dev.cel.expr.CheckedExpr 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
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: cel/expr/checked.proto
package dev.cel.expr;
/**
*
* A CEL expression which has been successfully type checked.
*
*
* Protobuf type {@code cel.expr.CheckedExpr}
*/
public final class CheckedExpr extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:cel.expr.CheckedExpr)
CheckedExprOrBuilder {
private static final long serialVersionUID = 0L;
// Use CheckedExpr.newBuilder() to construct.
private CheckedExpr(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CheckedExpr() {
exprVersion_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CheckedExpr();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.cel.expr.DeclProto.internal_static_cel_expr_CheckedExpr_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 2:
return internalGetReferenceMap();
case 3:
return internalGetTypeMap();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.cel.expr.DeclProto.internal_static_cel_expr_CheckedExpr_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.cel.expr.CheckedExpr.class, dev.cel.expr.CheckedExpr.Builder.class);
}
public static final int REFERENCE_MAP_FIELD_NUMBER = 2;
private static final class ReferenceMapDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.Long, dev.cel.expr.Reference> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
dev.cel.expr.DeclProto.internal_static_cel_expr_CheckedExpr_ReferenceMapEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.INT64,
0L,
com.google.protobuf.WireFormat.FieldType.MESSAGE,
dev.cel.expr.Reference.getDefaultInstance());
}
private com.google.protobuf.MapField<
java.lang.Long, dev.cel.expr.Reference> referenceMap_;
private com.google.protobuf.MapField
internalGetReferenceMap() {
if (referenceMap_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ReferenceMapDefaultEntryHolder.defaultEntry);
}
return referenceMap_;
}
public int getReferenceMapCount() {
return internalGetReferenceMap().getMap().size();
}
/**
*
* A map from expression ids to resolved references.
* The following entries are in this table:
* - An Ident or Select expression is represented here if it resolves to a
* declaration. For instance, if `a.b.c` is represented by
* `select(select(id(a), b), c)`, and `a.b` resolves to a declaration,
* while `c` is a field selection, then the reference is attached to the
* nested select expression (but not to the id or or the outer select).
* In turn, if `a` resolves to a declaration and `b.c` are field selections,
* the reference is attached to the ident expression.
* - Every Call expression has an entry here, identifying the function being
* called.
* - Every CreateStruct expression for a message has an entry, identifying
* the message.
*
*
* map<int64, .cel.expr.Reference> reference_map = 2;
*/
@java.lang.Override
public boolean containsReferenceMap(
long key) {
return internalGetReferenceMap().getMap().containsKey(key);
}
/**
* Use {@link #getReferenceMapMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getReferenceMap() {
return getReferenceMapMap();
}
/**
*
* A map from expression ids to resolved references.
* The following entries are in this table:
* - An Ident or Select expression is represented here if it resolves to a
* declaration. For instance, if `a.b.c` is represented by
* `select(select(id(a), b), c)`, and `a.b` resolves to a declaration,
* while `c` is a field selection, then the reference is attached to the
* nested select expression (but not to the id or or the outer select).
* In turn, if `a` resolves to a declaration and `b.c` are field selections,
* the reference is attached to the ident expression.
* - Every Call expression has an entry here, identifying the function being
* called.
* - Every CreateStruct expression for a message has an entry, identifying
* the message.
*
*
* map<int64, .cel.expr.Reference> reference_map = 2;
*/
@java.lang.Override
public java.util.Map getReferenceMapMap() {
return internalGetReferenceMap().getMap();
}
/**
*
* A map from expression ids to resolved references.
* The following entries are in this table:
* - An Ident or Select expression is represented here if it resolves to a
* declaration. For instance, if `a.b.c` is represented by
* `select(select(id(a), b), c)`, and `a.b` resolves to a declaration,
* while `c` is a field selection, then the reference is attached to the
* nested select expression (but not to the id or or the outer select).
* In turn, if `a` resolves to a declaration and `b.c` are field selections,
* the reference is attached to the ident expression.
* - Every Call expression has an entry here, identifying the function being
* called.
* - Every CreateStruct expression for a message has an entry, identifying
* the message.
*
*
* map<int64, .cel.expr.Reference> reference_map = 2;
*/
@java.lang.Override
public dev.cel.expr.Reference getReferenceMapOrDefault(
long key,
dev.cel.expr.Reference defaultValue) {
java.util.Map map =
internalGetReferenceMap().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* A map from expression ids to resolved references.
* The following entries are in this table:
* - An Ident or Select expression is represented here if it resolves to a
* declaration. For instance, if `a.b.c` is represented by
* `select(select(id(a), b), c)`, and `a.b` resolves to a declaration,
* while `c` is a field selection, then the reference is attached to the
* nested select expression (but not to the id or or the outer select).
* In turn, if `a` resolves to a declaration and `b.c` are field selections,
* the reference is attached to the ident expression.
* - Every Call expression has an entry here, identifying the function being
* called.
* - Every CreateStruct expression for a message has an entry, identifying
* the message.
*
*
* map<int64, .cel.expr.Reference> reference_map = 2;
*/
@java.lang.Override
public dev.cel.expr.Reference getReferenceMapOrThrow(
long key) {
java.util.Map map =
internalGetReferenceMap().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int TYPE_MAP_FIELD_NUMBER = 3;
private static final class TypeMapDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.Long, dev.cel.expr.Type> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
dev.cel.expr.DeclProto.internal_static_cel_expr_CheckedExpr_TypeMapEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.INT64,
0L,
com.google.protobuf.WireFormat.FieldType.MESSAGE,
dev.cel.expr.Type.getDefaultInstance());
}
private com.google.protobuf.MapField<
java.lang.Long, dev.cel.expr.Type> typeMap_;
private com.google.protobuf.MapField
internalGetTypeMap() {
if (typeMap_ == null) {
return com.google.protobuf.MapField.emptyMapField(
TypeMapDefaultEntryHolder.defaultEntry);
}
return typeMap_;
}
public int getTypeMapCount() {
return internalGetTypeMap().getMap().size();
}
/**
*
* A map from expression ids to types.
* Every expression node which has a type different than DYN has a mapping
* here. If an expression has type DYN, it is omitted from this map to save
* space.
*
*
* map<int64, .cel.expr.Type> type_map = 3;
*/
@java.lang.Override
public boolean containsTypeMap(
long key) {
return internalGetTypeMap().getMap().containsKey(key);
}
/**
* Use {@link #getTypeMapMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getTypeMap() {
return getTypeMapMap();
}
/**
*
* A map from expression ids to types.
* Every expression node which has a type different than DYN has a mapping
* here. If an expression has type DYN, it is omitted from this map to save
* space.
*
*
* map<int64, .cel.expr.Type> type_map = 3;
*/
@java.lang.Override
public java.util.Map getTypeMapMap() {
return internalGetTypeMap().getMap();
}
/**
*
* A map from expression ids to types.
* Every expression node which has a type different than DYN has a mapping
* here. If an expression has type DYN, it is omitted from this map to save
* space.
*
*
* map<int64, .cel.expr.Type> type_map = 3;
*/
@java.lang.Override
public dev.cel.expr.Type getTypeMapOrDefault(
long key,
dev.cel.expr.Type defaultValue) {
java.util.Map map =
internalGetTypeMap().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* A map from expression ids to types.
* Every expression node which has a type different than DYN has a mapping
* here. If an expression has type DYN, it is omitted from this map to save
* space.
*
*
* map<int64, .cel.expr.Type> type_map = 3;
*/
@java.lang.Override
public dev.cel.expr.Type getTypeMapOrThrow(
long key) {
java.util.Map map =
internalGetTypeMap().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int SOURCE_INFO_FIELD_NUMBER = 5;
private dev.cel.expr.SourceInfo sourceInfo_;
/**
*
* The source info derived from input that generated the parsed `expr` and
* any optimizations made during the type-checking pass.
*
*
* .cel.expr.SourceInfo source_info = 5;
* @return Whether the sourceInfo field is set.
*/
@java.lang.Override
public boolean hasSourceInfo() {
return sourceInfo_ != null;
}
/**
*
* The source info derived from input that generated the parsed `expr` and
* any optimizations made during the type-checking pass.
*
*
* .cel.expr.SourceInfo source_info = 5;
* @return The sourceInfo.
*/
@java.lang.Override
public dev.cel.expr.SourceInfo getSourceInfo() {
return sourceInfo_ == null ? dev.cel.expr.SourceInfo.getDefaultInstance() : sourceInfo_;
}
/**
*
* The source info derived from input that generated the parsed `expr` and
* any optimizations made during the type-checking pass.
*
*
* .cel.expr.SourceInfo source_info = 5;
*/
@java.lang.Override
public dev.cel.expr.SourceInfoOrBuilder getSourceInfoOrBuilder() {
return getSourceInfo();
}
public static final int EXPR_VERSION_FIELD_NUMBER = 6;
private volatile java.lang.Object exprVersion_;
/**
*
* The expr version indicates the major / minor version number of the `expr`
* representation.
* The most common reason for a version change will be to indicate to the CEL
* runtimes that transformations have been performed on the expr during static
* analysis. In some cases, this will save the runtime the work of applying
* the same or similar transformations prior to evaluation.
*
*
* string expr_version = 6;
* @return The exprVersion.
*/
@java.lang.Override
public java.lang.String getExprVersion() {
java.lang.Object ref = exprVersion_;
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();
exprVersion_ = s;
return s;
}
}
/**
*
* The expr version indicates the major / minor version number of the `expr`
* representation.
* The most common reason for a version change will be to indicate to the CEL
* runtimes that transformations have been performed on the expr during static
* analysis. In some cases, this will save the runtime the work of applying
* the same or similar transformations prior to evaluation.
*
*
* string expr_version = 6;
* @return The bytes for exprVersion.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getExprVersionBytes() {
java.lang.Object ref = exprVersion_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
exprVersion_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int EXPR_FIELD_NUMBER = 4;
private dev.cel.expr.Expr expr_;
/**
*
* The checked expression. Semantically equivalent to the parsed `expr`, but
* may have structural differences.
*
*
* .cel.expr.Expr expr = 4;
* @return Whether the expr field is set.
*/
@java.lang.Override
public boolean hasExpr() {
return expr_ != null;
}
/**
*
* The checked expression. Semantically equivalent to the parsed `expr`, but
* may have structural differences.
*
*
* .cel.expr.Expr expr = 4;
* @return The expr.
*/
@java.lang.Override
public dev.cel.expr.Expr getExpr() {
return expr_ == null ? dev.cel.expr.Expr.getDefaultInstance() : expr_;
}
/**
*
* The checked expression. Semantically equivalent to the parsed `expr`, but
* may have structural differences.
*
*
* .cel.expr.Expr expr = 4;
*/
@java.lang.Override
public dev.cel.expr.ExprOrBuilder getExprOrBuilder() {
return getExpr();
}
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 {
com.google.protobuf.GeneratedMessageV3
.serializeLongMapTo(
output,
internalGetReferenceMap(),
ReferenceMapDefaultEntryHolder.defaultEntry,
2);
com.google.protobuf.GeneratedMessageV3
.serializeLongMapTo(
output,
internalGetTypeMap(),
TypeMapDefaultEntryHolder.defaultEntry,
3);
if (expr_ != null) {
output.writeMessage(4, getExpr());
}
if (sourceInfo_ != null) {
output.writeMessage(5, getSourceInfo());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(exprVersion_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, exprVersion_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (java.util.Map.Entry entry
: internalGetReferenceMap().getMap().entrySet()) {
com.google.protobuf.MapEntry
referenceMap__ = ReferenceMapDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, referenceMap__);
}
for (java.util.Map.Entry entry
: internalGetTypeMap().getMap().entrySet()) {
com.google.protobuf.MapEntry
typeMap__ = TypeMapDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, typeMap__);
}
if (expr_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getExpr());
}
if (sourceInfo_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getSourceInfo());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(exprVersion_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, exprVersion_);
}
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.CheckedExpr)) {
return super.equals(obj);
}
dev.cel.expr.CheckedExpr other = (dev.cel.expr.CheckedExpr) obj;
if (!internalGetReferenceMap().equals(
other.internalGetReferenceMap())) return false;
if (!internalGetTypeMap().equals(
other.internalGetTypeMap())) return false;
if (hasSourceInfo() != other.hasSourceInfo()) return false;
if (hasSourceInfo()) {
if (!getSourceInfo()
.equals(other.getSourceInfo())) return false;
}
if (!getExprVersion()
.equals(other.getExprVersion())) return false;
if (hasExpr() != other.hasExpr()) return false;
if (hasExpr()) {
if (!getExpr()
.equals(other.getExpr())) return false;
}
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();
if (!internalGetReferenceMap().getMap().isEmpty()) {
hash = (37 * hash) + REFERENCE_MAP_FIELD_NUMBER;
hash = (53 * hash) + internalGetReferenceMap().hashCode();
}
if (!internalGetTypeMap().getMap().isEmpty()) {
hash = (37 * hash) + TYPE_MAP_FIELD_NUMBER;
hash = (53 * hash) + internalGetTypeMap().hashCode();
}
if (hasSourceInfo()) {
hash = (37 * hash) + SOURCE_INFO_FIELD_NUMBER;
hash = (53 * hash) + getSourceInfo().hashCode();
}
hash = (37 * hash) + EXPR_VERSION_FIELD_NUMBER;
hash = (53 * hash) + getExprVersion().hashCode();
if (hasExpr()) {
hash = (37 * hash) + EXPR_FIELD_NUMBER;
hash = (53 * hash) + getExpr().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.cel.expr.CheckedExpr parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.CheckedExpr 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.CheckedExpr parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.CheckedExpr 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.CheckedExpr parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.CheckedExpr parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.cel.expr.CheckedExpr parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.cel.expr.CheckedExpr parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static dev.cel.expr.CheckedExpr parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.cel.expr.CheckedExpr parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static dev.cel.expr.CheckedExpr parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.cel.expr.CheckedExpr parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.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.CheckedExpr 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.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* A CEL expression which has been successfully type checked.
*
*
* Protobuf type {@code cel.expr.CheckedExpr}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:cel.expr.CheckedExpr)
dev.cel.expr.CheckedExprOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.cel.expr.DeclProto.internal_static_cel_expr_CheckedExpr_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 2:
return internalGetReferenceMap();
case 3:
return internalGetTypeMap();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 2:
return internalGetMutableReferenceMap();
case 3:
return internalGetMutableTypeMap();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.cel.expr.DeclProto.internal_static_cel_expr_CheckedExpr_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.cel.expr.CheckedExpr.class, dev.cel.expr.CheckedExpr.Builder.class);
}
// Construct using dev.cel.expr.CheckedExpr.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
internalGetMutableReferenceMap().clear();
internalGetMutableTypeMap().clear();
if (sourceInfoBuilder_ == null) {
sourceInfo_ = null;
} else {
sourceInfo_ = null;
sourceInfoBuilder_ = null;
}
exprVersion_ = "";
if (exprBuilder_ == null) {
expr_ = null;
} else {
expr_ = null;
exprBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.cel.expr.DeclProto.internal_static_cel_expr_CheckedExpr_descriptor;
}
@java.lang.Override
public dev.cel.expr.CheckedExpr getDefaultInstanceForType() {
return dev.cel.expr.CheckedExpr.getDefaultInstance();
}
@java.lang.Override
public dev.cel.expr.CheckedExpr build() {
dev.cel.expr.CheckedExpr result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.cel.expr.CheckedExpr buildPartial() {
dev.cel.expr.CheckedExpr result = new dev.cel.expr.CheckedExpr(this);
int from_bitField0_ = bitField0_;
result.referenceMap_ = internalGetReferenceMap();
result.referenceMap_.makeImmutable();
result.typeMap_ = internalGetTypeMap();
result.typeMap_.makeImmutable();
if (sourceInfoBuilder_ == null) {
result.sourceInfo_ = sourceInfo_;
} else {
result.sourceInfo_ = sourceInfoBuilder_.build();
}
result.exprVersion_ = exprVersion_;
if (exprBuilder_ == null) {
result.expr_ = expr_;
} else {
result.expr_ = exprBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.cel.expr.CheckedExpr) {
return mergeFrom((dev.cel.expr.CheckedExpr)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.cel.expr.CheckedExpr other) {
if (other == dev.cel.expr.CheckedExpr.getDefaultInstance()) return this;
internalGetMutableReferenceMap().mergeFrom(
other.internalGetReferenceMap());
internalGetMutableTypeMap().mergeFrom(
other.internalGetTypeMap());
if (other.hasSourceInfo()) {
mergeSourceInfo(other.getSourceInfo());
}
if (!other.getExprVersion().isEmpty()) {
exprVersion_ = other.exprVersion_;
onChanged();
}
if (other.hasExpr()) {
mergeExpr(other.getExpr());
}
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 18: {
com.google.protobuf.MapEntry
referenceMap__ = input.readMessage(
ReferenceMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableReferenceMap().getMutableMap().put(
referenceMap__.getKey(), referenceMap__.getValue());
break;
} // case 18
case 26: {
com.google.protobuf.MapEntry
typeMap__ = input.readMessage(
TypeMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableTypeMap().getMutableMap().put(
typeMap__.getKey(), typeMap__.getValue());
break;
} // case 26
case 34: {
input.readMessage(
getExprFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 34
case 42: {
input.readMessage(
getSourceInfoFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 42
case 50: {
exprVersion_ = input.readStringRequireUtf8();
break;
} // case 50
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 bitField0_;
private com.google.protobuf.MapField<
java.lang.Long, dev.cel.expr.Reference> referenceMap_;
private com.google.protobuf.MapField
internalGetReferenceMap() {
if (referenceMap_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ReferenceMapDefaultEntryHolder.defaultEntry);
}
return referenceMap_;
}
private com.google.protobuf.MapField
internalGetMutableReferenceMap() {
onChanged();;
if (referenceMap_ == null) {
referenceMap_ = com.google.protobuf.MapField.newMapField(
ReferenceMapDefaultEntryHolder.defaultEntry);
}
if (!referenceMap_.isMutable()) {
referenceMap_ = referenceMap_.copy();
}
return referenceMap_;
}
public int getReferenceMapCount() {
return internalGetReferenceMap().getMap().size();
}
/**
*
* A map from expression ids to resolved references.
* The following entries are in this table:
* - An Ident or Select expression is represented here if it resolves to a
* declaration. For instance, if `a.b.c` is represented by
* `select(select(id(a), b), c)`, and `a.b` resolves to a declaration,
* while `c` is a field selection, then the reference is attached to the
* nested select expression (but not to the id or or the outer select).
* In turn, if `a` resolves to a declaration and `b.c` are field selections,
* the reference is attached to the ident expression.
* - Every Call expression has an entry here, identifying the function being
* called.
* - Every CreateStruct expression for a message has an entry, identifying
* the message.
*
*
* map<int64, .cel.expr.Reference> reference_map = 2;
*/
@java.lang.Override
public boolean containsReferenceMap(
long key) {
return internalGetReferenceMap().getMap().containsKey(key);
}
/**
* Use {@link #getReferenceMapMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getReferenceMap() {
return getReferenceMapMap();
}
/**
*
* A map from expression ids to resolved references.
* The following entries are in this table:
* - An Ident or Select expression is represented here if it resolves to a
* declaration. For instance, if `a.b.c` is represented by
* `select(select(id(a), b), c)`, and `a.b` resolves to a declaration,
* while `c` is a field selection, then the reference is attached to the
* nested select expression (but not to the id or or the outer select).
* In turn, if `a` resolves to a declaration and `b.c` are field selections,
* the reference is attached to the ident expression.
* - Every Call expression has an entry here, identifying the function being
* called.
* - Every CreateStruct expression for a message has an entry, identifying
* the message.
*
*
* map<int64, .cel.expr.Reference> reference_map = 2;
*/
@java.lang.Override
public java.util.Map getReferenceMapMap() {
return internalGetReferenceMap().getMap();
}
/**
*
* A map from expression ids to resolved references.
* The following entries are in this table:
* - An Ident or Select expression is represented here if it resolves to a
* declaration. For instance, if `a.b.c` is represented by
* `select(select(id(a), b), c)`, and `a.b` resolves to a declaration,
* while `c` is a field selection, then the reference is attached to the
* nested select expression (but not to the id or or the outer select).
* In turn, if `a` resolves to a declaration and `b.c` are field selections,
* the reference is attached to the ident expression.
* - Every Call expression has an entry here, identifying the function being
* called.
* - Every CreateStruct expression for a message has an entry, identifying
* the message.
*
*
* map<int64, .cel.expr.Reference> reference_map = 2;
*/
@java.lang.Override
public dev.cel.expr.Reference getReferenceMapOrDefault(
long key,
dev.cel.expr.Reference defaultValue) {
java.util.Map map =
internalGetReferenceMap().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* A map from expression ids to resolved references.
* The following entries are in this table:
* - An Ident or Select expression is represented here if it resolves to a
* declaration. For instance, if `a.b.c` is represented by
* `select(select(id(a), b), c)`, and `a.b` resolves to a declaration,
* while `c` is a field selection, then the reference is attached to the
* nested select expression (but not to the id or or the outer select).
* In turn, if `a` resolves to a declaration and `b.c` are field selections,
* the reference is attached to the ident expression.
* - Every Call expression has an entry here, identifying the function being
* called.
* - Every CreateStruct expression for a message has an entry, identifying
* the message.
*
*
* map<int64, .cel.expr.Reference> reference_map = 2;
*/
@java.lang.Override
public dev.cel.expr.Reference getReferenceMapOrThrow(
long key) {
java.util.Map map =
internalGetReferenceMap().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearReferenceMap() {
internalGetMutableReferenceMap().getMutableMap()
.clear();
return this;
}
/**
*
* A map from expression ids to resolved references.
* The following entries are in this table:
* - An Ident or Select expression is represented here if it resolves to a
* declaration. For instance, if `a.b.c` is represented by
* `select(select(id(a), b), c)`, and `a.b` resolves to a declaration,
* while `c` is a field selection, then the reference is attached to the
* nested select expression (but not to the id or or the outer select).
* In turn, if `a` resolves to a declaration and `b.c` are field selections,
* the reference is attached to the ident expression.
* - Every Call expression has an entry here, identifying the function being
* called.
* - Every CreateStruct expression for a message has an entry, identifying
* the message.
*
*
* map<int64, .cel.expr.Reference> reference_map = 2;
*/
public Builder removeReferenceMap(
long key) {
internalGetMutableReferenceMap().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableReferenceMap() {
return internalGetMutableReferenceMap().getMutableMap();
}
/**
*
* A map from expression ids to resolved references.
* The following entries are in this table:
* - An Ident or Select expression is represented here if it resolves to a
* declaration. For instance, if `a.b.c` is represented by
* `select(select(id(a), b), c)`, and `a.b` resolves to a declaration,
* while `c` is a field selection, then the reference is attached to the
* nested select expression (but not to the id or or the outer select).
* In turn, if `a` resolves to a declaration and `b.c` are field selections,
* the reference is attached to the ident expression.
* - Every Call expression has an entry here, identifying the function being
* called.
* - Every CreateStruct expression for a message has an entry, identifying
* the message.
*
*
* map<int64, .cel.expr.Reference> reference_map = 2;
*/
public Builder putReferenceMap(
long key,
dev.cel.expr.Reference value) {
if (value == null) {
throw new NullPointerException("map value");
}
internalGetMutableReferenceMap().getMutableMap()
.put(key, value);
return this;
}
/**
*
* A map from expression ids to resolved references.
* The following entries are in this table:
* - An Ident or Select expression is represented here if it resolves to a
* declaration. For instance, if `a.b.c` is represented by
* `select(select(id(a), b), c)`, and `a.b` resolves to a declaration,
* while `c` is a field selection, then the reference is attached to the
* nested select expression (but not to the id or or the outer select).
* In turn, if `a` resolves to a declaration and `b.c` are field selections,
* the reference is attached to the ident expression.
* - Every Call expression has an entry here, identifying the function being
* called.
* - Every CreateStruct expression for a message has an entry, identifying
* the message.
*
*
* map<int64, .cel.expr.Reference> reference_map = 2;
*/
public Builder putAllReferenceMap(
java.util.Map values) {
internalGetMutableReferenceMap().getMutableMap()
.putAll(values);
return this;
}
private com.google.protobuf.MapField<
java.lang.Long, dev.cel.expr.Type> typeMap_;
private com.google.protobuf.MapField
internalGetTypeMap() {
if (typeMap_ == null) {
return com.google.protobuf.MapField.emptyMapField(
TypeMapDefaultEntryHolder.defaultEntry);
}
return typeMap_;
}
private com.google.protobuf.MapField
internalGetMutableTypeMap() {
onChanged();;
if (typeMap_ == null) {
typeMap_ = com.google.protobuf.MapField.newMapField(
TypeMapDefaultEntryHolder.defaultEntry);
}
if (!typeMap_.isMutable()) {
typeMap_ = typeMap_.copy();
}
return typeMap_;
}
public int getTypeMapCount() {
return internalGetTypeMap().getMap().size();
}
/**
*
* A map from expression ids to types.
* Every expression node which has a type different than DYN has a mapping
* here. If an expression has type DYN, it is omitted from this map to save
* space.
*
*
* map<int64, .cel.expr.Type> type_map = 3;
*/
@java.lang.Override
public boolean containsTypeMap(
long key) {
return internalGetTypeMap().getMap().containsKey(key);
}
/**
* Use {@link #getTypeMapMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getTypeMap() {
return getTypeMapMap();
}
/**
*
* A map from expression ids to types.
* Every expression node which has a type different than DYN has a mapping
* here. If an expression has type DYN, it is omitted from this map to save
* space.
*
*
* map<int64, .cel.expr.Type> type_map = 3;
*/
@java.lang.Override
public java.util.Map getTypeMapMap() {
return internalGetTypeMap().getMap();
}
/**
*
* A map from expression ids to types.
* Every expression node which has a type different than DYN has a mapping
* here. If an expression has type DYN, it is omitted from this map to save
* space.
*
*
* map<int64, .cel.expr.Type> type_map = 3;
*/
@java.lang.Override
public dev.cel.expr.Type getTypeMapOrDefault(
long key,
dev.cel.expr.Type defaultValue) {
java.util.Map map =
internalGetTypeMap().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* A map from expression ids to types.
* Every expression node which has a type different than DYN has a mapping
* here. If an expression has type DYN, it is omitted from this map to save
* space.
*
*
* map<int64, .cel.expr.Type> type_map = 3;
*/
@java.lang.Override
public dev.cel.expr.Type getTypeMapOrThrow(
long key) {
java.util.Map map =
internalGetTypeMap().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearTypeMap() {
internalGetMutableTypeMap().getMutableMap()
.clear();
return this;
}
/**
*
* A map from expression ids to types.
* Every expression node which has a type different than DYN has a mapping
* here. If an expression has type DYN, it is omitted from this map to save
* space.
*
*
* map<int64, .cel.expr.Type> type_map = 3;
*/
public Builder removeTypeMap(
long key) {
internalGetMutableTypeMap().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableTypeMap() {
return internalGetMutableTypeMap().getMutableMap();
}
/**
*
* A map from expression ids to types.
* Every expression node which has a type different than DYN has a mapping
* here. If an expression has type DYN, it is omitted from this map to save
* space.
*
*
* map<int64, .cel.expr.Type> type_map = 3;
*/
public Builder putTypeMap(
long key,
dev.cel.expr.Type value) {
if (value == null) {
throw new NullPointerException("map value");
}
internalGetMutableTypeMap().getMutableMap()
.put(key, value);
return this;
}
/**
*
* A map from expression ids to types.
* Every expression node which has a type different than DYN has a mapping
* here. If an expression has type DYN, it is omitted from this map to save
* space.
*
*
* map<int64, .cel.expr.Type> type_map = 3;
*/
public Builder putAllTypeMap(
java.util.Map values) {
internalGetMutableTypeMap().getMutableMap()
.putAll(values);
return this;
}
private dev.cel.expr.SourceInfo sourceInfo_;
private com.google.protobuf.SingleFieldBuilderV3<
dev.cel.expr.SourceInfo, dev.cel.expr.SourceInfo.Builder, dev.cel.expr.SourceInfoOrBuilder> sourceInfoBuilder_;
/**
*
* The source info derived from input that generated the parsed `expr` and
* any optimizations made during the type-checking pass.
*
*
* .cel.expr.SourceInfo source_info = 5;
* @return Whether the sourceInfo field is set.
*/
public boolean hasSourceInfo() {
return sourceInfoBuilder_ != null || sourceInfo_ != null;
}
/**
*
* The source info derived from input that generated the parsed `expr` and
* any optimizations made during the type-checking pass.
*
*
* .cel.expr.SourceInfo source_info = 5;
* @return The sourceInfo.
*/
public dev.cel.expr.SourceInfo getSourceInfo() {
if (sourceInfoBuilder_ == null) {
return sourceInfo_ == null ? dev.cel.expr.SourceInfo.getDefaultInstance() : sourceInfo_;
} else {
return sourceInfoBuilder_.getMessage();
}
}
/**
*
* The source info derived from input that generated the parsed `expr` and
* any optimizations made during the type-checking pass.
*
*
* .cel.expr.SourceInfo source_info = 5;
*/
public Builder setSourceInfo(dev.cel.expr.SourceInfo value) {
if (sourceInfoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
sourceInfo_ = value;
onChanged();
} else {
sourceInfoBuilder_.setMessage(value);
}
return this;
}
/**
*
* The source info derived from input that generated the parsed `expr` and
* any optimizations made during the type-checking pass.
*
*
* .cel.expr.SourceInfo source_info = 5;
*/
public Builder setSourceInfo(
dev.cel.expr.SourceInfo.Builder builderForValue) {
if (sourceInfoBuilder_ == null) {
sourceInfo_ = builderForValue.build();
onChanged();
} else {
sourceInfoBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The source info derived from input that generated the parsed `expr` and
* any optimizations made during the type-checking pass.
*
*
* .cel.expr.SourceInfo source_info = 5;
*/
public Builder mergeSourceInfo(dev.cel.expr.SourceInfo value) {
if (sourceInfoBuilder_ == null) {
if (sourceInfo_ != null) {
sourceInfo_ =
dev.cel.expr.SourceInfo.newBuilder(sourceInfo_).mergeFrom(value).buildPartial();
} else {
sourceInfo_ = value;
}
onChanged();
} else {
sourceInfoBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The source info derived from input that generated the parsed `expr` and
* any optimizations made during the type-checking pass.
*
*
* .cel.expr.SourceInfo source_info = 5;
*/
public Builder clearSourceInfo() {
if (sourceInfoBuilder_ == null) {
sourceInfo_ = null;
onChanged();
} else {
sourceInfo_ = null;
sourceInfoBuilder_ = null;
}
return this;
}
/**
*
* The source info derived from input that generated the parsed `expr` and
* any optimizations made during the type-checking pass.
*
*
* .cel.expr.SourceInfo source_info = 5;
*/
public dev.cel.expr.SourceInfo.Builder getSourceInfoBuilder() {
onChanged();
return getSourceInfoFieldBuilder().getBuilder();
}
/**
*
* The source info derived from input that generated the parsed `expr` and
* any optimizations made during the type-checking pass.
*
*
* .cel.expr.SourceInfo source_info = 5;
*/
public dev.cel.expr.SourceInfoOrBuilder getSourceInfoOrBuilder() {
if (sourceInfoBuilder_ != null) {
return sourceInfoBuilder_.getMessageOrBuilder();
} else {
return sourceInfo_ == null ?
dev.cel.expr.SourceInfo.getDefaultInstance() : sourceInfo_;
}
}
/**
*
* The source info derived from input that generated the parsed `expr` and
* any optimizations made during the type-checking pass.
*
*
* .cel.expr.SourceInfo source_info = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
dev.cel.expr.SourceInfo, dev.cel.expr.SourceInfo.Builder, dev.cel.expr.SourceInfoOrBuilder>
getSourceInfoFieldBuilder() {
if (sourceInfoBuilder_ == null) {
sourceInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
dev.cel.expr.SourceInfo, dev.cel.expr.SourceInfo.Builder, dev.cel.expr.SourceInfoOrBuilder>(
getSourceInfo(),
getParentForChildren(),
isClean());
sourceInfo_ = null;
}
return sourceInfoBuilder_;
}
private java.lang.Object exprVersion_ = "";
/**
*
* The expr version indicates the major / minor version number of the `expr`
* representation.
* The most common reason for a version change will be to indicate to the CEL
* runtimes that transformations have been performed on the expr during static
* analysis. In some cases, this will save the runtime the work of applying
* the same or similar transformations prior to evaluation.
*
*
* string expr_version = 6;
* @return The exprVersion.
*/
public java.lang.String getExprVersion() {
java.lang.Object ref = exprVersion_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
exprVersion_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The expr version indicates the major / minor version number of the `expr`
* representation.
* The most common reason for a version change will be to indicate to the CEL
* runtimes that transformations have been performed on the expr during static
* analysis. In some cases, this will save the runtime the work of applying
* the same or similar transformations prior to evaluation.
*
*
* string expr_version = 6;
* @return The bytes for exprVersion.
*/
public com.google.protobuf.ByteString
getExprVersionBytes() {
java.lang.Object ref = exprVersion_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
exprVersion_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The expr version indicates the major / minor version number of the `expr`
* representation.
* The most common reason for a version change will be to indicate to the CEL
* runtimes that transformations have been performed on the expr during static
* analysis. In some cases, this will save the runtime the work of applying
* the same or similar transformations prior to evaluation.
*
*
* string expr_version = 6;
* @param value The exprVersion to set.
* @return This builder for chaining.
*/
public Builder setExprVersion(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
exprVersion_ = value;
onChanged();
return this;
}
/**
*
* The expr version indicates the major / minor version number of the `expr`
* representation.
* The most common reason for a version change will be to indicate to the CEL
* runtimes that transformations have been performed on the expr during static
* analysis. In some cases, this will save the runtime the work of applying
* the same or similar transformations prior to evaluation.
*
*
* string expr_version = 6;
* @return This builder for chaining.
*/
public Builder clearExprVersion() {
exprVersion_ = getDefaultInstance().getExprVersion();
onChanged();
return this;
}
/**
*
* The expr version indicates the major / minor version number of the `expr`
* representation.
* The most common reason for a version change will be to indicate to the CEL
* runtimes that transformations have been performed on the expr during static
* analysis. In some cases, this will save the runtime the work of applying
* the same or similar transformations prior to evaluation.
*
*
* string expr_version = 6;
* @param value The bytes for exprVersion to set.
* @return This builder for chaining.
*/
public Builder setExprVersionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
exprVersion_ = value;
onChanged();
return this;
}
private dev.cel.expr.Expr expr_;
private com.google.protobuf.SingleFieldBuilderV3<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder> exprBuilder_;
/**
*
* The checked expression. Semantically equivalent to the parsed `expr`, but
* may have structural differences.
*
*
* .cel.expr.Expr expr = 4;
* @return Whether the expr field is set.
*/
public boolean hasExpr() {
return exprBuilder_ != null || expr_ != null;
}
/**
*
* The checked expression. Semantically equivalent to the parsed `expr`, but
* may have structural differences.
*
*
* .cel.expr.Expr expr = 4;
* @return The expr.
*/
public dev.cel.expr.Expr getExpr() {
if (exprBuilder_ == null) {
return expr_ == null ? dev.cel.expr.Expr.getDefaultInstance() : expr_;
} else {
return exprBuilder_.getMessage();
}
}
/**
*
* The checked expression. Semantically equivalent to the parsed `expr`, but
* may have structural differences.
*
*
* .cel.expr.Expr expr = 4;
*/
public Builder setExpr(dev.cel.expr.Expr value) {
if (exprBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
expr_ = value;
onChanged();
} else {
exprBuilder_.setMessage(value);
}
return this;
}
/**
*
* The checked expression. Semantically equivalent to the parsed `expr`, but
* may have structural differences.
*
*
* .cel.expr.Expr expr = 4;
*/
public Builder setExpr(
dev.cel.expr.Expr.Builder builderForValue) {
if (exprBuilder_ == null) {
expr_ = builderForValue.build();
onChanged();
} else {
exprBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The checked expression. Semantically equivalent to the parsed `expr`, but
* may have structural differences.
*
*
* .cel.expr.Expr expr = 4;
*/
public Builder mergeExpr(dev.cel.expr.Expr value) {
if (exprBuilder_ == null) {
if (expr_ != null) {
expr_ =
dev.cel.expr.Expr.newBuilder(expr_).mergeFrom(value).buildPartial();
} else {
expr_ = value;
}
onChanged();
} else {
exprBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The checked expression. Semantically equivalent to the parsed `expr`, but
* may have structural differences.
*
*
* .cel.expr.Expr expr = 4;
*/
public Builder clearExpr() {
if (exprBuilder_ == null) {
expr_ = null;
onChanged();
} else {
expr_ = null;
exprBuilder_ = null;
}
return this;
}
/**
*
* The checked expression. Semantically equivalent to the parsed `expr`, but
* may have structural differences.
*
*
* .cel.expr.Expr expr = 4;
*/
public dev.cel.expr.Expr.Builder getExprBuilder() {
onChanged();
return getExprFieldBuilder().getBuilder();
}
/**
*
* The checked expression. Semantically equivalent to the parsed `expr`, but
* may have structural differences.
*
*
* .cel.expr.Expr expr = 4;
*/
public dev.cel.expr.ExprOrBuilder getExprOrBuilder() {
if (exprBuilder_ != null) {
return exprBuilder_.getMessageOrBuilder();
} else {
return expr_ == null ?
dev.cel.expr.Expr.getDefaultInstance() : expr_;
}
}
/**
*
* The checked expression. Semantically equivalent to the parsed `expr`, but
* may have structural differences.
*
*
* .cel.expr.Expr expr = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>
getExprFieldBuilder() {
if (exprBuilder_ == null) {
exprBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>(
getExpr(),
getParentForChildren(),
isClean());
expr_ = null;
}
return exprBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:cel.expr.CheckedExpr)
}
// @@protoc_insertion_point(class_scope:cel.expr.CheckedExpr)
private static final dev.cel.expr.CheckedExpr DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.cel.expr.CheckedExpr();
}
public static dev.cel.expr.CheckedExpr getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CheckedExpr 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.CheckedExpr getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}