Package dev.cel.expr

Class CheckedExpr

  • All Implemented Interfaces:
    com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, CheckedExprOrBuilder, java.io.Serializable

    public final class CheckedExpr
    extends com.google.protobuf.GeneratedMessageV3
    implements CheckedExprOrBuilder
     A CEL expression which has been successfully type checked.
     
    Protobuf type cel.expr.CheckedExpr
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  CheckedExpr.Builder
      A CEL expression which has been successfully type checked.
      • Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3

        com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,​BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,​BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean containsReferenceMap​(long key)
      A map from expression ids to resolved references.
      boolean containsTypeMap​(long key)
      A map from expression ids to types.
      boolean equals​(java.lang.Object obj)  
      static CheckedExpr getDefaultInstance()  
      CheckedExpr getDefaultInstanceForType()  
      static com.google.protobuf.Descriptors.Descriptor getDescriptor()  
      Expr getExpr()
      The checked expression.
      ExprOrBuilder getExprOrBuilder()
      The checked expression.
      java.lang.String getExprVersion()
      The expr version indicates the major / minor version number of the `expr` representation.
      com.google.protobuf.ByteString getExprVersionBytes()
      The expr version indicates the major / minor version number of the `expr` representation.
      com.google.protobuf.Parser<CheckedExpr> getParserForType()  
      java.util.Map<java.lang.Long,​Reference> getReferenceMap()
      Deprecated.
      int getReferenceMapCount()
      A map from expression ids to resolved references.
      java.util.Map<java.lang.Long,​Reference> getReferenceMapMap()
      A map from expression ids to resolved references.
      Reference getReferenceMapOrDefault​(long key, Reference defaultValue)
      A map from expression ids to resolved references.
      Reference getReferenceMapOrThrow​(long key)
      A map from expression ids to resolved references.
      int getSerializedSize()  
      SourceInfo getSourceInfo()
      The source info derived from input that generated the parsed `expr` and any optimizations made during the type-checking pass.
      SourceInfoOrBuilder getSourceInfoOrBuilder()
      The source info derived from input that generated the parsed `expr` and any optimizations made during the type-checking pass.
      java.util.Map<java.lang.Long,​Type> getTypeMap()
      Deprecated.
      int getTypeMapCount()
      A map from expression ids to types.
      java.util.Map<java.lang.Long,​Type> getTypeMapMap()
      A map from expression ids to types.
      Type getTypeMapOrDefault​(long key, Type defaultValue)
      A map from expression ids to types.
      Type getTypeMapOrThrow​(long key)
      A map from expression ids to types.
      com.google.protobuf.UnknownFieldSet getUnknownFields()  
      boolean hasExpr()
      The checked expression.
      int hashCode()  
      boolean hasSourceInfo()
      The source info derived from input that generated the parsed `expr` and any optimizations made during the type-checking pass.
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()  
      protected com.google.protobuf.MapField internalGetMapField​(int number)  
      boolean isInitialized()  
      static CheckedExpr.Builder newBuilder()  
      static CheckedExpr.Builder newBuilder​(CheckedExpr prototype)  
      CheckedExpr.Builder newBuilderForType()  
      protected CheckedExpr.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)  
      protected java.lang.Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)  
      static CheckedExpr parseDelimitedFrom​(java.io.InputStream input)  
      static CheckedExpr parseDelimitedFrom​(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static CheckedExpr parseFrom​(byte[] data)  
      static CheckedExpr parseFrom​(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static CheckedExpr parseFrom​(com.google.protobuf.ByteString data)  
      static CheckedExpr parseFrom​(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static CheckedExpr parseFrom​(com.google.protobuf.CodedInputStream input)  
      static CheckedExpr parseFrom​(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static CheckedExpr parseFrom​(java.io.InputStream input)  
      static CheckedExpr parseFrom​(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static CheckedExpr parseFrom​(java.nio.ByteBuffer data)  
      static CheckedExpr parseFrom​(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static com.google.protobuf.Parser<CheckedExpr> parser()  
      CheckedExpr.Builder toBuilder()  
      void writeTo​(com.google.protobuf.CodedOutputStream output)  
      • Methods inherited from class com.google.protobuf.GeneratedMessageV3

        canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
      • Methods inherited from class com.google.protobuf.AbstractMessage

        findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
      • Methods inherited from class com.google.protobuf.AbstractMessageLite

        addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface com.google.protobuf.MessageLite

        toByteArray, toByteString, writeDelimitedTo, writeTo
      • Methods inherited from interface com.google.protobuf.MessageOrBuilder

        findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
    • Method Detail

      • newInstance

        protected java.lang.Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getUnknownFields

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
        Specified by:
        getUnknownFields in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getUnknownFields in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetMapField

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getReferenceMapCount

        public int getReferenceMapCount()
        Description copied from interface: CheckedExprOrBuilder
         A map from expression ids to resolved references.
         The following entries are in this table:
         - An Ident or Select expression is represented here if it resolves to a
           declaration. For instance, if `a.b.c` is represented by
           `select(select(id(a), b), c)`, and `a.b` resolves to a declaration,
           while `c` is a field selection, then the reference is attached to the
           nested select expression (but not to the id or or the outer select).
           In turn, if `a` resolves to a declaration and `b.c` are field selections,
           the reference is attached to the ident expression.
         - Every Call expression has an entry here, identifying the function being
           called.
         - Every CreateStruct expression for a message has an entry, identifying
           the message.
         
        map<int64, .cel.expr.Reference> reference_map = 2;
        Specified by:
        getReferenceMapCount in interface CheckedExprOrBuilder
      • containsReferenceMap

        public boolean containsReferenceMap​(long key)
         A map from expression ids to resolved references.
         The following entries are in this table:
         - An Ident or Select expression is represented here if it resolves to a
           declaration. For instance, if `a.b.c` is represented by
           `select(select(id(a), b), c)`, and `a.b` resolves to a declaration,
           while `c` is a field selection, then the reference is attached to the
           nested select expression (but not to the id or or the outer select).
           In turn, if `a` resolves to a declaration and `b.c` are field selections,
           the reference is attached to the ident expression.
         - Every Call expression has an entry here, identifying the function being
           called.
         - Every CreateStruct expression for a message has an entry, identifying
           the message.
         
        map<int64, .cel.expr.Reference> reference_map = 2;
        Specified by:
        containsReferenceMap in interface CheckedExprOrBuilder
      • getReferenceMapMap

        public java.util.Map<java.lang.Long,​Reference> getReferenceMapMap()
         A map from expression ids to resolved references.
         The following entries are in this table:
         - An Ident or Select expression is represented here if it resolves to a
           declaration. For instance, if `a.b.c` is represented by
           `select(select(id(a), b), c)`, and `a.b` resolves to a declaration,
           while `c` is a field selection, then the reference is attached to the
           nested select expression (but not to the id or or the outer select).
           In turn, if `a` resolves to a declaration and `b.c` are field selections,
           the reference is attached to the ident expression.
         - Every Call expression has an entry here, identifying the function being
           called.
         - Every CreateStruct expression for a message has an entry, identifying
           the message.
         
        map<int64, .cel.expr.Reference> reference_map = 2;
        Specified by:
        getReferenceMapMap in interface CheckedExprOrBuilder
      • getReferenceMapOrDefault

        public Reference getReferenceMapOrDefault​(long key,
                                                  Reference defaultValue)
         A map from expression ids to resolved references.
         The following entries are in this table:
         - An Ident or Select expression is represented here if it resolves to a
           declaration. For instance, if `a.b.c` is represented by
           `select(select(id(a), b), c)`, and `a.b` resolves to a declaration,
           while `c` is a field selection, then the reference is attached to the
           nested select expression (but not to the id or or the outer select).
           In turn, if `a` resolves to a declaration and `b.c` are field selections,
           the reference is attached to the ident expression.
         - Every Call expression has an entry here, identifying the function being
           called.
         - Every CreateStruct expression for a message has an entry, identifying
           the message.
         
        map<int64, .cel.expr.Reference> reference_map = 2;
        Specified by:
        getReferenceMapOrDefault in interface CheckedExprOrBuilder
      • getReferenceMapOrThrow

        public Reference getReferenceMapOrThrow​(long key)
         A map from expression ids to resolved references.
         The following entries are in this table:
         - An Ident or Select expression is represented here if it resolves to a
           declaration. For instance, if `a.b.c` is represented by
           `select(select(id(a), b), c)`, and `a.b` resolves to a declaration,
           while `c` is a field selection, then the reference is attached to the
           nested select expression (but not to the id or or the outer select).
           In turn, if `a` resolves to a declaration and `b.c` are field selections,
           the reference is attached to the ident expression.
         - Every Call expression has an entry here, identifying the function being
           called.
         - Every CreateStruct expression for a message has an entry, identifying
           the message.
         
        map<int64, .cel.expr.Reference> reference_map = 2;
        Specified by:
        getReferenceMapOrThrow in interface CheckedExprOrBuilder
      • getTypeMapCount

        public int getTypeMapCount()
        Description copied from interface: CheckedExprOrBuilder
         A map from expression ids to types.
         Every expression node which has a type different than DYN has a mapping
         here. If an expression has type DYN, it is omitted from this map to save
         space.
         
        map<int64, .cel.expr.Type> type_map = 3;
        Specified by:
        getTypeMapCount in interface CheckedExprOrBuilder
      • containsTypeMap

        public boolean containsTypeMap​(long key)
         A map from expression ids to types.
         Every expression node which has a type different than DYN has a mapping
         here. If an expression has type DYN, it is omitted from this map to save
         space.
         
        map<int64, .cel.expr.Type> type_map = 3;
        Specified by:
        containsTypeMap in interface CheckedExprOrBuilder
      • getTypeMapMap

        public java.util.Map<java.lang.Long,​Type> getTypeMapMap()
         A map from expression ids to types.
         Every expression node which has a type different than DYN has a mapping
         here. If an expression has type DYN, it is omitted from this map to save
         space.
         
        map<int64, .cel.expr.Type> type_map = 3;
        Specified by:
        getTypeMapMap in interface CheckedExprOrBuilder
      • getTypeMapOrDefault

        public Type getTypeMapOrDefault​(long key,
                                        Type defaultValue)
         A map from expression ids to types.
         Every expression node which has a type different than DYN has a mapping
         here. If an expression has type DYN, it is omitted from this map to save
         space.
         
        map<int64, .cel.expr.Type> type_map = 3;
        Specified by:
        getTypeMapOrDefault in interface CheckedExprOrBuilder
      • getTypeMapOrThrow

        public Type getTypeMapOrThrow​(long key)
         A map from expression ids to types.
         Every expression node which has a type different than DYN has a mapping
         here. If an expression has type DYN, it is omitted from this map to save
         space.
         
        map<int64, .cel.expr.Type> type_map = 3;
        Specified by:
        getTypeMapOrThrow in interface CheckedExprOrBuilder
      • hasSourceInfo

        public boolean hasSourceInfo()
         The source info derived from input that generated the parsed `expr` and
         any optimizations made during the type-checking pass.
         
        .cel.expr.SourceInfo source_info = 5;
        Specified by:
        hasSourceInfo in interface CheckedExprOrBuilder
        Returns:
        Whether the sourceInfo field is set.
      • getSourceInfo

        public SourceInfo getSourceInfo()
         The source info derived from input that generated the parsed `expr` and
         any optimizations made during the type-checking pass.
         
        .cel.expr.SourceInfo source_info = 5;
        Specified by:
        getSourceInfo in interface CheckedExprOrBuilder
        Returns:
        The sourceInfo.
      • getSourceInfoOrBuilder

        public SourceInfoOrBuilder getSourceInfoOrBuilder()
         The source info derived from input that generated the parsed `expr` and
         any optimizations made during the type-checking pass.
         
        .cel.expr.SourceInfo source_info = 5;
        Specified by:
        getSourceInfoOrBuilder in interface CheckedExprOrBuilder
      • getExprVersion

        public java.lang.String getExprVersion()
         The expr version indicates the major / minor version number of the `expr`
         representation.
         The most common reason for a version change will be to indicate to the CEL
         runtimes that transformations have been performed on the expr during static
         analysis. In some cases, this will save the runtime the work of applying
         the same or similar transformations prior to evaluation.
         
        string expr_version = 6;
        Specified by:
        getExprVersion in interface CheckedExprOrBuilder
        Returns:
        The exprVersion.
      • getExprVersionBytes

        public com.google.protobuf.ByteString getExprVersionBytes()
         The expr version indicates the major / minor version number of the `expr`
         representation.
         The most common reason for a version change will be to indicate to the CEL
         runtimes that transformations have been performed on the expr during static
         analysis. In some cases, this will save the runtime the work of applying
         the same or similar transformations prior to evaluation.
         
        string expr_version = 6;
        Specified by:
        getExprVersionBytes in interface CheckedExprOrBuilder
        Returns:
        The bytes for exprVersion.
      • hasExpr

        public boolean hasExpr()
         The checked expression. Semantically equivalent to the parsed `expr`, but
         may have structural differences.
         
        .cel.expr.Expr expr = 4;
        Specified by:
        hasExpr in interface CheckedExprOrBuilder
        Returns:
        Whether the expr field is set.
      • getExpr

        public Expr getExpr()
         The checked expression. Semantically equivalent to the parsed `expr`, but
         may have structural differences.
         
        .cel.expr.Expr expr = 4;
        Specified by:
        getExpr in interface CheckedExprOrBuilder
        Returns:
        The expr.
      • getExprOrBuilder

        public ExprOrBuilder getExprOrBuilder()
         The checked expression. Semantically equivalent to the parsed `expr`, but
         may have structural differences.
         
        .cel.expr.Expr expr = 4;
        Specified by:
        getExprOrBuilder in interface CheckedExprOrBuilder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws java.io.IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        java.io.IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static CheckedExpr parseFrom​(java.nio.ByteBuffer data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CheckedExpr parseFrom​(java.nio.ByteBuffer data,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CheckedExpr parseFrom​(com.google.protobuf.ByteString data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CheckedExpr parseFrom​(com.google.protobuf.ByteString data,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CheckedExpr parseFrom​(byte[] data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CheckedExpr parseFrom​(byte[] data,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CheckedExpr parseFrom​(java.io.InputStream input)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static CheckedExpr parseFrom​(java.io.InputStream input,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static CheckedExpr parseDelimitedFrom​(java.io.InputStream input)
                                              throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static CheckedExpr parseDelimitedFrom​(java.io.InputStream input,
                                                     com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                              throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static CheckedExpr parseFrom​(com.google.protobuf.CodedInputStream input)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static CheckedExpr parseFrom​(com.google.protobuf.CodedInputStream input,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • newBuilderForType

        public CheckedExpr.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public CheckedExpr.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected CheckedExpr.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static CheckedExpr getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<CheckedExpr> parser()
      • getParserForType

        public com.google.protobuf.Parser<CheckedExpr> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public CheckedExpr getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder