envoy_types/generated/cel.expr.rs
1// This file is @generated by prost-build.
2/// An expression together with source information as returned by the parser.
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct ParsedExpr {
5 /// The parsed expression.
6 #[prost(message, optional, tag = "2")]
7 pub expr: ::core::option::Option<Expr>,
8 /// The source info derived from input that generated the parsed `expr`.
9 #[prost(message, optional, tag = "3")]
10 pub source_info: ::core::option::Option<SourceInfo>,
11}
12impl ::prost::Name for ParsedExpr {
13 const NAME: &'static str = "ParsedExpr";
14 const PACKAGE: &'static str = "cel.expr";
15 fn full_name() -> ::prost::alloc::string::String {
16 "cel.expr.ParsedExpr".into()
17 }
18 fn type_url() -> ::prost::alloc::string::String {
19 "type.googleapis.com/cel.expr.ParsedExpr".into()
20 }
21}
22/// An abstract representation of a common expression.
23///
24/// Expressions are abstractly represented as a collection of identifiers,
25/// select statements, function calls, literals, and comprehensions. All
26/// operators with the exception of the '.' operator are modelled as function
27/// calls. This makes it easy to represent new operators into the existing AST.
28///
29/// All references within expressions must resolve to a
30/// \[Decl\]\[cel.expr.Decl\] provided at type-check for an expression to be
31/// valid. A reference may either be a bare identifier `name` or a qualified
32/// identifier `google.api.name`. References may either refer to a value or a
33/// function declaration.
34///
35/// For example, the expression `google.api.name.startsWith('expr')` references
36/// the declaration `google.api.name` within a
37/// \[Expr.Select\]\[cel.expr.Expr.Select\] expression, and the function
38/// declaration `startsWith`.
39#[derive(Clone, PartialEq, ::prost::Message)]
40pub struct Expr {
41 /// Required. An id assigned to this node by the parser which is unique in a
42 /// given expression tree. This is used to associate type information and other
43 /// attributes to a node in the parse tree.
44 #[prost(int64, tag = "2")]
45 pub id: i64,
46 /// Required. Variants of expressions.
47 #[prost(oneof = "expr::ExprKind", tags = "3, 4, 5, 6, 7, 8, 9")]
48 pub expr_kind: ::core::option::Option<expr::ExprKind>,
49}
50/// Nested message and enum types in `Expr`.
51pub mod expr {
52 /// An identifier expression. e.g. `request`.
53 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
54 pub struct Ident {
55 /// Required. Holds a single, unqualified identifier, possibly preceded by a
56 /// '.'.
57 ///
58 /// Qualified names are represented by the
59 /// \[Expr.Select\]\[cel.expr.Expr.Select\] expression.
60 #[prost(string, tag = "1")]
61 pub name: ::prost::alloc::string::String,
62 }
63 impl ::prost::Name for Ident {
64 const NAME: &'static str = "Ident";
65 const PACKAGE: &'static str = "cel.expr";
66 fn full_name() -> ::prost::alloc::string::String {
67 "cel.expr.Expr.Ident".into()
68 }
69 fn type_url() -> ::prost::alloc::string::String {
70 "type.googleapis.com/cel.expr.Expr.Ident".into()
71 }
72 }
73 /// A field selection expression. e.g. `request.auth`.
74 #[derive(Clone, PartialEq, ::prost::Message)]
75 pub struct Select {
76 /// Required. The target of the selection expression.
77 ///
78 /// For example, in the select expression `request.auth`, the `request`
79 /// portion of the expression is the `operand`.
80 #[prost(message, optional, boxed, tag = "1")]
81 pub operand: ::core::option::Option<::prost::alloc::boxed::Box<super::Expr>>,
82 /// Required. The name of the field to select.
83 ///
84 /// For example, in the select expression `request.auth`, the `auth` portion
85 /// of the expression would be the `field`.
86 #[prost(string, tag = "2")]
87 pub field: ::prost::alloc::string::String,
88 /// Whether the select is to be interpreted as a field presence test.
89 ///
90 /// This results from the macro `has(request.auth)`.
91 #[prost(bool, tag = "3")]
92 pub test_only: bool,
93 }
94 impl ::prost::Name for Select {
95 const NAME: &'static str = "Select";
96 const PACKAGE: &'static str = "cel.expr";
97 fn full_name() -> ::prost::alloc::string::String {
98 "cel.expr.Expr.Select".into()
99 }
100 fn type_url() -> ::prost::alloc::string::String {
101 "type.googleapis.com/cel.expr.Expr.Select".into()
102 }
103 }
104 /// A call expression, including calls to predefined functions and operators.
105 ///
106 /// For example, `value == 10`, `size(map_value)`.
107 #[derive(Clone, PartialEq, ::prost::Message)]
108 pub struct Call {
109 /// The target of an method call-style expression. For example, `x` in
110 /// `x.f()`.
111 #[prost(message, optional, boxed, tag = "1")]
112 pub target: ::core::option::Option<::prost::alloc::boxed::Box<super::Expr>>,
113 /// Required. The name of the function or method being called.
114 #[prost(string, tag = "2")]
115 pub function: ::prost::alloc::string::String,
116 /// The arguments.
117 #[prost(message, repeated, tag = "3")]
118 pub args: ::prost::alloc::vec::Vec<super::Expr>,
119 }
120 impl ::prost::Name for Call {
121 const NAME: &'static str = "Call";
122 const PACKAGE: &'static str = "cel.expr";
123 fn full_name() -> ::prost::alloc::string::String {
124 "cel.expr.Expr.Call".into()
125 }
126 fn type_url() -> ::prost::alloc::string::String {
127 "type.googleapis.com/cel.expr.Expr.Call".into()
128 }
129 }
130 /// A list creation expression.
131 ///
132 /// Lists may either be homogenous, e.g. `\[1, 2, 3\]`, or heterogeneous, e.g.
133 /// `dyn(\[1, 'hello', 2.0\])`
134 #[derive(Clone, PartialEq, ::prost::Message)]
135 pub struct CreateList {
136 /// The elements part of the list.
137 #[prost(message, repeated, tag = "1")]
138 pub elements: ::prost::alloc::vec::Vec<super::Expr>,
139 /// The indices within the elements list which are marked as optional
140 /// elements.
141 ///
142 /// When an optional-typed value is present, the value it contains
143 /// is included in the list. If the optional-typed value is absent, the list
144 /// element is omitted from the CreateList result.
145 #[prost(int32, repeated, tag = "2")]
146 pub optional_indices: ::prost::alloc::vec::Vec<i32>,
147 }
148 impl ::prost::Name for CreateList {
149 const NAME: &'static str = "CreateList";
150 const PACKAGE: &'static str = "cel.expr";
151 fn full_name() -> ::prost::alloc::string::String {
152 "cel.expr.Expr.CreateList".into()
153 }
154 fn type_url() -> ::prost::alloc::string::String {
155 "type.googleapis.com/cel.expr.Expr.CreateList".into()
156 }
157 }
158 /// A map or message creation expression.
159 ///
160 /// Maps are constructed as `{'key_name': 'value'}`. Message construction is
161 /// similar, but prefixed with a type name and composed of field ids:
162 /// `types.MyType{field_id: 'value'}`.
163 #[derive(Clone, PartialEq, ::prost::Message)]
164 pub struct CreateStruct {
165 /// The type name of the message to be created, empty when creating map
166 /// literals.
167 #[prost(string, tag = "1")]
168 pub message_name: ::prost::alloc::string::String,
169 /// The entries in the creation expression.
170 #[prost(message, repeated, tag = "2")]
171 pub entries: ::prost::alloc::vec::Vec<create_struct::Entry>,
172 }
173 /// Nested message and enum types in `CreateStruct`.
174 pub mod create_struct {
175 /// Represents an entry.
176 #[derive(Clone, PartialEq, ::prost::Message)]
177 pub struct Entry {
178 /// Required. An id assigned to this node by the parser which is unique
179 /// in a given expression tree. This is used to associate type
180 /// information and other attributes to the node.
181 #[prost(int64, tag = "1")]
182 pub id: i64,
183 /// Required. The value assigned to the key.
184 ///
185 /// If the optional_entry field is true, the expression must resolve to an
186 /// optional-typed value. If the optional value is present, the key will be
187 /// set; however, if the optional value is absent, the key will be unset.
188 #[prost(message, optional, tag = "4")]
189 pub value: ::core::option::Option<super::super::Expr>,
190 /// Whether the key-value pair is optional.
191 #[prost(bool, tag = "5")]
192 pub optional_entry: bool,
193 /// The `Entry` key kinds.
194 #[prost(oneof = "entry::KeyKind", tags = "2, 3")]
195 pub key_kind: ::core::option::Option<entry::KeyKind>,
196 }
197 /// Nested message and enum types in `Entry`.
198 pub mod entry {
199 /// The `Entry` key kinds.
200 #[derive(Clone, PartialEq, ::prost::Oneof)]
201 pub enum KeyKind {
202 /// The field key for a message creator statement.
203 #[prost(string, tag = "2")]
204 FieldKey(::prost::alloc::string::String),
205 /// The key expression for a map creation statement.
206 #[prost(message, tag = "3")]
207 MapKey(super::super::super::Expr),
208 }
209 }
210 impl ::prost::Name for Entry {
211 const NAME: &'static str = "Entry";
212 const PACKAGE: &'static str = "cel.expr";
213 fn full_name() -> ::prost::alloc::string::String {
214 "cel.expr.Expr.CreateStruct.Entry".into()
215 }
216 fn type_url() -> ::prost::alloc::string::String {
217 "type.googleapis.com/cel.expr.Expr.CreateStruct.Entry".into()
218 }
219 }
220 }
221 impl ::prost::Name for CreateStruct {
222 const NAME: &'static str = "CreateStruct";
223 const PACKAGE: &'static str = "cel.expr";
224 fn full_name() -> ::prost::alloc::string::String {
225 "cel.expr.Expr.CreateStruct".into()
226 }
227 fn type_url() -> ::prost::alloc::string::String {
228 "type.googleapis.com/cel.expr.Expr.CreateStruct".into()
229 }
230 }
231 /// A comprehension expression applied to a list or map.
232 ///
233 /// Comprehensions are not part of the core syntax, but enabled with macros.
234 /// A macro matches a specific call signature within a parsed AST and replaces
235 /// the call with an alternate AST block. Macro expansion happens at parse
236 /// time.
237 ///
238 /// The following macros are supported within CEL:
239 ///
240 /// Aggregate type macros may be applied to all elements in a list or all keys
241 /// in a map:
242 ///
243 /// * `all`, `exists`, `exists_one` - test a predicate expression against
244 /// the inputs and return `true` if the predicate is satisfied for all,
245 /// any, or only one value `list.all(x, x < 10)`.
246 /// * `filter` - test a predicate expression against the inputs and return
247 /// the subset of elements which satisfy the predicate:
248 /// `payments.filter(p, p > 1000)`.
249 /// * `map` - apply an expression to all elements in the input and return the
250 /// output aggregate type: `\[1, 2, 3\].map(i, i * i)`.
251 ///
252 /// The `has(m.x)` macro tests whether the property `x` is present in struct
253 /// `m`. The semantics of this macro depend on the type of `m`. For proto2
254 /// messages `has(m.x)` is defined as 'defined, but not set`. For proto3, the macro tests whether the property is set to its default. For map and struct types, the macro tests whether the property `x`is defined on`m\`.
255 ///
256 /// Comprehensions for the standard environment macros evaluation can be best
257 /// visualized as the following pseudocode:
258 ///
259 /// ```text,
260 /// let `accu_var` = `accu_init`
261 /// for (let `iter_var` in `iter_range`) {
262 /// if (!`loop_condition`) {
263 /// break
264 /// }
265 /// `accu_var` = `loop_step`
266 /// }
267 /// return `result`
268 /// ```
269 ///
270 /// Comprehensions for the optional V2 macros which support map-to-map
271 /// translation differ slightly from the standard environment macros in that
272 /// they expose both the key or index in addition to the value for each list
273 /// or map entry:
274 ///
275 /// ```text,
276 /// let `accu_var` = `accu_init`
277 /// for (let `iter_var`, `iter_var2` in `iter_range`) {
278 /// if (!`loop_condition`) {
279 /// break
280 /// }
281 /// `accu_var` = `loop_step`
282 /// }
283 /// return `result`
284 /// ```
285 #[derive(Clone, PartialEq, ::prost::Message)]
286 pub struct Comprehension {
287 /// The name of the first iteration variable.
288 /// For the single iteration variable macros, when iter_range is a list, this
289 /// variable is the list element and when the iter_range is a map, this
290 /// variable is the map key.
291 #[prost(string, tag = "1")]
292 pub iter_var: ::prost::alloc::string::String,
293 /// The name of the second iteration variable, empty if not set.
294 /// This field is only set for comprehension v2 macros.
295 #[prost(string, tag = "8")]
296 pub iter_var2: ::prost::alloc::string::String,
297 /// The range over which the comprehension iterates.
298 #[prost(message, optional, boxed, tag = "2")]
299 pub iter_range: ::core::option::Option<::prost::alloc::boxed::Box<super::Expr>>,
300 /// The name of the variable used for accumulation of the result.
301 #[prost(string, tag = "3")]
302 pub accu_var: ::prost::alloc::string::String,
303 /// The initial value of the accumulator.
304 #[prost(message, optional, boxed, tag = "4")]
305 pub accu_init: ::core::option::Option<::prost::alloc::boxed::Box<super::Expr>>,
306 /// An expression which can contain iter_var, iter_var2, and accu_var.
307 ///
308 /// Returns false when the result has been computed and may be used as
309 /// a hint to short-circuit the remainder of the comprehension.
310 #[prost(message, optional, boxed, tag = "5")]
311 pub loop_condition: ::core::option::Option<
312 ::prost::alloc::boxed::Box<super::Expr>,
313 >,
314 /// An expression which can contain iter_var, iter_var2, and accu_var.
315 ///
316 /// Computes the next value of accu_var.
317 #[prost(message, optional, boxed, tag = "6")]
318 pub loop_step: ::core::option::Option<::prost::alloc::boxed::Box<super::Expr>>,
319 /// An expression which can contain accu_var.
320 ///
321 /// Computes the result.
322 #[prost(message, optional, boxed, tag = "7")]
323 pub result: ::core::option::Option<::prost::alloc::boxed::Box<super::Expr>>,
324 }
325 impl ::prost::Name for Comprehension {
326 const NAME: &'static str = "Comprehension";
327 const PACKAGE: &'static str = "cel.expr";
328 fn full_name() -> ::prost::alloc::string::String {
329 "cel.expr.Expr.Comprehension".into()
330 }
331 fn type_url() -> ::prost::alloc::string::String {
332 "type.googleapis.com/cel.expr.Expr.Comprehension".into()
333 }
334 }
335 /// Required. Variants of expressions.
336 #[derive(Clone, PartialEq, ::prost::Oneof)]
337 pub enum ExprKind {
338 /// A constant expression.
339 #[prost(message, tag = "3")]
340 ConstExpr(super::Constant),
341 /// An identifier expression.
342 #[prost(message, tag = "4")]
343 IdentExpr(Ident),
344 /// A field selection expression, e.g. `request.auth`.
345 #[prost(message, tag = "5")]
346 SelectExpr(::prost::alloc::boxed::Box<Select>),
347 /// A call expression, including calls to predefined functions and operators.
348 #[prost(message, tag = "6")]
349 CallExpr(::prost::alloc::boxed::Box<Call>),
350 /// A list creation expression.
351 #[prost(message, tag = "7")]
352 ListExpr(CreateList),
353 /// A map or message creation expression.
354 #[prost(message, tag = "8")]
355 StructExpr(CreateStruct),
356 /// A comprehension expression.
357 #[prost(message, tag = "9")]
358 ComprehensionExpr(::prost::alloc::boxed::Box<Comprehension>),
359 }
360}
361impl ::prost::Name for Expr {
362 const NAME: &'static str = "Expr";
363 const PACKAGE: &'static str = "cel.expr";
364 fn full_name() -> ::prost::alloc::string::String {
365 "cel.expr.Expr".into()
366 }
367 fn type_url() -> ::prost::alloc::string::String {
368 "type.googleapis.com/cel.expr.Expr".into()
369 }
370}
371/// Represents a primitive literal.
372///
373/// Named 'Constant' here for backwards compatibility.
374///
375/// This is similar as the primitives supported in the well-known type
376/// `google.protobuf.Value`, but richer so it can represent CEL's full range of
377/// primitives.
378///
379/// Lists and structs are not included as constants as these aggregate types may
380/// contain \[Expr\]\[cel.expr.Expr\] elements which require evaluation and
381/// are thus not constant.
382///
383/// Examples of constants include: `"hello"`, `b'bytes'`, `1u`, `4.2`, `-2`,
384/// `true`, `null`.
385#[derive(Clone, PartialEq, ::prost::Message)]
386pub struct Constant {
387 /// Required. The valid constant kinds.
388 #[prost(oneof = "constant::ConstantKind", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9")]
389 pub constant_kind: ::core::option::Option<constant::ConstantKind>,
390}
391/// Nested message and enum types in `Constant`.
392pub mod constant {
393 /// Required. The valid constant kinds.
394 #[derive(Clone, PartialEq, ::prost::Oneof)]
395 pub enum ConstantKind {
396 /// null value.
397 #[prost(
398 enumeration = "super::super::super::google::protobuf::NullValue",
399 tag = "1"
400 )]
401 NullValue(i32),
402 /// boolean value.
403 #[prost(bool, tag = "2")]
404 BoolValue(bool),
405 /// int64 value.
406 #[prost(int64, tag = "3")]
407 Int64Value(i64),
408 /// uint64 value.
409 #[prost(uint64, tag = "4")]
410 Uint64Value(u64),
411 /// double value.
412 #[prost(double, tag = "5")]
413 DoubleValue(f64),
414 /// string value.
415 #[prost(string, tag = "6")]
416 StringValue(::prost::alloc::string::String),
417 /// bytes value.
418 #[prost(bytes, tag = "7")]
419 BytesValue(::prost::alloc::vec::Vec<u8>),
420 /// protobuf.Duration value.
421 ///
422 /// Deprecated: duration is no longer considered a builtin cel type.
423 #[prost(message, tag = "8")]
424 DurationValue(super::super::super::google::protobuf::Duration),
425 /// protobuf.Timestamp value.
426 ///
427 /// Deprecated: timestamp is no longer considered a builtin cel type.
428 #[prost(message, tag = "9")]
429 TimestampValue(super::super::super::google::protobuf::Timestamp),
430 }
431}
432impl ::prost::Name for Constant {
433 const NAME: &'static str = "Constant";
434 const PACKAGE: &'static str = "cel.expr";
435 fn full_name() -> ::prost::alloc::string::String {
436 "cel.expr.Constant".into()
437 }
438 fn type_url() -> ::prost::alloc::string::String {
439 "type.googleapis.com/cel.expr.Constant".into()
440 }
441}
442/// Source information collected at parse time.
443#[derive(Clone, PartialEq, ::prost::Message)]
444pub struct SourceInfo {
445 /// The syntax version of the source, e.g. `cel1`.
446 #[prost(string, tag = "1")]
447 pub syntax_version: ::prost::alloc::string::String,
448 /// The location name. All position information attached to an expression is
449 /// relative to this location.
450 ///
451 /// The location could be a file, UI element, or similar. For example,
452 /// `acme/app/AnvilPolicy.cel`.
453 #[prost(string, tag = "2")]
454 pub location: ::prost::alloc::string::String,
455 /// Monotonically increasing list of code point offsets where newlines
456 /// `\n` appear.
457 ///
458 /// The line number of a given position is the index `i` where for a given
459 /// `id` the `line_offsets\[i\] < id_positions\[id\] < line_offsets\[i+1\]`. The
460 /// column may be derived from `id_positions\[id\] - line_offsets\[i\]`.
461 #[prost(int32, repeated, tag = "3")]
462 pub line_offsets: ::prost::alloc::vec::Vec<i32>,
463 /// A map from the parse node id (e.g. `Expr.id`) to the code point offset
464 /// within the source.
465 #[prost(map = "int64, int32", tag = "4")]
466 pub positions: ::std::collections::HashMap<i64, i32>,
467 /// A map from the parse node id where a macro replacement was made to the
468 /// call `Expr` that resulted in a macro expansion.
469 ///
470 /// For example, `has(value.field)` is a function call that is replaced by a
471 /// `test_only` field selection in the AST. Likewise, the call
472 /// `list.exists(e, e > 10)` translates to a comprehension expression. The key
473 /// in the map corresponds to the expression id of the expanded macro, and the
474 /// value is the call `Expr` that was replaced.
475 #[prost(map = "int64, message", tag = "5")]
476 pub macro_calls: ::std::collections::HashMap<i64, Expr>,
477 /// A list of tags for extensions that were used while parsing or type checking
478 /// the source expression. For example, optimizations that require special
479 /// runtime support may be specified.
480 ///
481 /// These are used to check feature support between components in separate
482 /// implementations. This can be used to either skip redundant work or
483 /// report an error if the extension is unsupported.
484 #[prost(message, repeated, tag = "6")]
485 pub extensions: ::prost::alloc::vec::Vec<source_info::Extension>,
486}
487/// Nested message and enum types in `SourceInfo`.
488pub mod source_info {
489 /// An extension that was requested for the source expression.
490 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
491 pub struct Extension {
492 /// Identifier for the extension. Example: constant_folding
493 #[prost(string, tag = "1")]
494 pub id: ::prost::alloc::string::String,
495 /// If set, the listed components must understand the extension for the
496 /// expression to evaluate correctly.
497 ///
498 /// This field has set semantics, repeated values should be deduplicated.
499 #[prost(enumeration = "extension::Component", repeated, tag = "2")]
500 pub affected_components: ::prost::alloc::vec::Vec<i32>,
501 /// Version info. May be skipped if it isn't meaningful for the extension.
502 /// (for example constant_folding might always be v0.0).
503 #[prost(message, optional, tag = "3")]
504 pub version: ::core::option::Option<extension::Version>,
505 }
506 /// Nested message and enum types in `Extension`.
507 pub mod extension {
508 /// Version
509 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
510 pub struct Version {
511 /// Major version changes indicate different required support level from
512 /// the required components.
513 #[prost(int64, tag = "1")]
514 pub major: i64,
515 /// Minor version changes must not change the observed behavior from
516 /// existing implementations, but may be provided informationally.
517 #[prost(int64, tag = "2")]
518 pub minor: i64,
519 }
520 impl ::prost::Name for Version {
521 const NAME: &'static str = "Version";
522 const PACKAGE: &'static str = "cel.expr";
523 fn full_name() -> ::prost::alloc::string::String {
524 "cel.expr.SourceInfo.Extension.Version".into()
525 }
526 fn type_url() -> ::prost::alloc::string::String {
527 "type.googleapis.com/cel.expr.SourceInfo.Extension.Version".into()
528 }
529 }
530 /// CEL component specifier.
531 #[derive(
532 Clone,
533 Copy,
534 Debug,
535 PartialEq,
536 Eq,
537 Hash,
538 PartialOrd,
539 Ord,
540 ::prost::Enumeration
541 )]
542 #[repr(i32)]
543 pub enum Component {
544 /// Unspecified, default.
545 Unspecified = 0,
546 /// Parser. Converts a CEL string to an AST.
547 Parser = 1,
548 /// Type checker. Checks that references in an AST are defined and types
549 /// agree.
550 TypeChecker = 2,
551 /// Runtime. Evaluates a parsed and optionally checked CEL AST against a
552 /// context.
553 Runtime = 3,
554 }
555 impl Component {
556 /// String value of the enum field names used in the ProtoBuf definition.
557 ///
558 /// The values are not transformed in any way and thus are considered stable
559 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
560 pub fn as_str_name(&self) -> &'static str {
561 match self {
562 Self::Unspecified => "COMPONENT_UNSPECIFIED",
563 Self::Parser => "COMPONENT_PARSER",
564 Self::TypeChecker => "COMPONENT_TYPE_CHECKER",
565 Self::Runtime => "COMPONENT_RUNTIME",
566 }
567 }
568 /// Creates an enum from field names used in the ProtoBuf definition.
569 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
570 match value {
571 "COMPONENT_UNSPECIFIED" => Some(Self::Unspecified),
572 "COMPONENT_PARSER" => Some(Self::Parser),
573 "COMPONENT_TYPE_CHECKER" => Some(Self::TypeChecker),
574 "COMPONENT_RUNTIME" => Some(Self::Runtime),
575 _ => None,
576 }
577 }
578 }
579 }
580 impl ::prost::Name for Extension {
581 const NAME: &'static str = "Extension";
582 const PACKAGE: &'static str = "cel.expr";
583 fn full_name() -> ::prost::alloc::string::String {
584 "cel.expr.SourceInfo.Extension".into()
585 }
586 fn type_url() -> ::prost::alloc::string::String {
587 "type.googleapis.com/cel.expr.SourceInfo.Extension".into()
588 }
589 }
590}
591impl ::prost::Name for SourceInfo {
592 const NAME: &'static str = "SourceInfo";
593 const PACKAGE: &'static str = "cel.expr";
594 fn full_name() -> ::prost::alloc::string::String {
595 "cel.expr.SourceInfo".into()
596 }
597 fn type_url() -> ::prost::alloc::string::String {
598 "type.googleapis.com/cel.expr.SourceInfo".into()
599 }
600}
601/// A CEL expression which has been successfully type checked.
602#[derive(Clone, PartialEq, ::prost::Message)]
603pub struct CheckedExpr {
604 /// A map from expression ids to resolved references.
605 ///
606 /// The following entries are in this table:
607 ///
608 /// * An Ident or Select expression is represented here if it resolves to a
609 /// declaration. For instance, if `a.b.c` is represented by
610 /// `select(select(id(a), b), c)`, and `a.b` resolves to a declaration,
611 /// while `c` is a field selection, then the reference is attached to the
612 /// nested select expression (but not to the id or or the outer select).
613 /// In turn, if `a` resolves to a declaration and `b.c` are field selections,
614 /// the reference is attached to the ident expression.
615 /// * Every Call expression has an entry here, identifying the function being
616 /// called.
617 /// * Every CreateStruct expression for a message has an entry, identifying
618 /// the message.
619 #[prost(map = "int64, message", tag = "2")]
620 pub reference_map: ::std::collections::HashMap<i64, Reference>,
621 /// A map from expression ids to types.
622 ///
623 /// Every expression node which has a type different than DYN has a mapping
624 /// here. If an expression has type DYN, it is omitted from this map to save
625 /// space.
626 #[prost(map = "int64, message", tag = "3")]
627 pub type_map: ::std::collections::HashMap<i64, Type>,
628 /// The source info derived from input that generated the parsed `expr` and
629 /// any optimizations made during the type-checking pass.
630 #[prost(message, optional, tag = "5")]
631 pub source_info: ::core::option::Option<SourceInfo>,
632 /// The expr version indicates the major / minor version number of the `expr`
633 /// representation.
634 ///
635 /// The most common reason for a version change will be to indicate to the CEL
636 /// runtimes that transformations have been performed on the expr during static
637 /// analysis. In some cases, this will save the runtime the work of applying
638 /// the same or similar transformations prior to evaluation.
639 #[prost(string, tag = "6")]
640 pub expr_version: ::prost::alloc::string::String,
641 /// The checked expression. Semantically equivalent to the parsed `expr`, but
642 /// may have structural differences.
643 #[prost(message, optional, tag = "4")]
644 pub expr: ::core::option::Option<Expr>,
645}
646impl ::prost::Name for CheckedExpr {
647 const NAME: &'static str = "CheckedExpr";
648 const PACKAGE: &'static str = "cel.expr";
649 fn full_name() -> ::prost::alloc::string::String {
650 "cel.expr.CheckedExpr".into()
651 }
652 fn type_url() -> ::prost::alloc::string::String {
653 "type.googleapis.com/cel.expr.CheckedExpr".into()
654 }
655}
656/// Represents a CEL type.
657#[derive(Clone, PartialEq, ::prost::Message)]
658pub struct Type {
659 /// The kind of type.
660 #[prost(
661 oneof = "r#type::TypeKind",
662 tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14"
663 )]
664 pub type_kind: ::core::option::Option<r#type::TypeKind>,
665}
666/// Nested message and enum types in `Type`.
667pub mod r#type {
668 /// List type with typed elements, e.g. `list<example.proto.MyMessage>`.
669 #[derive(Clone, PartialEq, ::prost::Message)]
670 pub struct ListType {
671 /// The element type.
672 #[prost(message, optional, boxed, tag = "1")]
673 pub elem_type: ::core::option::Option<::prost::alloc::boxed::Box<super::Type>>,
674 }
675 impl ::prost::Name for ListType {
676 const NAME: &'static str = "ListType";
677 const PACKAGE: &'static str = "cel.expr";
678 fn full_name() -> ::prost::alloc::string::String {
679 "cel.expr.Type.ListType".into()
680 }
681 fn type_url() -> ::prost::alloc::string::String {
682 "type.googleapis.com/cel.expr.Type.ListType".into()
683 }
684 }
685 /// Map type with parameterized key and value types, e.g. `map<string, int>`.
686 #[derive(Clone, PartialEq, ::prost::Message)]
687 pub struct MapType {
688 /// The type of the key.
689 #[prost(message, optional, boxed, tag = "1")]
690 pub key_type: ::core::option::Option<::prost::alloc::boxed::Box<super::Type>>,
691 /// The type of the value.
692 #[prost(message, optional, boxed, tag = "2")]
693 pub value_type: ::core::option::Option<::prost::alloc::boxed::Box<super::Type>>,
694 }
695 impl ::prost::Name for MapType {
696 const NAME: &'static str = "MapType";
697 const PACKAGE: &'static str = "cel.expr";
698 fn full_name() -> ::prost::alloc::string::String {
699 "cel.expr.Type.MapType".into()
700 }
701 fn type_url() -> ::prost::alloc::string::String {
702 "type.googleapis.com/cel.expr.Type.MapType".into()
703 }
704 }
705 /// Function type with result and arg types.
706 #[derive(Clone, PartialEq, ::prost::Message)]
707 pub struct FunctionType {
708 /// Result type of the function.
709 #[prost(message, optional, boxed, tag = "1")]
710 pub result_type: ::core::option::Option<::prost::alloc::boxed::Box<super::Type>>,
711 /// Argument types of the function.
712 #[prost(message, repeated, tag = "2")]
713 pub arg_types: ::prost::alloc::vec::Vec<super::Type>,
714 }
715 impl ::prost::Name for FunctionType {
716 const NAME: &'static str = "FunctionType";
717 const PACKAGE: &'static str = "cel.expr";
718 fn full_name() -> ::prost::alloc::string::String {
719 "cel.expr.Type.FunctionType".into()
720 }
721 fn type_url() -> ::prost::alloc::string::String {
722 "type.googleapis.com/cel.expr.Type.FunctionType".into()
723 }
724 }
725 /// Application defined abstract type.
726 #[derive(Clone, PartialEq, ::prost::Message)]
727 pub struct AbstractType {
728 /// The fully qualified name of this abstract type.
729 #[prost(string, tag = "1")]
730 pub name: ::prost::alloc::string::String,
731 /// Parameter types for this abstract type.
732 #[prost(message, repeated, tag = "2")]
733 pub parameter_types: ::prost::alloc::vec::Vec<super::Type>,
734 }
735 impl ::prost::Name for AbstractType {
736 const NAME: &'static str = "AbstractType";
737 const PACKAGE: &'static str = "cel.expr";
738 fn full_name() -> ::prost::alloc::string::String {
739 "cel.expr.Type.AbstractType".into()
740 }
741 fn type_url() -> ::prost::alloc::string::String {
742 "type.googleapis.com/cel.expr.Type.AbstractType".into()
743 }
744 }
745 /// CEL primitive types.
746 #[derive(
747 Clone,
748 Copy,
749 Debug,
750 PartialEq,
751 Eq,
752 Hash,
753 PartialOrd,
754 Ord,
755 ::prost::Enumeration
756 )]
757 #[repr(i32)]
758 pub enum PrimitiveType {
759 /// Unspecified type.
760 Unspecified = 0,
761 /// Boolean type.
762 Bool = 1,
763 /// Int64 type.
764 ///
765 /// 32-bit integer values are widened to int64.
766 Int64 = 2,
767 /// Uint64 type.
768 ///
769 /// 32-bit unsigned integer values are widened to uint64.
770 Uint64 = 3,
771 /// Double type.
772 ///
773 /// 32-bit float values are widened to double values.
774 Double = 4,
775 /// String type.
776 String = 5,
777 /// Bytes type.
778 Bytes = 6,
779 }
780 impl PrimitiveType {
781 /// String value of the enum field names used in the ProtoBuf definition.
782 ///
783 /// The values are not transformed in any way and thus are considered stable
784 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
785 pub fn as_str_name(&self) -> &'static str {
786 match self {
787 Self::Unspecified => "PRIMITIVE_TYPE_UNSPECIFIED",
788 Self::Bool => "BOOL",
789 Self::Int64 => "INT64",
790 Self::Uint64 => "UINT64",
791 Self::Double => "DOUBLE",
792 Self::String => "STRING",
793 Self::Bytes => "BYTES",
794 }
795 }
796 /// Creates an enum from field names used in the ProtoBuf definition.
797 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
798 match value {
799 "PRIMITIVE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
800 "BOOL" => Some(Self::Bool),
801 "INT64" => Some(Self::Int64),
802 "UINT64" => Some(Self::Uint64),
803 "DOUBLE" => Some(Self::Double),
804 "STRING" => Some(Self::String),
805 "BYTES" => Some(Self::Bytes),
806 _ => None,
807 }
808 }
809 }
810 /// Well-known protobuf types treated with first-class support in CEL.
811 #[derive(
812 Clone,
813 Copy,
814 Debug,
815 PartialEq,
816 Eq,
817 Hash,
818 PartialOrd,
819 Ord,
820 ::prost::Enumeration
821 )]
822 #[repr(i32)]
823 pub enum WellKnownType {
824 /// Unspecified type.
825 Unspecified = 0,
826 /// Well-known protobuf.Any type.
827 ///
828 /// Any types are a polymorphic message type. During type-checking they are
829 /// treated like `DYN` types, but at runtime they are resolved to a specific
830 /// message type specified at evaluation time.
831 Any = 1,
832 /// Well-known protobuf.Timestamp type, internally referenced as `timestamp`.
833 Timestamp = 2,
834 /// Well-known protobuf.Duration type, internally referenced as `duration`.
835 Duration = 3,
836 }
837 impl WellKnownType {
838 /// String value of the enum field names used in the ProtoBuf definition.
839 ///
840 /// The values are not transformed in any way and thus are considered stable
841 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
842 pub fn as_str_name(&self) -> &'static str {
843 match self {
844 Self::Unspecified => "WELL_KNOWN_TYPE_UNSPECIFIED",
845 Self::Any => "ANY",
846 Self::Timestamp => "TIMESTAMP",
847 Self::Duration => "DURATION",
848 }
849 }
850 /// Creates an enum from field names used in the ProtoBuf definition.
851 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
852 match value {
853 "WELL_KNOWN_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
854 "ANY" => Some(Self::Any),
855 "TIMESTAMP" => Some(Self::Timestamp),
856 "DURATION" => Some(Self::Duration),
857 _ => None,
858 }
859 }
860 }
861 /// The kind of type.
862 #[derive(Clone, PartialEq, ::prost::Oneof)]
863 pub enum TypeKind {
864 /// Dynamic type.
865 #[prost(message, tag = "1")]
866 Dyn(super::super::super::google::protobuf::Empty),
867 /// Null value.
868 #[prost(
869 enumeration = "super::super::super::google::protobuf::NullValue",
870 tag = "2"
871 )]
872 Null(i32),
873 /// Primitive types: `true`, `1u`, `-2.0`, `'string'`, `b'bytes'`.
874 #[prost(enumeration = "PrimitiveType", tag = "3")]
875 Primitive(i32),
876 /// Wrapper of a primitive type, e.g. `google.protobuf.Int64Value`.
877 #[prost(enumeration = "PrimitiveType", tag = "4")]
878 Wrapper(i32),
879 /// Well-known protobuf type such as `google.protobuf.Timestamp`.
880 #[prost(enumeration = "WellKnownType", tag = "5")]
881 WellKnown(i32),
882 /// Parameterized list with elements of `list_type`, e.g. `list<timestamp>`.
883 #[prost(message, tag = "6")]
884 ListType(::prost::alloc::boxed::Box<ListType>),
885 /// Parameterized map with typed keys and values.
886 #[prost(message, tag = "7")]
887 MapType(::prost::alloc::boxed::Box<MapType>),
888 /// Function type.
889 #[prost(message, tag = "8")]
890 Function(::prost::alloc::boxed::Box<FunctionType>),
891 /// Protocol buffer message type.
892 ///
893 /// The `message_type` string specifies the qualified message type name. For
894 /// example, `google.type.PhoneNumber`.
895 #[prost(string, tag = "9")]
896 MessageType(::prost::alloc::string::String),
897 /// Type param type.
898 ///
899 /// The `type_param` string specifies the type parameter name, e.g. `list<E>`
900 /// would be a `list_type` whose element type was a `type_param` type
901 /// named `E`.
902 #[prost(string, tag = "10")]
903 TypeParam(::prost::alloc::string::String),
904 /// Type type.
905 ///
906 /// The `type` value specifies the target type. e.g. int is type with a
907 /// target type of `Primitive.INT64`.
908 #[prost(message, tag = "11")]
909 Type(::prost::alloc::boxed::Box<super::Type>),
910 /// Error type.
911 ///
912 /// During type-checking if an expression is an error, its type is propagated
913 /// as the `ERROR` type. This permits the type-checker to discover other
914 /// errors present in the expression.
915 #[prost(message, tag = "12")]
916 Error(super::super::super::google::protobuf::Empty),
917 /// Abstract, application defined type.
918 ///
919 /// An abstract type has no accessible field names, and it can only be
920 /// inspected via helper / member functions.
921 #[prost(message, tag = "14")]
922 AbstractType(AbstractType),
923 }
924}
925impl ::prost::Name for Type {
926 const NAME: &'static str = "Type";
927 const PACKAGE: &'static str = "cel.expr";
928 fn full_name() -> ::prost::alloc::string::String {
929 "cel.expr.Type".into()
930 }
931 fn type_url() -> ::prost::alloc::string::String {
932 "type.googleapis.com/cel.expr.Type".into()
933 }
934}
935/// Represents a declaration of a named value or function.
936///
937/// A declaration is part of the contract between the expression, the agent
938/// evaluating that expression, and the caller requesting evaluation.
939#[derive(Clone, PartialEq, ::prost::Message)]
940pub struct Decl {
941 /// The fully qualified name of the declaration.
942 ///
943 /// Declarations are organized in containers and this represents the full path
944 /// to the declaration in its container, as in `cel.expr.Decl`.
945 ///
946 /// Declarations used as
947 /// \[FunctionDecl.Overload\]\[cel.expr.Decl.FunctionDecl.Overload\]
948 /// parameters may or may not have a name depending on whether the overload is
949 /// function declaration or a function definition containing a result
950 /// \[Expr\]\[cel.expr.Expr\].
951 #[prost(string, tag = "1")]
952 pub name: ::prost::alloc::string::String,
953 /// Required. The declaration kind.
954 #[prost(oneof = "decl::DeclKind", tags = "2, 3")]
955 pub decl_kind: ::core::option::Option<decl::DeclKind>,
956}
957/// Nested message and enum types in `Decl`.
958pub mod decl {
959 /// Identifier declaration which specifies its type and optional `Expr` value.
960 ///
961 /// An identifier without a value is a declaration that must be provided at
962 /// evaluation time. An identifier with a value should resolve to a constant,
963 /// but may be used in conjunction with other identifiers bound at evaluation
964 /// time.
965 #[derive(Clone, PartialEq, ::prost::Message)]
966 pub struct IdentDecl {
967 /// Required. The type of the identifier.
968 #[prost(message, optional, tag = "1")]
969 pub r#type: ::core::option::Option<super::Type>,
970 /// The constant value of the identifier. If not specified, the identifier
971 /// must be supplied at evaluation time.
972 #[prost(message, optional, tag = "2")]
973 pub value: ::core::option::Option<super::Constant>,
974 /// Documentation string for the identifier.
975 ///
976 /// Provide a brief description of what the variable represents and whether
977 /// there are any constraints on the formatting or supported value range.
978 ///
979 /// Examples:
980 ///
981 /// ```text
982 /// 'request.auth.principal' - string which uniquely identifies an
983 /// authenticated principal. For JSON Web Tokens (JWTs), the principal
984 /// is the combination of the issuer ('iss') and subject ('sub') token
985 /// fields concatenated by a forward slash: iss + `/` + sub.
986 ///
987 /// 'min_cpus' - integer value indicates the minimum number of CPUs
988 /// required for a compute cluster. The 'min_cpus' value must be
989 /// greater than zero and less than 'max_cpus' or 64 whichever is less.
990 /// ```
991 #[prost(string, tag = "3")]
992 pub doc: ::prost::alloc::string::String,
993 }
994 impl ::prost::Name for IdentDecl {
995 const NAME: &'static str = "IdentDecl";
996 const PACKAGE: &'static str = "cel.expr";
997 fn full_name() -> ::prost::alloc::string::String {
998 "cel.expr.Decl.IdentDecl".into()
999 }
1000 fn type_url() -> ::prost::alloc::string::String {
1001 "type.googleapis.com/cel.expr.Decl.IdentDecl".into()
1002 }
1003 }
1004 /// Function declaration specifies one or more overloads which indicate the
1005 /// function's parameter types and return type.
1006 ///
1007 /// Functions have no observable side-effects (there may be side-effects like
1008 /// logging which are not observable from CEL).
1009 #[derive(Clone, PartialEq, ::prost::Message)]
1010 pub struct FunctionDecl {
1011 /// Required. List of function overloads, must contain at least one overload.
1012 #[prost(message, repeated, tag = "1")]
1013 pub overloads: ::prost::alloc::vec::Vec<function_decl::Overload>,
1014 /// Documentation string for the function that indicates the general purpose
1015 /// of the function and its behavior.
1016 ///
1017 /// Documentation strings for the function should be general purpose with
1018 /// specific examples provided in the overload doc string.
1019 ///
1020 /// Examples:
1021 ///
1022 /// ```text
1023 /// The 'in' operator tests whether an item exists in a collection.
1024 ///
1025 /// The 'substring' function returns a substring of a target string.
1026 /// ```
1027 #[prost(string, tag = "2")]
1028 pub doc: ::prost::alloc::string::String,
1029 }
1030 /// Nested message and enum types in `FunctionDecl`.
1031 pub mod function_decl {
1032 /// An overload indicates a function's parameter types and return type, and
1033 /// may optionally include a function body described in terms of
1034 /// \[Expr\]\[cel.expr.Expr\] values.
1035 ///
1036 /// Functions overloads are declared in either a function or method
1037 /// call-style. For methods, the `params\[0\]` is the expected type of the
1038 /// target receiver.
1039 ///
1040 /// Overloads must have non-overlapping argument types after erasure of all
1041 /// parameterized type variables (similar as type erasure in Java).
1042 #[derive(Clone, PartialEq, ::prost::Message)]
1043 pub struct Overload {
1044 /// Required. Globally unique overload name of the function which reflects
1045 /// the function name and argument types.
1046 ///
1047 /// This will be used by a \[Reference\]\[cel.expr.Reference\] to
1048 /// indicate the `overload_id` that was resolved for the function `name`.
1049 #[prost(string, tag = "1")]
1050 pub overload_id: ::prost::alloc::string::String,
1051 /// List of function parameter \[Type\]\[cel.expr.Type\] values.
1052 ///
1053 /// Param types are disjoint after generic type parameters have been
1054 /// replaced with the type `DYN`. Since the `DYN` type is compatible with
1055 /// any other type, this means that if `A` is a type parameter, the
1056 /// function types `int<A>` and `int<int>` are not disjoint. Likewise,
1057 /// `map<string, string>` is not disjoint from `map<K, V>`.
1058 ///
1059 /// When the `result_type` of a function is a generic type param, the
1060 /// type param name also appears as the `type` of on at least one params.
1061 #[prost(message, repeated, tag = "2")]
1062 pub params: ::prost::alloc::vec::Vec<super::super::Type>,
1063 /// The type param names associated with the function declaration.
1064 ///
1065 /// For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
1066 /// the type params of `K, V`.
1067 #[prost(string, repeated, tag = "3")]
1068 pub type_params: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1069 /// Required. The result type of the function. For example, the operator
1070 /// `string.isEmpty()` would have `result_type` of `kind: BOOL`.
1071 #[prost(message, optional, tag = "4")]
1072 pub result_type: ::core::option::Option<super::super::Type>,
1073 /// Whether the function is to be used in a method call-style `x.f(...)`
1074 /// of a function call-style `f(x, ...)`.
1075 ///
1076 /// For methods, the first parameter declaration, `params\[0\]` is the
1077 /// expected type of the target receiver.
1078 #[prost(bool, tag = "5")]
1079 pub is_instance_function: bool,
1080 /// Documentation string for the overload.
1081 ///
1082 /// Provide examples of the overload behavior, preferring to use literal
1083 /// values as input with a comment on the return value.
1084 ///
1085 /// Examples:
1086 ///
1087 /// ```text
1088 /// // Determine whether a value of type <V> exists within a list<V>.
1089 /// 2 in \[1, 2, 3\] // returns true
1090 ///
1091 /// // Determine whether a key of type <K> exists within a map<K,V>.
1092 /// 'hello' in {'hi': 'you', 'hello': 'there'} // returns true
1093 /// 'help' in {'hi': 'you', 'hello': 'there'} // returns false
1094 ///
1095 /// // Take the substring of a string starting at a specific character
1096 /// // offset (inclusive).
1097 /// "tacocat".substring(1) // returns "acocat"
1098 /// "tacocat".substring(20) // error
1099 ///
1100 /// // Take the substring of a string starting at a specific character
1101 /// // offset (inclusive) and ending at the given offset (exclusive).
1102 /// "tacocat".substring(1, 6) // returns "acoca"
1103 /// ```
1104 #[prost(string, tag = "6")]
1105 pub doc: ::prost::alloc::string::String,
1106 }
1107 impl ::prost::Name for Overload {
1108 const NAME: &'static str = "Overload";
1109 const PACKAGE: &'static str = "cel.expr";
1110 fn full_name() -> ::prost::alloc::string::String {
1111 "cel.expr.Decl.FunctionDecl.Overload".into()
1112 }
1113 fn type_url() -> ::prost::alloc::string::String {
1114 "type.googleapis.com/cel.expr.Decl.FunctionDecl.Overload".into()
1115 }
1116 }
1117 }
1118 impl ::prost::Name for FunctionDecl {
1119 const NAME: &'static str = "FunctionDecl";
1120 const PACKAGE: &'static str = "cel.expr";
1121 fn full_name() -> ::prost::alloc::string::String {
1122 "cel.expr.Decl.FunctionDecl".into()
1123 }
1124 fn type_url() -> ::prost::alloc::string::String {
1125 "type.googleapis.com/cel.expr.Decl.FunctionDecl".into()
1126 }
1127 }
1128 /// Required. The declaration kind.
1129 #[derive(Clone, PartialEq, ::prost::Oneof)]
1130 pub enum DeclKind {
1131 /// Identifier declaration.
1132 #[prost(message, tag = "2")]
1133 Ident(IdentDecl),
1134 /// Function declaration.
1135 #[prost(message, tag = "3")]
1136 Function(FunctionDecl),
1137 }
1138}
1139impl ::prost::Name for Decl {
1140 const NAME: &'static str = "Decl";
1141 const PACKAGE: &'static str = "cel.expr";
1142 fn full_name() -> ::prost::alloc::string::String {
1143 "cel.expr.Decl".into()
1144 }
1145 fn type_url() -> ::prost::alloc::string::String {
1146 "type.googleapis.com/cel.expr.Decl".into()
1147 }
1148}
1149/// Describes a resolved reference to a declaration.
1150#[derive(Clone, PartialEq, ::prost::Message)]
1151pub struct Reference {
1152 /// The fully qualified name of the declaration.
1153 #[prost(string, tag = "1")]
1154 pub name: ::prost::alloc::string::String,
1155 /// For references to functions, this is a list of `Overload.overload_id`
1156 /// values which match according to typing rules.
1157 ///
1158 /// If the list has more than one element, overload resolution among the
1159 /// presented candidates must happen at runtime because of dynamic types. The
1160 /// type checker attempts to narrow down this list as much as possible.
1161 ///
1162 /// Empty if this is not a reference to a
1163 /// \[Decl.FunctionDecl\]\[cel.expr.Decl.FunctionDecl\].
1164 #[prost(string, repeated, tag = "3")]
1165 pub overload_id: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1166 /// For references to constants, this may contain the value of the
1167 /// constant if known at compile time.
1168 #[prost(message, optional, tag = "4")]
1169 pub value: ::core::option::Option<Constant>,
1170}
1171impl ::prost::Name for Reference {
1172 const NAME: &'static str = "Reference";
1173 const PACKAGE: &'static str = "cel.expr";
1174 fn full_name() -> ::prost::alloc::string::String {
1175 "cel.expr.Reference".into()
1176 }
1177 fn type_url() -> ::prost::alloc::string::String {
1178 "type.googleapis.com/cel.expr.Reference".into()
1179 }
1180}