Package dev.cel.expr

Class ExprValue

    • Method Detail

      • hasValue

        public boolean hasValue()
        .cel.expr.Value value = 1;
        Specified by:
        hasValue in interface ExprValueOrBuilder
        Returns:
        Whether the value field is set.
      • hasError

        public boolean hasError()
         The set of errors in the critical path of evaluation.
         Only errors in the critical path are included. For example,
         `(<error1> || true) && <error2>` will only result in `<error2>`,
         while `<error1> || <error2>` will result in both `<error1>` and
         `<error2>`.
         Errors cause by the presence of other errors are not included in the
         set. For example `<error1>.foo`, `foo(<error1>)`, and `<error1> + 1` will
         only result in `<error1>`.
         Multiple errors *might* be included when evaluation could result
         in different errors. For example `<error1> + <error2>` and
         `foo(<error1>, <error2>)` may result in `<error1>`, `<error2>` or both.
         The exact subset of errors included for this case is unspecified and
         depends on the implementation details of the evaluator.
         
        .cel.expr.ErrorSet error = 2;
        Specified by:
        hasError in interface ExprValueOrBuilder
        Returns:
        Whether the error field is set.
      • getError

        public ErrorSet getError()
         The set of errors in the critical path of evaluation.
         Only errors in the critical path are included. For example,
         `(<error1> || true) && <error2>` will only result in `<error2>`,
         while `<error1> || <error2>` will result in both `<error1>` and
         `<error2>`.
         Errors cause by the presence of other errors are not included in the
         set. For example `<error1>.foo`, `foo(<error1>)`, and `<error1> + 1` will
         only result in `<error1>`.
         Multiple errors *might* be included when evaluation could result
         in different errors. For example `<error1> + <error2>` and
         `foo(<error1>, <error2>)` may result in `<error1>`, `<error2>` or both.
         The exact subset of errors included for this case is unspecified and
         depends on the implementation details of the evaluator.
         
        .cel.expr.ErrorSet error = 2;
        Specified by:
        getError in interface ExprValueOrBuilder
        Returns:
        The error.
      • getErrorOrBuilder

        public ErrorSetOrBuilder getErrorOrBuilder()
         The set of errors in the critical path of evaluation.
         Only errors in the critical path are included. For example,
         `(<error1> || true) && <error2>` will only result in `<error2>`,
         while `<error1> || <error2>` will result in both `<error1>` and
         `<error2>`.
         Errors cause by the presence of other errors are not included in the
         set. For example `<error1>.foo`, `foo(<error1>)`, and `<error1> + 1` will
         only result in `<error1>`.
         Multiple errors *might* be included when evaluation could result
         in different errors. For example `<error1> + <error2>` and
         `foo(<error1>, <error2>)` may result in `<error1>`, `<error2>` or both.
         The exact subset of errors included for this case is unspecified and
         depends on the implementation details of the evaluator.
         
        .cel.expr.ErrorSet error = 2;
        Specified by:
        getErrorOrBuilder in interface ExprValueOrBuilder
      • hasUnknown

        public boolean hasUnknown()
         The set of unknowns in the critical path of evaluation.
         Unknown behaves identically to Error with regards to propagation.
         Specifically, only unknowns in the critical path are included, unknowns
         caused by the presence of other unknowns are not included, and multiple
         unknowns *might* be included when evaluation could result in
         different unknowns. For example:
             (<unknown[1]> || true) && <unknown[2]> -> <unknown[2]>
             <unknown[1]> || <unknown[2]> -> <unknown[1,2]>
             <unknown[1]>.foo -> <unknown[1]>
             foo(<unknown[1]>) -> <unknown[1]>
             <unknown[1]> + <unknown[2]> -> <unknown[1]> or <unknown[2[>
         Unknown takes precedence over Error in cases where a `Value` can short
         circuit the result:
             <error> || <unknown> -> <unknown>
             <error> && <unknown> -> <unknown>
         Errors take precedence in all other cases:
             <unknown> + <error> -> <error>
             foo(<unknown>, <error>) -> <error>
         
        .cel.expr.UnknownSet unknown = 3;
        Specified by:
        hasUnknown in interface ExprValueOrBuilder
        Returns:
        Whether the unknown field is set.
      • getUnknown

        public UnknownSet getUnknown()
         The set of unknowns in the critical path of evaluation.
         Unknown behaves identically to Error with regards to propagation.
         Specifically, only unknowns in the critical path are included, unknowns
         caused by the presence of other unknowns are not included, and multiple
         unknowns *might* be included when evaluation could result in
         different unknowns. For example:
             (<unknown[1]> || true) && <unknown[2]> -> <unknown[2]>
             <unknown[1]> || <unknown[2]> -> <unknown[1,2]>
             <unknown[1]>.foo -> <unknown[1]>
             foo(<unknown[1]>) -> <unknown[1]>
             <unknown[1]> + <unknown[2]> -> <unknown[1]> or <unknown[2[>
         Unknown takes precedence over Error in cases where a `Value` can short
         circuit the result:
             <error> || <unknown> -> <unknown>
             <error> && <unknown> -> <unknown>
         Errors take precedence in all other cases:
             <unknown> + <error> -> <error>
             foo(<unknown>, <error>) -> <error>
         
        .cel.expr.UnknownSet unknown = 3;
        Specified by:
        getUnknown in interface ExprValueOrBuilder
        Returns:
        The unknown.
      • getUnknownOrBuilder

        public UnknownSetOrBuilder getUnknownOrBuilder()
         The set of unknowns in the critical path of evaluation.
         Unknown behaves identically to Error with regards to propagation.
         Specifically, only unknowns in the critical path are included, unknowns
         caused by the presence of other unknowns are not included, and multiple
         unknowns *might* be included when evaluation could result in
         different unknowns. For example:
             (<unknown[1]> || true) && <unknown[2]> -> <unknown[2]>
             <unknown[1]> || <unknown[2]> -> <unknown[1,2]>
             <unknown[1]>.foo -> <unknown[1]>
             foo(<unknown[1]>) -> <unknown[1]>
             <unknown[1]> + <unknown[2]> -> <unknown[1]> or <unknown[2[>
         Unknown takes precedence over Error in cases where a `Value` can short
         circuit the result:
             <error> || <unknown> -> <unknown>
             <error> && <unknown> -> <unknown>
         Errors take precedence in all other cases:
             <unknown> + <error> -> <error>
             foo(<unknown>, <error>) -> <error>
         
        .cel.expr.UnknownSet unknown = 3;
        Specified by:
        getUnknownOrBuilder in interface ExprValueOrBuilder
      • getSerializedSize

        public int getSerializedSize()
        Description copied from interface: MessageLite
        Get the number of bytes required to encode this message. The result is only computed on the first call and memoized after that. If this message requires more than Integer.MAX_VALUE bytes to encode, the return value will be smaller than the actual number of bytes required and might be negative.
        Specified by:
        getSerializedSize in interface MessageLite
        Overrides:
        getSerializedSize in class GeneratedMessageV3
      • equals

        public boolean equals​(java.lang.Object obj)
        Description copied from interface: Message
        Compares the specified object with this message for equality. Returns true if the given object is a message of the same type (as defined by getDescriptorForType()) and has identical values for all of its fields. Subclasses must implement this; inheriting Object.equals() is incorrect.
        Specified by:
        equals in interface Message
        Overrides:
        equals in class AbstractMessage
        Parameters:
        obj - object to be compared for equality with this message
        Returns:
        true if the specified object is equal to this message
      • hashCode

        public int hashCode()
        Description copied from interface: Message
        Returns the hash code value for this message. The hash code of a message should mix the message's type (object identity of the descriptor) with its contents (known and unknown field values). Subclasses must implement this; inheriting Object.hashCode() is incorrect.
        Specified by:
        hashCode in interface Message
        Overrides:
        hashCode in class AbstractMessage
        Returns:
        the hash code value for this message
        See Also:
        Map.hashCode()
      • parseFrom

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

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

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

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

        public static ExprValue parseFrom​(CodedInputStream input)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • getDefaultInstance

        public static ExprValue getDefaultInstance()
      • getDefaultInstanceForType

        public ExprValue getDefaultInstanceForType()
        Description copied from interface: MessageLiteOrBuilder
        Get an instance of the type with no fields set. Because no fields are set, all getters for singular fields will return default values and repeated fields will appear empty. This may or may not be a singleton. This differs from the getDefaultInstance() method of generated message classes in that this method is an abstract method of the MessageLite interface whereas getDefaultInstance() is a static method of a specific class. They return the same thing.
        Specified by:
        getDefaultInstanceForType in interface MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface MessageOrBuilder