package google.api.expr.v1alpha1

Mouse Melon logoGet desktop application:
View/edit binary Protocol Buffers messages

message Constant

syntax.proto:242

Represents a primitive literal. Named 'Constant' here for backwards compatibility. This is similar as the primitives supported in the well-known type `google.protobuf.Value`, but richer so it can represent CEL's full range of primitives. Lists and structs are not included as constants as these aggregate types may contain [Expr][google.api.expr.v1alpha1.Expr] elements which require evaluation and are thus not constant. Examples of literals include: `"hello"`, `b'bytes'`, `1u`, `4.2`, `-2`, `true`, `null`.

Used in: Expr

message EnumValue

value.proto:76

An enum value.

Used in: Value

message Expr

syntax.proto:55

An abstract representation of a common expression. Expressions are abstractly represented as a collection of identifiers, select statements, function calls, literals, and comprehensions. All operators with the exception of the '.' operator are modelled as function calls. This makes it easy to represent new operators into the existing AST. All references within expressions must resolve to a [Decl][google.api.expr.v1alpha1.Decl] provided at type-check for an expression to be valid. A reference may either be a bare identifier `name` or a qualified identifier `google.api.name`. References may either refer to a value or a function declaration. For example, the expression `google.api.name.startsWith('expr')` references the declaration `google.api.name` within a [Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression, and the function declaration `startsWith`.

Used in: Expr.Call, Expr.Comprehension, Expr.CreateList, Expr.CreateStruct.Entry, Expr.Select, ParsedExpr, SourceInfo

message Expr.Call

syntax.proto:88

A call expression, including calls to predefined functions and operators. For example, `value == 10`, `size(map_value)`.

Used in: Expr

message Expr.Comprehension

syntax.proto:169

A comprehension expression applied to a list or map. Comprehensions are not part of the core syntax, but enabled with macros. A macro matches a specific call signature within a parsed AST and replaces the call with an alternate AST block. Macro expansion happens at parse time. The following macros are supported within CEL: Aggregate type macros may be applied to all elements in a list or all keys in a map: * `all`, `exists`, `exists_one` - test a predicate expression against the inputs and return `true` if the predicate is satisfied for all, any, or only one value `list.all(x, x < 10)`. * `filter` - test a predicate expression against the inputs and return the subset of elements which satisfy the predicate: `payments.filter(p, p > 1000)`. * `map` - apply an expression to all elements in the input and return the output aggregate type: `[1, 2, 3].map(i, i * i)`. The `has(m.x)` macro tests whether the property `x` is present in struct `m`. The semantics of this macro depend on the type of `m`. For proto2 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`.

Used in: Expr

message Expr.CreateList

syntax.proto:104

A list creation expression. Lists may either be homogenous, e.g. `[1, 2, 3]`, or heterogenous, e.g. `dyn([1, 'hello', 2.0])`

Used in: Expr

message Expr.CreateStruct

syntax.proto:114

A map or message creation expression. Maps are constructed as `{'key_name': 'value'}`. Message construction is similar, but prefixed with a type name and composed of field ids: `types.MyType{field_id: 'value'}`.

Used in: Expr

message Expr.CreateStruct.Entry

syntax.proto:116

Represents an entry.

Used in: CreateStruct

message Expr.Ident

syntax.proto:57

An identifier expression. e.g. `request`.

Used in: Expr

message Expr.Select

syntax.proto:66

A field selection expression. e.g. `request.auth`.

Used in: Expr

message ListValue

value.proto:88

A list. Wrapped in a message so 'not set' and empty can be differentiated, which is required for use in a 'oneof'.

Used in: Value

message MapValue

value.proto:97

A map. Wrapped in a message so 'not set' and empty can be differentiated, which is required for use in a 'oneof'.

Used in: Value

message MapValue.Entry

value.proto:99

An entry in the map.

Used in: MapValue

message ParsedExpr

syntax.proto:32

An expression together with source information as returned by the parser.

message SourceInfo

syntax.proto:279

Source information collected at parse time.

Used in: ParsedExpr

message SourcePosition

syntax.proto:313

A specific position in source.

message Value

value.proto:34

Represents a CEL value. This is similar to `google.protobuf.Value`, but can represent CEL's full range of values.

Used in: ListValue, MapValue.Entry