Package com.google.api.expr.v1alpha1
Class Constant
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessage
-
- com.google.api.expr.v1alpha1.Constant
-
- All Implemented Interfaces:
ConstantOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,java.io.Serializable
public final class Constant extends com.google.protobuf.GeneratedMessage 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][google.api.expr.v1alpha1.Expr] elements which require evaluation and are thus not constant. Examples of literals include: `"hello"`, `b'bytes'`, `1u`, `4.2`, `-2`, `true`, `null`.
Protobuf typegoogle.api.expr.v1alpha1.Constant- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classConstant.BuilderRepresents a primitive literal.static classConstant.ConstantKindCase-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,T extends java.lang.Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter
-
-
Field Summary
Fields 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 Summary
All 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.google.api.expr.v1alpha1.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.google.api.expr.v1alpha1.Constant.timestamp_value is deprecated.com.google.protobuf.TimestampOrBuildergetTimestampValueOrBuilder()Deprecated.longgetUint64Value()uint64 value.booleanhasBoolValue()boolean value.booleanhasBytesValue()bytes value.booleanhasDoubleValue()double value.booleanhasDurationValue()Deprecated.google.api.expr.v1alpha1.Constant.duration_value is deprecated.inthashCode()booleanhasInt64Value()int64 value.booleanhasNullValue()null value.booleanhasStringValue()string value.booleanhasTimestampValue()Deprecated.google.api.expr.v1alpha1.Constant.timestamp_value is deprecated.booleanhasUint64Value()uint64 value.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static Constant.BuildernewBuilder()static Constant.BuildernewBuilder(Constant prototype)Constant.BuildernewBuilderForType()protected Constant.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)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.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
NULL_VALUE_FIELD_NUMBER
public static final int NULL_VALUE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
BOOL_VALUE_FIELD_NUMBER
public static final int BOOL_VALUE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
INT64_VALUE_FIELD_NUMBER
public static final int INT64_VALUE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
UINT64_VALUE_FIELD_NUMBER
public static final int UINT64_VALUE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DOUBLE_VALUE_FIELD_NUMBER
public static final int DOUBLE_VALUE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
STRING_VALUE_FIELD_NUMBER
public static final int STRING_VALUE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
BYTES_VALUE_FIELD_NUMBER
public static final int BYTES_VALUE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DURATION_VALUE_FIELD_NUMBER
public static final int DURATION_VALUE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
TIMESTAMP_VALUE_FIELD_NUMBER
public static final int TIMESTAMP_VALUE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
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
-
getConstantKindCase
public Constant.ConstantKindCase getConstantKindCase()
- Specified by:
getConstantKindCasein interfaceConstantOrBuilder
-
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.
-
getNullValue
public com.google.protobuf.NullValue getNullValue()
null value.
.google.protobuf.NullValue null_value = 1;- Specified by:
getNullValuein interfaceConstantOrBuilder- Returns:
- The nullValue.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
hasDurationValue
@Deprecated public boolean hasDurationValue()
Deprecated.google.api.expr.v1alpha1.Constant.duration_value is deprecated. See google/api/expr/v1alpha1/syntax.proto;l=283protobuf.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.google.api.expr.v1alpha1.Constant.duration_value is deprecated. See google/api/expr/v1alpha1/syntax.proto;l=283protobuf.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.
-
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.google.api.expr.v1alpha1.Constant.timestamp_value is deprecated. See google/api/expr/v1alpha1/syntax.proto;l=288protobuf.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.google.api.expr.v1alpha1.Constant.timestamp_value is deprecated. See google/api/expr/v1alpha1/syntax.proto;l=288protobuf.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.
-
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
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
java.io.IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Constant parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Constant parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Constant parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Constant parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Constant parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Constant parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Constant parseFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Constant parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static Constant parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static Constant parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Constant parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Constant parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
newBuilderForType
public Constant.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static Constant.Builder newBuilder()
-
newBuilder
public static Constant.Builder newBuilder(Constant prototype)
-
toBuilder
public Constant.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Constant.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
- Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
public static Constant getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<Constant> parser()
-
getParserForType
public com.google.protobuf.Parser<Constant> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
public Constant getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-