xds_api/generated/
envoy.config.accesslog.v3.rs

1// This file is @generated by prost-build.
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct AccessLog {
4    /// The name of the access log extension configuration.
5    #[prost(string, tag = "1")]
6    pub name: ::prost::alloc::string::String,
7    /// Filter which is used to determine if the access log needs to be written.
8    #[prost(message, optional, tag = "2")]
9    pub filter: ::core::option::Option<AccessLogFilter>,
10    /// Custom configuration that must be set according to the access logger extension being instantiated.
11    /// \[#extension-category: envoy.access_loggers\]
12    #[prost(oneof = "access_log::ConfigType", tags = "4")]
13    pub config_type: ::core::option::Option<access_log::ConfigType>,
14}
15/// Nested message and enum types in `AccessLog`.
16pub mod access_log {
17    /// Custom configuration that must be set according to the access logger extension being instantiated.
18    /// \[#extension-category: envoy.access_loggers\]
19    #[derive(Clone, PartialEq, ::prost::Oneof)]
20    pub enum ConfigType {
21        #[prost(message, tag = "4")]
22        TypedConfig(super::super::super::super::super::google::protobuf::Any),
23    }
24}
25impl ::prost::Name for AccessLog {
26    const NAME: &'static str = "AccessLog";
27    const PACKAGE: &'static str = "envoy.config.accesslog.v3";
28    fn full_name() -> ::prost::alloc::string::String {
29        "envoy.config.accesslog.v3.AccessLog".into()
30    }
31    fn type_url() -> ::prost::alloc::string::String {
32        "type.googleapis.com/envoy.config.accesslog.v3.AccessLog".into()
33    }
34}
35/// \[#next-free-field: 14\]
36#[derive(Clone, PartialEq, ::prost::Message)]
37pub struct AccessLogFilter {
38    #[prost(
39        oneof = "access_log_filter::FilterSpecifier",
40        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13"
41    )]
42    pub filter_specifier: ::core::option::Option<access_log_filter::FilterSpecifier>,
43}
44/// Nested message and enum types in `AccessLogFilter`.
45pub mod access_log_filter {
46    #[derive(Clone, PartialEq, ::prost::Oneof)]
47    pub enum FilterSpecifier {
48        /// Status code filter.
49        #[prost(message, tag = "1")]
50        StatusCodeFilter(super::StatusCodeFilter),
51        /// Duration filter.
52        #[prost(message, tag = "2")]
53        DurationFilter(super::DurationFilter),
54        /// Not health check filter.
55        #[prost(message, tag = "3")]
56        NotHealthCheckFilter(super::NotHealthCheckFilter),
57        /// Traceable filter.
58        #[prost(message, tag = "4")]
59        TraceableFilter(super::TraceableFilter),
60        /// Runtime filter.
61        #[prost(message, tag = "5")]
62        RuntimeFilter(super::RuntimeFilter),
63        /// And filter.
64        #[prost(message, tag = "6")]
65        AndFilter(super::AndFilter),
66        /// Or filter.
67        #[prost(message, tag = "7")]
68        OrFilter(super::OrFilter),
69        /// Header filter.
70        #[prost(message, tag = "8")]
71        HeaderFilter(super::HeaderFilter),
72        /// Response flag filter.
73        #[prost(message, tag = "9")]
74        ResponseFlagFilter(super::ResponseFlagFilter),
75        /// gRPC status filter.
76        #[prost(message, tag = "10")]
77        GrpcStatusFilter(super::GrpcStatusFilter),
78        /// Extension filter.
79        /// \[#extension-category: envoy.access_loggers.extension_filters\]
80        #[prost(message, tag = "11")]
81        ExtensionFilter(super::ExtensionFilter),
82        /// Metadata Filter
83        #[prost(message, tag = "12")]
84        MetadataFilter(super::MetadataFilter),
85        /// Log Type Filter
86        #[prost(message, tag = "13")]
87        LogTypeFilter(super::LogTypeFilter),
88    }
89}
90impl ::prost::Name for AccessLogFilter {
91    const NAME: &'static str = "AccessLogFilter";
92    const PACKAGE: &'static str = "envoy.config.accesslog.v3";
93    fn full_name() -> ::prost::alloc::string::String {
94        "envoy.config.accesslog.v3.AccessLogFilter".into()
95    }
96    fn type_url() -> ::prost::alloc::string::String {
97        "type.googleapis.com/envoy.config.accesslog.v3.AccessLogFilter".into()
98    }
99}
100/// Filter on an integer comparison.
101#[derive(Clone, PartialEq, ::prost::Message)]
102pub struct ComparisonFilter {
103    /// Comparison operator.
104    #[prost(enumeration = "comparison_filter::Op", tag = "1")]
105    pub op: i32,
106    /// Value to compare against.
107    #[prost(message, optional, tag = "2")]
108    pub value: ::core::option::Option<super::super::core::v3::RuntimeUInt32>,
109}
110/// Nested message and enum types in `ComparisonFilter`.
111pub mod comparison_filter {
112    #[derive(
113        Clone,
114        Copy,
115        Debug,
116        PartialEq,
117        Eq,
118        Hash,
119        PartialOrd,
120        Ord,
121        ::prost::Enumeration
122    )]
123    #[repr(i32)]
124    pub enum Op {
125        /// =
126        Eq = 0,
127        /// >=
128        Ge = 1,
129        /// <=
130        Le = 2,
131    }
132    impl Op {
133        /// String value of the enum field names used in the ProtoBuf definition.
134        ///
135        /// The values are not transformed in any way and thus are considered stable
136        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
137        pub fn as_str_name(&self) -> &'static str {
138            match self {
139                Self::Eq => "EQ",
140                Self::Ge => "GE",
141                Self::Le => "LE",
142            }
143        }
144        /// Creates an enum from field names used in the ProtoBuf definition.
145        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
146            match value {
147                "EQ" => Some(Self::Eq),
148                "GE" => Some(Self::Ge),
149                "LE" => Some(Self::Le),
150                _ => None,
151            }
152        }
153    }
154}
155impl ::prost::Name for ComparisonFilter {
156    const NAME: &'static str = "ComparisonFilter";
157    const PACKAGE: &'static str = "envoy.config.accesslog.v3";
158    fn full_name() -> ::prost::alloc::string::String {
159        "envoy.config.accesslog.v3.ComparisonFilter".into()
160    }
161    fn type_url() -> ::prost::alloc::string::String {
162        "type.googleapis.com/envoy.config.accesslog.v3.ComparisonFilter".into()
163    }
164}
165/// Filters on HTTP response/status code.
166#[derive(Clone, PartialEq, ::prost::Message)]
167pub struct StatusCodeFilter {
168    /// Comparison.
169    #[prost(message, optional, tag = "1")]
170    pub comparison: ::core::option::Option<ComparisonFilter>,
171}
172impl ::prost::Name for StatusCodeFilter {
173    const NAME: &'static str = "StatusCodeFilter";
174    const PACKAGE: &'static str = "envoy.config.accesslog.v3";
175    fn full_name() -> ::prost::alloc::string::String {
176        "envoy.config.accesslog.v3.StatusCodeFilter".into()
177    }
178    fn type_url() -> ::prost::alloc::string::String {
179        "type.googleapis.com/envoy.config.accesslog.v3.StatusCodeFilter".into()
180    }
181}
182/// Filters based on the duration of the request or stream, in milliseconds.
183/// For end of stream access logs, the total duration of the stream will be used.
184/// For :ref:`periodic access logs<arch_overview_access_log_periodic>`,
185/// the duration of the stream at the time of log recording will be used.
186#[derive(Clone, PartialEq, ::prost::Message)]
187pub struct DurationFilter {
188    /// Comparison.
189    #[prost(message, optional, tag = "1")]
190    pub comparison: ::core::option::Option<ComparisonFilter>,
191}
192impl ::prost::Name for DurationFilter {
193    const NAME: &'static str = "DurationFilter";
194    const PACKAGE: &'static str = "envoy.config.accesslog.v3";
195    fn full_name() -> ::prost::alloc::string::String {
196        "envoy.config.accesslog.v3.DurationFilter".into()
197    }
198    fn type_url() -> ::prost::alloc::string::String {
199        "type.googleapis.com/envoy.config.accesslog.v3.DurationFilter".into()
200    }
201}
202/// Filters for requests that are not health check requests. A health check
203/// request is marked by the health check filter.
204#[derive(Clone, Copy, PartialEq, ::prost::Message)]
205pub struct NotHealthCheckFilter {}
206impl ::prost::Name for NotHealthCheckFilter {
207    const NAME: &'static str = "NotHealthCheckFilter";
208    const PACKAGE: &'static str = "envoy.config.accesslog.v3";
209    fn full_name() -> ::prost::alloc::string::String {
210        "envoy.config.accesslog.v3.NotHealthCheckFilter".into()
211    }
212    fn type_url() -> ::prost::alloc::string::String {
213        "type.googleapis.com/envoy.config.accesslog.v3.NotHealthCheckFilter".into()
214    }
215}
216/// Filters for requests that are traceable. See the tracing overview for more
217/// information on how a request becomes traceable.
218#[derive(Clone, Copy, PartialEq, ::prost::Message)]
219pub struct TraceableFilter {}
220impl ::prost::Name for TraceableFilter {
221    const NAME: &'static str = "TraceableFilter";
222    const PACKAGE: &'static str = "envoy.config.accesslog.v3";
223    fn full_name() -> ::prost::alloc::string::String {
224        "envoy.config.accesslog.v3.TraceableFilter".into()
225    }
226    fn type_url() -> ::prost::alloc::string::String {
227        "type.googleapis.com/envoy.config.accesslog.v3.TraceableFilter".into()
228    }
229}
230/// Filters for random sampling of requests.
231#[derive(Clone, PartialEq, ::prost::Message)]
232pub struct RuntimeFilter {
233    /// Runtime key to get an optional overridden numerator for use in the
234    /// ``percent_sampled`` field. If found in runtime, this value will replace the
235    /// default numerator.
236    #[prost(string, tag = "1")]
237    pub runtime_key: ::prost::alloc::string::String,
238    /// The default sampling percentage. If not specified, defaults to 0% with
239    /// denominator of 100.
240    #[prost(message, optional, tag = "2")]
241    pub percent_sampled: ::core::option::Option<
242        super::super::super::r#type::v3::FractionalPercent,
243    >,
244    /// By default, sampling pivots on the header
245    /// :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` being
246    /// present. If :ref:`x-request-id<config_http_conn_man_headers_x-request-id>`
247    /// is present, the filter will consistently sample across multiple hosts based
248    /// on the runtime key value and the value extracted from
249    /// :ref:`x-request-id<config_http_conn_man_headers_x-request-id>`. If it is
250    /// missing, or ``use_independent_randomness`` is set to true, the filter will
251    /// randomly sample based on the runtime key value alone.
252    /// ``use_independent_randomness`` can be used for logging kill switches within
253    /// complex nested :ref:`AndFilter
254    /// <envoy_v3_api_msg_config.accesslog.v3.AndFilter>` and :ref:`OrFilter
255    /// <envoy_v3_api_msg_config.accesslog.v3.OrFilter>` blocks that are easier to
256    /// reason about from a probability perspective (i.e., setting to true will
257    /// cause the filter to behave like an independent random variable when
258    /// composed within logical operator filters).
259    #[prost(bool, tag = "3")]
260    pub use_independent_randomness: bool,
261}
262impl ::prost::Name for RuntimeFilter {
263    const NAME: &'static str = "RuntimeFilter";
264    const PACKAGE: &'static str = "envoy.config.accesslog.v3";
265    fn full_name() -> ::prost::alloc::string::String {
266        "envoy.config.accesslog.v3.RuntimeFilter".into()
267    }
268    fn type_url() -> ::prost::alloc::string::String {
269        "type.googleapis.com/envoy.config.accesslog.v3.RuntimeFilter".into()
270    }
271}
272/// Performs a logical “and” operation on the result of each filter in filters.
273/// Filters are evaluated sequentially and if one of them returns false, the
274/// filter returns false immediately.
275#[derive(Clone, PartialEq, ::prost::Message)]
276pub struct AndFilter {
277    #[prost(message, repeated, tag = "1")]
278    pub filters: ::prost::alloc::vec::Vec<AccessLogFilter>,
279}
280impl ::prost::Name for AndFilter {
281    const NAME: &'static str = "AndFilter";
282    const PACKAGE: &'static str = "envoy.config.accesslog.v3";
283    fn full_name() -> ::prost::alloc::string::String {
284        "envoy.config.accesslog.v3.AndFilter".into()
285    }
286    fn type_url() -> ::prost::alloc::string::String {
287        "type.googleapis.com/envoy.config.accesslog.v3.AndFilter".into()
288    }
289}
290/// Performs a logical “or” operation on the result of each individual filter.
291/// Filters are evaluated sequentially and if one of them returns true, the
292/// filter returns true immediately.
293#[derive(Clone, PartialEq, ::prost::Message)]
294pub struct OrFilter {
295    #[prost(message, repeated, tag = "2")]
296    pub filters: ::prost::alloc::vec::Vec<AccessLogFilter>,
297}
298impl ::prost::Name for OrFilter {
299    const NAME: &'static str = "OrFilter";
300    const PACKAGE: &'static str = "envoy.config.accesslog.v3";
301    fn full_name() -> ::prost::alloc::string::String {
302        "envoy.config.accesslog.v3.OrFilter".into()
303    }
304    fn type_url() -> ::prost::alloc::string::String {
305        "type.googleapis.com/envoy.config.accesslog.v3.OrFilter".into()
306    }
307}
308/// Filters requests based on the presence or value of a request header.
309#[derive(Clone, PartialEq, ::prost::Message)]
310pub struct HeaderFilter {
311    /// Only requests with a header which matches the specified HeaderMatcher will
312    /// pass the filter check.
313    #[prost(message, optional, tag = "1")]
314    pub header: ::core::option::Option<super::super::route::v3::HeaderMatcher>,
315}
316impl ::prost::Name for HeaderFilter {
317    const NAME: &'static str = "HeaderFilter";
318    const PACKAGE: &'static str = "envoy.config.accesslog.v3";
319    fn full_name() -> ::prost::alloc::string::String {
320        "envoy.config.accesslog.v3.HeaderFilter".into()
321    }
322    fn type_url() -> ::prost::alloc::string::String {
323        "type.googleapis.com/envoy.config.accesslog.v3.HeaderFilter".into()
324    }
325}
326/// Filters requests that received responses with an Envoy response flag set.
327/// A list of the response flags can be found
328/// in the access log formatter
329/// :ref:`documentation<config_access_log_format_response_flags>`.
330#[derive(Clone, PartialEq, ::prost::Message)]
331pub struct ResponseFlagFilter {
332    /// Only responses with the any of the flags listed in this field will be
333    /// logged. This field is optional. If it is not specified, then any response
334    /// flag will pass the filter check.
335    #[prost(string, repeated, tag = "1")]
336    pub flags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
337}
338impl ::prost::Name for ResponseFlagFilter {
339    const NAME: &'static str = "ResponseFlagFilter";
340    const PACKAGE: &'static str = "envoy.config.accesslog.v3";
341    fn full_name() -> ::prost::alloc::string::String {
342        "envoy.config.accesslog.v3.ResponseFlagFilter".into()
343    }
344    fn type_url() -> ::prost::alloc::string::String {
345        "type.googleapis.com/envoy.config.accesslog.v3.ResponseFlagFilter".into()
346    }
347}
348/// Filters gRPC requests based on their response status. If a gRPC status is not
349/// provided, the filter will infer the status from the HTTP status code.
350#[derive(Clone, PartialEq, ::prost::Message)]
351pub struct GrpcStatusFilter {
352    /// Logs only responses that have any one of the gRPC statuses in this field.
353    #[prost(
354        enumeration = "grpc_status_filter::Status",
355        repeated,
356        packed = "false",
357        tag = "1"
358    )]
359    pub statuses: ::prost::alloc::vec::Vec<i32>,
360    /// If included and set to true, the filter will instead block all responses
361    /// with a gRPC status or inferred gRPC status enumerated in statuses, and
362    /// allow all other responses.
363    #[prost(bool, tag = "2")]
364    pub exclude: bool,
365}
366/// Nested message and enum types in `GrpcStatusFilter`.
367pub mod grpc_status_filter {
368    #[derive(
369        Clone,
370        Copy,
371        Debug,
372        PartialEq,
373        Eq,
374        Hash,
375        PartialOrd,
376        Ord,
377        ::prost::Enumeration
378    )]
379    #[repr(i32)]
380    pub enum Status {
381        Ok = 0,
382        Canceled = 1,
383        Unknown = 2,
384        InvalidArgument = 3,
385        DeadlineExceeded = 4,
386        NotFound = 5,
387        AlreadyExists = 6,
388        PermissionDenied = 7,
389        ResourceExhausted = 8,
390        FailedPrecondition = 9,
391        Aborted = 10,
392        OutOfRange = 11,
393        Unimplemented = 12,
394        Internal = 13,
395        Unavailable = 14,
396        DataLoss = 15,
397        Unauthenticated = 16,
398    }
399    impl Status {
400        /// String value of the enum field names used in the ProtoBuf definition.
401        ///
402        /// The values are not transformed in any way and thus are considered stable
403        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
404        pub fn as_str_name(&self) -> &'static str {
405            match self {
406                Self::Ok => "OK",
407                Self::Canceled => "CANCELED",
408                Self::Unknown => "UNKNOWN",
409                Self::InvalidArgument => "INVALID_ARGUMENT",
410                Self::DeadlineExceeded => "DEADLINE_EXCEEDED",
411                Self::NotFound => "NOT_FOUND",
412                Self::AlreadyExists => "ALREADY_EXISTS",
413                Self::PermissionDenied => "PERMISSION_DENIED",
414                Self::ResourceExhausted => "RESOURCE_EXHAUSTED",
415                Self::FailedPrecondition => "FAILED_PRECONDITION",
416                Self::Aborted => "ABORTED",
417                Self::OutOfRange => "OUT_OF_RANGE",
418                Self::Unimplemented => "UNIMPLEMENTED",
419                Self::Internal => "INTERNAL",
420                Self::Unavailable => "UNAVAILABLE",
421                Self::DataLoss => "DATA_LOSS",
422                Self::Unauthenticated => "UNAUTHENTICATED",
423            }
424        }
425        /// Creates an enum from field names used in the ProtoBuf definition.
426        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
427            match value {
428                "OK" => Some(Self::Ok),
429                "CANCELED" => Some(Self::Canceled),
430                "UNKNOWN" => Some(Self::Unknown),
431                "INVALID_ARGUMENT" => Some(Self::InvalidArgument),
432                "DEADLINE_EXCEEDED" => Some(Self::DeadlineExceeded),
433                "NOT_FOUND" => Some(Self::NotFound),
434                "ALREADY_EXISTS" => Some(Self::AlreadyExists),
435                "PERMISSION_DENIED" => Some(Self::PermissionDenied),
436                "RESOURCE_EXHAUSTED" => Some(Self::ResourceExhausted),
437                "FAILED_PRECONDITION" => Some(Self::FailedPrecondition),
438                "ABORTED" => Some(Self::Aborted),
439                "OUT_OF_RANGE" => Some(Self::OutOfRange),
440                "UNIMPLEMENTED" => Some(Self::Unimplemented),
441                "INTERNAL" => Some(Self::Internal),
442                "UNAVAILABLE" => Some(Self::Unavailable),
443                "DATA_LOSS" => Some(Self::DataLoss),
444                "UNAUTHENTICATED" => Some(Self::Unauthenticated),
445                _ => None,
446            }
447        }
448    }
449}
450impl ::prost::Name for GrpcStatusFilter {
451    const NAME: &'static str = "GrpcStatusFilter";
452    const PACKAGE: &'static str = "envoy.config.accesslog.v3";
453    fn full_name() -> ::prost::alloc::string::String {
454        "envoy.config.accesslog.v3.GrpcStatusFilter".into()
455    }
456    fn type_url() -> ::prost::alloc::string::String {
457        "type.googleapis.com/envoy.config.accesslog.v3.GrpcStatusFilter".into()
458    }
459}
460/// Filters based on matching dynamic metadata.
461/// If the matcher path and key correspond to an existing key in dynamic
462/// metadata, the request is logged only if the matcher value is equal to the
463/// metadata value. If the matcher path and key *do not* correspond to an
464/// existing key in dynamic metadata, the request is logged only if
465/// match_if_key_not_found is "true" or unset.
466#[derive(Clone, PartialEq, ::prost::Message)]
467pub struct MetadataFilter {
468    /// Matcher to check metadata for specified value. For example, to match on the
469    /// access_log_hint metadata, set the filter to "envoy.common" and the path to
470    /// "access_log_hint", and the value to "true".
471    #[prost(message, optional, tag = "1")]
472    pub matcher: ::core::option::Option<
473        super::super::super::r#type::matcher::v3::MetadataMatcher,
474    >,
475    /// Default result if the key does not exist in dynamic metadata: if unset or
476    /// true, then log; if false, then don't log.
477    #[prost(message, optional, tag = "2")]
478    pub match_if_key_not_found: ::core::option::Option<
479        super::super::super::super::google::protobuf::BoolValue,
480    >,
481}
482impl ::prost::Name for MetadataFilter {
483    const NAME: &'static str = "MetadataFilter";
484    const PACKAGE: &'static str = "envoy.config.accesslog.v3";
485    fn full_name() -> ::prost::alloc::string::String {
486        "envoy.config.accesslog.v3.MetadataFilter".into()
487    }
488    fn type_url() -> ::prost::alloc::string::String {
489        "type.googleapis.com/envoy.config.accesslog.v3.MetadataFilter".into()
490    }
491}
492/// Filters based on access log type.
493#[derive(Clone, PartialEq, ::prost::Message)]
494pub struct LogTypeFilter {
495    /// Logs only records which their type is one of the types defined in this field.
496    #[prost(
497        enumeration = "super::super::super::data::accesslog::v3::AccessLogType",
498        repeated,
499        packed = "false",
500        tag = "1"
501    )]
502    pub types: ::prost::alloc::vec::Vec<i32>,
503    /// If this field is set to true, the filter will instead block all records
504    /// with a access log type in types field, and allow all other records.
505    #[prost(bool, tag = "2")]
506    pub exclude: bool,
507}
508impl ::prost::Name for LogTypeFilter {
509    const NAME: &'static str = "LogTypeFilter";
510    const PACKAGE: &'static str = "envoy.config.accesslog.v3";
511    fn full_name() -> ::prost::alloc::string::String {
512        "envoy.config.accesslog.v3.LogTypeFilter".into()
513    }
514    fn type_url() -> ::prost::alloc::string::String {
515        "type.googleapis.com/envoy.config.accesslog.v3.LogTypeFilter".into()
516    }
517}
518/// Extension filter is statically registered at runtime.
519#[derive(Clone, PartialEq, ::prost::Message)]
520pub struct ExtensionFilter {
521    /// The name of the filter implementation to instantiate. The name must
522    /// match a statically registered filter.
523    #[prost(string, tag = "1")]
524    pub name: ::prost::alloc::string::String,
525    /// Custom configuration that depends on the filter being instantiated.
526    #[prost(oneof = "extension_filter::ConfigType", tags = "3")]
527    pub config_type: ::core::option::Option<extension_filter::ConfigType>,
528}
529/// Nested message and enum types in `ExtensionFilter`.
530pub mod extension_filter {
531    /// Custom configuration that depends on the filter being instantiated.
532    #[derive(Clone, PartialEq, ::prost::Oneof)]
533    pub enum ConfigType {
534        #[prost(message, tag = "3")]
535        TypedConfig(super::super::super::super::super::google::protobuf::Any),
536    }
537}
538impl ::prost::Name for ExtensionFilter {
539    const NAME: &'static str = "ExtensionFilter";
540    const PACKAGE: &'static str = "envoy.config.accesslog.v3";
541    fn full_name() -> ::prost::alloc::string::String {
542        "envoy.config.accesslog.v3.ExtensionFilter".into()
543    }
544    fn type_url() -> ::prost::alloc::string::String {
545        "type.googleapis.com/envoy.config.accesslog.v3.ExtensionFilter".into()
546    }
547}