Package dev.cel.expr
Class Constant
- java.lang.Object
- 
- com.google.protobuf.AbstractMessageLite
- 
- com.google.protobuf.AbstractMessage
- 
- com.google.protobuf.GeneratedMessageV3
- 
- dev.cel.expr.Constant
 
 
 
 
- 
- All Implemented Interfaces:
- com.google.protobuf.Message,- com.google.protobuf.MessageLite,- com.google.protobuf.MessageLiteOrBuilder,- com.google.protobuf.MessageOrBuilder,- ConstantOrBuilder,- java.io.Serializable
 
 public final class Constant extends com.google.protobuf.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 typecel.expr.Constant- See Also:
- Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classConstant.BuilderRepresents a primitive literal.static classConstant.ConstantKindCase- 
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static intBOOL_VALUE_FIELD_NUMBERstatic intBYTES_VALUE_FIELD_NUMBERstatic intDOUBLE_VALUE_FIELD_NUMBERstatic intDURATION_VALUE_FIELD_NUMBERstatic intINT64_VALUE_FIELD_NUMBERstatic intNULL_VALUE_FIELD_NUMBERstatic intSTRING_VALUE_FIELD_NUMBERstatic intTIMESTAMP_VALUE_FIELD_NUMBERstatic intUINT64_VALUE_FIELD_NUMBER
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)booleangetBoolValue()boolean value.com.google.protobuf.ByteStringgetBytesValue()bytes value.Constant.ConstantKindCasegetConstantKindCase()static ConstantgetDefaultInstance()ConstantgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()doublegetDoubleValue()double value.com.google.protobuf.DurationgetDurationValue()Deprecated.cel.expr.Constant.duration_value is deprecated.com.google.protobuf.DurationOrBuildergetDurationValueOrBuilder()Deprecated.longgetInt64Value()int64 value.com.google.protobuf.NullValuegetNullValue()null value.intgetNullValueValue()null value.com.google.protobuf.Parser<Constant>getParserForType()intgetSerializedSize()java.lang.StringgetStringValue()string value.com.google.protobuf.ByteStringgetStringValueBytes()string value.com.google.protobuf.TimestampgetTimestampValue()Deprecated.cel.expr.Constant.timestamp_value is deprecated.com.google.protobuf.TimestampOrBuildergetTimestampValueOrBuilder()Deprecated.longgetUint64Value()uint64 value.com.google.protobuf.UnknownFieldSetgetUnknownFields()booleanhasBoolValue()boolean value.booleanhasBytesValue()bytes value.booleanhasDoubleValue()double value.booleanhasDurationValue()Deprecated.cel.expr.Constant.duration_value is deprecated.inthashCode()booleanhasInt64Value()int64 value.booleanhasNullValue()null value.booleanhasStringValue()string value.booleanhasTimestampValue()Deprecated.cel.expr.Constant.timestamp_value is deprecated.booleanhasUint64Value()uint64 value.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static Constant.BuildernewBuilder()static Constant.BuildernewBuilder(Constant prototype)Constant.BuildernewBuilderForType()protected Constant.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected java.lang.ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static ConstantparseDelimitedFrom(java.io.InputStream input)static ConstantparseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static ConstantparseFrom(byte[] data)static ConstantparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static ConstantparseFrom(com.google.protobuf.ByteString data)static ConstantparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static ConstantparseFrom(com.google.protobuf.CodedInputStream input)static ConstantparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static ConstantparseFrom(java.io.InputStream input)static ConstantparseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static ConstantparseFrom(java.nio.ByteBuffer data)static ConstantparseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<Constant>parser()Constant.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)- 
Methods inherited from class com.google.protobuf.GeneratedMessageV3canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, 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.AbstractMessagefindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
 - 
Methods inherited from class com.google.protobuf.AbstractMessageLiteaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
 - 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
- 
 
- 
- 
- 
Field Detail- 
NULL_VALUE_FIELD_NUMBERpublic static final int NULL_VALUE_FIELD_NUMBER - See Also:
- Constant Field Values
 
 - 
BOOL_VALUE_FIELD_NUMBERpublic static final int BOOL_VALUE_FIELD_NUMBER - See Also:
- Constant Field Values
 
 - 
