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
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: cel/expr/checked.proto
// Protobuf Java Version: 4.28.2
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.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:cel.expr.CheckedExpr)
CheckedExprOrBuilder {
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= */ "",
CheckedExpr.class.getName());
}
// Use CheckedExpr.newBuilder() to construct.
private CheckedExpr(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private CheckedExpr() {
exprVersion_ = "";
}
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.MapFieldReflectionAccessor internalGetMapFieldReflection(
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.GeneratedMessage.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);
}
private int bitField0_;
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());
}
@SuppressWarnings("serial")
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 /* nullable */
dev.cel.expr.Reference getReferenceMapOrDefault(
long key,
/* nullable */
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());
}
@SuppressWarnings("serial")
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 /* nullable */
dev.cel.expr.Type getTypeMapOrDefault(
long key,
/* nullable */
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 ((bitField0_ & 0x00000001) != 0);
}
/**
*
* 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 sourceInfo_ == null ? dev.cel.expr.SourceInfo.getDefaultInstance() : sourceInfo_;
}
public static final int EXPR_VERSION_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
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 ((bitField0_ & 0x00000002) != 0);
}
/**
*
* 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 expr_ == null ? dev.cel.expr.Expr.getDefaultInstance() : expr_;
}
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.GeneratedMessage
.serializeLongMapTo(
output,
internalGetReferenceMap(),
ReferenceMapDefaultEntryHolder.defaultEntry,
2);
com.google.protobuf.GeneratedMessage
.serializeLongMapTo(
output,
internalGetTypeMap(),
TypeMapDefaultEntryHolder.defaultEntry,
3);
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(4, getExpr());
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(5, getSourceInfo());
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(exprVersion_)) {
com.google.protobuf.GeneratedMessage.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 (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getExpr());
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getSourceInfo());
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(exprVersion_)) {
size += com.google.protobuf.GeneratedMessage.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.GeneratedMessage
.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.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static dev.cel.expr.CheckedExpr parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.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.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static dev.cel.expr.CheckedExpr parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.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.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.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.GeneratedMessage.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.GeneratedMessage.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.MapFieldReflectionAccessor internalGetMapFieldReflection(
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.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
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.GeneratedMessage.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() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage
.alwaysUseFieldBuilders) {
getSourceInfoFieldBuilder();
getExprFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
internalGetMutableReferenceMap().clear();
internalGetMutableTypeMap().clear();
sourceInfo_ = null;
if (sourceInfoBuilder_ != null) {
sourceInfoBuilder_.dispose();
sourceInfoBuilder_ = null;
}
exprVersion_ = "";
expr_ = null;
if (exprBuilder_ != null) {
exprBuilder_.dispose();
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);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(dev.cel.expr.CheckedExpr result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.referenceMap_ = internalGetReferenceMap().build(ReferenceMapDefaultEntryHolder.defaultEntry);
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.typeMap_ = internalGetTypeMap().build(TypeMapDefaultEntryHolder.defaultEntry);
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.sourceInfo_ = sourceInfoBuilder_ == null
? sourceInfo_
: sourceInfoBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.exprVersion_ = exprVersion_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.expr_ = exprBuilder_ == null
? expr_
: exprBuilder_.build();
to_bitField0_ |= 0x00000002;
}
result.bitField0_ |= to_bitField0_;
}
@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());
bitField0_ |= 0x00000001;
internalGetMutableTypeMap().mergeFrom(
other.internalGetTypeMap());
bitField0_ |= 0x00000002;
if (other.hasSourceInfo()) {
mergeSourceInfo(other.getSourceInfo());
}
if (!other.getExprVersion().isEmpty()) {
exprVersion_ = other.exprVersion_;
bitField0_ |= 0x00000008;
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().ensureBuilderMap().put(
referenceMap__.getKey(), referenceMap__.getValue());
bitField0_ |= 0x00000001;
break;
} // case 18
case 26: {
com.google.protobuf.MapEntry
typeMap__ = input.readMessage(
TypeMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableTypeMap().ensureBuilderMap().put(
typeMap__.getKey(), typeMap__.getValue());
bitField0_ |= 0x00000002;
break;
} // case 26
case 34: {
input.readMessage(
getExprFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 34
case 42: {
input.readMessage(
getSourceInfoFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 42
case 50: {
exprVersion_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
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 static final class ReferenceMapConverter implements com.google.protobuf.MapFieldBuilder.Converter {
@java.lang.Override
public dev.cel.expr.Reference build(dev.cel.expr.ReferenceOrBuilder val) {
if (val instanceof dev.cel.expr.Reference) { return (dev.cel.expr.Reference) val; }
return ((dev.cel.expr.Reference.Builder) val).build();
}
@java.lang.Override
public com.google.protobuf.MapEntry defaultEntry() {
return ReferenceMapDefaultEntryHolder.defaultEntry;
}
};
private static final ReferenceMapConverter referenceMapConverter = new ReferenceMapConverter();
private com.google.protobuf.MapFieldBuilder<
java.lang.Long, dev.cel.expr.ReferenceOrBuilder, dev.cel.expr.Reference, dev.cel.expr.Reference.Builder> referenceMap_;
private com.google.protobuf.MapFieldBuilder
internalGetReferenceMap() {
if (referenceMap_ == null) {
return new com.google.protobuf.MapFieldBuilder<>(referenceMapConverter);
}
return referenceMap_;
}
private com.google.protobuf.MapFieldBuilder
internalGetMutableReferenceMap() {
if (referenceMap_ == null) {
referenceMap_ = new com.google.protobuf.MapFieldBuilder<>(referenceMapConverter);
}
bitField0_ |= 0x00000001;
onChanged();
return referenceMap_;
}
public int getReferenceMapCount() {
return internalGetReferenceMap().ensureBuilderMap().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().ensureBuilderMap().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().getImmutableMap();
}
/**
*
* 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 /* nullable */
dev.cel.expr.Reference getReferenceMapOrDefault(
long key,
/* nullable */
dev.cel.expr.Reference defaultValue) {
java.util.Map map = internalGetMutableReferenceMap().ensureBuilderMap();
return map.containsKey(key) ? referenceMapConverter.build(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 = internalGetMutableReferenceMap().ensureBuilderMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return referenceMapConverter.build(map.get(key));
}
public Builder clearReferenceMap() {
bitField0_ = (bitField0_ & ~0x00000001);
internalGetMutableReferenceMap().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().ensureBuilderMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableReferenceMap() {
bitField0_ |= 0x00000001;
return internalGetMutableReferenceMap().ensureMessageMap();
}
/**
*
* 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().ensureBuilderMap()
.put(key, value);
bitField0_ |= 0x00000001;
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) {
for (java.util.Map.Entry e : values.entrySet()) {
if (e.getKey() == null || e.getValue() == null) {
throw new NullPointerException();
}
}
internalGetMutableReferenceMap().ensureBuilderMap()
.putAll(values);
bitField0_ |= 0x00000001;
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 dev.cel.expr.Reference.Builder putReferenceMapBuilderIfAbsent(
long key) {
java.util.Map builderMap = internalGetMutableReferenceMap().ensureBuilderMap();
dev.cel.expr.ReferenceOrBuilder entry = builderMap.get(key);
if (entry == null) {
entry = dev.cel.expr.Reference.newBuilder();
builderMap.put(key, entry);
}
if (entry instanceof dev.cel.expr.Reference) {
entry = ((dev.cel.expr.Reference) entry).toBuilder();
builderMap.put(key, entry);
}
return (dev.cel.expr.Reference.Builder) entry;
}
private static final class TypeMapConverter implements com.google.protobuf.MapFieldBuilder.Converter {
@java.lang.Override
public dev.cel.expr.Type build(dev.cel.expr.TypeOrBuilder val) {
if (val instanceof dev.cel.expr.Type) { return (dev.cel.expr.Type) val; }
return ((dev.cel.expr.Type.Builder) val).build();
}
@java.lang.Override
public com.google.protobuf.MapEntry defaultEntry() {
return TypeMapDefaultEntryHolder.defaultEntry;
}
};
private static final TypeMapConverter typeMapConverter = new TypeMapConverter();
private com.google.protobuf.MapFieldBuilder<
java.lang.Long, dev.cel.expr.TypeOrBuilder, dev.cel.expr.Type, dev.cel.expr.Type.Builder> typeMap_;
private com.google.protobuf.MapFieldBuilder
internalGetTypeMap() {
if (typeMap_ == null) {
return new com.google.protobuf.MapFieldBuilder<>(typeMapConverter);
}
return typeMap_;
}
private com.google.protobuf.MapFieldBuilder
internalGetMutableTypeMap() {
if (typeMap_ == null) {
typeMap_ = new com.google.protobuf.MapFieldBuilder<>(typeMapConverter);
}
bitField0_ |= 0x00000002;
onChanged();
return typeMap_;
}
public int getTypeMapCount() {
return internalGetTypeMap().ensureBuilderMap().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().ensureBuilderMap().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().getImmutableMap();
}
/**
*
* 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 /* nullable */
dev.cel.expr.Type getTypeMapOrDefault(
long key,
/* nullable */
dev.cel.expr.Type defaultValue) {
java.util.Map map = internalGetMutableTypeMap().ensureBuilderMap();
return map.containsKey(key) ? typeMapConverter.build(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 = internalGetMutableTypeMap().ensureBuilderMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return typeMapConverter.build(map.get(key));
}
public Builder clearTypeMap() {
bitField0_ = (bitField0_ & ~0x00000002);
internalGetMutableTypeMap().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().ensureBuilderMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableTypeMap() {
bitField0_ |= 0x00000002;
return internalGetMutableTypeMap().ensureMessageMap();
}
/**
*
* 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().ensureBuilderMap()
.put(key, value);
bitField0_ |= 0x00000002;
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) {
for (java.util.Map.Entry e : values.entrySet()) {
if (e.getKey() == null || e.getValue() == null) {
throw new NullPointerException();
}
}
internalGetMutableTypeMap().ensureBuilderMap()
.putAll(values);
bitField0_ |= 0x00000002;
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 dev.cel.expr.Type.Builder putTypeMapBuilderIfAbsent(
long key) {
java.util.Map builderMap = internalGetMutableTypeMap().ensureBuilderMap();
dev.cel.expr.TypeOrBuilder entry = builderMap.get(key);
if (entry == null) {
entry = dev.cel.expr.Type.newBuilder();
builderMap.put(key, entry);
}
if (entry instanceof dev.cel.expr.Type) {
entry = ((dev.cel.expr.Type) entry).toBuilder();
builderMap.put(key, entry);
}
return (dev.cel.expr.Type.Builder) entry;
}
private dev.cel.expr.SourceInfo sourceInfo_;
private com.google.protobuf.SingleFieldBuilder<
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 ((bitField0_ & 0x00000004) != 0);
}
/**
*
* 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;
} else {
sourceInfoBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
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();
} else {
sourceInfoBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
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 (((bitField0_ & 0x00000004) != 0) &&
sourceInfo_ != null &&
sourceInfo_ != dev.cel.expr.SourceInfo.getDefaultInstance()) {
getSourceInfoBuilder().mergeFrom(value);
} else {
sourceInfo_ = value;
}
} else {
sourceInfoBuilder_.mergeFrom(value);
}
if (sourceInfo_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
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() {
bitField0_ = (bitField0_ & ~0x00000004);
sourceInfo_ = null;
if (sourceInfoBuilder_ != null) {
sourceInfoBuilder_.dispose();
sourceInfoBuilder_ = null;
}
onChanged();
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() {
bitField0_ |= 0x00000004;
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.SingleFieldBuilder<
dev.cel.expr.SourceInfo, dev.cel.expr.SourceInfo.Builder, dev.cel.expr.SourceInfoOrBuilder>
getSourceInfoFieldBuilder() {
if (sourceInfoBuilder_ == null) {
sourceInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
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;
bitField0_ |= 0x00000008;
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();
bitField0_ = (bitField0_ & ~0x00000008);
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;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private dev.cel.expr.Expr expr_;
private com.google.protobuf.SingleFieldBuilder<
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 ((bitField0_ & 0x00000010) != 0);
}
/**
*
* 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;
} else {
exprBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
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();
} else {
exprBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
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 (((bitField0_ & 0x00000010) != 0) &&
expr_ != null &&
expr_ != dev.cel.expr.Expr.getDefaultInstance()) {
getExprBuilder().mergeFrom(value);
} else {
expr_ = value;
}
} else {
exprBuilder_.mergeFrom(value);
}
if (expr_ != null) {
bitField0_ |= 0x00000010;
onChanged();
}
return this;
}
/**
*
* The checked expression. Semantically equivalent to the parsed `expr`, but
* may have structural differences.
*
*
* .cel.expr.Expr expr = 4;
*/
public Builder clearExpr() {
bitField0_ = (bitField0_ & ~0x00000010);
expr_ = null;
if (exprBuilder_ != null) {
exprBuilder_.dispose();
exprBuilder_ = null;
}
onChanged();
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() {
bitField0_ |= 0x00000010;
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.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>
getExprFieldBuilder() {
if (exprBuilder_ == null) {
exprBuilder_ = new com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>(
getExpr(),
getParentForChildren(),
isClean());
expr_ = null;
}
return exprBuilder_;
}
// @@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;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy