Package dev.cel.expr

Class Constant

  • All Implemented Interfaces:
    Message, MessageLite, MessageLiteOrBuilder, MessageOrBuilder, ConstantOrBuilder, java.io.Serializable

    public final class Constant
    extends GeneratedMessageV3
    implements ConstantOrBuilder
     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][cel.expr.Expr] elements which require evaluation and
     are thus not constant.
     Examples of constants include: `"hello"`, `b'bytes'`, `1u`, `4.2`, `-2`,
     `true`, `null`.
     
    Protobuf type cel.expr.Constant
    See Also:
    Serialized Form