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][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 type
google.api.expr.v1alpha1.Constant| Modifier and Type | Class and Description |
|---|---|
static class |
Constant.Builder
Represents a primitive literal.
|
static class |
Constant.ConstantKindCase |
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
BOOL_VALUE_FIELD_NUMBER |
static int |
BYTES_VALUE_FIELD_NUMBER |
static int |
DOUBLE_VALUE_FIELD_NUMBER |
static int |
DURATION_VALUE_FIELD_NUMBER |
static int |
INT64_VALUE_FIELD_NUMBER |
static int |
NULL_VALUE_FIELD_NUMBER |
static int |
STRING_VALUE_FIELD_NUMBER |
static int |
TIMESTAMP_VALUE_FIELD_NUMBER |
static int |
UINT64_VALUE_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
boolean |
getBoolValue()
boolean value.
|
com.google.protobuf.ByteString |
getBytesValue()
bytes value.
|
Constant.ConstantKindCase |
getConstantKindCase() |
static Constant |
getDefaultInstance() |
Constant |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
double |
getDoubleValue()
double value.
|
com.google.protobuf.Duration |
getDurationValue()
Deprecated.
|
com.google.protobuf.DurationOrBuilder |
getDurationValueOrBuilder()
Deprecated.
|
long |
getInt64Value()
int64 value.
|
com.google.protobuf.NullValue |
getNullValue()
null value.
|
int |
getNullValueValue()
null value.
|
com.google.protobuf.Parser<Constant> |
getParserForType() |
int |
getSerializedSize() |
String |
getStringValue()
string value.
|
com.google.protobuf.ByteString |
getStringValueBytes()
string value.
|
com.google.protobuf.Timestamp |
getTimestampValue()
Deprecated.
|
com.google.protobuf.TimestampOrBuilder |
getTimestampValueOrBuilder()
Deprecated.
|
long |
getUint64Value()
uint64 value.
|
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
boolean |
hasDurationValue()
Deprecated.
|
int |
hashCode() |
boolean |
hasTimestampValue()
Deprecated.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static Constant.Builder |
newBuilder() |
static Constant.Builder |
newBuilder(Constant prototype) |
Constant.Builder |
newBuilderForType() |
protected Constant.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static Constant |
parseDelimitedFrom(InputStream input) |
static Constant |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Constant |
parseFrom(byte[] data) |
static Constant |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Constant |
parseFrom(ByteBuffer data) |
static Constant |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Constant |
parseFrom(com.google.protobuf.ByteString data) |
static Constant |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Constant |
parseFrom(com.google.protobuf.CodedInputStream input) |
static Constant |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Constant |
parseFrom(InputStream input) |
static Constant |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<Constant> |
parser() |
Constant.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, 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, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int NULL_VALUE_FIELD_NUMBER
public static final int BOOL_VALUE_FIELD_NUMBER
public static final int INT64_VALUE_FIELD_NUMBER
public static final int UINT64_VALUE_FIELD_NUMBER
public static final int DOUBLE_VALUE_FIELD_NUMBER
public static final int STRING_VALUE_FIELD_NUMBER
public static final int BYTES_VALUE_FIELD_NUMBER
public static final int DURATION_VALUE_FIELD_NUMBER
public static final int TIMESTAMP_VALUE_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public Constant.ConstantKindCase getConstantKindCase()
getConstantKindCase in interface ConstantOrBuilderpublic int getNullValueValue()
null value.
.google.protobuf.NullValue null_value = 1;getNullValueValue in interface ConstantOrBuilderpublic com.google.protobuf.NullValue getNullValue()
null value.
.google.protobuf.NullValue null_value = 1;getNullValue in interface ConstantOrBuilderpublic boolean getBoolValue()
boolean value.
bool bool_value = 2;getBoolValue in interface ConstantOrBuilderpublic long getInt64Value()
int64 value.
int64 int64_value = 3;getInt64Value in interface ConstantOrBuilderpublic long getUint64Value()
uint64 value.
uint64 uint64_value = 4;getUint64Value in interface ConstantOrBuilderpublic double getDoubleValue()
double value.
double double_value = 5;getDoubleValue in interface ConstantOrBuilderpublic String getStringValue()
string value.
string string_value = 6;getStringValue in interface ConstantOrBuilderpublic com.google.protobuf.ByteString getStringValueBytes()
string value.
string string_value = 6;getStringValueBytes in interface ConstantOrBuilderpublic com.google.protobuf.ByteString getBytesValue()
bytes value.
bytes bytes_value = 7;getBytesValue in interface ConstantOrBuilder@Deprecated public boolean hasDurationValue()
protobuf.Duration value. Deprecated: duration is no longer considered a builtin cel type.
.google.protobuf.Duration duration_value = 8 [deprecated = true];hasDurationValue in interface ConstantOrBuilder@Deprecated public com.google.protobuf.Duration getDurationValue()
protobuf.Duration value. Deprecated: duration is no longer considered a builtin cel type.
.google.protobuf.Duration duration_value = 8 [deprecated = true];getDurationValue in interface ConstantOrBuilder@Deprecated public com.google.protobuf.DurationOrBuilder getDurationValueOrBuilder()
protobuf.Duration value. Deprecated: duration is no longer considered a builtin cel type.
.google.protobuf.Duration duration_value = 8 [deprecated = true];getDurationValueOrBuilder in interface ConstantOrBuilder@Deprecated public boolean hasTimestampValue()
protobuf.Timestamp value. Deprecated: timestamp is no longer considered a builtin cel type.
.google.protobuf.Timestamp timestamp_value = 9 [deprecated = true];hasTimestampValue in interface ConstantOrBuilder@Deprecated public com.google.protobuf.Timestamp getTimestampValue()
protobuf.Timestamp value. Deprecated: timestamp is no longer considered a builtin cel type.
.google.protobuf.Timestamp timestamp_value = 9 [deprecated = true];getTimestampValue in interface ConstantOrBuilder@Deprecated public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder()
protobuf.Timestamp value. Deprecated: timestamp is no longer considered a builtin cel type.
.google.protobuf.Timestamp timestamp_value = 9 [deprecated = true];getTimestampValueOrBuilder in interface ConstantOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static Constant parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Constant parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Constant parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Constant parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Constant parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Constant parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Constant parseFrom(InputStream input) throws IOException
IOExceptionpublic static Constant parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Constant parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static Constant parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Constant parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static Constant parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic Constant.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static Constant.Builder newBuilder()
public static Constant.Builder newBuilder(Constant prototype)
public Constant.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected Constant.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static Constant getDefaultInstance()
public static com.google.protobuf.Parser<Constant> parser()
public com.google.protobuf.Parser<Constant> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public Constant getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2018–2021 The Envoy Project. All rights reserved.