envoy-types 0.7.3

Collection of protobuf types and other assets to work with the Envoy Proxy through Rust gRPC services.
Documentation
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
// This file is @generated by prost-build.
/// A matcher, which may traverse a matching tree in order to result in a match action.
/// During matching, the tree will be traversed until a match is found, or if no match
/// is found the action specified by the most specific on_no_match will be evaluated.
/// As an on_no_match might result in another matching tree being evaluated, this process
/// might repeat several times until the final OnMatch (or no match) is decided.
///
/// .. note::
/// Please use the syntactically equivalent :ref:`matching API <envoy_v3_api_msg_.xds.type.matcher.v3.Matcher>`
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Matcher {
    /// Optional `OnMatch` to use if the matcher failed.
    /// If specified, the `OnMatch` is used, and the matcher is considered
    /// to have matched.
    /// If not specified, the matcher is considered not to have matched.
    #[prost(message, optional, boxed, tag = "3")]
    pub on_no_match: ::core::option::Option<
        ::prost::alloc::boxed::Box<matcher::OnMatch>,
    >,
    #[prost(oneof = "matcher::MatcherType", tags = "1, 2")]
    pub matcher_type: ::core::option::Option<matcher::MatcherType>,
}
/// Nested message and enum types in `Matcher`.
pub mod matcher {
    /// What to do if a match is successful.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct OnMatch {
        /// If true, the action will be taken but the caller will behave as if no
        /// match was found. This applies both to actions directly encoded in the
        /// action field and to actions returned from a nested matcher tree in the
        /// matcher field. A subsequent matcher on_no_match action will be used
        /// instead.
        ///
        /// This field is not supported in all contexts in which the matcher API is
        /// used. If this field is set in a context in which it's not supported,
        /// the resource will be rejected.
        #[prost(bool, tag = "3")]
        pub keep_matching: bool,
        #[prost(oneof = "on_match::OnMatch", tags = "1, 2")]
        pub on_match: ::core::option::Option<on_match::OnMatch>,
    }
    /// Nested message and enum types in `OnMatch`.
    pub mod on_match {
        #[derive(Clone, PartialEq, ::prost::Oneof)]
        pub enum OnMatch {
            /// Nested matcher to evaluate.
            /// If the nested matcher does not match and does not specify
            /// on_no_match, then this matcher is considered not to have
            /// matched, even if a predicate at this level or above returned
            /// true.
            #[prost(message, tag = "1")]
            Matcher(::prost::alloc::boxed::Box<super::super::Matcher>),
            /// Protocol-specific action to take.
            #[prost(message, tag = "2")]
            Action(super::super::super::super::super::core::v3::TypedExtensionConfig),
        }
    }
    impl ::prost::Name for OnMatch {
        const NAME: &'static str = "OnMatch";
        const PACKAGE: &'static str = "envoy.config.common.matcher.v3";
        fn full_name() -> ::prost::alloc::string::String {
            "envoy.config.common.matcher.v3.Matcher.OnMatch".into()
        }
        fn type_url() -> ::prost::alloc::string::String {
            "type.googleapis.com/envoy.config.common.matcher.v3.Matcher.OnMatch".into()
        }
    }
    /// A linear list of field matchers.
    /// The field matchers are evaluated in order, and the first match
    /// wins.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct MatcherList {
        /// A list of matchers. First match wins.
        #[prost(message, repeated, tag = "1")]
        pub matchers: ::prost::alloc::vec::Vec<matcher_list::FieldMatcher>,
    }
    /// Nested message and enum types in `MatcherList`.
    pub mod matcher_list {
        /// Predicate to determine if a match is successful.
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct Predicate {
            #[prost(oneof = "predicate::MatchType", tags = "1, 2, 3, 4")]
            pub match_type: ::core::option::Option<predicate::MatchType>,
        }
        /// Nested message and enum types in `Predicate`.
        pub mod predicate {
            /// Predicate for a single input field.
            #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
            pub struct SinglePredicate {
                /// Protocol-specific specification of input field to match on.
                /// \[\#extension-category: envoy.matching.common_inputs\]
                #[prost(message, optional, tag = "1")]
                pub input: ::core::option::Option<
                    super::super::super::super::super::super::core::v3::TypedExtensionConfig,
                >,
                #[prost(oneof = "single_predicate::Matcher", tags = "2, 3")]
                pub matcher: ::core::option::Option<single_predicate::Matcher>,
            }
            /// Nested message and enum types in `SinglePredicate`.
            pub mod single_predicate {
                #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
                pub enum Matcher {
                    /// Built-in string matcher.
                    #[prost(message, tag = "2")]
                    ValueMatch(
                        super::super::super::super::super::super::super::super::r#type::matcher::v3::StringMatcher,
                    ),
                    /// Extension for custom matching logic.
                    /// \[\#extension-category: envoy.matching.input_matchers\]
                    #[prost(message, tag = "3")]
                    CustomMatch(
                        super::super::super::super::super::super::super::core::v3::TypedExtensionConfig,
                    ),
                }
            }
            impl ::prost::Name for SinglePredicate {
                const NAME: &'static str = "SinglePredicate";
                const PACKAGE: &'static str = "envoy.config.common.matcher.v3";
                fn full_name() -> ::prost::alloc::string::String {
                    "envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate"
                        .into()
                }
                fn type_url() -> ::prost::alloc::string::String {
                    "type.googleapis.com/envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate"
                        .into()
                }
            }
            /// A list of two or more matchers. Used to allow using a list within a oneof.
            #[derive(Clone, PartialEq, ::prost::Message)]
            pub struct PredicateList {
                #[prost(message, repeated, tag = "1")]
                pub predicate: ::prost::alloc::vec::Vec<super::Predicate>,
            }
            impl ::prost::Name for PredicateList {
                const NAME: &'static str = "PredicateList";
                const PACKAGE: &'static str = "envoy.config.common.matcher.v3";
                fn full_name() -> ::prost::alloc::string::String {
                    "envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.PredicateList"
                        .into()
                }
                fn type_url() -> ::prost::alloc::string::String {
                    "type.googleapis.com/envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.PredicateList"
                        .into()
                }
            }
            #[derive(Clone, PartialEq, ::prost::Oneof)]
            pub enum MatchType {
                /// A single predicate to evaluate.
                #[prost(message, tag = "1")]
                SinglePredicate(SinglePredicate),
                /// A list of predicates to be OR-ed together.
                #[prost(message, tag = "2")]
                OrMatcher(PredicateList),
                /// A list of predicates to be AND-ed together.
                #[prost(message, tag = "3")]
                AndMatcher(PredicateList),
                /// The inverse of a predicate
                #[prost(message, tag = "4")]
                NotMatcher(::prost::alloc::boxed::Box<super::Predicate>),
            }
        }
        impl ::prost::Name for Predicate {
            const NAME: &'static str = "Predicate";
            const PACKAGE: &'static str = "envoy.config.common.matcher.v3";
            fn full_name() -> ::prost::alloc::string::String {
                "envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate".into()
            }
            fn type_url() -> ::prost::alloc::string::String {
                "type.googleapis.com/envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate"
                    .into()
            }
        }
        /// An individual matcher.
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct FieldMatcher {
            /// Determines if the match succeeds.
            #[prost(message, optional, tag = "1")]
            pub predicate: ::core::option::Option<Predicate>,
            /// What to do if the match succeeds.
            #[prost(message, optional, tag = "2")]
            pub on_match: ::core::option::Option<super::OnMatch>,
        }
        impl ::prost::Name for FieldMatcher {
            const NAME: &'static str = "FieldMatcher";
            const PACKAGE: &'static str = "envoy.config.common.matcher.v3";
            fn full_name() -> ::prost::alloc::string::String {
                "envoy.config.common.matcher.v3.Matcher.MatcherList.FieldMatcher".into()
            }
            fn type_url() -> ::prost::alloc::string::String {
                "type.googleapis.com/envoy.config.common.matcher.v3.Matcher.MatcherList.FieldMatcher"
                    .into()
            }
        }
    }
    impl ::prost::Name for MatcherList {
        const NAME: &'static str = "MatcherList";
        const PACKAGE: &'static str = "envoy.config.common.matcher.v3";
        fn full_name() -> ::prost::alloc::string::String {
            "envoy.config.common.matcher.v3.Matcher.MatcherList".into()
        }
        fn type_url() -> ::prost::alloc::string::String {
            "type.googleapis.com/envoy.config.common.matcher.v3.Matcher.MatcherList"
                .into()
        }
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct MatcherTree {
        /// Protocol-specific specification of input field to match on.
        #[prost(message, optional, tag = "1")]
        pub input: ::core::option::Option<
            super::super::super::super::core::v3::TypedExtensionConfig,
        >,
        /// Exact or prefix match maps in which to look up the input value.
        /// If the lookup succeeds, the match is considered successful, and
        /// the corresponding OnMatch is used.
        #[prost(oneof = "matcher_tree::TreeType", tags = "2, 3, 4")]
        pub tree_type: ::core::option::Option<matcher_tree::TreeType>,
    }
    /// Nested message and enum types in `MatcherTree`.
    pub mod matcher_tree {
        /// A map of configured matchers. Used to allow using a map within a oneof.
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct MatchMap {
            #[prost(map = "string, message", tag = "1")]
            pub map: ::std::collections::HashMap<
                ::prost::alloc::string::String,
                super::OnMatch,
            >,
        }
        impl ::prost::Name for MatchMap {
            const NAME: &'static str = "MatchMap";
            const PACKAGE: &'static str = "envoy.config.common.matcher.v3";
            fn full_name() -> ::prost::alloc::string::String {
                "envoy.config.common.matcher.v3.Matcher.MatcherTree.MatchMap".into()
            }
            fn type_url() -> ::prost::alloc::string::String {
                "type.googleapis.com/envoy.config.common.matcher.v3.Matcher.MatcherTree.MatchMap"
                    .into()
            }
        }
        /// Exact or prefix match maps in which to look up the input value.
        /// If the lookup succeeds, the match is considered successful, and
        /// the corresponding OnMatch is used.
        #[derive(Clone, PartialEq, ::prost::Oneof)]
        pub enum TreeType {
            #[prost(message, tag = "2")]
            ExactMatchMap(MatchMap),
            /// Longest matching prefix wins.
            #[prost(message, tag = "3")]
            PrefixMatchMap(MatchMap),
            /// Extension for custom matching logic.
            #[prost(message, tag = "4")]
            CustomMatch(
                super::super::super::super::super::core::v3::TypedExtensionConfig,
            ),
        }
    }
    impl ::prost::Name for MatcherTree {
        const NAME: &'static str = "MatcherTree";
        const PACKAGE: &'static str = "envoy.config.common.matcher.v3";
        fn full_name() -> ::prost::alloc::string::String {
            "envoy.config.common.matcher.v3.Matcher.MatcherTree".into()
        }
        fn type_url() -> ::prost::alloc::string::String {
            "type.googleapis.com/envoy.config.common.matcher.v3.Matcher.MatcherTree"
                .into()
        }
    }
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum MatcherType {
        /// A linear list of matchers to evaluate.
        #[prost(message, tag = "1")]
        MatcherList(MatcherList),
        /// A match tree to evaluate.
        #[prost(message, tag = "2")]
        MatcherTree(MatcherTree),
    }
}
impl ::prost::Name for Matcher {
    const NAME: &'static str = "Matcher";
    const PACKAGE: &'static str = "envoy.config.common.matcher.v3";
    fn full_name() -> ::prost::alloc::string::String {
        "envoy.config.common.matcher.v3.Matcher".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "type.googleapis.com/envoy.config.common.matcher.v3.Matcher".into()
    }
}
/// Match configuration. This is a recursive structure which allows complex nested match
/// configurations to be built using various logical operators.
/// \[\#next-free-field: 11\]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MatchPredicate {
    #[prost(oneof = "match_predicate::Rule", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10")]
    pub rule: ::core::option::Option<match_predicate::Rule>,
}
/// Nested message and enum types in `MatchPredicate`.
pub mod match_predicate {
    /// A set of match configurations used for logical operations.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct MatchSet {
        /// The list of rules that make up the set.
        #[prost(message, repeated, tag = "1")]
        pub rules: ::prost::alloc::vec::Vec<super::MatchPredicate>,
    }
    impl ::prost::Name for MatchSet {
        const NAME: &'static str = "MatchSet";
        const PACKAGE: &'static str = "envoy.config.common.matcher.v3";
        fn full_name() -> ::prost::alloc::string::String {
            "envoy.config.common.matcher.v3.MatchPredicate.MatchSet".into()
        }
        fn type_url() -> ::prost::alloc::string::String {
            "type.googleapis.com/envoy.config.common.matcher.v3.MatchPredicate.MatchSet"
                .into()
        }
    }
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Rule {
        /// A set that describes a logical OR. If any member of the set matches, the match configuration
        /// matches.
        #[prost(message, tag = "1")]
        OrMatch(MatchSet),
        /// A set that describes a logical AND. If all members of the set match, the match configuration
        /// matches.
        #[prost(message, tag = "2")]
        AndMatch(MatchSet),
        /// A negation match. The match configuration will match if the negated match condition matches.
        #[prost(message, tag = "3")]
        NotMatch(::prost::alloc::boxed::Box<super::MatchPredicate>),
        /// The match configuration will always match.
        #[prost(bool, tag = "4")]
        AnyMatch(bool),
        /// HTTP request headers match configuration.
        #[prost(message, tag = "5")]
        HttpRequestHeadersMatch(super::HttpHeadersMatch),
        /// HTTP request trailers match configuration.
        #[prost(message, tag = "6")]
        HttpRequestTrailersMatch(super::HttpHeadersMatch),
        /// HTTP response headers match configuration.
        #[prost(message, tag = "7")]
        HttpResponseHeadersMatch(super::HttpHeadersMatch),
        /// HTTP response trailers match configuration.
        #[prost(message, tag = "8")]
        HttpResponseTrailersMatch(super::HttpHeadersMatch),
        /// HTTP request generic body match configuration.
        #[prost(message, tag = "9")]
        HttpRequestGenericBodyMatch(super::HttpGenericBodyMatch),
        /// HTTP response generic body match configuration.
        #[prost(message, tag = "10")]
        HttpResponseGenericBodyMatch(super::HttpGenericBodyMatch),
    }
}
impl ::prost::Name for MatchPredicate {
    const NAME: &'static str = "MatchPredicate";
    const PACKAGE: &'static str = "envoy.config.common.matcher.v3";
    fn full_name() -> ::prost::alloc::string::String {
        "envoy.config.common.matcher.v3.MatchPredicate".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "type.googleapis.com/envoy.config.common.matcher.v3.MatchPredicate".into()
    }
}
/// HTTP headers match configuration.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HttpHeadersMatch {
    /// HTTP headers to match.
    #[prost(message, repeated, tag = "1")]
    pub headers: ::prost::alloc::vec::Vec<super::super::super::route::v3::HeaderMatcher>,
}
impl ::prost::Name for HttpHeadersMatch {
    const NAME: &'static str = "HttpHeadersMatch";
    const PACKAGE: &'static str = "envoy.config.common.matcher.v3";
    fn full_name() -> ::prost::alloc::string::String {
        "envoy.config.common.matcher.v3.HttpHeadersMatch".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "type.googleapis.com/envoy.config.common.matcher.v3.HttpHeadersMatch".into()
    }
}
/// HTTP generic body match configuration.
/// List of text strings and hex strings to be located in HTTP body.
/// All specified strings must be found in the HTTP body for positive match.
/// The search may be limited to specified number of bytes from the body start.
///
/// .. attention::
///
/// Searching for patterns in HTTP body is potentially CPU-intensive. For each specified pattern, HTTP body is scanned byte by byte to find a match.
/// If multiple patterns are specified, the process is repeated for each pattern. If location of a pattern is known, `bytes_limit` should be specified
/// to scan only part of the HTTP body.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HttpGenericBodyMatch {
    /// Limits search to specified number of bytes - default zero (no limit - match entire captured buffer).
    #[prost(uint32, tag = "1")]
    pub bytes_limit: u32,
    /// List of patterns to match.
    #[prost(message, repeated, tag = "2")]
    pub patterns: ::prost::alloc::vec::Vec<http_generic_body_match::GenericTextMatch>,
}
/// Nested message and enum types in `HttpGenericBodyMatch`.
pub mod http_generic_body_match {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct GenericTextMatch {
        #[prost(oneof = "generic_text_match::Rule", tags = "1, 2")]
        pub rule: ::core::option::Option<generic_text_match::Rule>,
    }
    /// Nested message and enum types in `GenericTextMatch`.
    pub mod generic_text_match {
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
        pub enum Rule {
            /// Text string to be located in HTTP body.
            #[prost(string, tag = "1")]
            StringMatch(::prost::alloc::string::String),
            /// Sequence of bytes to be located in HTTP body.
            #[prost(bytes, tag = "2")]
            BinaryMatch(::prost::alloc::vec::Vec<u8>),
        }
    }
    impl ::prost::Name for GenericTextMatch {
        const NAME: &'static str = "GenericTextMatch";
        const PACKAGE: &'static str = "envoy.config.common.matcher.v3";
        fn full_name() -> ::prost::alloc::string::String {
            "envoy.config.common.matcher.v3.HttpGenericBodyMatch.GenericTextMatch".into()
        }
        fn type_url() -> ::prost::alloc::string::String {
            "type.googleapis.com/envoy.config.common.matcher.v3.HttpGenericBodyMatch.GenericTextMatch"
                .into()
        }
    }
}
impl ::prost::Name for HttpGenericBodyMatch {
    const NAME: &'static str = "HttpGenericBodyMatch";
    const PACKAGE: &'static str = "envoy.config.common.matcher.v3";
    fn full_name() -> ::prost::alloc::string::String {
        "envoy.config.common.matcher.v3.HttpGenericBodyMatch".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "type.googleapis.com/envoy.config.common.matcher.v3.HttpGenericBodyMatch".into()
    }
}