Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/expr/v1alpha1/checked.proto
// Protobuf Java Version: 3.25.4
package com.google.api.expr.v1alpha1;
/**
*
* A CEL expression which has been successfully type checked.
*
*
* Protobuf type {@code google.api.expr.v1alpha1.CheckedExpr}
*/
public final class CheckedExpr extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.api.expr.v1alpha1.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();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.expr.v1alpha1.DeclProto.internal_static_google_api_expr_v1alpha1_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.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.expr.v1alpha1.DeclProto.internal_static_google_api_expr_v1alpha1_CheckedExpr_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.expr.v1alpha1.CheckedExpr.class, com.google.api.expr.v1alpha1.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, com.google.api.expr.v1alpha1.Reference> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
com.google.api.expr.v1alpha1.DeclProto.internal_static_google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.INT64,
0L,
com.google.protobuf.WireFormat.FieldType.MESSAGE,
com.google.api.expr.v1alpha1.Reference.getDefaultInstance());
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField<
java.lang.Long, com.google.api.expr.v1alpha1.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, .google.api.expr.v1alpha1.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.
*
* 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.
*
* 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, .google.api.expr.v1alpha1.Reference> reference_map = 2;
*/
@java.lang.Override
public com.google.api.expr.v1alpha1.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, com.google.api.expr.v1alpha1.Type> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
com.google.api.expr.v1alpha1.DeclProto.internal_static_google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.INT64,
0L,
com.google.protobuf.WireFormat.FieldType.MESSAGE,
com.google.api.expr.v1alpha1.Type.getDefaultInstance());
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField<
java.lang.Long, com.google.api.expr.v1alpha1.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, .google.api.expr.v1alpha1.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.
*
* 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.
*
* 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, .google.api.expr.v1alpha1.Type> type_map = 3;
*/
@java.lang.Override
public com.google.api.expr.v1alpha1.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 com.google.api.expr.v1alpha1.SourceInfo sourceInfo_;
/**
*
* The source info derived from input that generated the parsed `expr` and
* any optimizations made during the type-checking pass.
*
*
* .google.api.expr.v1alpha1.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.
*
* The source info derived from input that generated the parsed `expr` and
* any optimizations made during the type-checking pass.
*
*
* .google.api.expr.v1alpha1.SourceInfo source_info = 5;
*/
@java.lang.Override
public com.google.api.expr.v1alpha1.SourceInfoOrBuilder getSourceInfoOrBuilder() {
return sourceInfo_ == null ? com.google.api.expr.v1alpha1.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.
*
* 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 com.google.api.expr.v1alpha1.Expr expr_;
/**
*
* The checked expression. Semantically equivalent to the parsed `expr`, but
* may have structural differences.
*
*
* .google.api.expr.v1alpha1.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.
*
* A CEL expression which has been successfully type checked.
*
*
* Protobuf type {@code google.api.expr.v1alpha1.CheckedExpr}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.api.expr.v1alpha1.CheckedExpr)
com.google.api.expr.v1alpha1.CheckedExprOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.expr.v1alpha1.DeclProto.internal_static_google_api_expr_v1alpha1_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.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.expr.v1alpha1.DeclProto.internal_static_google_api_expr_v1alpha1_CheckedExpr_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.expr.v1alpha1.CheckedExpr.class, com.google.api.expr.v1alpha1.CheckedExpr.Builder.class);
}
// Construct using com.google.api.expr.v1alpha1.CheckedExpr.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.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 com.google.api.expr.v1alpha1.DeclProto.internal_static_google_api_expr_v1alpha1_CheckedExpr_descriptor;
}
@java.lang.Override
public com.google.api.expr.v1alpha1.CheckedExpr getDefaultInstanceForType() {
return com.google.api.expr.v1alpha1.CheckedExpr.getDefaultInstance();
}
@java.lang.Override
public com.google.api.expr.v1alpha1.CheckedExpr build() {
com.google.api.expr.v1alpha1.CheckedExpr result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.api.expr.v1alpha1.CheckedExpr buildPartial() {
com.google.api.expr.v1alpha1.CheckedExpr result = new com.google.api.expr.v1alpha1.CheckedExpr(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.google.api.expr.v1alpha1.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 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 com.google.api.expr.v1alpha1.CheckedExpr) {
return mergeFrom((com.google.api.expr.v1alpha1.CheckedExpr)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.api.expr.v1alpha1.CheckedExpr other) {
if (other == com.google.api.expr.v1alpha1.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 com.google.api.expr.v1alpha1.Reference build(com.google.api.expr.v1alpha1.ReferenceOrBuilder val) {
if (val instanceof com.google.api.expr.v1alpha1.Reference) { return (com.google.api.expr.v1alpha1.Reference) val; }
return ((com.google.api.expr.v1alpha1.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, com.google.api.expr.v1alpha1.ReferenceOrBuilder, com.google.api.expr.v1alpha1.Reference, com.google.api.expr.v1alpha1.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, .google.api.expr.v1alpha1.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.
*
* 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.
*
* 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, .google.api.expr.v1alpha1.Reference> reference_map = 2;
*/
@java.lang.Override
public com.google.api.expr.v1alpha1.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, .google.api.expr.v1alpha1.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, .google.api.expr.v1alpha1.Reference> reference_map = 2;
*/
public Builder putReferenceMap(
long key,
com.google.api.expr.v1alpha1.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, .google.api.expr.v1alpha1.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, .google.api.expr.v1alpha1.Reference> reference_map = 2;
*/
public com.google.api.expr.v1alpha1.Reference.Builder putReferenceMapBuilderIfAbsent(
long key) {
java.util.Map builderMap = internalGetMutableReferenceMap().ensureBuilderMap();
com.google.api.expr.v1alpha1.ReferenceOrBuilder entry = builderMap.get(key);
if (entry == null) {
entry = com.google.api.expr.v1alpha1.Reference.newBuilder();
builderMap.put(key, entry);
}
if (entry instanceof com.google.api.expr.v1alpha1.Reference) {
entry = ((com.google.api.expr.v1alpha1.Reference) entry).toBuilder();
builderMap.put(key, entry);
}
return (com.google.api.expr.v1alpha1.Reference.Builder) entry;
}
private static final class TypeMapConverter implements com.google.protobuf.MapFieldBuilder.Converter {
@java.lang.Override
public com.google.api.expr.v1alpha1.Type build(com.google.api.expr.v1alpha1.TypeOrBuilder val) {
if (val instanceof com.google.api.expr.v1alpha1.Type) { return (com.google.api.expr.v1alpha1.Type) val; }
return ((com.google.api.expr.v1alpha1.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, com.google.api.expr.v1alpha1.TypeOrBuilder, com.google.api.expr.v1alpha1.Type, com.google.api.expr.v1alpha1.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, .google.api.expr.v1alpha1.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.
*
* 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.
*
* 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, .google.api.expr.v1alpha1.Type> type_map = 3;
*/
@java.lang.Override
public com.google.api.expr.v1alpha1.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, .google.api.expr.v1alpha1.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, .google.api.expr.v1alpha1.Type> type_map = 3;
*/
public Builder putTypeMap(
long key,
com.google.api.expr.v1alpha1.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, .google.api.expr.v1alpha1.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.
*
* 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.
*
* 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.
*
* 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 com.google.api.expr.v1alpha1.Expr expr_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.api.expr.v1alpha1.Expr, com.google.api.expr.v1alpha1.Expr.Builder, com.google.api.expr.v1alpha1.ExprOrBuilder> exprBuilder_;
/**
*
* The checked expression. Semantically equivalent to the parsed `expr`, but
* may have structural differences.
*
*
* .google.api.expr.v1alpha1.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.
*