dev.cel.expr.Value Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of runtime Show documentation
Show all versions of runtime Show documentation
Common Expression Language Runtime for Java
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: cel/expr/value.proto
// Protobuf Java Version: 4.28.2
package dev.cel.expr;
/**
*
* Represents a CEL value.
*
* This is similar to `google.protobuf.Value`, but can represent CEL's full
* range of values.
*
*
* Protobuf type {@code cel.expr.Value}
*/
public final class Value extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:cel.expr.Value)
ValueOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
Value.class.getName());
}
// Use Value.newBuilder() to construct.
private Value(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private Value() {
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.cel.expr.ValueProto.internal_static_cel_expr_Value_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.cel.expr.ValueProto.internal_static_cel_expr_Value_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.cel.expr.Value.class, dev.cel.expr.Value.Builder.class);
}
private int kindCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object kind_;
public enum KindCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
NULL_VALUE(1),
BOOL_VALUE(2),
INT64_VALUE(3),
UINT64_VALUE(4),
DOUBLE_VALUE(5),
STRING_VALUE(6),
BYTES_VALUE(7),
ENUM_VALUE(9),
OBJECT_VALUE(10),
MAP_VALUE(11),
LIST_VALUE(12),
TYPE_VALUE(15),
KIND_NOT_SET(0);
private final int value;
private KindCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static KindCase valueOf(int value) {
return forNumber(value);
}
public static KindCase forNumber(int value) {
switch (value) {
case 1: return NULL_VALUE;
case 2: return BOOL_VALUE;
case 3: return INT64_VALUE;
case 4: return UINT64_VALUE;
case 5: return DOUBLE_VALUE;
case 6: return STRING_VALUE;
case 7: return BYTES_VALUE;
case 9: return ENUM_VALUE;
case 10: return OBJECT_VALUE;
case 11: return MAP_VALUE;
case 12: return LIST_VALUE;
case 15: return TYPE_VALUE;
case 0: return KIND_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public KindCase
getKindCase() {
return KindCase.forNumber(
kindCase_);
}
public static final int NULL_VALUE_FIELD_NUMBER = 1;
/**
*
* Null value.
*
*
* .google.protobuf.NullValue null_value = 1;
* @return Whether the nullValue field is set.
*/
public boolean hasNullValue() {
return kindCase_ == 1;
}
/**
*
* Null value.
*
*
* .google.protobuf.NullValue null_value = 1;
* @return The enum numeric value on the wire for nullValue.
*/
public int getNullValueValue() {
if (kindCase_ == 1) {
return (java.lang.Integer) kind_;
}
return 0;
}
/**
*
* Null value.
*
*
* .google.protobuf.NullValue null_value = 1;
* @return The nullValue.
*/
public com.google.protobuf.NullValue getNullValue() {
if (kindCase_ == 1) {
com.google.protobuf.NullValue result = com.google.protobuf.NullValue.forNumber(
(java.lang.Integer) kind_);
return result == null ? com.google.protobuf.NullValue.UNRECOGNIZED : result;
}
return com.google.protobuf.NullValue.NULL_VALUE;
}
public static final int BOOL_VALUE_FIELD_NUMBER = 2;
/**
*
* Boolean value.
*
*
* bool bool_value = 2;
* @return Whether the boolValue field is set.
*/
@java.lang.Override
public boolean hasBoolValue() {
return kindCase_ == 2;
}
/**
*
* Boolean value.
*
*
* bool bool_value = 2;
* @return The boolValue.
*/
@java.lang.Override
public boolean getBoolValue() {
if (kindCase_ == 2) {
return (java.lang.Boolean) kind_;
}
return false;
}
public static final int INT64_VALUE_FIELD_NUMBER = 3;
/**
*
* Signed integer value.
*
*
* int64 int64_value = 3;
* @return Whether the int64Value field is set.
*/
@java.lang.Override
public boolean hasInt64Value() {
return kindCase_ == 3;
}
/**
*
* Signed integer value.
*
*
* int64 int64_value = 3;
* @return The int64Value.
*/
@java.lang.Override
public long getInt64Value() {
if (kindCase_ == 3) {
return (java.lang.Long) kind_;
}
return 0L;
}
public static final int UINT64_VALUE_FIELD_NUMBER = 4;
/**
*
* Unsigned integer value.
*
*
* uint64 uint64_value = 4;
* @return Whether the uint64Value field is set.
*/
@java.lang.Override
public boolean hasUint64Value() {
return kindCase_ == 4;
}
/**
*
* Unsigned integer value.
*
*
* uint64 uint64_value = 4;
* @return The uint64Value.
*/
@java.lang.Override
public long getUint64Value() {
if (kindCase_ == 4) {
return (java.lang.Long) kind_;
}
return 0L;
}
public static final int DOUBLE_VALUE_FIELD_NUMBER = 5;
/**
*
* Floating point value.
*
*
* double double_value = 5;
* @return Whether the doubleValue field is set.
*/
@java.lang.Override
public boolean hasDoubleValue() {
return kindCase_ == 5;
}
/**
*
* Floating point value.
*
*
* double double_value = 5;
* @return The doubleValue.
*/
@java.lang.Override
public double getDoubleValue() {
if (kindCase_ == 5) {
return (java.lang.Double) kind_;
}
return 0D;
}
public static final int STRING_VALUE_FIELD_NUMBER = 6;
/**
*
* UTF-8 string value.
*
*
* string string_value = 6;
* @return Whether the stringValue field is set.
*/
public boolean hasStringValue() {
return kindCase_ == 6;
}
/**
*
* UTF-8 string value.
*
*
* string string_value = 6;
* @return The stringValue.
*/
public java.lang.String getStringValue() {
java.lang.Object ref = "";
if (kindCase_ == 6) {
ref = kind_;
}
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (kindCase_ == 6) {
kind_ = s;
}
return s;
}
}
/**
*
* UTF-8 string value.
*
*
* string string_value = 6;
* @return The bytes for stringValue.
*/
public com.google.protobuf.ByteString
getStringValueBytes() {
java.lang.Object ref = "";
if (kindCase_ == 6) {
ref = kind_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (kindCase_ == 6) {
kind_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int BYTES_VALUE_FIELD_NUMBER = 7;
/**
*
* Byte string value.
*
*
* bytes bytes_value = 7;
* @return Whether the bytesValue field is set.
*/
@java.lang.Override
public boolean hasBytesValue() {
return kindCase_ == 7;
}
/**
*
* Byte string value.
*
*
* bytes bytes_value = 7;
* @return The bytesValue.
*/
@java.lang.Override
public com.google.protobuf.ByteString getBytesValue() {
if (kindCase_ == 7) {
return (com.google.protobuf.ByteString) kind_;
}
return com.google.protobuf.ByteString.EMPTY;
}
public static final int ENUM_VALUE_FIELD_NUMBER = 9;
/**
*
* An enum value.
*
*
* .cel.expr.EnumValue enum_value = 9;
* @return Whether the enumValue field is set.
*/
@java.lang.Override
public boolean hasEnumValue() {
return kindCase_ == 9;
}
/**
*
* An enum value.
*
*
* .cel.expr.EnumValue enum_value = 9;
* @return The enumValue.
*/
@java.lang.Override
public dev.cel.expr.EnumValue getEnumValue() {
if (kindCase_ == 9) {
return (dev.cel.expr.EnumValue) kind_;
}
return dev.cel.expr.EnumValue.getDefaultInstance();
}
/**
*
* An enum value.
*
*
* .cel.expr.EnumValue enum_value = 9;
*/
@java.lang.Override
public dev.cel.expr.EnumValueOrBuilder getEnumValueOrBuilder() {
if (kindCase_ == 9) {
return (dev.cel.expr.EnumValue) kind_;
}
return dev.cel.expr.EnumValue.getDefaultInstance();
}
public static final int OBJECT_VALUE_FIELD_NUMBER = 10;
/**
*
* The proto message backing an object value.
*
*
* .google.protobuf.Any object_value = 10;
* @return Whether the objectValue field is set.
*/
@java.lang.Override
public boolean hasObjectValue() {
return kindCase_ == 10;
}
/**
*
* The proto message backing an object value.
*
*
* .google.protobuf.Any object_value = 10;
* @return The objectValue.
*/
@java.lang.Override
public com.google.protobuf.Any getObjectValue() {
if (kindCase_ == 10) {
return (com.google.protobuf.Any) kind_;
}
return com.google.protobuf.Any.getDefaultInstance();
}
/**
*
* The proto message backing an object value.
*
*
* .google.protobuf.Any object_value = 10;
*/
@java.lang.Override
public com.google.protobuf.AnyOrBuilder getObjectValueOrBuilder() {
if (kindCase_ == 10) {
return (com.google.protobuf.Any) kind_;
}
return com.google.protobuf.Any.getDefaultInstance();
}
public static final int MAP_VALUE_FIELD_NUMBER = 11;
/**
*
* Map value.
*
*
* .cel.expr.MapValue map_value = 11;
* @return Whether the mapValue field is set.
*/
@java.lang.Override
public boolean hasMapValue() {
return kindCase_ == 11;
}
/**
*
* Map value.
*
*
* .cel.expr.MapValue map_value = 11;
* @return The mapValue.
*/
@java.lang.Override
public dev.cel.expr.MapValue getMapValue() {
if (kindCase_ == 11) {
return (dev.cel.expr.MapValue) kind_;
}
return dev.cel.expr.MapValue.getDefaultInstance();
}
/**
*
* Map value.
*
*
* .cel.expr.MapValue map_value = 11;
*/
@java.lang.Override
public dev.cel.expr.MapValueOrBuilder getMapValueOrBuilder() {
if (kindCase_ == 11) {
return (dev.cel.expr.MapValue) kind_;
}
return dev.cel.expr.MapValue.getDefaultInstance();
}
public static final int LIST_VALUE_FIELD_NUMBER = 12;
/**
*
* List value.
*
*
* .cel.expr.ListValue list_value = 12;
* @return Whether the listValue field is set.
*/
@java.lang.Override
public boolean hasListValue() {
return kindCase_ == 12;
}
/**
*
* List value.
*
*
* .cel.expr.ListValue list_value = 12;
* @return The listValue.
*/
@java.lang.Override
public dev.cel.expr.ListValue getListValue() {
if (kindCase_ == 12) {
return (dev.cel.expr.ListValue) kind_;
}
return dev.cel.expr.ListValue.getDefaultInstance();
}
/**
*
* List value.
*
*
* .cel.expr.ListValue list_value = 12;
*/
@java.lang.Override
public dev.cel.expr.ListValueOrBuilder getListValueOrBuilder() {
if (kindCase_ == 12) {
return (dev.cel.expr.ListValue) kind_;
}
return dev.cel.expr.ListValue.getDefaultInstance();
}
public static final int TYPE_VALUE_FIELD_NUMBER = 15;
/**
*
* Type value.
*
*
* string type_value = 15;
* @return Whether the typeValue field is set.
*/
public boolean hasTypeValue() {
return kindCase_ == 15;
}
/**
*
* Type value.
*
*
* string type_value = 15;
* @return The typeValue.
*/
public java.lang.String getTypeValue() {
java.lang.Object ref = "";
if (kindCase_ == 15) {
ref = kind_;
}
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (kindCase_ == 15) {
kind_ = s;
}
return s;
}
}
/**
*
* Type value.
*
*
* string type_value = 15;
* @return The bytes for typeValue.
*/
public com.google.protobuf.ByteString
getTypeValueBytes() {
java.lang.Object ref = "";
if (kindCase_ == 15) {
ref = kind_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (kindCase_ == 15) {
kind_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (kindCase_ == 1) {
output.writeEnum(1, ((java.lang.Integer) kind_));
}
if (kindCase_ == 2) {
output.writeBool(
2, (boolean)((java.lang.Boolean) kind_));
}
if (kindCase_ == 3) {
output.writeInt64(
3, (long)((java.lang.Long) kind_));
}
if (kindCase_ == 4) {
output.writeUInt64(
4, (long)((java.lang.Long) kind_));
}
if (kindCase_ == 5) {
output.writeDouble(
5, (double)((java.lang.Double) kind_));
}
if (kindCase_ == 6) {
com.google.protobuf.GeneratedMessage.writeString(output, 6, kind_);
}
if (kindCase_ == 7) {
output.writeBytes(
7, (com.google.protobuf.ByteString) kind_);
}
if (kindCase_ == 9) {
output.writeMessage(9, (dev.cel.expr.EnumValue) kind_);
}
if (kindCase_ == 10) {
output.writeMessage(10, (com.google.protobuf.Any) kind_);
}
if (kindCase_ == 11) {
output.writeMessage(11, (dev.cel.expr.MapValue) kind_);
}
if (kindCase_ == 12) {
output.writeMessage(12, (dev.cel.expr.ListValue) kind_);
}
if (kindCase_ == 15) {
com.google.protobuf.GeneratedMessage.writeString(output, 15, kind_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (kindCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, ((java.lang.Integer) kind_));
}
if (kindCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(
2, (boolean)((java.lang.Boolean) kind_));
}
if (kindCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(
3, (long)((java.lang.Long) kind_));
}
if (kindCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(
4, (long)((java.lang.Long) kind_));
}
if (kindCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(
5, (double)((java.lang.Double) kind_));
}
if (kindCase_ == 6) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(6, kind_);
}
if (kindCase_ == 7) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(
7, (com.google.protobuf.ByteString) kind_);
}
if (kindCase_ == 9) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, (dev.cel.expr.EnumValue) kind_);
}
if (kindCase_ == 10) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, (com.google.protobuf.Any) kind_);
}
if (kindCase_ == 11) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, (dev.cel.expr.MapValue) kind_);
}
if (kindCase_ == 12) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(12, (dev.cel.expr.ListValue) kind_);
}
if (kindCase_ == 15) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(15, kind_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof dev.cel.expr.Value)) {
return super.equals(obj);
}
dev.cel.expr.Value other = (dev.cel.expr.Value) obj;
if (!getKindCase().equals(other.getKindCase())) return false;
switch (kindCase_) {
case 1:
if (getNullValueValue()
!= other.getNullValueValue()) return false;
break;
case 2:
if (getBoolValue()
!= other.getBoolValue()) return false;
break;
case 3:
if (getInt64Value()
!= other.getInt64Value()) return false;
break;
case 4:
if (getUint64Value()
!= other.getUint64Value()) return false;
break;
case 5:
if (java.lang.Double.doubleToLongBits(getDoubleValue())
!= java.lang.Double.doubleToLongBits(
other.getDoubleValue())) return false;
break;
case 6:
if (!getStringValue()
.equals(other.getStringValue())) return false;
break;
case 7:
if (!getBytesValue()
.equals(other.getBytesValue())) return false;
break;
case 9:
if (!getEnumValue()
.equals(other.getEnumValue())) return false;
break;
case 10:
if (!getObjectValue()
.equals(other.getObjectValue())) return false;
break;
case 11:
if (!getMapValue()
.equals(other.getMapValue())) return false;
break;
case 12:
if (!getListValue()
.equals(other.getListValue())) return false;
break;
case 15:
if (!getTypeValue()
.equals(other.getTypeValue())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
switch (kindCase_) {
case 1:
hash = (37 * hash) + NULL_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getNullValueValue();
break;
case 2:
hash = (37 * hash) + BOOL_VALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getBoolValue());
break;
case 3:
hash = (37 * hash) + INT64_VALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getInt64Value());
break;
case 4:
hash = (37 * hash) + UINT64_VALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getUint64Value());
break;
case 5:
hash = (37 * hash) + DOUBLE_VALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getDoubleValue()));
break;
case 6:
hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getStringValue().hashCode();
break;
case 7:
hash = (37 * hash) + BYTES_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getBytesValue().hashCode();
break;
case 9:
hash = (37 * hash) + ENUM_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getEnumValue().hashCode();
break;
case 10:
hash = (37 * hash) + OBJECT_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getObjectValue().hashCode();
break;
case 11:
hash = (37 * hash) + MAP_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getMapValue().hashCode();
break;
case 12:
hash = (37 * hash) + LIST_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getListValue().hashCode();
break;
case 15:
hash = (37 * hash) + TYPE_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getTypeValue().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.cel.expr.Value parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.Value parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.cel.expr.Value parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.Value parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.cel.expr.Value parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.Value parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.cel.expr.Value parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static dev.cel.expr.Value parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static dev.cel.expr.Value parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.cel.expr.Value parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static dev.cel.expr.Value parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static dev.cel.expr.Value parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(dev.cel.expr.Value prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Represents a CEL value.
*
* This is similar to `google.protobuf.Value`, but can represent CEL's full
* range of values.
*
*
* Protobuf type {@code cel.expr.Value}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:cel.expr.Value)
dev.cel.expr.ValueOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.cel.expr.ValueProto.internal_static_cel_expr_Value_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.cel.expr.ValueProto.internal_static_cel_expr_Value_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.cel.expr.Value.class, dev.cel.expr.Value.Builder.class);
}
// Construct using dev.cel.expr.Value.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (enumValueBuilder_ != null) {
enumValueBuilder_.clear();
}
if (objectValueBuilder_ != null) {
objectValueBuilder_.clear();
}
if (mapValueBuilder_ != null) {
mapValueBuilder_.clear();
}
if (listValueBuilder_ != null) {
listValueBuilder_.clear();
}
kindCase_ = 0;
kind_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.cel.expr.ValueProto.internal_static_cel_expr_Value_descriptor;
}
@java.lang.Override
public dev.cel.expr.Value getDefaultInstanceForType() {
return dev.cel.expr.Value.getDefaultInstance();
}
@java.lang.Override
public dev.cel.expr.Value build() {
dev.cel.expr.Value result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.cel.expr.Value buildPartial() {
dev.cel.expr.Value result = new dev.cel.expr.Value(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(dev.cel.expr.Value result) {
int from_bitField0_ = bitField0_;
}
private void buildPartialOneofs(dev.cel.expr.Value result) {
result.kindCase_ = kindCase_;
result.kind_ = this.kind_;
if (kindCase_ == 9 &&
enumValueBuilder_ != null) {
result.kind_ = enumValueBuilder_.build();
}
if (kindCase_ == 10 &&
objectValueBuilder_ != null) {
result.kind_ = objectValueBuilder_.build();
}
if (kindCase_ == 11 &&
mapValueBuilder_ != null) {
result.kind_ = mapValueBuilder_.build();
}
if (kindCase_ == 12 &&
listValueBuilder_ != null) {
result.kind_ = listValueBuilder_.build();
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.cel.expr.Value) {
return mergeFrom((dev.cel.expr.Value)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.cel.expr.Value other) {
if (other == dev.cel.expr.Value.getDefaultInstance()) return this;
switch (other.getKindCase()) {
case NULL_VALUE: {
setNullValueValue(other.getNullValueValue());
break;
}
case BOOL_VALUE: {
setBoolValue(other.getBoolValue());
break;
}
case INT64_VALUE: {
setInt64Value(other.getInt64Value());
break;
}
case UINT64_VALUE: {
setUint64Value(other.getUint64Value());
break;
}
case DOUBLE_VALUE: {
setDoubleValue(other.getDoubleValue());
break;
}
case STRING_VALUE: {
kindCase_ = 6;
kind_ = other.kind_;
onChanged();
break;
}
case BYTES_VALUE: {
setBytesValue(other.getBytesValue());
break;
}
case ENUM_VALUE: {
mergeEnumValue(other.getEnumValue());
break;
}
case OBJECT_VALUE: {
mergeObjectValue(other.getObjectValue());
break;
}
case MAP_VALUE: {
mergeMapValue(other.getMapValue());
break;
}
case LIST_VALUE: {
mergeListValue(other.getListValue());
break;
}
case TYPE_VALUE: {
kindCase_ = 15;
kind_ = other.kind_;
onChanged();
break;
}
case KIND_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
int rawValue = input.readEnum();
kindCase_ = 1;
kind_ = rawValue;
break;
} // case 8
case 16: {
kind_ = input.readBool();
kindCase_ = 2;
break;
} // case 16
case 24: {
kind_ = input.readInt64();
kindCase_ = 3;
break;
} // case 24
case 32: {
kind_ = input.readUInt64();
kindCase_ = 4;
break;
} // case 32
case 41: {
kind_ = input.readDouble();
kindCase_ = 5;
break;
} // case 41
case 50: {
java.lang.String s = input.readStringRequireUtf8();
kindCase_ = 6;
kind_ = s;
break;
} // case 50
case 58: {
kind_ = input.readBytes();
kindCase_ = 7;
break;
} // case 58
case 74: {
input.readMessage(
getEnumValueFieldBuilder().getBuilder(),
extensionRegistry);
kindCase_ = 9;
break;
} // case 74
case 82: {
input.readMessage(
getObjectValueFieldBuilder().getBuilder(),
extensionRegistry);
kindCase_ = 10;
break;
} // case 82
case 90: {
input.readMessage(
getMapValueFieldBuilder().getBuilder(),
extensionRegistry);
kindCase_ = 11;
break;
} // case 90
case 98: {
input.readMessage(
getListValueFieldBuilder().getBuilder(),
extensionRegistry);
kindCase_ = 12;
break;
} // case 98
case 122: {
java.lang.String s = input.readStringRequireUtf8();
kindCase_ = 15;
kind_ = s;
break;
} // case 122
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int kindCase_ = 0;
private java.lang.Object kind_;
public KindCase
getKindCase() {
return KindCase.forNumber(
kindCase_);
}
public Builder clearKind() {
kindCase_ = 0;
kind_ = null;
onChanged();
return this;
}
private int bitField0_;
/**
*
* Null value.
*
*
* .google.protobuf.NullValue null_value = 1;
* @return Whether the nullValue field is set.
*/
@java.lang.Override
public boolean hasNullValue() {
return kindCase_ == 1;
}
/**
*
* Null value.
*
*
* .google.protobuf.NullValue null_value = 1;
* @return The enum numeric value on the wire for nullValue.
*/
@java.lang.Override
public int getNullValueValue() {
if (kindCase_ == 1) {
return ((java.lang.Integer) kind_).intValue();
}
return 0;
}
/**
*
* Null value.
*
*
* .google.protobuf.NullValue null_value = 1;
* @param value The enum numeric value on the wire for nullValue to set.
* @return This builder for chaining.
*/
public Builder setNullValueValue(int value) {
kindCase_ = 1;
kind_ = value;
onChanged();
return this;
}
/**
*
* Null value.
*
*
* .google.protobuf.NullValue null_value = 1;
* @return The nullValue.
*/
@java.lang.Override
public com.google.protobuf.NullValue getNullValue() {
if (kindCase_ == 1) {
com.google.protobuf.NullValue result = com.google.protobuf.NullValue.forNumber(
(java.lang.Integer) kind_);
return result == null ? com.google.protobuf.NullValue.UNRECOGNIZED : result;
}
return com.google.protobuf.NullValue.NULL_VALUE;
}
/**
*
* Null value.
*
*
* .google.protobuf.NullValue null_value = 1;
* @param value The nullValue to set.
* @return This builder for chaining.
*/
public Builder setNullValue(com.google.protobuf.NullValue value) {
if (value == null) {
throw new NullPointerException();
}
kindCase_ = 1;
kind_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Null value.
*
*
* .google.protobuf.NullValue null_value = 1;
* @return This builder for chaining.
*/
public Builder clearNullValue() {
if (kindCase_ == 1) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
return this;
}
/**
*
* Boolean value.
*
*
* bool bool_value = 2;
* @return Whether the boolValue field is set.
*/
public boolean hasBoolValue() {
return kindCase_ == 2;
}
/**
*
* Boolean value.
*
*
* bool bool_value = 2;
* @return The boolValue.
*/
public boolean getBoolValue() {
if (kindCase_ == 2) {
return (java.lang.Boolean) kind_;
}
return false;
}
/**
*
* Boolean value.
*
*
* bool bool_value = 2;
* @param value The boolValue to set.
* @return This builder for chaining.
*/
public Builder setBoolValue(boolean value) {
kindCase_ = 2;
kind_ = value;
onChanged();
return this;
}
/**
*
* Boolean value.
*
*
* bool bool_value = 2;
* @return This builder for chaining.
*/
public Builder clearBoolValue() {
if (kindCase_ == 2) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
return this;
}
/**
*
* Signed integer value.
*
*
* int64 int64_value = 3;
* @return Whether the int64Value field is set.
*/
public boolean hasInt64Value() {
return kindCase_ == 3;
}
/**
*
* Signed integer value.
*
*
* int64 int64_value = 3;
* @return The int64Value.
*/
public long getInt64Value() {
if (kindCase_ == 3) {
return (java.lang.Long) kind_;
}
return 0L;
}
/**
*
* Signed integer value.
*
*
* int64 int64_value = 3;
* @param value The int64Value to set.
* @return This builder for chaining.
*/
public Builder setInt64Value(long value) {
kindCase_ = 3;
kind_ = value;
onChanged();
return this;
}
/**
*
* Signed integer value.
*
*
* int64 int64_value = 3;
* @return This builder for chaining.
*/
public Builder clearInt64Value() {
if (kindCase_ == 3) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
return this;
}
/**
*
* Unsigned integer value.
*
*
* uint64 uint64_value = 4;
* @return Whether the uint64Value field is set.
*/
public boolean hasUint64Value() {
return kindCase_ == 4;
}
/**
*
* Unsigned integer value.
*
*
* uint64 uint64_value = 4;
* @return The uint64Value.
*/
public long getUint64Value() {
if (kindCase_ == 4) {
return (java.lang.Long) kind_;
}
return 0L;
}
/**
*
* Unsigned integer value.
*
*
* uint64 uint64_value = 4;
* @param value The uint64Value to set.
* @return This builder for chaining.
*/
public Builder setUint64Value(long value) {
kindCase_ = 4;
kind_ = value;
onChanged();
return this;
}
/**
*
* Unsigned integer value.
*
*
* uint64 uint64_value = 4;
* @return This builder for chaining.
*/
public Builder clearUint64Value() {
if (kindCase_ == 4) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
return this;
}
/**
*
* Floating point value.
*
*
* double double_value = 5;
* @return Whether the doubleValue field is set.
*/
public boolean hasDoubleValue() {
return kindCase_ == 5;
}
/**
*
* Floating point value.
*
*
* double double_value = 5;
* @return The doubleValue.
*/
public double getDoubleValue() {
if (kindCase_ == 5) {
return (java.lang.Double) kind_;
}
return 0D;
}
/**
*
* Floating point value.
*
*
* double double_value = 5;
* @param value The doubleValue to set.
* @return This builder for chaining.
*/
public Builder setDoubleValue(double value) {
kindCase_ = 5;
kind_ = value;
onChanged();
return this;
}
/**
*
* Floating point value.
*
*
* double double_value = 5;
* @return This builder for chaining.
*/
public Builder clearDoubleValue() {
if (kindCase_ == 5) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
return this;
}
/**
*
* UTF-8 string value.
*
*
* string string_value = 6;
* @return Whether the stringValue field is set.
*/
@java.lang.Override
public boolean hasStringValue() {
return kindCase_ == 6;
}
/**
*
* UTF-8 string value.
*
*
* string string_value = 6;
* @return The stringValue.
*/
@java.lang.Override
public java.lang.String getStringValue() {
java.lang.Object ref = "";
if (kindCase_ == 6) {
ref = kind_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (kindCase_ == 6) {
kind_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* UTF-8 string value.
*
*
* string string_value = 6;
* @return The bytes for stringValue.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getStringValueBytes() {
java.lang.Object ref = "";
if (kindCase_ == 6) {
ref = kind_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (kindCase_ == 6) {
kind_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* UTF-8 string value.
*
*
* string string_value = 6;
* @param value The stringValue to set.
* @return This builder for chaining.
*/
public Builder setStringValue(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
kindCase_ = 6;
kind_ = value;
onChanged();
return this;
}
/**
*
* UTF-8 string value.
*
*
* string string_value = 6;
* @return This builder for chaining.
*/
public Builder clearStringValue() {
if (kindCase_ == 6) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
return this;
}
/**
*
* UTF-8 string value.
*
*
* string string_value = 6;
* @param value The bytes for stringValue to set.
* @return This builder for chaining.
*/
public Builder setStringValueBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
kindCase_ = 6;
kind_ = value;
onChanged();
return this;
}
/**
*
* Byte string value.
*
*
* bytes bytes_value = 7;
* @return Whether the bytesValue field is set.
*/
public boolean hasBytesValue() {
return kindCase_ == 7;
}
/**
*
* Byte string value.
*
*
* bytes bytes_value = 7;
* @return The bytesValue.
*/
public com.google.protobuf.ByteString getBytesValue() {
if (kindCase_ == 7) {
return (com.google.protobuf.ByteString) kind_;
}
return com.google.protobuf.ByteString.EMPTY;
}
/**
*
* Byte string value.
*
*
* bytes bytes_value = 7;
* @param value The bytesValue to set.
* @return This builder for chaining.
*/
public Builder setBytesValue(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
kindCase_ = 7;
kind_ = value;
onChanged();
return this;
}
/**
*
* Byte string value.
*
*
* bytes bytes_value = 7;
* @return This builder for chaining.
*/
public Builder clearBytesValue() {
if (kindCase_ == 7) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
return this;
}
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.EnumValue, dev.cel.expr.EnumValue.Builder, dev.cel.expr.EnumValueOrBuilder> enumValueBuilder_;
/**
*
* An enum value.
*
*
* .cel.expr.EnumValue enum_value = 9;
* @return Whether the enumValue field is set.
*/
@java.lang.Override
public boolean hasEnumValue() {
return kindCase_ == 9;
}
/**
*
* An enum value.
*
*
* .cel.expr.EnumValue enum_value = 9;
* @return The enumValue.
*/
@java.lang.Override
public dev.cel.expr.EnumValue getEnumValue() {
if (enumValueBuilder_ == null) {
if (kindCase_ == 9) {
return (dev.cel.expr.EnumValue) kind_;
}
return dev.cel.expr.EnumValue.getDefaultInstance();
} else {
if (kindCase_ == 9) {
return enumValueBuilder_.getMessage();
}
return dev.cel.expr.EnumValue.getDefaultInstance();
}
}
/**
*
* An enum value.
*
*
* .cel.expr.EnumValue enum_value = 9;
*/
public Builder setEnumValue(dev.cel.expr.EnumValue value) {
if (enumValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
kind_ = value;
onChanged();
} else {
enumValueBuilder_.setMessage(value);
}
kindCase_ = 9;
return this;
}
/**
*
* An enum value.
*
*
* .cel.expr.EnumValue enum_value = 9;
*/
public Builder setEnumValue(
dev.cel.expr.EnumValue.Builder builderForValue) {
if (enumValueBuilder_ == null) {
kind_ = builderForValue.build();
onChanged();
} else {
enumValueBuilder_.setMessage(builderForValue.build());
}
kindCase_ = 9;
return this;
}
/**
*
* An enum value.
*
*
* .cel.expr.EnumValue enum_value = 9;
*/
public Builder mergeEnumValue(dev.cel.expr.EnumValue value) {
if (enumValueBuilder_ == null) {
if (kindCase_ == 9 &&
kind_ != dev.cel.expr.EnumValue.getDefaultInstance()) {
kind_ = dev.cel.expr.EnumValue.newBuilder((dev.cel.expr.EnumValue) kind_)
.mergeFrom(value).buildPartial();
} else {
kind_ = value;
}
onChanged();
} else {
if (kindCase_ == 9) {
enumValueBuilder_.mergeFrom(value);
} else {
enumValueBuilder_.setMessage(value);
}
}
kindCase_ = 9;
return this;
}
/**
*
* An enum value.
*
*
* .cel.expr.EnumValue enum_value = 9;
*/
public Builder clearEnumValue() {
if (enumValueBuilder_ == null) {
if (kindCase_ == 9) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
} else {
if (kindCase_ == 9) {
kindCase_ = 0;
kind_ = null;
}
enumValueBuilder_.clear();
}
return this;
}
/**
*
* An enum value.
*
*
* .cel.expr.EnumValue enum_value = 9;
*/
public dev.cel.expr.EnumValue.Builder getEnumValueBuilder() {
return getEnumValueFieldBuilder().getBuilder();
}
/**
*
* An enum value.
*
*
* .cel.expr.EnumValue enum_value = 9;
*/
@java.lang.Override
public dev.cel.expr.EnumValueOrBuilder getEnumValueOrBuilder() {
if ((kindCase_ == 9) && (enumValueBuilder_ != null)) {
return enumValueBuilder_.getMessageOrBuilder();
} else {
if (kindCase_ == 9) {
return (dev.cel.expr.EnumValue) kind_;
}
return dev.cel.expr.EnumValue.getDefaultInstance();
}
}
/**
*
* An enum value.
*
*
* .cel.expr.EnumValue enum_value = 9;
*/
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.EnumValue, dev.cel.expr.EnumValue.Builder, dev.cel.expr.EnumValueOrBuilder>
getEnumValueFieldBuilder() {
if (enumValueBuilder_ == null) {
if (!(kindCase_ == 9)) {
kind_ = dev.cel.expr.EnumValue.getDefaultInstance();
}
enumValueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.EnumValue, dev.cel.expr.EnumValue.Builder, dev.cel.expr.EnumValueOrBuilder>(
(dev.cel.expr.EnumValue) kind_,
getParentForChildren(),
isClean());
kind_ = null;
}
kindCase_ = 9;
onChanged();
return enumValueBuilder_;
}
private com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> objectValueBuilder_;
/**
*
* The proto message backing an object value.
*
*
* .google.protobuf.Any object_value = 10;
* @return Whether the objectValue field is set.
*/
@java.lang.Override
public boolean hasObjectValue() {
return kindCase_ == 10;
}
/**
*
* The proto message backing an object value.
*
*
* .google.protobuf.Any object_value = 10;
* @return The objectValue.
*/
@java.lang.Override
public com.google.protobuf.Any getObjectValue() {
if (objectValueBuilder_ == null) {
if (kindCase_ == 10) {
return (com.google.protobuf.Any) kind_;
}
return com.google.protobuf.Any.getDefaultInstance();
} else {
if (kindCase_ == 10) {
return objectValueBuilder_.getMessage();
}
return com.google.protobuf.Any.getDefaultInstance();
}
}
/**
*
* The proto message backing an object value.
*
*
* .google.protobuf.Any object_value = 10;
*/
public Builder setObjectValue(com.google.protobuf.Any value) {
if (objectValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
kind_ = value;
onChanged();
} else {
objectValueBuilder_.setMessage(value);
}
kindCase_ = 10;
return this;
}
/**
*
* The proto message backing an object value.
*
*
* .google.protobuf.Any object_value = 10;
*/
public Builder setObjectValue(
com.google.protobuf.Any.Builder builderForValue) {
if (objectValueBuilder_ == null) {
kind_ = builderForValue.build();
onChanged();
} else {
objectValueBuilder_.setMessage(builderForValue.build());
}
kindCase_ = 10;
return this;
}
/**
*
* The proto message backing an object value.
*
*
* .google.protobuf.Any object_value = 10;
*/
public Builder mergeObjectValue(com.google.protobuf.Any value) {
if (objectValueBuilder_ == null) {
if (kindCase_ == 10 &&
kind_ != com.google.protobuf.Any.getDefaultInstance()) {
kind_ = com.google.protobuf.Any.newBuilder((com.google.protobuf.Any) kind_)
.mergeFrom(value).buildPartial();
} else {
kind_ = value;
}
onChanged();
} else {
if (kindCase_ == 10) {
objectValueBuilder_.mergeFrom(value);
} else {
objectValueBuilder_.setMessage(value);
}
}
kindCase_ = 10;
return this;
}
/**
*
* The proto message backing an object value.
*
*
* .google.protobuf.Any object_value = 10;
*/
public Builder clearObjectValue() {
if (objectValueBuilder_ == null) {
if (kindCase_ == 10) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
} else {
if (kindCase_ == 10) {
kindCase_ = 0;
kind_ = null;
}
objectValueBuilder_.clear();
}
return this;
}
/**
*
* The proto message backing an object value.
*
*
* .google.protobuf.Any object_value = 10;
*/
public com.google.protobuf.Any.Builder getObjectValueBuilder() {
return getObjectValueFieldBuilder().getBuilder();
}
/**
*
* The proto message backing an object value.
*
*
* .google.protobuf.Any object_value = 10;
*/
@java.lang.Override
public com.google.protobuf.AnyOrBuilder getObjectValueOrBuilder() {
if ((kindCase_ == 10) && (objectValueBuilder_ != null)) {
return objectValueBuilder_.getMessageOrBuilder();
} else {
if (kindCase_ == 10) {
return (com.google.protobuf.Any) kind_;
}
return com.google.protobuf.Any.getDefaultInstance();
}
}
/**
*
* The proto message backing an object value.
*
*
* .google.protobuf.Any object_value = 10;
*/
private com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>
getObjectValueFieldBuilder() {
if (objectValueBuilder_ == null) {
if (!(kindCase_ == 10)) {
kind_ = com.google.protobuf.Any.getDefaultInstance();
}
objectValueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
(com.google.protobuf.Any) kind_,
getParentForChildren(),
isClean());
kind_ = null;
}
kindCase_ = 10;
onChanged();
return objectValueBuilder_;
}
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.MapValue, dev.cel.expr.MapValue.Builder, dev.cel.expr.MapValueOrBuilder> mapValueBuilder_;
/**
*
* Map value.
*
*
* .cel.expr.MapValue map_value = 11;
* @return Whether the mapValue field is set.
*/
@java.lang.Override
public boolean hasMapValue() {
return kindCase_ == 11;
}
/**
*
* Map value.
*
*
* .cel.expr.MapValue map_value = 11;
* @return The mapValue.
*/
@java.lang.Override
public dev.cel.expr.MapValue getMapValue() {
if (mapValueBuilder_ == null) {
if (kindCase_ == 11) {
return (dev.cel.expr.MapValue) kind_;
}
return dev.cel.expr.MapValue.getDefaultInstance();
} else {
if (kindCase_ == 11) {
return mapValueBuilder_.getMessage();
}
return dev.cel.expr.MapValue.getDefaultInstance();
}
}
/**
*
* Map value.
*
*
* .cel.expr.MapValue map_value = 11;
*/
public Builder setMapValue(dev.cel.expr.MapValue value) {
if (mapValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
kind_ = value;
onChanged();
} else {
mapValueBuilder_.setMessage(value);
}
kindCase_ = 11;
return this;
}
/**
*
* Map value.
*
*
* .cel.expr.MapValue map_value = 11;
*/
public Builder setMapValue(
dev.cel.expr.MapValue.Builder builderForValue) {
if (mapValueBuilder_ == null) {
kind_ = builderForValue.build();
onChanged();
} else {
mapValueBuilder_.setMessage(builderForValue.build());
}
kindCase_ = 11;
return this;
}
/**
*
* Map value.
*
*
* .cel.expr.MapValue map_value = 11;
*/
public Builder mergeMapValue(dev.cel.expr.MapValue value) {
if (mapValueBuilder_ == null) {
if (kindCase_ == 11 &&
kind_ != dev.cel.expr.MapValue.getDefaultInstance()) {
kind_ = dev.cel.expr.MapValue.newBuilder((dev.cel.expr.MapValue) kind_)
.mergeFrom(value).buildPartial();
} else {
kind_ = value;
}
onChanged();
} else {
if (kindCase_ == 11) {
mapValueBuilder_.mergeFrom(value);
} else {
mapValueBuilder_.setMessage(value);
}
}
kindCase_ = 11;
return this;
}
/**
*
* Map value.
*
*
* .cel.expr.MapValue map_value = 11;
*/
public Builder clearMapValue() {
if (mapValueBuilder_ == null) {
if (kindCase_ == 11) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
} else {
if (kindCase_ == 11) {
kindCase_ = 0;
kind_ = null;
}
mapValueBuilder_.clear();
}
return this;
}
/**
*
* Map value.
*
*
* .cel.expr.MapValue map_value = 11;
*/
public dev.cel.expr.MapValue.Builder getMapValueBuilder() {
return getMapValueFieldBuilder().getBuilder();
}
/**
*
* Map value.
*
*
* .cel.expr.MapValue map_value = 11;
*/
@java.lang.Override
public dev.cel.expr.MapValueOrBuilder getMapValueOrBuilder() {
if ((kindCase_ == 11) && (mapValueBuilder_ != null)) {
return mapValueBuilder_.getMessageOrBuilder();
} else {
if (kindCase_ == 11) {
return (dev.cel.expr.MapValue) kind_;
}
return dev.cel.expr.MapValue.getDefaultInstance();
}
}
/**
*
* Map value.
*
*
* .cel.expr.MapValue map_value = 11;
*/
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.MapValue, dev.cel.expr.MapValue.Builder, dev.cel.expr.MapValueOrBuilder>
getMapValueFieldBuilder() {
if (mapValueBuilder_ == null) {
if (!(kindCase_ == 11)) {
kind_ = dev.cel.expr.MapValue.getDefaultInstance();
}
mapValueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.MapValue, dev.cel.expr.MapValue.Builder, dev.cel.expr.MapValueOrBuilder>(
(dev.cel.expr.MapValue) kind_,
getParentForChildren(),
isClean());
kind_ = null;
}
kindCase_ = 11;
onChanged();
return mapValueBuilder_;
}
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.ListValue, dev.cel.expr.ListValue.Builder, dev.cel.expr.ListValueOrBuilder> listValueBuilder_;
/**
*
* List value.
*
*
* .cel.expr.ListValue list_value = 12;
* @return Whether the listValue field is set.
*/
@java.lang.Override
public boolean hasListValue() {
return kindCase_ == 12;
}
/**
*
* List value.
*
*
* .cel.expr.ListValue list_value = 12;
* @return The listValue.
*/
@java.lang.Override
public dev.cel.expr.ListValue getListValue() {
if (listValueBuilder_ == null) {
if (kindCase_ == 12) {
return (dev.cel.expr.ListValue) kind_;
}
return dev.cel.expr.ListValue.getDefaultInstance();
} else {
if (kindCase_ == 12) {
return listValueBuilder_.getMessage();
}
return dev.cel.expr.ListValue.getDefaultInstance();
}
}
/**
*
* List value.
*
*
* .cel.expr.ListValue list_value = 12;
*/
public Builder setListValue(dev.cel.expr.ListValue value) {
if (listValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
kind_ = value;
onChanged();
} else {
listValueBuilder_.setMessage(value);
}
kindCase_ = 12;
return this;
}
/**
*
* List value.
*
*
* .cel.expr.ListValue list_value = 12;
*/
public Builder setListValue(
dev.cel.expr.ListValue.Builder builderForValue) {
if (listValueBuilder_ == null) {
kind_ = builderForValue.build();
onChanged();
} else {
listValueBuilder_.setMessage(builderForValue.build());
}
kindCase_ = 12;
return this;
}
/**
*
* List value.
*
*
* .cel.expr.ListValue list_value = 12;
*/
public Builder mergeListValue(dev.cel.expr.ListValue value) {
if (listValueBuilder_ == null) {
if (kindCase_ == 12 &&
kind_ != dev.cel.expr.ListValue.getDefaultInstance()) {
kind_ = dev.cel.expr.ListValue.newBuilder((dev.cel.expr.ListValue) kind_)
.mergeFrom(value).buildPartial();
} else {
kind_ = value;
}
onChanged();
} else {
if (kindCase_ == 12) {
listValueBuilder_.mergeFrom(value);
} else {
listValueBuilder_.setMessage(value);
}
}
kindCase_ = 12;
return this;
}
/**
*
* List value.
*
*
* .cel.expr.ListValue list_value = 12;
*/
public Builder clearListValue() {
if (listValueBuilder_ == null) {
if (kindCase_ == 12) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
} else {
if (kindCase_ == 12) {
kindCase_ = 0;
kind_ = null;
}
listValueBuilder_.clear();
}
return this;
}
/**
*
* List value.
*
*
* .cel.expr.ListValue list_value = 12;
*/
public dev.cel.expr.ListValue.Builder getListValueBuilder() {
return getListValueFieldBuilder().getBuilder();
}
/**
*
* List value.
*
*
* .cel.expr.ListValue list_value = 12;
*/
@java.lang.Override
public dev.cel.expr.ListValueOrBuilder getListValueOrBuilder() {
if ((kindCase_ == 12) && (listValueBuilder_ != null)) {
return listValueBuilder_.getMessageOrBuilder();
} else {
if (kindCase_ == 12) {
return (dev.cel.expr.ListValue) kind_;
}
return dev.cel.expr.ListValue.getDefaultInstance();
}
}
/**
*
* List value.
*
*
* .cel.expr.ListValue list_value = 12;
*/
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.ListValue, dev.cel.expr.ListValue.Builder, dev.cel.expr.ListValueOrBuilder>
getListValueFieldBuilder() {
if (listValueBuilder_ == null) {
if (!(kindCase_ == 12)) {
kind_ = dev.cel.expr.ListValue.getDefaultInstance();
}
listValueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.ListValue, dev.cel.expr.ListValue.Builder, dev.cel.expr.ListValueOrBuilder>(
(dev.cel.expr.ListValue) kind_,
getParentForChildren(),
isClean());
kind_ = null;
}
kindCase_ = 12;
onChanged();
return listValueBuilder_;
}
/**
*
* Type value.
*
*
* string type_value = 15;
* @return Whether the typeValue field is set.
*/
@java.lang.Override
public boolean hasTypeValue() {
return kindCase_ == 15;
}
/**
*
* Type value.
*
*
* string type_value = 15;
* @return The typeValue.
*/
@java.lang.Override
public java.lang.String getTypeValue() {
java.lang.Object ref = "";
if (kindCase_ == 15) {
ref = kind_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (kindCase_ == 15) {
kind_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Type value.
*
*
* string type_value = 15;
* @return The bytes for typeValue.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTypeValueBytes() {
java.lang.Object ref = "";
if (kindCase_ == 15) {
ref = kind_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (kindCase_ == 15) {
kind_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Type value.
*
*
* string type_value = 15;
* @param value The typeValue to set.
* @return This builder for chaining.
*/
public Builder setTypeValue(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
kindCase_ = 15;
kind_ = value;
onChanged();
return this;
}
/**
*
* Type value.
*
*
* string type_value = 15;
* @return This builder for chaining.
*/
public Builder clearTypeValue() {
if (kindCase_ == 15) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
return this;
}
/**
*
* Type value.
*
*
* string type_value = 15;
* @param value The bytes for typeValue to set.
* @return This builder for chaining.
*/
public Builder setTypeValueBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
kindCase_ = 15;
kind_ = value;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:cel.expr.Value)
}
// @@protoc_insertion_point(class_scope:cel.expr.Value)
private static final dev.cel.expr.Value DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.cel.expr.Value();
}
public static dev.cel.expr.Value getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Value parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public dev.cel.expr.Value getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy