Class CelConstant


  • @Internal
    @Immutable
    public abstract class CelConstant
    extends java.lang.Object
    Represents a primitive literal.

    This is the CEL-Java native type equivalent of Constant message type from syntax.proto.

    • Constructor Detail

      • CelConstant

        public CelConstant()
    • Method Detail

      • nullValue

        public abstract com.google.protobuf.NullValue nullValue()
      • booleanValue

        public abstract boolean booleanValue()
      • int64Value

        public abstract long int64Value()
      • uint64Value

        public abstract com.google.common.primitives.UnsignedLong uint64Value()
      • doubleValue

        public abstract double doubleValue()
      • stringValue

        public abstract java.lang.String stringValue()
      • bytesValue

        public abstract com.google.protobuf.ByteString bytesValue()
      • timestampValue

        @Deprecated
        public abstract com.google.protobuf.Timestamp timestampValue()
        Deprecated.
        Do not use. Timestamp is no longer built-in CEL type.
      • durationValue

        @Deprecated
        public abstract com.google.protobuf.Duration durationValue()
        Deprecated.
        Do not use. Duration is no longer built-in CEL type.
      • ofValue

        public static CelConstant ofValue​(com.google.protobuf.NullValue value)
      • ofValue

        public static CelConstant ofValue​(boolean value)
      • ofValue

        public static CelConstant ofValue​(long value)
      • ofValue

        public static CelConstant ofValue​(com.google.common.primitives.UnsignedLong value)
      • ofValue

        public static CelConstant ofValue​(double value)
      • ofValue

        public static CelConstant ofValue​(java.lang.String value)
      • ofValue

        public static CelConstant ofValue​(com.google.protobuf.ByteString value)
      • isConstantValue

        public static boolean isConstantValue​(java.lang.Object value)
        Checks whether the provided Java object is a valid CelConstant value.
      • ofObjectValue

        public static CelConstant ofObjectValue​(java.lang.Object value)
        Converts the given Java object into a CelConstant value. This is equivalent of calling ofValue(com.google.protobuf.NullValue) with concrete types.
        Throws:
        java.lang.IllegalArgumentException - If the value is not a supported CelConstant. This includes the deprecated duration and timestamp values.
      • ofValue

        @Deprecated
        public static CelConstant ofValue​(com.google.protobuf.Duration value)
        Deprecated.
        Do not use. Duration is no longer built-in CEL type.
      • ofValue

        @Deprecated
        public static CelConstant ofValue​(com.google.protobuf.Timestamp value)
        Deprecated.
        Do not use. Timestamp is no longer built-in CEL type.