INT64_VALUE_FIELD_NUMBERpublic static final int INT64_VALUE_FIELD_NUMBER - See Also:
- Constant Field Values
 
 - 
UINT64_VALUE_FIELD_NUMBERpublic static final int UINT64_VALUE_FIELD_NUMBER - See Also:
- Constant Field Values
 
 - 
DOUBLE_VALUE_FIELD_NUMBERpublic static final int DOUBLE_VALUE_FIELD_NUMBER - See Also:
- Constant Field Values
 
 - 
STRING_VALUE_FIELD_NUMBERpublic static final int STRING_VALUE_FIELD_NUMBER - See Also:
- Constant Field Values
 
 - 
BYTES_VALUE_FIELD_NUMBERpublic static final int BYTES_VALUE_FIELD_NUMBER - See Also:
- Constant Field Values
 
 - 
DURATION_VALUE_FIELD_NUMBERpublic static final int DURATION_VALUE_FIELD_NUMBER - See Also:
- Constant Field Values
 
 - 
TIMESTAMP_VALUE_FIELD_NUMBERpublic static final int TIMESTAMP_VALUE_FIELD_NUMBER - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
newInstanceprotected java.lang.Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) - Overrides:
- newInstancein class- com.google.protobuf.GeneratedMessageV3
 
 - 
getUnknownFieldspublic final com.google.protobuf.UnknownFieldSet getUnknownFields() - Specified by:
- getUnknownFieldsin interface- com.google.protobuf.MessageOrBuilder
- Overrides:
- getUnknownFieldsin class- com.google.protobuf.GeneratedMessageV3
 
 - 
getDescriptorpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor() 
 - 
internalGetFieldAccessorTableprotected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() - Specified by:
- internalGetFieldAccessorTablein class- com.google.protobuf.GeneratedMessageV3
 
 - 
getConstantKindCasepublic Constant.ConstantKindCase getConstantKindCase() - Specified by:
- getConstantKindCasein interface- ConstantOrBuilder
 
 - 
hasNullValuepublic boolean hasNullValue() null value. .google.protobuf.NullValue null_value = 1;- Specified by:
- hasNullValuein interface- ConstantOrBuilder
- Returns:
- Whether the nullValue field is set.
 
 - 
getNullValueValuepublic int getNullValueValue() null value. .google.protobuf.NullValue null_value = 1;- Specified by:
- getNullValueValuein interface- ConstantOrBuilder
- Returns:
- The enum numeric value on the wire for nullValue.
 
 - 
getNullValuepublic com.google.protobuf.NullValue getNullValue() null value. .google.protobuf.NullValue null_value = 1;- Specified by:
- getNullValuein interface- ConstantOrBuilder
- Returns:
- The nullValue.
 
 - 
hasBoolValuepublic boolean hasBoolValue() boolean value. bool bool_value = 2;- Specified by:
- hasBoolValuein interface- ConstantOrBuilder
- Returns:
- Whether the boolValue field is set.
 
 - 
getBoolValuepublic boolean getBoolValue() boolean value. bool bool_value = 2;- Specified by:
- getBoolValuein interface- ConstantOrBuilder
- Returns:
- The boolValue.
 
 - 
hasInt64Valuepublic boolean hasInt64Value() int64 value. int64 int64_value = 3;- Specified by:
- hasInt64Valuein interface- ConstantOrBuilder
- Returns:
- Whether the int64Value field is set.
 
 - 
getInt64Valuepublic long getInt64Value() int64 value. int64 int64_value = 3;- Specified by:
- getInt64Valuein interface- ConstantOrBuilder
- Returns:
- The int64Value.
 
 - 
hasUint64Valuepublic boolean hasUint64Value() uint64 value. uint64 uint64_value = 4;- Specified by:
- hasUint64Valuein interface- ConstantOrBuilder
- Returns:
- Whether the uint64Value field is set.
 
 - 
getUint64Valuepublic long getUint64Value() uint64 value. uint64 uint64_value = 4;- Specified by:
- getUint64Valuein interface- ConstantOrBuilder
- Returns:
- The uint64Value.
 
 - 
