1#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct AccessLog {
4 #[prost(string, tag = "1")]
5 pub name: ::prost::alloc::string::String,
6 #[prost(message, optional, tag = "2")]
7 pub filter: ::core::option::Option<AccessLogFilter>,
8 #[prost(oneof = "access_log::ConfigType", tags = "4")]
9 pub config_type: ::core::option::Option<access_log::ConfigType>,
10}
11pub mod access_log {
13 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
14 pub enum ConfigType {
15 #[prost(message, tag = "4")]
16 TypedConfig(::prost_types::Any),
17 }
18}
19#[derive(Clone, PartialEq, ::prost::Message)]
20pub struct AccessLogFilter {
21 #[prost(
22 oneof = "access_log_filter::FilterSpecifier",
23 tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12"
24 )]
25 pub filter_specifier: ::core::option::Option<access_log_filter::FilterSpecifier>,
26}
27pub mod access_log_filter {
29 #[derive(Clone, PartialEq, ::prost::Oneof)]
30 pub enum FilterSpecifier {
31 #[prost(message, tag = "1")]
32 StatusCodeFilter(super::StatusCodeFilter),
33 #[prost(message, tag = "2")]
34 DurationFilter(super::DurationFilter),
35 #[prost(message, tag = "3")]
36 NotHealthCheckFilter(super::NotHealthCheckFilter),
37 #[prost(message, tag = "4")]
38 TraceableFilter(super::TraceableFilter),
39 #[prost(message, tag = "5")]
40 RuntimeFilter(super::RuntimeFilter),
41 #[prost(message, tag = "6")]
42 AndFilter(super::AndFilter),
43 #[prost(message, tag = "7")]
44 OrFilter(super::OrFilter),
45 #[prost(message, tag = "8")]
46 HeaderFilter(super::HeaderFilter),
47 #[prost(message, tag = "9")]
48 ResponseFlagFilter(super::ResponseFlagFilter),
49 #[prost(message, tag = "10")]
50 GrpcStatusFilter(super::GrpcStatusFilter),
51 #[prost(message, tag = "11")]
52 ExtensionFilter(super::ExtensionFilter),
53 #[prost(message, tag = "12")]
54 MetadataFilter(super::MetadataFilter),
55 }
56}
57#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
58pub struct ComparisonFilter {
59 #[prost(enumeration = "comparison_filter::Op", tag = "1")]
60 pub op: i32,
61 #[prost(message, optional, tag = "2")]
62 pub value: ::core::option::Option<super::super::core::v3::RuntimeUInt32>,
63}
64pub mod comparison_filter {
66 #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
67 #[repr(i32)]
68 pub enum Op {
69 Eq = 0,
70 Ge = 1,
71 Le = 2,
72 }
73 impl Op {
74 pub fn as_str_name(&self) -> &'static str {
79 match self {
80 Self::Eq => "EQ",
81 Self::Ge => "GE",
82 Self::Le => "LE",
83 }
84 }
85 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
87 match value {
88 "EQ" => Some(Self::Eq),
89 "GE" => Some(Self::Ge),
90 "LE" => Some(Self::Le),
91 _ => None,
92 }
93 }
94 }
95}
96#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
97pub struct StatusCodeFilter {
98 #[prost(message, optional, tag = "1")]
99 pub comparison: ::core::option::Option<ComparisonFilter>,
100}
101#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
102pub struct DurationFilter {
103 #[prost(message, optional, tag = "1")]
104 pub comparison: ::core::option::Option<ComparisonFilter>,
105}
106#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
107pub struct NotHealthCheckFilter {}
108#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
109pub struct TraceableFilter {}
110#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
111pub struct RuntimeFilter {
112 #[prost(string, tag = "1")]
113 pub runtime_key: ::prost::alloc::string::String,
114 #[prost(message, optional, tag = "2")]
115 pub percent_sampled: ::core::option::Option<super::super::super::kind::v3::FractionalPercent>,
116 #[prost(bool, tag = "3")]
117 pub use_independent_randomness: bool,
118}
119#[derive(Clone, PartialEq, ::prost::Message)]
120pub struct AndFilter {
121 #[prost(message, repeated, tag = "1")]
122 pub filters: ::prost::alloc::vec::Vec<AccessLogFilter>,
123}
124#[derive(Clone, PartialEq, ::prost::Message)]
125pub struct OrFilter {
126 #[prost(message, repeated, tag = "2")]
127 pub filters: ::prost::alloc::vec::Vec<AccessLogFilter>,
128}
129#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
130pub struct HeaderFilter {
131 #[prost(message, optional, tag = "1")]
132 pub header: ::core::option::Option<super::super::route::v3::HeaderMatcher>,
133}
134#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
135pub struct ResponseFlagFilter {
136 #[prost(string, repeated, tag = "1")]
137 pub flags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
138}
139#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
140pub struct GrpcStatusFilter {
141 #[prost(
142 enumeration = "grpc_status_filter::Status",
143 repeated,
144 packed = "false",
145 tag = "1"
146 )]
147 pub statuses: ::prost::alloc::vec::Vec<i32>,
148 #[prost(bool, tag = "2")]
149 pub exclude: bool,
150}
151pub mod grpc_status_filter {
153 #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
154 #[repr(i32)]
155 pub enum Status {
156 Ok = 0,
157 Canceled = 1,
158 Unknown = 2,
159 InvalidArgument = 3,
160 DeadlineExceeded = 4,
161 NotFound = 5,
162 AlreadyExists = 6,
163 PermissionDenied = 7,
164 ResourceExhausted = 8,
165 FailedPrecondition = 9,
166 Aborted = 10,
167 OutOfRange = 11,
168 Unimplemented = 12,
169 Internal = 13,
170 Unavailable = 14,
171 DataLoss = 15,
172 Unauthenticated = 16,
173 }
174 impl Status {
175 pub fn as_str_name(&self) -> &'static str {
180 match self {
181 Self::Ok => "OK",
182 Self::Canceled => "CANCELED",
183 Self::Unknown => "UNKNOWN",
184 Self::InvalidArgument => "INVALID_ARGUMENT",
185 Self::DeadlineExceeded => "DEADLINE_EXCEEDED",
186 Self::NotFound => "NOT_FOUND",
187 Self::AlreadyExists => "ALREADY_EXISTS",
188 Self::PermissionDenied => "PERMISSION_DENIED",
189 Self::ResourceExhausted => "RESOURCE_EXHAUSTED",
190 Self::FailedPrecondition => "FAILED_PRECONDITION",
191 Self::Aborted => "ABORTED",
192 Self::OutOfRange => "OUT_OF_RANGE",
193 Self::Unimplemented => "UNIMPLEMENTED",
194 Self::Internal => "INTERNAL",
195 Self::Unavailable => "UNAVAILABLE",
196 Self::DataLoss => "DATA_LOSS",
197 Self::Unauthenticated => "UNAUTHENTICATED",
198 }
199 }
200 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
202 match value {
203 "OK" => Some(Self::Ok),
204 "CANCELED" => Some(Self::Canceled),
205 "UNKNOWN" => Some(Self::Unknown),
206 "INVALID_ARGUMENT" => Some(Self::InvalidArgument),
207 "DEADLINE_EXCEEDED" => Some(Self::DeadlineExceeded),
208 "NOT_FOUND" => Some(Self::NotFound),
209 "ALREADY_EXISTS" => Some(Self::AlreadyExists),
210 "PERMISSION_DENIED" => Some(Self::PermissionDenied),
211 "RESOURCE_EXHAUSTED" => Some(Self::ResourceExhausted),
212 "FAILED_PRECONDITION" => Some(Self::FailedPrecondition),
213 "ABORTED" => Some(Self::Aborted),
214 "OUT_OF_RANGE" => Some(Self::OutOfRange),
215 "UNIMPLEMENTED" => Some(Self::Unimplemented),
216 "INTERNAL" => Some(Self::Internal),
217 "UNAVAILABLE" => Some(Self::Unavailable),
218 "DATA_LOSS" => Some(Self::DataLoss),
219 "UNAUTHENTICATED" => Some(Self::Unauthenticated),
220 _ => None,
221 }
222 }
223 }
224}
225#[derive(Clone, PartialEq, ::prost::Message)]
226pub struct MetadataFilter {
227 #[prost(message, optional, tag = "1")]
228 pub matcher: ::core::option::Option<super::super::super::kind::matcher::v3::MetadataMatcher>,
229 #[prost(message, optional, tag = "2")]
230 pub match_if_key_not_found: ::core::option::Option<bool>,
231}
232#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
233pub struct ExtensionFilter {
234 #[prost(string, tag = "1")]
235 pub name: ::prost::alloc::string::String,
236 #[prost(oneof = "extension_filter::ConfigType", tags = "3")]
237 pub config_type: ::core::option::Option<extension_filter::ConfigType>,
238}
239pub mod extension_filter {
241 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
242 pub enum ConfigType {
243 #[prost(message, tag = "3")]
244 TypedConfig(::prost_types::Any),
245 }
246}