Package dev.cel.expr
Class Constant.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessage.Builder<Constant.Builder>
-
- dev.cel.expr.Constant.Builder
-
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,ConstantOrBuilder,java.lang.Cloneable
- Enclosing class:
- Constant
public static final class Constant.Builder extends com.google.protobuf.GeneratedMessage.Builder<Constant.Builder> 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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Constantbuild()ConstantbuildPartial()Constant.Builderclear()Constant.BuilderclearBoolValue()boolean value.Constant.BuilderclearBytesValue()bytes value.Constant.BuilderclearConstantKind()Constant.BuilderclearDoubleValue()double value.Constant.BuilderclearDurationValue()Deprecated.Constant.BuilderclearInt64Value()int64 value.Constant.BuilderclearNullValue()null value.Constant.BuilderclearStringValue()string value.Constant.BuilderclearTimestampValue()Deprecated.Constant.BuilderclearUint64Value()uint64 value.booleangetBoolValue()boolean value.com.google.protobuf.ByteStringgetBytesValue()bytes value.Constant.ConstantKindCasegetConstantKindCase()ConstantgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()doublegetDoubleValue()double value.com.google.protobuf.DurationgetDurationValue()Deprecated.cel.expr.Constant.duration_value is deprecated.com.google.protobuf.Duration.BuildergetDurationValueBuilder()Deprecated.com.google.protobuf.DurationOrBuildergetDurationValueOrBuilder()Deprecated.longgetInt64Value()int64 value.com.google.protobuf.NullValuegetNullValue()null value.intgetNullValueValue()null value.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.Timestamp.BuildergetTimestampValueBuilder()Deprecated.com.google.protobuf.TimestampOrBuildergetTimestampValueOrBuilder()Deprecated.longgetUint64Value()uint64 value.booleanhasBoolValue()boolean value.booleanhasBytesValue()bytes value.booleanhasDoubleValue()double value.booleanhasDurationValue()Deprecated.cel.expr.Constant.duration_value is deprecated.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.GeneratedMessage.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()Constant.BuildermergeDurationValue(com.google.protobuf.Duration value)Deprecated.Constant.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)Constant.BuildermergeFrom(com.google.protobuf.Message other)Constant.BuildermergeFrom(Constant other)Constant.BuildermergeTimestampValue(com.google.protobuf.Timestamp value)Deprecated.Constant.BuildersetBoolValue(boolean value)boolean value.Constant.BuildersetBytesValue(com.google.protobuf.ByteString value)bytes value.Constant.BuildersetDoubleValue(double value)double value.Constant.BuildersetDurationValue(com.google.protobuf.Duration value)Deprecated.Constant.BuildersetDurationValue(com.google.protobuf.Duration.Builder builderForValue)Deprecated.Constant.BuildersetInt64Value(long value)int64 value.Constant.BuildersetNullValue(com.google.protobuf.NullValue value)null value.Constant.BuildersetNullValueValue(int value)null value.Constant.BuildersetStringValue(java.lang.String value)string value.Constant.BuildersetStringValueBytes(com.google.protobuf.ByteString value)string value.Constant.BuildersetTimestampValue(com.google.protobuf.Timestamp value)Deprecated.Constant.BuildersetTimestampValue(com.google.protobuf.Timestamp.Builder builderForValue)Deprecated.Constant.BuildersetUint64Value(long value)uint64 value.-
Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Constant.Builder>
-
clear
public Constant.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Constant.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Constant.Builder>
-
getDefaultInstanceForType
public Constant getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public Constant build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public Constant buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
public Constant.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Constant.Builder>
-
mergeFrom
public Constant.Builder mergeFrom(Constant other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Constant.Builder>
-
mergeFrom
public Constant.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Constant.Builder>- Throws:
java.io.IOException
-
getConstantKindCase
public Constant.ConstantKindCase getConstantKindCase()
- Specified by:
getConstantKindCasein interfaceConstantOrBuilder
-
clearConstantKind
public Constant.Builder clearConstantKind()
-
hasNullValue
public boolean hasNullValue()
null value.
.google.protobuf.NullValue null_value = 1;- Specified by:
hasNullValuein interfaceConstantOrBuilder- Returns:
- Whether the nullValue field is set.
-
getNullValueValue
public int getNullValueValue()
null value.
.google.protobuf.NullValue null_value = 1;- Specified by:
getNullValueValuein interfaceConstantOrBuilder- Returns:
- The enum numeric value on the wire for nullValue.
-
setNullValueValue
public Constant.Builder setNullValueValue(int value)
null value.
.google.protobuf.NullValue null_value = 1;- Parameters:
value- The enum numeric value on the wire for nullValue to set.- Returns:
- This builder for chaining.
-
getNullValue
public com.google.protobuf.NullValue getNullValue()
null value.
.google.protobuf.NullValue null_value = 1;- Specified by:
getNullValuein interfaceConstantOrBuilder- Returns:
- The nullValue.
-
setNullValue
public Constant.Builder setNullValue(com.google.protobuf.NullValue value)
null value.
.google.protobuf.NullValue null_value = 1;- Parameters:
value- The nullValue to set.- Returns:
- This builder for chaining.
-
clearNullValue
public Constant.Builder clearNullValue()
null value.
.google.protobuf.NullValue null_value = 1;- Returns:
- This builder for chaining.
-
hasBoolValue
public boolean hasBoolValue()
boolean value.
bool bool_value = 2;- Specified by:
hasBoolValuein interfaceConstantOrBuilder- Returns:
- Whether the boolValue field is set.
-
getBoolValue
public boolean getBoolValue()
boolean value.
bool bool_value = 2;- Specified by:
getBoolValuein interfaceConstantOrBuilder- Returns:
- The boolValue.
-
setBoolValue
public Constant.Builder setBoolValue(boolean value)
boolean value.
bool bool_value = 2;- Parameters:
value- The boolValue to set.- Returns:
- This builder for chaining.
-
clearBoolValue
public Constant.Builder clearBoolValue()
boolean value.
bool bool_value = 2;- Returns:
- This builder for chaining.
-
hasInt64Value
public boolean hasInt64Value()
int64 value.
int64 int64_value = 3;- Specified by:
hasInt64Valuein interfaceConstantOrBuilder- Returns:
- Whether the int64Value field is set.
-
getInt64Value
public long getInt64Value()
int64 value.
int64 int64_value = 3;- Specified by:
getInt64Valuein interfaceConstantOrBuilder- Returns:
- The int64Value.
-
setInt64Value
public Constant.Builder setInt64Value(long value)
int64 value.
int64 int64_value = 3;- Parameters:
value- The int64Value to set.- Returns:
- This builder for chaining.
-
clearInt64Value
public Constant.Builder clearInt64Value()
int64 value.
int64 int64_value = 3;- Returns:
- This builder for chaining.
-
hasUint64Value
public boolean hasUint64Value()
uint64 value.
uint64 uint64_value = 4;- Specified by:
hasUint64Valuein interfaceConstantOrBuilder- Returns:
- Whether the uint64Value field is set.
-
getUint64Value
public long getUint64Value()
uint64 value.
uint64 uint64_value = 4;- Specified by:
getUint64Valuein interfaceConstantOrBuilder- Returns:
- The uint64Value.
-
setUint64Value
public Constant.Builder setUint64Value(long value)
uint64 value.
uint64 uint64_value = 4;- Parameters:
value- The uint64Value to set.- Returns:
- This builder for chaining.
-
clearUint64Value
public Constant.Builder clearUint64Value()
uint64 value.
uint64 uint64_value = 4;- Returns:
- This builder for chaining.
-
hasDoubleValue
public boolean hasDoubleValue()
double value.
double double_value = 5;- Specified by:
hasDoubleValuein interfaceConstantOrBuilder- Returns:
- Whether the doubleValue field is set.
-
getDoubleValue
public double getDoubleValue()
double value.
double double_value = 5;- Specified by:
getDoubleValuein interfaceConstantOrBuilder- Returns:
- The doubleValue.
-
setDoubleValue
public Constant.Builder setDoubleValue(double value)
double value.
double double_value = 5;- Parameters:
value- The doubleValue to set.- Returns:
- This builder for chaining.
-
clearDoubleValue
public Constant.Builder clearDoubleValue()
double value.
double double_value = 5;- Returns:
- This builder for chaining.
-
hasStringValue
public boolean hasStringValue()
string value.
string string_value = 6;- Specified by:
hasStringValuein interfaceConstantOrBuilder- Returns:
- Whether the stringValue field is set.
-
getStringValue
public java.lang.String getStringValue()
string value.
string string_value = 6;- Specified by:
getStringValuein interfaceConstantOrBuilder- Returns:
- The stringValue.
-
getStringValueBytes
public com.google.protobuf.ByteString getStringValueBytes()
string value.
string string_value = 6;- Specified by:
getStringValueBytesin interfaceConstantOrBuilder- Returns:
- The bytes for stringValue.
-
setStringValue
public Constant.Builder setStringValue(java.lang.String value)
string value.
string string_value = 6;- Parameters:
value- The stringValue to set.- Returns:
- This builder for chaining.
-
clearStringValue
public Constant.Builder clearStringValue()
string value.
string string_value = 6;- Returns:
- This builder for chaining.
-
setStringValueBytes
public Constant.Builder setStringValueBytes(com.google.protobuf.ByteString value)
string value.
string string_value = 6;- Parameters:
value- The bytes for stringValue to set.- Returns:
- This builder for chaining.
-
hasBytesValue
public boolean hasBytesValue()
bytes value.
bytes bytes_value = 7;- Specified by:
hasBytesValuein interfaceConstantOrBuilder- Returns:
- Whether the bytesValue field is set.
-
getBytesValue
public com.google.protobuf.ByteString getBytesValue()
bytes value.
bytes bytes_value = 7;- Specified by:
getBytesValuein interfaceConstantOrBuilder- Returns:
- The bytesValue.
-
setBytesValue
public Constant.Builder setBytesValue(com.google.protobuf.ByteString value)
bytes value.
bytes bytes_value = 7;- Parameters:
value- The bytesValue to set.- Returns:
- This builder for chaining.
-
clearBytesValue
public Constant.Builder clearBytesValue()
bytes value.
bytes bytes_value = 7;- Returns:
- This builder for chaining.
-
hasDurationValue
@Deprecated public boolean hasDurationValue()
Deprecated.cel.expr.Constant.duration_value is deprecated. See cel/expr/syntax.proto;l=324protobuf.Duration value. Deprecated: duration is no longer considered a builtin cel type.
.google.protobuf.Duration duration_value = 8 [deprecated = true];- Specified by:
hasDurationValuein interfaceConstantOrBuilder- 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=324protobuf.Duration value. Deprecated: duration is no longer considered a builtin cel type.
.google.protobuf.Duration duration_value = 8 [deprecated = true];- Specified by:
getDurationValuein interfaceConstantOrBuilder- Returns:
- The durationValue.
-
setDurationValue
@Deprecated public Constant.Builder setDurationValue(com.google.protobuf.Duration value)
Deprecated.protobuf.Duration value. Deprecated: duration is no longer considered a builtin cel type.
.google.protobuf.Duration duration_value = 8 [deprecated = true];
-
setDurationValue
@Deprecated public Constant.Builder setDurationValue(com.google.protobuf.Duration.Builder builderForValue)
Deprecated.protobuf.Duration value. Deprecated: duration is no longer considered a builtin cel type.
.google.protobuf.Duration duration_value = 8 [deprecated = true];
-
mergeDurationValue
@Deprecated public Constant.Builder mergeDurationValue(com.google.protobuf.Duration value)
Deprecated.protobuf.Duration value. Deprecated: duration is no longer considered a builtin cel type.
.google.protobuf.Duration duration_value = 8 [deprecated = true];
-
clearDurationValue
@Deprecated public Constant.Builder clearDurationValue()
Deprecated.protobuf.Duration value. Deprecated: duration is no longer considered a builtin cel type.
.google.protobuf.Duration duration_value = 8 [deprecated = true];
-
getDurationValueBuilder
@Deprecated public com.google.protobuf.Duration.Builder getDurationValueBuilder()
Deprecated.protobuf.Duration value. Deprecated: duration is no longer considered a builtin cel type.
.google.protobuf.Duration duration_value = 8 [deprecated = true];
-
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 interfaceConstantOrBuilder
-
hasTimestampValue
@Deprecated public boolean hasTimestampValue()
Deprecated.cel.expr.Constant.timestamp_value is deprecated. See cel/expr/syntax.proto;l=329protobuf.Timestamp value. Deprecated: timestamp is no longer considered a builtin cel type.
.google.protobuf.Timestamp timestamp_value = 9 [deprecated = true];- Specified by:
hasTimestampValuein interfaceConstantOrBuilder- 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=329protobuf.Timestamp value. Deprecated: timestamp is no longer considered a builtin cel type.
.google.protobuf.Timestamp timestamp_value = 9 [deprecated = true];- Specified by:
getTimestampValuein interfaceConstantOrBuilder- Returns:
- The timestampValue.
-
setTimestampValue
@Deprecated public Constant.Builder setTimestampValue(com.google.protobuf.Timestamp value)
Deprecated.protobuf.Timestamp value. Deprecated: timestamp is no longer considered a builtin cel type.
.google.protobuf.Timestamp timestamp_value = 9 [deprecated = true];
-
setTimestampValue
@Deprecated public Constant.Builder setTimestampValue(com.google.protobuf.Timestamp.Builder builderForValue)
Deprecated.protobuf.Timestamp value. Deprecated: timestamp is no longer considered a builtin cel type.
.google.protobuf.Timestamp timestamp_value = 9 [deprecated = true];
-
mergeTimestampValue
@Deprecated public Constant.Builder mergeTimestampValue(com.google.protobuf.Timestamp value)
Deprecated.protobuf.Timestamp value. Deprecated: timestamp is no longer considered a builtin cel type.
.google.protobuf.Timestamp timestamp_value = 9 [deprecated = true];
-
clearTimestampValue
@Deprecated public Constant.Builder clearTimestampValue()
Deprecated.protobuf.Timestamp value. Deprecated: timestamp is no longer considered a builtin cel type.
.google.protobuf.Timestamp timestamp_value = 9 [deprecated = true];
-
getTimestampValueBuilder
@Deprecated public com.google.protobuf.Timestamp.Builder getTimestampValueBuilder()
Deprecated.protobuf.Timestamp value. Deprecated: timestamp is no longer considered a builtin cel type.
.google.protobuf.Timestamp timestamp_value = 9 [deprecated = true];
-
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 interfaceConstantOrBuilder
-
-