hasDoubleValuepublic boolean hasDoubleValue() double value. double double_value = 5;- Specified by:
- hasDoubleValuein interface- ConstantOrBuilder
- Returns:
- Whether the doubleValue field is set.
 
 - 
getDoubleValuepublic double getDoubleValue() double value. double double_value = 5;- Specified by:
- getDoubleValuein interface- ConstantOrBuilder
- Returns:
- The doubleValue.
 
 - 
hasStringValuepublic boolean hasStringValue() string value. string string_value = 6;- Specified by:
- hasStringValuein interface- ConstantOrBuilder
- Returns:
- Whether the stringValue field is set.
 
 - 
getStringValuepublic java.lang.String getStringValue() string value. string string_value = 6;- Specified by:
- getStringValuein interface- ConstantOrBuilder
- Returns:
- The stringValue.
 
 - 
getStringValueBytespublic com.google.protobuf.ByteString getStringValueBytes() string value. string string_value = 6;- Specified by:
- getStringValueBytesin interface- ConstantOrBuilder
- Returns:
- The bytes for stringValue.
 
 - 
hasBytesValuepublic boolean hasBytesValue() bytes value. bytes bytes_value = 7;- Specified by:
- hasBytesValuein interface- ConstantOrBuilder
- Returns:
- Whether the bytesValue field is set.
 
 - 
getBytesValuepublic com.google.protobuf.ByteString getBytesValue() bytes value. bytes bytes_value = 7;- Specified by:
- getBytesValuein interface- ConstantOrBuilder
- Returns:
- The bytesValue.
 
 - 
hasDurationValue@Deprecated public boolean hasDurationValue() Deprecated.cel.expr.Constant.duration_value is deprecated. See cel/expr/syntax.proto;l=301protobuf.Duration value. Deprecated: duration is no longer considered a builtin cel type. .google.protobuf.Duration duration_value = 8 [deprecated = true];- Specified by:
- hasDurationValuein interface- ConstantOrBuilder
- Returns:
- Whether the durationValue field is set.
 
 - 
getDurationValue@Deprecated public com.google.protobuf.Duration getDurationValue() Deprecated.cel.expr.Constant.duration_value is deprecated. See cel/expr/syntax.proto;l=301protobuf.Duration value. Deprecated: duration is no longer considered a builtin cel type. .google.protobuf.Duration duration_value = 8 [deprecated = true];- Specified by:
- getDurationValuein interface- ConstantOrBuilder
- Returns:
- The durationValue.
 
 - 
getDurationValueOrBuilder@Deprecated public com.google.protobuf.DurationOrBuilder getDurationValueOrBuilder() Deprecated.protobuf.Duration value. Deprecated: duration is no longer considered a builtin cel type. .google.protobuf.Duration duration_value = 8 [deprecated = true];- Specified by:
- getDurationValueOrBuilderin interface- ConstantOrBuilder
 
 - 
hasTimestampValue@Deprecated public boolean hasTimestampValue() Deprecated.cel.expr.Constant.timestamp_value is deprecated. See cel/expr/syntax.proto;l=306protobuf.Timestamp value. Deprecated: timestamp is no longer considered a builtin cel type. .google.protobuf.Timestamp timestamp_value = 9 [deprecated = true];- Specified by:
- hasTimestampValuein interface- ConstantOrBuilder
- Returns:
- Whether the timestampValue field is set.
 
 - 
getTimestampValue@Deprecated public com.google.protobuf.Timestamp getTimestampValue() Deprecated.cel.expr.Constant.timestamp_value is deprecated. See cel/expr/syntax.proto;l=306protobuf.Timestamp value. Deprecated: timestamp is no longer considered a builtin cel type. .google.protobuf.Timestamp timestamp_value = 9 [deprecated = true];- Specified by:
- getTimestampValuein interface- ConstantOrBuilder
- Returns:
- The timestampValue.
 
 - 
getTimestampValueOrBuilder@Deprecated public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() Deprecated.protobuf.Timestamp value. Deprecated: timestamp is no longer considered a builtin cel type. .google.protobuf.Timestamp timestamp_value = 9 [deprecated = true];- Specified by:
- getTimestampValueOrBuilderin interface- ConstantOrBuilder
 
 - 
