Package dev.cel.expr

Class ExprValue.Builder

    • Method Detail

      • 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
      • mergeFrom

        public ExprValue.Builder mergeFrom​(Message other)
        Description copied from interface: Message.Builder
        Merge other into the message being built. other must have the exact same type as this (i.e. getDescriptorForType() == other.getDescriptorForType()).

        Merging occurs as follows. For each field:
        * For singular primitive fields, if the field is set in other, then other's value overwrites the value in this message.
        * For singular message fields, if the field is set in other, it is merged into the corresponding sub-message of this message using the same merging rules.
        * For repeated fields, the elements in other are concatenated with the elements in this message.
        * For oneof groups, if the other message has one of the fields set, the group of this message is cleared and replaced by the field of the other message, so that the oneof constraint is preserved.

        This is equivalent to the Message::MergeFrom method in C++.

        Specified by:
        mergeFrom in interface Message.Builder
        Overrides:
        mergeFrom in class AbstractMessage.Builder<ExprValue.Builder>
      • hasValue

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

        public Value.Builder getValueBuilder()
        .cel.expr.Value value = 1;
      • 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.
      • setError

        public ExprValue.Builder setError​(ErrorSet value)
         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;
      • setError

        public ExprValue.Builder setError​(ErrorSet.Builder builderForValue)
         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;
      • mergeError

        public ExprValue.Builder mergeError​(ErrorSet value)
         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;
      • clearError

        public ExprValue.Builder clearError()
         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;
      • getErrorBuilder

        public ErrorSet.Builder getErrorBuilder()
         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;
      • 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.
      • setUnknown

        public ExprValue.Builder setUnknown​(UnknownSet value)
         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;
      • setUnknown

        public ExprValue.Builder setUnknown​(UnknownSet.Builder builderForValue)
         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;
      • mergeUnknown

        public ExprValue.Builder mergeUnknown​(UnknownSet value)
         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;
      • clearUnknown

        public ExprValue.Builder clearUnknown()
         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;
      • getUnknownBuilder

        public UnknownSet.Builder getUnknownBuilder()
         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;
      • 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