isInitializedpublic final boolean isInitialized() - Specified by:
- isInitializedin interface- com.google.protobuf.MessageLiteOrBuilder
- Overrides:
- isInitializedin class- com.google.protobuf.GeneratedMessageV3
 
 - 
writeTopublic void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException- Specified by:
- writeToin interface- com.google.protobuf.MessageLite
- Overrides:
- writeToin class- com.google.protobuf.GeneratedMessageV3
- Throws:
- java.io.IOException
 
 - 
getSerializedSizepublic int getSerializedSize() - Specified by:
- getSerializedSizein interface- com.google.protobuf.MessageLite
- Overrides:
- getSerializedSizein class- com.google.protobuf.GeneratedMessageV3
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Specified by:
- equalsin interface- com.google.protobuf.Message
- Overrides:
- equalsin class- com.google.protobuf.AbstractMessage
 
 - 
hashCodepublic int hashCode() - Specified by:
- hashCodein interface- com.google.protobuf.Message
- Overrides:
- hashCodein class- com.google.protobuf.AbstractMessage
 
 - 
parseFrompublic static Constant parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
- com.google.protobuf.InvalidProtocolBufferException
 
 - 
parseFrompublic static Constant parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
- com.google.protobuf.InvalidProtocolBufferException
 
 - 
parseFrompublic static Constant parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
- com.google.protobuf.InvalidProtocolBufferException
 
 - 
parseFrompublic static Constant parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
- com.google.protobuf.InvalidProtocolBufferException
 
 - 
parseFrompublic static Constant parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
- com.google.protobuf.InvalidProtocolBufferException
 
 - 
parseFrompublic static Constant parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
- com.google.protobuf.InvalidProtocolBufferException
 
 - 
parseFrompublic static Constant parseFrom(java.io.InputStream input) throws java.io.IOException - Throws:
- java.io.IOException
 
 - 
parseFrompublic static Constant parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException - Throws:
- java.io.IOException
 
 - 
parseDelimitedFrompublic static Constant parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException - Throws:
- java.io.IOException
 
 - 
parseDelimitedFrompublic static Constant parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException - Throws:
- java.io.IOException
 
 - 
parseFrompublic static Constant parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException - Throws:
- java.io.IOException
 
 - 
parseFrompublic static Constant parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException - Throws:
- java.io.IOException
 
 - 
newBuilderForTypepublic Constant.Builder newBuilderForType() - Specified by:
- newBuilderForTypein interface- com.google.protobuf.Message
- Specified by:
- newBuilderForTypein interface- com.google.protobuf.MessageLite
 
 - 
newBuilderpublic static Constant.Builder newBuilder() 
 - 
newBuilderpublic static Constant.Builder newBuilder(Constant prototype) 
 - 
toBuilderpublic Constant.Builder toBuilder() - Specified by:
- toBuilderin interface- com.google.protobuf.Message
- Specified by:
- toBuilderin interface- com.google.protobuf.MessageLite
 
 - 
newBuilderForTypeprotected Constant.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) - Specified by:
- newBuilderForTypein class- com.google.protobuf.GeneratedMessageV3
 
 - 
getDefaultInstancepublic static Constant getDefaultInstance() 
 - 
parserpublic static com.google.protobuf.Parser<Constant> parser() 
 - 
getParserForTypepublic com.google.protobuf.Parser<Constant> getParserForType() - Specified by:
- getParserForTypein interface- com.google.protobuf.Message
- Specified by:
- getParserForTypein interface- com.google.protobuf.MessageLite
- Overrides:
- getParserForTypein class- com.google.protobuf.GeneratedMessageV3
 
 - 
getDefaultInstanceForTypepublic Constant getDefaultInstanceForType() - Specified by:
- getDefaultInstanceForTypein interface- com.google.protobuf.MessageLiteOrBuilder
- Specified by:
- getDefaultInstanceForTypein interface- com.google.protobuf.MessageOrBuilder
 
 
- 
 
-