Please wait. This can take some minutes ...
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.
dev.cel.expr.Expr Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: cel/expr/syntax.proto
// Protobuf Java Version: 4.28.2
package dev.cel.expr;
/**
*
* An abstract representation of a common expression.
*
* Expressions are abstractly represented as a collection of identifiers,
* select statements, function calls, literals, and comprehensions. All
* operators with the exception of the '.' operator are modelled as function
* calls. This makes it easy to represent new operators into the existing AST.
*
* All references within expressions must resolve to a
* [Decl][cel.expr.Decl] provided at type-check for an expression to be
* valid. A reference may either be a bare identifier `name` or a qualified
* identifier `google.api.name`. References may either refer to a value or a
* function declaration.
*
* For example, the expression `google.api.name.startsWith('expr')` references
* the declaration `google.api.name` within a
* [Expr.Select][cel.expr.Expr.Select] expression, and the function
* declaration `startsWith`.
*
*
* Protobuf type {@code cel.expr.Expr}
*/
public final class Expr extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:cel.expr.Expr)
ExprOrBuilder {
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= */ "",
Expr.class.getName());
}
// Use Expr.newBuilder() to construct.
private Expr(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private Expr() {
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.cel.expr.Expr.class, dev.cel.expr.Expr.Builder.class);
}
public interface IdentOrBuilder extends
// @@protoc_insertion_point(interface_extends:cel.expr.Expr.Ident)
com.google.protobuf.MessageOrBuilder {
/**
*
* Required. Holds a single, unqualified identifier, possibly preceded by a
* '.'.
*
* Qualified names are represented by the
* [Expr.Select][cel.expr.Expr.Select] expression.
*
*
* string name = 1;
* @return The name.
*/
java.lang.String getName();
/**
*
* Required. Holds a single, unqualified identifier, possibly preceded by a
* '.'.
*
* Qualified names are represented by the
* [Expr.Select][cel.expr.Expr.Select] expression.
*
*
* string name = 1;
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
}
/**
*
* An identifier expression. e.g. `request`.
*
*
* Protobuf type {@code cel.expr.Expr.Ident}
*/
public static final class Ident extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:cel.expr.Expr.Ident)
IdentOrBuilder {
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= */ "",
Ident.class.getName());
}
// Use Ident.newBuilder() to construct.
private Ident(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private Ident() {
name_ = "";
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_Ident_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_Ident_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.cel.expr.Expr.Ident.class, dev.cel.expr.Expr.Ident.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
* Required. Holds a single, unqualified identifier, possibly preceded by a
* '.'.
*
* Qualified names are represented by the
* [Expr.Select][cel.expr.Expr.Select] expression.
*
*
* string name = 1;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
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();
name_ = s;
return s;
}
}
/**
*
* Required. Holds a single, unqualified identifier, possibly preceded by a
* '.'.
*
* Qualified names are represented by the
* [Expr.Select][cel.expr.Expr.Select] expression.
*
*
* string name = 1;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
}
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.Expr.Ident)) {
return super.equals(obj);
}
dev.cel.expr.Expr.Ident other = (dev.cel.expr.Expr.Ident) obj;
if (!getName()
.equals(other.getName())) 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();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.cel.expr.Expr.Ident parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.Expr.Ident 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.Expr.Ident parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.Expr.Ident 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.Expr.Ident parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.Expr.Ident parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.cel.expr.Expr.Ident parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static dev.cel.expr.Expr.Ident 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.Expr.Ident parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.cel.expr.Expr.Ident 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.Expr.Ident parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static dev.cel.expr.Expr.Ident 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.Expr.Ident 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;
}
/**
*
* An identifier expression. e.g. `request`.
*
*
* Protobuf type {@code cel.expr.Expr.Ident}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:cel.expr.Expr.Ident)
dev.cel.expr.Expr.IdentOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_Ident_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_Ident_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.cel.expr.Expr.Ident.class, dev.cel.expr.Expr.Ident.Builder.class);
}
// Construct using dev.cel.expr.Expr.Ident.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_Ident_descriptor;
}
@java.lang.Override
public dev.cel.expr.Expr.Ident getDefaultInstanceForType() {
return dev.cel.expr.Expr.Ident.getDefaultInstance();
}
@java.lang.Override
public dev.cel.expr.Expr.Ident build() {
dev.cel.expr.Expr.Ident result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.cel.expr.Expr.Ident buildPartial() {
dev.cel.expr.Expr.Ident result = new dev.cel.expr.Expr.Ident(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(dev.cel.expr.Expr.Ident result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.cel.expr.Expr.Ident) {
return mergeFrom((dev.cel.expr.Expr.Ident)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.cel.expr.Expr.Ident other) {
if (other == dev.cel.expr.Expr.Ident.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
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 10: {
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
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 java.lang.Object name_ = "";
/**
*
* Required. Holds a single, unqualified identifier, possibly preceded by a
* '.'.
*
* Qualified names are represented by the
* [Expr.Select][cel.expr.Expr.Select] expression.
*
*
* string name = 1;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required. Holds a single, unqualified identifier, possibly preceded by a
* '.'.
*
* Qualified names are represented by the
* [Expr.Select][cel.expr.Expr.Select] expression.
*
*
* string name = 1;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required. Holds a single, unqualified identifier, possibly preceded by a
* '.'.
*
* Qualified names are represented by the
* [Expr.Select][cel.expr.Expr.Select] expression.
*
*
* string name = 1;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Required. Holds a single, unqualified identifier, possibly preceded by a
* '.'.
*
* Qualified names are represented by the
* [Expr.Select][cel.expr.Expr.Select] expression.
*
*
* string name = 1;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Required. Holds a single, unqualified identifier, possibly preceded by a
* '.'.
*
* Qualified names are represented by the
* [Expr.Select][cel.expr.Expr.Select] expression.
*
*
* string name = 1;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:cel.expr.Expr.Ident)
}
// @@protoc_insertion_point(class_scope:cel.expr.Expr.Ident)
private static final dev.cel.expr.Expr.Ident DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.cel.expr.Expr.Ident();
}
public static dev.cel.expr.Expr.Ident getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Ident 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.Expr.Ident getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface SelectOrBuilder extends
// @@protoc_insertion_point(interface_extends:cel.expr.Expr.Select)
com.google.protobuf.MessageOrBuilder {
/**
*
* Required. The target of the selection expression.
*
* For example, in the select expression `request.auth`, the `request`
* portion of the expression is the `operand`.
*
*
* .cel.expr.Expr operand = 1;
* @return Whether the operand field is set.
*/
boolean hasOperand();
/**
*
* Required. The target of the selection expression.
*
* For example, in the select expression `request.auth`, the `request`
* portion of the expression is the `operand`.
*
*
* .cel.expr.Expr operand = 1;
* @return The operand.
*/
dev.cel.expr.Expr getOperand();
/**
*
* Required. The target of the selection expression.
*
* For example, in the select expression `request.auth`, the `request`
* portion of the expression is the `operand`.
*
*
* .cel.expr.Expr operand = 1;
*/
dev.cel.expr.ExprOrBuilder getOperandOrBuilder();
/**
*
* Required. The name of the field to select.
*
* For example, in the select expression `request.auth`, the `auth` portion
* of the expression would be the `field`.
*
*
* string field = 2;
* @return The field.
*/
java.lang.String getField();
/**
*
* Required. The name of the field to select.
*
* For example, in the select expression `request.auth`, the `auth` portion
* of the expression would be the `field`.
*
*
* string field = 2;
* @return The bytes for field.
*/
com.google.protobuf.ByteString
getFieldBytes();
/**
*
* Whether the select is to be interpreted as a field presence test.
*
* This results from the macro `has(request.auth)`.
*
*
* bool test_only = 3;
* @return The testOnly.
*/
boolean getTestOnly();
}
/**
*
* A field selection expression. e.g. `request.auth`.
*
*
* Protobuf type {@code cel.expr.Expr.Select}
*/
public static final class Select extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:cel.expr.Expr.Select)
SelectOrBuilder {
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= */ "",
Select.class.getName());
}
// Use Select.newBuilder() to construct.
private Select(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private Select() {
field_ = "";
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_Select_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_Select_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.cel.expr.Expr.Select.class, dev.cel.expr.Expr.Select.Builder.class);
}
private int bitField0_;
public static final int OPERAND_FIELD_NUMBER = 1;
private dev.cel.expr.Expr operand_;
/**
*
* Required. The target of the selection expression.
*
* For example, in the select expression `request.auth`, the `request`
* portion of the expression is the `operand`.
*
*
* .cel.expr.Expr operand = 1;
* @return Whether the operand field is set.
*/
@java.lang.Override
public boolean hasOperand() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Required. The target of the selection expression.
*
* For example, in the select expression `request.auth`, the `request`
* portion of the expression is the `operand`.
*
*
* .cel.expr.Expr operand = 1;
* @return The operand.
*/
@java.lang.Override
public dev.cel.expr.Expr getOperand() {
return operand_ == null ? dev.cel.expr.Expr.getDefaultInstance() : operand_;
}
/**
*
* Required. The target of the selection expression.
*
* For example, in the select expression `request.auth`, the `request`
* portion of the expression is the `operand`.
*
*
* .cel.expr.Expr operand = 1;
*/
@java.lang.Override
public dev.cel.expr.ExprOrBuilder getOperandOrBuilder() {
return operand_ == null ? dev.cel.expr.Expr.getDefaultInstance() : operand_;
}
public static final int FIELD_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object field_ = "";
/**
*
* Required. The name of the field to select.
*
* For example, in the select expression `request.auth`, the `auth` portion
* of the expression would be the `field`.
*
*
* string field = 2;
* @return The field.
*/
@java.lang.Override
public java.lang.String getField() {
java.lang.Object ref = field_;
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();
field_ = s;
return s;
}
}
/**
*
* Required. The name of the field to select.
*
* For example, in the select expression `request.auth`, the `auth` portion
* of the expression would be the `field`.
*
*
* string field = 2;
* @return The bytes for field.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getFieldBytes() {
java.lang.Object ref = field_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
field_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TEST_ONLY_FIELD_NUMBER = 3;
private boolean testOnly_ = false;
/**
*
* Whether the select is to be interpreted as a field presence test.
*
* This results from the macro `has(request.auth)`.
*
*
* bool test_only = 3;
* @return The testOnly.
*/
@java.lang.Override
public boolean getTestOnly() {
return testOnly_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getOperand());
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(field_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 2, field_);
}
if (testOnly_ != false) {
output.writeBool(3, testOnly_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getOperand());
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(field_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(2, field_);
}
if (testOnly_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, testOnly_);
}
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.Expr.Select)) {
return super.equals(obj);
}
dev.cel.expr.Expr.Select other = (dev.cel.expr.Expr.Select) obj;
if (hasOperand() != other.hasOperand()) return false;
if (hasOperand()) {
if (!getOperand()
.equals(other.getOperand())) return false;
}
if (!getField()
.equals(other.getField())) return false;
if (getTestOnly()
!= other.getTestOnly()) 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 (hasOperand()) {
hash = (37 * hash) + OPERAND_FIELD_NUMBER;
hash = (53 * hash) + getOperand().hashCode();
}
hash = (37 * hash) + FIELD_FIELD_NUMBER;
hash = (53 * hash) + getField().hashCode();
hash = (37 * hash) + TEST_ONLY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getTestOnly());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.cel.expr.Expr.Select parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.Expr.Select 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.Expr.Select parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.Expr.Select 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.Expr.Select parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.Expr.Select parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.cel.expr.Expr.Select parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static dev.cel.expr.Expr.Select 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.Expr.Select parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.cel.expr.Expr.Select 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.Expr.Select parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static dev.cel.expr.Expr.Select 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.Expr.Select 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 field selection expression. e.g. `request.auth`.
*
*
* Protobuf type {@code cel.expr.Expr.Select}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:cel.expr.Expr.Select)
dev.cel.expr.Expr.SelectOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_Select_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_Select_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.cel.expr.Expr.Select.class, dev.cel.expr.Expr.Select.Builder.class);
}
// Construct using dev.cel.expr.Expr.Select.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage
.alwaysUseFieldBuilders) {
getOperandFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
operand_ = null;
if (operandBuilder_ != null) {
operandBuilder_.dispose();
operandBuilder_ = null;
}
field_ = "";
testOnly_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_Select_descriptor;
}
@java.lang.Override
public dev.cel.expr.Expr.Select getDefaultInstanceForType() {
return dev.cel.expr.Expr.Select.getDefaultInstance();
}
@java.lang.Override
public dev.cel.expr.Expr.Select build() {
dev.cel.expr.Expr.Select result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.cel.expr.Expr.Select buildPartial() {
dev.cel.expr.Expr.Select result = new dev.cel.expr.Expr.Select(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(dev.cel.expr.Expr.Select result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.operand_ = operandBuilder_ == null
? operand_
: operandBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.field_ = field_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.testOnly_ = testOnly_;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.cel.expr.Expr.Select) {
return mergeFrom((dev.cel.expr.Expr.Select)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.cel.expr.Expr.Select other) {
if (other == dev.cel.expr.Expr.Select.getDefaultInstance()) return this;
if (other.hasOperand()) {
mergeOperand(other.getOperand());
}
if (!other.getField().isEmpty()) {
field_ = other.field_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.getTestOnly() != false) {
setTestOnly(other.getTestOnly());
}
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 10: {
input.readMessage(
getOperandFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
field_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 24: {
testOnly_ = input.readBool();
bitField0_ |= 0x00000004;
break;
} // case 24
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 dev.cel.expr.Expr operand_;
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder> operandBuilder_;
/**
*
* Required. The target of the selection expression.
*
* For example, in the select expression `request.auth`, the `request`
* portion of the expression is the `operand`.
*
*
* .cel.expr.Expr operand = 1;
* @return Whether the operand field is set.
*/
public boolean hasOperand() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Required. The target of the selection expression.
*
* For example, in the select expression `request.auth`, the `request`
* portion of the expression is the `operand`.
*
*
* .cel.expr.Expr operand = 1;
* @return The operand.
*/
public dev.cel.expr.Expr getOperand() {
if (operandBuilder_ == null) {
return operand_ == null ? dev.cel.expr.Expr.getDefaultInstance() : operand_;
} else {
return operandBuilder_.getMessage();
}
}
/**
*
* Required. The target of the selection expression.
*
* For example, in the select expression `request.auth`, the `request`
* portion of the expression is the `operand`.
*
*
* .cel.expr.Expr operand = 1;
*/
public Builder setOperand(dev.cel.expr.Expr value) {
if (operandBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
operand_ = value;
} else {
operandBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Required. The target of the selection expression.
*
* For example, in the select expression `request.auth`, the `request`
* portion of the expression is the `operand`.
*
*
* .cel.expr.Expr operand = 1;
*/
public Builder setOperand(
dev.cel.expr.Expr.Builder builderForValue) {
if (operandBuilder_ == null) {
operand_ = builderForValue.build();
} else {
operandBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Required. The target of the selection expression.
*
* For example, in the select expression `request.auth`, the `request`
* portion of the expression is the `operand`.
*
*
* .cel.expr.Expr operand = 1;
*/
public Builder mergeOperand(dev.cel.expr.Expr value) {
if (operandBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
operand_ != null &&
operand_ != dev.cel.expr.Expr.getDefaultInstance()) {
getOperandBuilder().mergeFrom(value);
} else {
operand_ = value;
}
} else {
operandBuilder_.mergeFrom(value);
}
if (operand_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* Required. The target of the selection expression.
*
* For example, in the select expression `request.auth`, the `request`
* portion of the expression is the `operand`.
*
*
* .cel.expr.Expr operand = 1;
*/
public Builder clearOperand() {
bitField0_ = (bitField0_ & ~0x00000001);
operand_ = null;
if (operandBuilder_ != null) {
operandBuilder_.dispose();
operandBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Required. The target of the selection expression.
*
* For example, in the select expression `request.auth`, the `request`
* portion of the expression is the `operand`.
*
*
* .cel.expr.Expr operand = 1;
*/
public dev.cel.expr.Expr.Builder getOperandBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getOperandFieldBuilder().getBuilder();
}
/**
*
* Required. The target of the selection expression.
*
* For example, in the select expression `request.auth`, the `request`
* portion of the expression is the `operand`.
*
*
* .cel.expr.Expr operand = 1;
*/
public dev.cel.expr.ExprOrBuilder getOperandOrBuilder() {
if (operandBuilder_ != null) {
return operandBuilder_.getMessageOrBuilder();
} else {
return operand_ == null ?
dev.cel.expr.Expr.getDefaultInstance() : operand_;
}
}
/**
*
* Required. The target of the selection expression.
*
* For example, in the select expression `request.auth`, the `request`
* portion of the expression is the `operand`.
*
*
* .cel.expr.Expr operand = 1;
*/
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>
getOperandFieldBuilder() {
if (operandBuilder_ == null) {
operandBuilder_ = new com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>(
getOperand(),
getParentForChildren(),
isClean());
operand_ = null;
}
return operandBuilder_;
}
private java.lang.Object field_ = "";
/**
*
* Required. The name of the field to select.
*
* For example, in the select expression `request.auth`, the `auth` portion
* of the expression would be the `field`.
*
*
* string field = 2;
* @return The field.
*/
public java.lang.String getField() {
java.lang.Object ref = field_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
field_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required. The name of the field to select.
*
* For example, in the select expression `request.auth`, the `auth` portion
* of the expression would be the `field`.
*
*
* string field = 2;
* @return The bytes for field.
*/
public com.google.protobuf.ByteString
getFieldBytes() {
java.lang.Object ref = field_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
field_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required. The name of the field to select.
*
* For example, in the select expression `request.auth`, the `auth` portion
* of the expression would be the `field`.
*
*
* string field = 2;
* @param value The field to set.
* @return This builder for chaining.
*/
public Builder setField(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
field_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Required. The name of the field to select.
*
* For example, in the select expression `request.auth`, the `auth` portion
* of the expression would be the `field`.
*
*
* string field = 2;
* @return This builder for chaining.
*/
public Builder clearField() {
field_ = getDefaultInstance().getField();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* Required. The name of the field to select.
*
* For example, in the select expression `request.auth`, the `auth` portion
* of the expression would be the `field`.
*
*
* string field = 2;
* @param value The bytes for field to set.
* @return This builder for chaining.
*/
public Builder setFieldBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
field_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private boolean testOnly_ ;
/**
*
* Whether the select is to be interpreted as a field presence test.
*
* This results from the macro `has(request.auth)`.
*
*
* bool test_only = 3;
* @return The testOnly.
*/
@java.lang.Override
public boolean getTestOnly() {
return testOnly_;
}
/**
*
* Whether the select is to be interpreted as a field presence test.
*
* This results from the macro `has(request.auth)`.
*
*
* bool test_only = 3;
* @param value The testOnly to set.
* @return This builder for chaining.
*/
public Builder setTestOnly(boolean value) {
testOnly_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Whether the select is to be interpreted as a field presence test.
*
* This results from the macro `has(request.auth)`.
*
*
* bool test_only = 3;
* @return This builder for chaining.
*/
public Builder clearTestOnly() {
bitField0_ = (bitField0_ & ~0x00000004);
testOnly_ = false;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:cel.expr.Expr.Select)
}
// @@protoc_insertion_point(class_scope:cel.expr.Expr.Select)
private static final dev.cel.expr.Expr.Select DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.cel.expr.Expr.Select();
}
public static dev.cel.expr.Expr.Select getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Select 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.Expr.Select getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CallOrBuilder extends
// @@protoc_insertion_point(interface_extends:cel.expr.Expr.Call)
com.google.protobuf.MessageOrBuilder {
/**
*
* The target of an method call-style expression. For example, `x` in
* `x.f()`.
*
*
* .cel.expr.Expr target = 1;
* @return Whether the target field is set.
*/
boolean hasTarget();
/**
*
* The target of an method call-style expression. For example, `x` in
* `x.f()`.
*
*
* .cel.expr.Expr target = 1;
* @return The target.
*/
dev.cel.expr.Expr getTarget();
/**
*
* The target of an method call-style expression. For example, `x` in
* `x.f()`.
*
*
* .cel.expr.Expr target = 1;
*/
dev.cel.expr.ExprOrBuilder getTargetOrBuilder();
/**
*
* Required. The name of the function or method being called.
*
*
* string function = 2;
* @return The function.
*/
java.lang.String getFunction();
/**
*
* Required. The name of the function or method being called.
*
*
* string function = 2;
* @return The bytes for function.
*/
com.google.protobuf.ByteString
getFunctionBytes();
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
java.util.List
getArgsList();
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
dev.cel.expr.Expr getArgs(int index);
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
int getArgsCount();
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
java.util.List extends dev.cel.expr.ExprOrBuilder>
getArgsOrBuilderList();
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
dev.cel.expr.ExprOrBuilder getArgsOrBuilder(
int index);
}
/**
*
* A call expression, including calls to predefined functions and operators.
*
* For example, `value == 10`, `size(map_value)`.
*
*
* Protobuf type {@code cel.expr.Expr.Call}
*/
public static final class Call extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:cel.expr.Expr.Call)
CallOrBuilder {
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= */ "",
Call.class.getName());
}
// Use Call.newBuilder() to construct.
private Call(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private Call() {
function_ = "";
args_ = java.util.Collections.emptyList();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_Call_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_Call_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.cel.expr.Expr.Call.class, dev.cel.expr.Expr.Call.Builder.class);
}
private int bitField0_;
public static final int TARGET_FIELD_NUMBER = 1;
private dev.cel.expr.Expr target_;
/**
*
* The target of an method call-style expression. For example, `x` in
* `x.f()`.
*
*
* .cel.expr.Expr target = 1;
* @return Whether the target field is set.
*/
@java.lang.Override
public boolean hasTarget() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The target of an method call-style expression. For example, `x` in
* `x.f()`.
*
*
* .cel.expr.Expr target = 1;
* @return The target.
*/
@java.lang.Override
public dev.cel.expr.Expr getTarget() {
return target_ == null ? dev.cel.expr.Expr.getDefaultInstance() : target_;
}
/**
*
* The target of an method call-style expression. For example, `x` in
* `x.f()`.
*
*
* .cel.expr.Expr target = 1;
*/
@java.lang.Override
public dev.cel.expr.ExprOrBuilder getTargetOrBuilder() {
return target_ == null ? dev.cel.expr.Expr.getDefaultInstance() : target_;
}
public static final int FUNCTION_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object function_ = "";
/**
*
* Required. The name of the function or method being called.
*
*
* string function = 2;
* @return The function.
*/
@java.lang.Override
public java.lang.String getFunction() {
java.lang.Object ref = function_;
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();
function_ = s;
return s;
}
}
/**
*
* Required. The name of the function or method being called.
*
*
* string function = 2;
* @return The bytes for function.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getFunctionBytes() {
java.lang.Object ref = function_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
function_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ARGS_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private java.util.List args_;
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
@java.lang.Override
public java.util.List getArgsList() {
return args_;
}
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
@java.lang.Override
public java.util.List extends dev.cel.expr.ExprOrBuilder>
getArgsOrBuilderList() {
return args_;
}
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
@java.lang.Override
public int getArgsCount() {
return args_.size();
}
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
@java.lang.Override
public dev.cel.expr.Expr getArgs(int index) {
return args_.get(index);
}
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
@java.lang.Override
public dev.cel.expr.ExprOrBuilder getArgsOrBuilder(
int index) {
return args_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getTarget());
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(function_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 2, function_);
}
for (int i = 0; i < args_.size(); i++) {
output.writeMessage(3, args_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getTarget());
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(function_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(2, function_);
}
for (int i = 0; i < args_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, args_.get(i));
}
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.Expr.Call)) {
return super.equals(obj);
}
dev.cel.expr.Expr.Call other = (dev.cel.expr.Expr.Call) obj;
if (hasTarget() != other.hasTarget()) return false;
if (hasTarget()) {
if (!getTarget()
.equals(other.getTarget())) return false;
}
if (!getFunction()
.equals(other.getFunction())) return false;
if (!getArgsList()
.equals(other.getArgsList())) 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 (hasTarget()) {
hash = (37 * hash) + TARGET_FIELD_NUMBER;
hash = (53 * hash) + getTarget().hashCode();
}
hash = (37 * hash) + FUNCTION_FIELD_NUMBER;
hash = (53 * hash) + getFunction().hashCode();
if (getArgsCount() > 0) {
hash = (37 * hash) + ARGS_FIELD_NUMBER;
hash = (53 * hash) + getArgsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.cel.expr.Expr.Call parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.Expr.Call 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.Expr.Call parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.Expr.Call 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.Expr.Call parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.Expr.Call parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.cel.expr.Expr.Call parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static dev.cel.expr.Expr.Call 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.Expr.Call parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.cel.expr.Expr.Call 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.Expr.Call parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static dev.cel.expr.Expr.Call 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.Expr.Call 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 call expression, including calls to predefined functions and operators.
*
* For example, `value == 10`, `size(map_value)`.
*
*
* Protobuf type {@code cel.expr.Expr.Call}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:cel.expr.Expr.Call)
dev.cel.expr.Expr.CallOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_Call_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_Call_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.cel.expr.Expr.Call.class, dev.cel.expr.Expr.Call.Builder.class);
}
// Construct using dev.cel.expr.Expr.Call.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage
.alwaysUseFieldBuilders) {
getTargetFieldBuilder();
getArgsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
target_ = null;
if (targetBuilder_ != null) {
targetBuilder_.dispose();
targetBuilder_ = null;
}
function_ = "";
if (argsBuilder_ == null) {
args_ = java.util.Collections.emptyList();
} else {
args_ = null;
argsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_Call_descriptor;
}
@java.lang.Override
public dev.cel.expr.Expr.Call getDefaultInstanceForType() {
return dev.cel.expr.Expr.Call.getDefaultInstance();
}
@java.lang.Override
public dev.cel.expr.Expr.Call build() {
dev.cel.expr.Expr.Call result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.cel.expr.Expr.Call buildPartial() {
dev.cel.expr.Expr.Call result = new dev.cel.expr.Expr.Call(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(dev.cel.expr.Expr.Call result) {
if (argsBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
args_ = java.util.Collections.unmodifiableList(args_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.args_ = args_;
} else {
result.args_ = argsBuilder_.build();
}
}
private void buildPartial0(dev.cel.expr.Expr.Call result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.target_ = targetBuilder_ == null
? target_
: targetBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.function_ = function_;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.cel.expr.Expr.Call) {
return mergeFrom((dev.cel.expr.Expr.Call)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.cel.expr.Expr.Call other) {
if (other == dev.cel.expr.Expr.Call.getDefaultInstance()) return this;
if (other.hasTarget()) {
mergeTarget(other.getTarget());
}
if (!other.getFunction().isEmpty()) {
function_ = other.function_;
bitField0_ |= 0x00000002;
onChanged();
}
if (argsBuilder_ == null) {
if (!other.args_.isEmpty()) {
if (args_.isEmpty()) {
args_ = other.args_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureArgsIsMutable();
args_.addAll(other.args_);
}
onChanged();
}
} else {
if (!other.args_.isEmpty()) {
if (argsBuilder_.isEmpty()) {
argsBuilder_.dispose();
argsBuilder_ = null;
args_ = other.args_;
bitField0_ = (bitField0_ & ~0x00000004);
argsBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getArgsFieldBuilder() : null;
} else {
argsBuilder_.addAllMessages(other.args_);
}
}
}
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 10: {
input.readMessage(
getTargetFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
function_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
dev.cel.expr.Expr m =
input.readMessage(
dev.cel.expr.Expr.parser(),
extensionRegistry);
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.add(m);
} else {
argsBuilder_.addMessage(m);
}
break;
} // case 26
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 dev.cel.expr.Expr target_;
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder> targetBuilder_;
/**
*
* The target of an method call-style expression. For example, `x` in
* `x.f()`.
*
*
* .cel.expr.Expr target = 1;
* @return Whether the target field is set.
*/
public boolean hasTarget() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The target of an method call-style expression. For example, `x` in
* `x.f()`.
*
*
* .cel.expr.Expr target = 1;
* @return The target.
*/
public dev.cel.expr.Expr getTarget() {
if (targetBuilder_ == null) {
return target_ == null ? dev.cel.expr.Expr.getDefaultInstance() : target_;
} else {
return targetBuilder_.getMessage();
}
}
/**
*
* The target of an method call-style expression. For example, `x` in
* `x.f()`.
*
*
* .cel.expr.Expr target = 1;
*/
public Builder setTarget(dev.cel.expr.Expr value) {
if (targetBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
target_ = value;
} else {
targetBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The target of an method call-style expression. For example, `x` in
* `x.f()`.
*
*
* .cel.expr.Expr target = 1;
*/
public Builder setTarget(
dev.cel.expr.Expr.Builder builderForValue) {
if (targetBuilder_ == null) {
target_ = builderForValue.build();
} else {
targetBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The target of an method call-style expression. For example, `x` in
* `x.f()`.
*
*
* .cel.expr.Expr target = 1;
*/
public Builder mergeTarget(dev.cel.expr.Expr value) {
if (targetBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
target_ != null &&
target_ != dev.cel.expr.Expr.getDefaultInstance()) {
getTargetBuilder().mergeFrom(value);
} else {
target_ = value;
}
} else {
targetBuilder_.mergeFrom(value);
}
if (target_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* The target of an method call-style expression. For example, `x` in
* `x.f()`.
*
*
* .cel.expr.Expr target = 1;
*/
public Builder clearTarget() {
bitField0_ = (bitField0_ & ~0x00000001);
target_ = null;
if (targetBuilder_ != null) {
targetBuilder_.dispose();
targetBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* The target of an method call-style expression. For example, `x` in
* `x.f()`.
*
*
* .cel.expr.Expr target = 1;
*/
public dev.cel.expr.Expr.Builder getTargetBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getTargetFieldBuilder().getBuilder();
}
/**
*
* The target of an method call-style expression. For example, `x` in
* `x.f()`.
*
*
* .cel.expr.Expr target = 1;
*/
public dev.cel.expr.ExprOrBuilder getTargetOrBuilder() {
if (targetBuilder_ != null) {
return targetBuilder_.getMessageOrBuilder();
} else {
return target_ == null ?
dev.cel.expr.Expr.getDefaultInstance() : target_;
}
}
/**
*
* The target of an method call-style expression. For example, `x` in
* `x.f()`.
*
*
* .cel.expr.Expr target = 1;
*/
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>
getTargetFieldBuilder() {
if (targetBuilder_ == null) {
targetBuilder_ = new com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>(
getTarget(),
getParentForChildren(),
isClean());
target_ = null;
}
return targetBuilder_;
}
private java.lang.Object function_ = "";
/**
*
* Required. The name of the function or method being called.
*
*
* string function = 2;
* @return The function.
*/
public java.lang.String getFunction() {
java.lang.Object ref = function_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
function_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required. The name of the function or method being called.
*
*
* string function = 2;
* @return The bytes for function.
*/
public com.google.protobuf.ByteString
getFunctionBytes() {
java.lang.Object ref = function_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
function_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required. The name of the function or method being called.
*
*
* string function = 2;
* @param value The function to set.
* @return This builder for chaining.
*/
public Builder setFunction(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
function_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Required. The name of the function or method being called.
*
*
* string function = 2;
* @return This builder for chaining.
*/
public Builder clearFunction() {
function_ = getDefaultInstance().getFunction();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* Required. The name of the function or method being called.
*
*
* string function = 2;
* @param value The bytes for function to set.
* @return This builder for chaining.
*/
public Builder setFunctionBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
function_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.util.List args_ =
java.util.Collections.emptyList();
private void ensureArgsIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
args_ = new java.util.ArrayList(args_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder> argsBuilder_;
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
public java.util.List getArgsList() {
if (argsBuilder_ == null) {
return java.util.Collections.unmodifiableList(args_);
} else {
return argsBuilder_.getMessageList();
}
}
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
public int getArgsCount() {
if (argsBuilder_ == null) {
return args_.size();
} else {
return argsBuilder_.getCount();
}
}
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
public dev.cel.expr.Expr getArgs(int index) {
if (argsBuilder_ == null) {
return args_.get(index);
} else {
return argsBuilder_.getMessage(index);
}
}
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
public Builder setArgs(
int index, dev.cel.expr.Expr value) {
if (argsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureArgsIsMutable();
args_.set(index, value);
onChanged();
} else {
argsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
public Builder setArgs(
int index, dev.cel.expr.Expr.Builder builderForValue) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.set(index, builderForValue.build());
onChanged();
} else {
argsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
public Builder addArgs(dev.cel.expr.Expr value) {
if (argsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureArgsIsMutable();
args_.add(value);
onChanged();
} else {
argsBuilder_.addMessage(value);
}
return this;
}
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
public Builder addArgs(
int index, dev.cel.expr.Expr value) {
if (argsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureArgsIsMutable();
args_.add(index, value);
onChanged();
} else {
argsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
public Builder addArgs(
dev.cel.expr.Expr.Builder builderForValue) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.add(builderForValue.build());
onChanged();
} else {
argsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
public Builder addArgs(
int index, dev.cel.expr.Expr.Builder builderForValue) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.add(index, builderForValue.build());
onChanged();
} else {
argsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
public Builder addAllArgs(
java.lang.Iterable extends dev.cel.expr.Expr> values) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, args_);
onChanged();
} else {
argsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
public Builder clearArgs() {
if (argsBuilder_ == null) {
args_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
argsBuilder_.clear();
}
return this;
}
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
public Builder removeArgs(int index) {
if (argsBuilder_ == null) {
ensureArgsIsMutable();
args_.remove(index);
onChanged();
} else {
argsBuilder_.remove(index);
}
return this;
}
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
public dev.cel.expr.Expr.Builder getArgsBuilder(
int index) {
return getArgsFieldBuilder().getBuilder(index);
}
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
public dev.cel.expr.ExprOrBuilder getArgsOrBuilder(
int index) {
if (argsBuilder_ == null) {
return args_.get(index); } else {
return argsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
public java.util.List extends dev.cel.expr.ExprOrBuilder>
getArgsOrBuilderList() {
if (argsBuilder_ != null) {
return argsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(args_);
}
}
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
public dev.cel.expr.Expr.Builder addArgsBuilder() {
return getArgsFieldBuilder().addBuilder(
dev.cel.expr.Expr.getDefaultInstance());
}
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
public dev.cel.expr.Expr.Builder addArgsBuilder(
int index) {
return getArgsFieldBuilder().addBuilder(
index, dev.cel.expr.Expr.getDefaultInstance());
}
/**
*
* The arguments.
*
*
* repeated .cel.expr.Expr args = 3;
*/
public java.util.List
getArgsBuilderList() {
return getArgsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>
getArgsFieldBuilder() {
if (argsBuilder_ == null) {
argsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>(
args_,
((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
args_ = null;
}
return argsBuilder_;
}
// @@protoc_insertion_point(builder_scope:cel.expr.Expr.Call)
}
// @@protoc_insertion_point(class_scope:cel.expr.Expr.Call)
private static final dev.cel.expr.Expr.Call DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.cel.expr.Expr.Call();
}
public static dev.cel.expr.Expr.Call getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Call 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.Expr.Call getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CreateListOrBuilder extends
// @@protoc_insertion_point(interface_extends:cel.expr.Expr.CreateList)
com.google.protobuf.MessageOrBuilder {
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
java.util.List
getElementsList();
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
dev.cel.expr.Expr getElements(int index);
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
int getElementsCount();
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
java.util.List extends dev.cel.expr.ExprOrBuilder>
getElementsOrBuilderList();
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
dev.cel.expr.ExprOrBuilder getElementsOrBuilder(
int index);
/**
*
* The indices within the elements list which are marked as optional
* elements.
*
* When an optional-typed value is present, the value it contains
* is included in the list. If the optional-typed value is absent, the list
* element is omitted from the CreateList result.
*
*
* repeated int32 optional_indices = 2;
* @return A list containing the optionalIndices.
*/
java.util.List getOptionalIndicesList();
/**
*
* The indices within the elements list which are marked as optional
* elements.
*
* When an optional-typed value is present, the value it contains
* is included in the list. If the optional-typed value is absent, the list
* element is omitted from the CreateList result.
*
*
* repeated int32 optional_indices = 2;
* @return The count of optionalIndices.
*/
int getOptionalIndicesCount();
/**
*
* The indices within the elements list which are marked as optional
* elements.
*
* When an optional-typed value is present, the value it contains
* is included in the list. If the optional-typed value is absent, the list
* element is omitted from the CreateList result.
*
*
* repeated int32 optional_indices = 2;
* @param index The index of the element to return.
* @return The optionalIndices at the given index.
*/
int getOptionalIndices(int index);
}
/**
*
* A list creation expression.
*
* Lists may either be homogenous, e.g. `[1, 2, 3]`, or heterogeneous, e.g.
* `dyn([1, 'hello', 2.0])`
*
*
* Protobuf type {@code cel.expr.Expr.CreateList}
*/
public static final class CreateList extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:cel.expr.Expr.CreateList)
CreateListOrBuilder {
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= */ "",
CreateList.class.getName());
}
// Use CreateList.newBuilder() to construct.
private CreateList(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private CreateList() {
elements_ = java.util.Collections.emptyList();
optionalIndices_ = emptyIntList();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_CreateList_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_CreateList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.cel.expr.Expr.CreateList.class, dev.cel.expr.Expr.CreateList.Builder.class);
}
public static final int ELEMENTS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List elements_;
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
@java.lang.Override
public java.util.List getElementsList() {
return elements_;
}
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
@java.lang.Override
public java.util.List extends dev.cel.expr.ExprOrBuilder>
getElementsOrBuilderList() {
return elements_;
}
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
@java.lang.Override
public int getElementsCount() {
return elements_.size();
}
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
@java.lang.Override
public dev.cel.expr.Expr getElements(int index) {
return elements_.get(index);
}
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
@java.lang.Override
public dev.cel.expr.ExprOrBuilder getElementsOrBuilder(
int index) {
return elements_.get(index);
}
public static final int OPTIONAL_INDICES_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private com.google.protobuf.Internal.IntList optionalIndices_ =
emptyIntList();
/**
*
* The indices within the elements list which are marked as optional
* elements.
*
* When an optional-typed value is present, the value it contains
* is included in the list. If the optional-typed value is absent, the list
* element is omitted from the CreateList result.
*
*
* repeated int32 optional_indices = 2;
* @return A list containing the optionalIndices.
*/
@java.lang.Override
public java.util.List
getOptionalIndicesList() {
return optionalIndices_;
}
/**
*
* The indices within the elements list which are marked as optional
* elements.
*
* When an optional-typed value is present, the value it contains
* is included in the list. If the optional-typed value is absent, the list
* element is omitted from the CreateList result.
*
*
* repeated int32 optional_indices = 2;
* @return The count of optionalIndices.
*/
public int getOptionalIndicesCount() {
return optionalIndices_.size();
}
/**
*
* The indices within the elements list which are marked as optional
* elements.
*
* When an optional-typed value is present, the value it contains
* is included in the list. If the optional-typed value is absent, the list
* element is omitted from the CreateList result.
*
*
* repeated int32 optional_indices = 2;
* @param index The index of the element to return.
* @return The optionalIndices at the given index.
*/
public int getOptionalIndices(int index) {
return optionalIndices_.getInt(index);
}
private int optionalIndicesMemoizedSerializedSize = -1;
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 {
getSerializedSize();
for (int i = 0; i < elements_.size(); i++) {
output.writeMessage(1, elements_.get(i));
}
if (getOptionalIndicesList().size() > 0) {
output.writeUInt32NoTag(18);
output.writeUInt32NoTag(optionalIndicesMemoizedSerializedSize);
}
for (int i = 0; i < optionalIndices_.size(); i++) {
output.writeInt32NoTag(optionalIndices_.getInt(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < elements_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, elements_.get(i));
}
{
int dataSize = 0;
for (int i = 0; i < optionalIndices_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(optionalIndices_.getInt(i));
}
size += dataSize;
if (!getOptionalIndicesList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
optionalIndicesMemoizedSerializedSize = dataSize;
}
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.Expr.CreateList)) {
return super.equals(obj);
}
dev.cel.expr.Expr.CreateList other = (dev.cel.expr.Expr.CreateList) obj;
if (!getElementsList()
.equals(other.getElementsList())) return false;
if (!getOptionalIndicesList()
.equals(other.getOptionalIndicesList())) 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 (getElementsCount() > 0) {
hash = (37 * hash) + ELEMENTS_FIELD_NUMBER;
hash = (53 * hash) + getElementsList().hashCode();
}
if (getOptionalIndicesCount() > 0) {
hash = (37 * hash) + OPTIONAL_INDICES_FIELD_NUMBER;
hash = (53 * hash) + getOptionalIndicesList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.cel.expr.Expr.CreateList parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.Expr.CreateList 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.Expr.CreateList parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.Expr.CreateList 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.Expr.CreateList parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.Expr.CreateList parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.cel.expr.Expr.CreateList parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static dev.cel.expr.Expr.CreateList 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.Expr.CreateList parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.cel.expr.Expr.CreateList 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.Expr.CreateList parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static dev.cel.expr.Expr.CreateList 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.Expr.CreateList 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 list creation expression.
*
* Lists may either be homogenous, e.g. `[1, 2, 3]`, or heterogeneous, e.g.
* `dyn([1, 'hello', 2.0])`
*
*
* Protobuf type {@code cel.expr.Expr.CreateList}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:cel.expr.Expr.CreateList)
dev.cel.expr.Expr.CreateListOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_CreateList_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_CreateList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.cel.expr.Expr.CreateList.class, dev.cel.expr.Expr.CreateList.Builder.class);
}
// Construct using dev.cel.expr.Expr.CreateList.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (elementsBuilder_ == null) {
elements_ = java.util.Collections.emptyList();
} else {
elements_ = null;
elementsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
optionalIndices_ = emptyIntList();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_CreateList_descriptor;
}
@java.lang.Override
public dev.cel.expr.Expr.CreateList getDefaultInstanceForType() {
return dev.cel.expr.Expr.CreateList.getDefaultInstance();
}
@java.lang.Override
public dev.cel.expr.Expr.CreateList build() {
dev.cel.expr.Expr.CreateList result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.cel.expr.Expr.CreateList buildPartial() {
dev.cel.expr.Expr.CreateList result = new dev.cel.expr.Expr.CreateList(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(dev.cel.expr.Expr.CreateList result) {
if (elementsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
elements_ = java.util.Collections.unmodifiableList(elements_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.elements_ = elements_;
} else {
result.elements_ = elementsBuilder_.build();
}
}
private void buildPartial0(dev.cel.expr.Expr.CreateList result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000002) != 0)) {
optionalIndices_.makeImmutable();
result.optionalIndices_ = optionalIndices_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.cel.expr.Expr.CreateList) {
return mergeFrom((dev.cel.expr.Expr.CreateList)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.cel.expr.Expr.CreateList other) {
if (other == dev.cel.expr.Expr.CreateList.getDefaultInstance()) return this;
if (elementsBuilder_ == null) {
if (!other.elements_.isEmpty()) {
if (elements_.isEmpty()) {
elements_ = other.elements_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureElementsIsMutable();
elements_.addAll(other.elements_);
}
onChanged();
}
} else {
if (!other.elements_.isEmpty()) {
if (elementsBuilder_.isEmpty()) {
elementsBuilder_.dispose();
elementsBuilder_ = null;
elements_ = other.elements_;
bitField0_ = (bitField0_ & ~0x00000001);
elementsBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getElementsFieldBuilder() : null;
} else {
elementsBuilder_.addAllMessages(other.elements_);
}
}
}
if (!other.optionalIndices_.isEmpty()) {
if (optionalIndices_.isEmpty()) {
optionalIndices_ = other.optionalIndices_;
optionalIndices_.makeImmutable();
bitField0_ |= 0x00000002;
} else {
ensureOptionalIndicesIsMutable();
optionalIndices_.addAll(other.optionalIndices_);
}
onChanged();
}
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 10: {
dev.cel.expr.Expr m =
input.readMessage(
dev.cel.expr.Expr.parser(),
extensionRegistry);
if (elementsBuilder_ == null) {
ensureElementsIsMutable();
elements_.add(m);
} else {
elementsBuilder_.addMessage(m);
}
break;
} // case 10
case 16: {
int v = input.readInt32();
ensureOptionalIndicesIsMutable();
optionalIndices_.addInt(v);
break;
} // case 16
case 18: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
ensureOptionalIndicesIsMutable();
while (input.getBytesUntilLimit() > 0) {
optionalIndices_.addInt(input.readInt32());
}
input.popLimit(limit);
break;
} // case 18
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 java.util.List elements_ =
java.util.Collections.emptyList();
private void ensureElementsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
elements_ = new java.util.ArrayList(elements_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder> elementsBuilder_;
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
public java.util.List getElementsList() {
if (elementsBuilder_ == null) {
return java.util.Collections.unmodifiableList(elements_);
} else {
return elementsBuilder_.getMessageList();
}
}
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
public int getElementsCount() {
if (elementsBuilder_ == null) {
return elements_.size();
} else {
return elementsBuilder_.getCount();
}
}
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
public dev.cel.expr.Expr getElements(int index) {
if (elementsBuilder_ == null) {
return elements_.get(index);
} else {
return elementsBuilder_.getMessage(index);
}
}
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
public Builder setElements(
int index, dev.cel.expr.Expr value) {
if (elementsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureElementsIsMutable();
elements_.set(index, value);
onChanged();
} else {
elementsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
public Builder setElements(
int index, dev.cel.expr.Expr.Builder builderForValue) {
if (elementsBuilder_ == null) {
ensureElementsIsMutable();
elements_.set(index, builderForValue.build());
onChanged();
} else {
elementsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
public Builder addElements(dev.cel.expr.Expr value) {
if (elementsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureElementsIsMutable();
elements_.add(value);
onChanged();
} else {
elementsBuilder_.addMessage(value);
}
return this;
}
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
public Builder addElements(
int index, dev.cel.expr.Expr value) {
if (elementsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureElementsIsMutable();
elements_.add(index, value);
onChanged();
} else {
elementsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
public Builder addElements(
dev.cel.expr.Expr.Builder builderForValue) {
if (elementsBuilder_ == null) {
ensureElementsIsMutable();
elements_.add(builderForValue.build());
onChanged();
} else {
elementsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
public Builder addElements(
int index, dev.cel.expr.Expr.Builder builderForValue) {
if (elementsBuilder_ == null) {
ensureElementsIsMutable();
elements_.add(index, builderForValue.build());
onChanged();
} else {
elementsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
public Builder addAllElements(
java.lang.Iterable extends dev.cel.expr.Expr> values) {
if (elementsBuilder_ == null) {
ensureElementsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, elements_);
onChanged();
} else {
elementsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
public Builder clearElements() {
if (elementsBuilder_ == null) {
elements_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
elementsBuilder_.clear();
}
return this;
}
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
public Builder removeElements(int index) {
if (elementsBuilder_ == null) {
ensureElementsIsMutable();
elements_.remove(index);
onChanged();
} else {
elementsBuilder_.remove(index);
}
return this;
}
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
public dev.cel.expr.Expr.Builder getElementsBuilder(
int index) {
return getElementsFieldBuilder().getBuilder(index);
}
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
public dev.cel.expr.ExprOrBuilder getElementsOrBuilder(
int index) {
if (elementsBuilder_ == null) {
return elements_.get(index); } else {
return elementsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
public java.util.List extends dev.cel.expr.ExprOrBuilder>
getElementsOrBuilderList() {
if (elementsBuilder_ != null) {
return elementsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(elements_);
}
}
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
public dev.cel.expr.Expr.Builder addElementsBuilder() {
return getElementsFieldBuilder().addBuilder(
dev.cel.expr.Expr.getDefaultInstance());
}
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
public dev.cel.expr.Expr.Builder addElementsBuilder(
int index) {
return getElementsFieldBuilder().addBuilder(
index, dev.cel.expr.Expr.getDefaultInstance());
}
/**
*
* The elements part of the list.
*
*
* repeated .cel.expr.Expr elements = 1;
*/
public java.util.List
getElementsBuilderList() {
return getElementsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>
getElementsFieldBuilder() {
if (elementsBuilder_ == null) {
elementsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>(
elements_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
elements_ = null;
}
return elementsBuilder_;
}
private com.google.protobuf.Internal.IntList optionalIndices_ = emptyIntList();
private void ensureOptionalIndicesIsMutable() {
if (!optionalIndices_.isModifiable()) {
optionalIndices_ = makeMutableCopy(optionalIndices_);
}
bitField0_ |= 0x00000002;
}
/**
*
* The indices within the elements list which are marked as optional
* elements.
*
* When an optional-typed value is present, the value it contains
* is included in the list. If the optional-typed value is absent, the list
* element is omitted from the CreateList result.
*
*
* repeated int32 optional_indices = 2;
* @return A list containing the optionalIndices.
*/
public java.util.List
getOptionalIndicesList() {
optionalIndices_.makeImmutable();
return optionalIndices_;
}
/**
*
* The indices within the elements list which are marked as optional
* elements.
*
* When an optional-typed value is present, the value it contains
* is included in the list. If the optional-typed value is absent, the list
* element is omitted from the CreateList result.
*
*
* repeated int32 optional_indices = 2;
* @return The count of optionalIndices.
*/
public int getOptionalIndicesCount() {
return optionalIndices_.size();
}
/**
*
* The indices within the elements list which are marked as optional
* elements.
*
* When an optional-typed value is present, the value it contains
* is included in the list. If the optional-typed value is absent, the list
* element is omitted from the CreateList result.
*
*
* repeated int32 optional_indices = 2;
* @param index The index of the element to return.
* @return The optionalIndices at the given index.
*/
public int getOptionalIndices(int index) {
return optionalIndices_.getInt(index);
}
/**
*
* The indices within the elements list which are marked as optional
* elements.
*
* When an optional-typed value is present, the value it contains
* is included in the list. If the optional-typed value is absent, the list
* element is omitted from the CreateList result.
*
*
* repeated int32 optional_indices = 2;
* @param index The index to set the value at.
* @param value The optionalIndices to set.
* @return This builder for chaining.
*/
public Builder setOptionalIndices(
int index, int value) {
ensureOptionalIndicesIsMutable();
optionalIndices_.setInt(index, value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The indices within the elements list which are marked as optional
* elements.
*
* When an optional-typed value is present, the value it contains
* is included in the list. If the optional-typed value is absent, the list
* element is omitted from the CreateList result.
*
*
* repeated int32 optional_indices = 2;
* @param value The optionalIndices to add.
* @return This builder for chaining.
*/
public Builder addOptionalIndices(int value) {
ensureOptionalIndicesIsMutable();
optionalIndices_.addInt(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The indices within the elements list which are marked as optional
* elements.
*
* When an optional-typed value is present, the value it contains
* is included in the list. If the optional-typed value is absent, the list
* element is omitted from the CreateList result.
*
*
* repeated int32 optional_indices = 2;
* @param values The optionalIndices to add.
* @return This builder for chaining.
*/
public Builder addAllOptionalIndices(
java.lang.Iterable extends java.lang.Integer> values) {
ensureOptionalIndicesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, optionalIndices_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The indices within the elements list which are marked as optional
* elements.
*
* When an optional-typed value is present, the value it contains
* is included in the list. If the optional-typed value is absent, the list
* element is omitted from the CreateList result.
*
*
* repeated int32 optional_indices = 2;
* @return This builder for chaining.
*/
public Builder clearOptionalIndices() {
optionalIndices_ = emptyIntList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:cel.expr.Expr.CreateList)
}
// @@protoc_insertion_point(class_scope:cel.expr.Expr.CreateList)
private static final dev.cel.expr.Expr.CreateList DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.cel.expr.Expr.CreateList();
}
public static dev.cel.expr.Expr.CreateList getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CreateList 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.Expr.CreateList getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CreateStructOrBuilder extends
// @@protoc_insertion_point(interface_extends:cel.expr.Expr.CreateStruct)
com.google.protobuf.MessageOrBuilder {
/**
*
* The type name of the message to be created, empty when creating map
* literals.
*
*
* string message_name = 1;
* @return The messageName.
*/
java.lang.String getMessageName();
/**
*
* The type name of the message to be created, empty when creating map
* literals.
*
*
* string message_name = 1;
* @return The bytes for messageName.
*/
com.google.protobuf.ByteString
getMessageNameBytes();
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
java.util.List
getEntriesList();
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
dev.cel.expr.Expr.CreateStruct.Entry getEntries(int index);
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
int getEntriesCount();
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
java.util.List extends dev.cel.expr.Expr.CreateStruct.EntryOrBuilder>
getEntriesOrBuilderList();
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
dev.cel.expr.Expr.CreateStruct.EntryOrBuilder getEntriesOrBuilder(
int index);
}
/**
*
* A map or message creation expression.
*
* Maps are constructed as `{'key_name': 'value'}`. Message construction is
* similar, but prefixed with a type name and composed of field ids:
* `types.MyType{field_id: 'value'}`.
*
*
* Protobuf type {@code cel.expr.Expr.CreateStruct}
*/
public static final class CreateStruct extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:cel.expr.Expr.CreateStruct)
CreateStructOrBuilder {
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= */ "",
CreateStruct.class.getName());
}
// Use CreateStruct.newBuilder() to construct.
private CreateStruct(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private CreateStruct() {
messageName_ = "";
entries_ = java.util.Collections.emptyList();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_CreateStruct_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_CreateStruct_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.cel.expr.Expr.CreateStruct.class, dev.cel.expr.Expr.CreateStruct.Builder.class);
}
public interface EntryOrBuilder extends
// @@protoc_insertion_point(interface_extends:cel.expr.Expr.CreateStruct.Entry)
com.google.protobuf.MessageOrBuilder {
/**
*
* Required. An id assigned to this node by the parser which is unique
* in a given expression tree. This is used to associate type
* information and other attributes to the node.
*
*
* int64 id = 1;
* @return The id.
*/
long getId();
/**
*
* The field key for a message creator statement.
*
*
* string field_key = 2;
* @return Whether the fieldKey field is set.
*/
boolean hasFieldKey();
/**
*
* The field key for a message creator statement.
*
*
* string field_key = 2;
* @return The fieldKey.
*/
java.lang.String getFieldKey();
/**
*
* The field key for a message creator statement.
*
*
* string field_key = 2;
* @return The bytes for fieldKey.
*/
com.google.protobuf.ByteString
getFieldKeyBytes();
/**
*
* The key expression for a map creation statement.
*
*
* .cel.expr.Expr map_key = 3;
* @return Whether the mapKey field is set.
*/
boolean hasMapKey();
/**
*
* The key expression for a map creation statement.
*
*
* .cel.expr.Expr map_key = 3;
* @return The mapKey.
*/
dev.cel.expr.Expr getMapKey();
/**
*
* The key expression for a map creation statement.
*
*
* .cel.expr.Expr map_key = 3;
*/
dev.cel.expr.ExprOrBuilder getMapKeyOrBuilder();
/**
*
* Required. The value assigned to the key.
*
* If the optional_entry field is true, the expression must resolve to an
* optional-typed value. If the optional value is present, the key will be
* set; however, if the optional value is absent, the key will be unset.
*
*
* .cel.expr.Expr value = 4;
* @return Whether the value field is set.
*/
boolean hasValue();
/**
*
* Required. The value assigned to the key.
*
* If the optional_entry field is true, the expression must resolve to an
* optional-typed value. If the optional value is present, the key will be
* set; however, if the optional value is absent, the key will be unset.
*
*
* .cel.expr.Expr value = 4;
* @return The value.
*/
dev.cel.expr.Expr getValue();
/**
*
* Required. The value assigned to the key.
*
* If the optional_entry field is true, the expression must resolve to an
* optional-typed value. If the optional value is present, the key will be
* set; however, if the optional value is absent, the key will be unset.
*
*
* .cel.expr.Expr value = 4;
*/
dev.cel.expr.ExprOrBuilder getValueOrBuilder();
/**
*
* Whether the key-value pair is optional.
*
*
* bool optional_entry = 5;
* @return The optionalEntry.
*/
boolean getOptionalEntry();
dev.cel.expr.Expr.CreateStruct.Entry.KeyKindCase getKeyKindCase();
}
/**
*
* Represents an entry.
*
*
* Protobuf type {@code cel.expr.Expr.CreateStruct.Entry}
*/
public static final class Entry extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:cel.expr.Expr.CreateStruct.Entry)
EntryOrBuilder {
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= */ "",
Entry.class.getName());
}
// Use Entry.newBuilder() to construct.
private Entry(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private Entry() {
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_CreateStruct_Entry_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_CreateStruct_Entry_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.cel.expr.Expr.CreateStruct.Entry.class, dev.cel.expr.Expr.CreateStruct.Entry.Builder.class);
}
private int bitField0_;
private int keyKindCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object keyKind_;
public enum KeyKindCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
FIELD_KEY(2),
MAP_KEY(3),
KEYKIND_NOT_SET(0);
private final int value;
private KeyKindCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static KeyKindCase valueOf(int value) {
return forNumber(value);
}
public static KeyKindCase forNumber(int value) {
switch (value) {
case 2: return FIELD_KEY;
case 3: return MAP_KEY;
case 0: return KEYKIND_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public KeyKindCase
getKeyKindCase() {
return KeyKindCase.forNumber(
keyKindCase_);
}
public static final int ID_FIELD_NUMBER = 1;
private long id_ = 0L;
/**
*
* Required. An id assigned to this node by the parser which is unique
* in a given expression tree. This is used to associate type
* information and other attributes to the node.
*
*
* int64 id = 1;
* @return The id.
*/
@java.lang.Override
public long getId() {
return id_;
}
public static final int FIELD_KEY_FIELD_NUMBER = 2;
/**
*
* The field key for a message creator statement.
*
*
* string field_key = 2;
* @return Whether the fieldKey field is set.
*/
public boolean hasFieldKey() {
return keyKindCase_ == 2;
}
/**
*
* The field key for a message creator statement.
*
*
* string field_key = 2;
* @return The fieldKey.
*/
public java.lang.String getFieldKey() {
java.lang.Object ref = "";
if (keyKindCase_ == 2) {
ref = keyKind_;
}
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (keyKindCase_ == 2) {
keyKind_ = s;
}
return s;
}
}
/**
*
* The field key for a message creator statement.
*
*
* string field_key = 2;
* @return The bytes for fieldKey.
*/
public com.google.protobuf.ByteString
getFieldKeyBytes() {
java.lang.Object ref = "";
if (keyKindCase_ == 2) {
ref = keyKind_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (keyKindCase_ == 2) {
keyKind_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MAP_KEY_FIELD_NUMBER = 3;
/**
*
* The key expression for a map creation statement.
*
*
* .cel.expr.Expr map_key = 3;
* @return Whether the mapKey field is set.
*/
@java.lang.Override
public boolean hasMapKey() {
return keyKindCase_ == 3;
}
/**
*
* The key expression for a map creation statement.
*
*
* .cel.expr.Expr map_key = 3;
* @return The mapKey.
*/
@java.lang.Override
public dev.cel.expr.Expr getMapKey() {
if (keyKindCase_ == 3) {
return (dev.cel.expr.Expr) keyKind_;
}
return dev.cel.expr.Expr.getDefaultInstance();
}
/**
*
* The key expression for a map creation statement.
*
*
* .cel.expr.Expr map_key = 3;
*/
@java.lang.Override
public dev.cel.expr.ExprOrBuilder getMapKeyOrBuilder() {
if (keyKindCase_ == 3) {
return (dev.cel.expr.Expr) keyKind_;
}
return dev.cel.expr.Expr.getDefaultInstance();
}
public static final int VALUE_FIELD_NUMBER = 4;
private dev.cel.expr.Expr value_;
/**
*
* Required. The value assigned to the key.
*
* If the optional_entry field is true, the expression must resolve to an
* optional-typed value. If the optional value is present, the key will be
* set; however, if the optional value is absent, the key will be unset.
*
*
* .cel.expr.Expr value = 4;
* @return Whether the value field is set.
*/
@java.lang.Override
public boolean hasValue() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Required. The value assigned to the key.
*
* If the optional_entry field is true, the expression must resolve to an
* optional-typed value. If the optional value is present, the key will be
* set; however, if the optional value is absent, the key will be unset.
*
*
* .cel.expr.Expr value = 4;
* @return The value.
*/
@java.lang.Override
public dev.cel.expr.Expr getValue() {
return value_ == null ? dev.cel.expr.Expr.getDefaultInstance() : value_;
}
/**
*
* Required. The value assigned to the key.
*
* If the optional_entry field is true, the expression must resolve to an
* optional-typed value. If the optional value is present, the key will be
* set; however, if the optional value is absent, the key will be unset.
*
*
* .cel.expr.Expr value = 4;
*/
@java.lang.Override
public dev.cel.expr.ExprOrBuilder getValueOrBuilder() {
return value_ == null ? dev.cel.expr.Expr.getDefaultInstance() : value_;
}
public static final int OPTIONAL_ENTRY_FIELD_NUMBER = 5;
private boolean optionalEntry_ = false;
/**
*
* Whether the key-value pair is optional.
*
*
* bool optional_entry = 5;
* @return The optionalEntry.
*/
@java.lang.Override
public boolean getOptionalEntry() {
return optionalEntry_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (id_ != 0L) {
output.writeInt64(1, id_);
}
if (keyKindCase_ == 2) {
com.google.protobuf.GeneratedMessage.writeString(output, 2, keyKind_);
}
if (keyKindCase_ == 3) {
output.writeMessage(3, (dev.cel.expr.Expr) keyKind_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(4, getValue());
}
if (optionalEntry_ != false) {
output.writeBool(5, optionalEntry_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (id_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, id_);
}
if (keyKindCase_ == 2) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(2, keyKind_);
}
if (keyKindCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (dev.cel.expr.Expr) keyKind_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getValue());
}
if (optionalEntry_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(5, optionalEntry_);
}
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.Expr.CreateStruct.Entry)) {
return super.equals(obj);
}
dev.cel.expr.Expr.CreateStruct.Entry other = (dev.cel.expr.Expr.CreateStruct.Entry) obj;
if (getId()
!= other.getId()) return false;
if (hasValue() != other.hasValue()) return false;
if (hasValue()) {
if (!getValue()
.equals(other.getValue())) return false;
}
if (getOptionalEntry()
!= other.getOptionalEntry()) return false;
if (!getKeyKindCase().equals(other.getKeyKindCase())) return false;
switch (keyKindCase_) {
case 2:
if (!getFieldKey()
.equals(other.getFieldKey())) return false;
break;
case 3:
if (!getMapKey()
.equals(other.getMapKey())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getId());
if (hasValue()) {
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + getValue().hashCode();
}
hash = (37 * hash) + OPTIONAL_ENTRY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getOptionalEntry());
switch (keyKindCase_) {
case 2:
hash = (37 * hash) + FIELD_KEY_FIELD_NUMBER;
hash = (53 * hash) + getFieldKey().hashCode();
break;
case 3:
hash = (37 * hash) + MAP_KEY_FIELD_NUMBER;
hash = (53 * hash) + getMapKey().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.cel.expr.Expr.CreateStruct.Entry parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.Expr.CreateStruct.Entry 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.Expr.CreateStruct.Entry parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.Expr.CreateStruct.Entry 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.Expr.CreateStruct.Entry parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.Expr.CreateStruct.Entry parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.cel.expr.Expr.CreateStruct.Entry parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static dev.cel.expr.Expr.CreateStruct.Entry 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.Expr.CreateStruct.Entry parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.cel.expr.Expr.CreateStruct.Entry 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.Expr.CreateStruct.Entry parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static dev.cel.expr.Expr.CreateStruct.Entry 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.Expr.CreateStruct.Entry prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Represents an entry.
*
*
* Protobuf type {@code cel.expr.Expr.CreateStruct.Entry}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:cel.expr.Expr.CreateStruct.Entry)
dev.cel.expr.Expr.CreateStruct.EntryOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_CreateStruct_Entry_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_CreateStruct_Entry_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.cel.expr.Expr.CreateStruct.Entry.class, dev.cel.expr.Expr.CreateStruct.Entry.Builder.class);
}
// Construct using dev.cel.expr.Expr.CreateStruct.Entry.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage
.alwaysUseFieldBuilders) {
getValueFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
id_ = 0L;
if (mapKeyBuilder_ != null) {
mapKeyBuilder_.clear();
}
value_ = null;
if (valueBuilder_ != null) {
valueBuilder_.dispose();
valueBuilder_ = null;
}
optionalEntry_ = false;
keyKindCase_ = 0;
keyKind_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_CreateStruct_Entry_descriptor;
}
@java.lang.Override
public dev.cel.expr.Expr.CreateStruct.Entry getDefaultInstanceForType() {
return dev.cel.expr.Expr.CreateStruct.Entry.getDefaultInstance();
}
@java.lang.Override
public dev.cel.expr.Expr.CreateStruct.Entry build() {
dev.cel.expr.Expr.CreateStruct.Entry result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.cel.expr.Expr.CreateStruct.Entry buildPartial() {
dev.cel.expr.Expr.CreateStruct.Entry result = new dev.cel.expr.Expr.CreateStruct.Entry(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(dev.cel.expr.Expr.CreateStruct.Entry result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.id_ = id_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000008) != 0)) {
result.value_ = valueBuilder_ == null
? value_
: valueBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.optionalEntry_ = optionalEntry_;
}
result.bitField0_ |= to_bitField0_;
}
private void buildPartialOneofs(dev.cel.expr.Expr.CreateStruct.Entry result) {
result.keyKindCase_ = keyKindCase_;
result.keyKind_ = this.keyKind_;
if (keyKindCase_ == 3 &&
mapKeyBuilder_ != null) {
result.keyKind_ = mapKeyBuilder_.build();
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.cel.expr.Expr.CreateStruct.Entry) {
return mergeFrom((dev.cel.expr.Expr.CreateStruct.Entry)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.cel.expr.Expr.CreateStruct.Entry other) {
if (other == dev.cel.expr.Expr.CreateStruct.Entry.getDefaultInstance()) return this;
if (other.getId() != 0L) {
setId(other.getId());
}
if (other.hasValue()) {
mergeValue(other.getValue());
}
if (other.getOptionalEntry() != false) {
setOptionalEntry(other.getOptionalEntry());
}
switch (other.getKeyKindCase()) {
case FIELD_KEY: {
keyKindCase_ = 2;
keyKind_ = other.keyKind_;
onChanged();
break;
}
case MAP_KEY: {
mergeMapKey(other.getMapKey());
break;
}
case KEYKIND_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
id_ = input.readInt64();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
java.lang.String s = input.readStringRequireUtf8();
keyKindCase_ = 2;
keyKind_ = s;
break;
} // case 18
case 26: {
input.readMessage(
getMapKeyFieldBuilder().getBuilder(),
extensionRegistry);
keyKindCase_ = 3;
break;
} // case 26
case 34: {
input.readMessage(
getValueFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 40: {
optionalEntry_ = input.readBool();
bitField0_ |= 0x00000010;
break;
} // case 40
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 keyKindCase_ = 0;
private java.lang.Object keyKind_;
public KeyKindCase
getKeyKindCase() {
return KeyKindCase.forNumber(
keyKindCase_);
}
public Builder clearKeyKind() {
keyKindCase_ = 0;
keyKind_ = null;
onChanged();
return this;
}
private int bitField0_;
private long id_ ;
/**
*
* Required. An id assigned to this node by the parser which is unique
* in a given expression tree. This is used to associate type
* information and other attributes to the node.
*
*
* int64 id = 1;
* @return The id.
*/
@java.lang.Override
public long getId() {
return id_;
}
/**
*
* Required. An id assigned to this node by the parser which is unique
* in a given expression tree. This is used to associate type
* information and other attributes to the node.
*
*
* int64 id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(long value) {
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Required. An id assigned to this node by the parser which is unique
* in a given expression tree. This is used to associate type
* information and other attributes to the node.
*
*
* int64 id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
bitField0_ = (bitField0_ & ~0x00000001);
id_ = 0L;
onChanged();
return this;
}
/**
*
* The field key for a message creator statement.
*
*
* string field_key = 2;
* @return Whether the fieldKey field is set.
*/
@java.lang.Override
public boolean hasFieldKey() {
return keyKindCase_ == 2;
}
/**
*
* The field key for a message creator statement.
*
*
* string field_key = 2;
* @return The fieldKey.
*/
@java.lang.Override
public java.lang.String getFieldKey() {
java.lang.Object ref = "";
if (keyKindCase_ == 2) {
ref = keyKind_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (keyKindCase_ == 2) {
keyKind_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The field key for a message creator statement.
*
*
* string field_key = 2;
* @return The bytes for fieldKey.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getFieldKeyBytes() {
java.lang.Object ref = "";
if (keyKindCase_ == 2) {
ref = keyKind_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (keyKindCase_ == 2) {
keyKind_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The field key for a message creator statement.
*
*
* string field_key = 2;
* @param value The fieldKey to set.
* @return This builder for chaining.
*/
public Builder setFieldKey(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
keyKindCase_ = 2;
keyKind_ = value;
onChanged();
return this;
}
/**
*
* The field key for a message creator statement.
*
*
* string field_key = 2;
* @return This builder for chaining.
*/
public Builder clearFieldKey() {
if (keyKindCase_ == 2) {
keyKindCase_ = 0;
keyKind_ = null;
onChanged();
}
return this;
}
/**
*
* The field key for a message creator statement.
*
*
* string field_key = 2;
* @param value The bytes for fieldKey to set.
* @return This builder for chaining.
*/
public Builder setFieldKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
keyKindCase_ = 2;
keyKind_ = value;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder> mapKeyBuilder_;
/**
*
* The key expression for a map creation statement.
*
*
* .cel.expr.Expr map_key = 3;
* @return Whether the mapKey field is set.
*/
@java.lang.Override
public boolean hasMapKey() {
return keyKindCase_ == 3;
}
/**
*
* The key expression for a map creation statement.
*
*
* .cel.expr.Expr map_key = 3;
* @return The mapKey.
*/
@java.lang.Override
public dev.cel.expr.Expr getMapKey() {
if (mapKeyBuilder_ == null) {
if (keyKindCase_ == 3) {
return (dev.cel.expr.Expr) keyKind_;
}
return dev.cel.expr.Expr.getDefaultInstance();
} else {
if (keyKindCase_ == 3) {
return mapKeyBuilder_.getMessage();
}
return dev.cel.expr.Expr.getDefaultInstance();
}
}
/**
*
* The key expression for a map creation statement.
*
*
* .cel.expr.Expr map_key = 3;
*/
public Builder setMapKey(dev.cel.expr.Expr value) {
if (mapKeyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
keyKind_ = value;
onChanged();
} else {
mapKeyBuilder_.setMessage(value);
}
keyKindCase_ = 3;
return this;
}
/**
*
* The key expression for a map creation statement.
*
*
* .cel.expr.Expr map_key = 3;
*/
public Builder setMapKey(
dev.cel.expr.Expr.Builder builderForValue) {
if (mapKeyBuilder_ == null) {
keyKind_ = builderForValue.build();
onChanged();
} else {
mapKeyBuilder_.setMessage(builderForValue.build());
}
keyKindCase_ = 3;
return this;
}
/**
*
* The key expression for a map creation statement.
*
*
* .cel.expr.Expr map_key = 3;
*/
public Builder mergeMapKey(dev.cel.expr.Expr value) {
if (mapKeyBuilder_ == null) {
if (keyKindCase_ == 3 &&
keyKind_ != dev.cel.expr.Expr.getDefaultInstance()) {
keyKind_ = dev.cel.expr.Expr.newBuilder((dev.cel.expr.Expr) keyKind_)
.mergeFrom(value).buildPartial();
} else {
keyKind_ = value;
}
onChanged();
} else {
if (keyKindCase_ == 3) {
mapKeyBuilder_.mergeFrom(value);
} else {
mapKeyBuilder_.setMessage(value);
}
}
keyKindCase_ = 3;
return this;
}
/**
*
* The key expression for a map creation statement.
*
*
* .cel.expr.Expr map_key = 3;
*/
public Builder clearMapKey() {
if (mapKeyBuilder_ == null) {
if (keyKindCase_ == 3) {
keyKindCase_ = 0;
keyKind_ = null;
onChanged();
}
} else {
if (keyKindCase_ == 3) {
keyKindCase_ = 0;
keyKind_ = null;
}
mapKeyBuilder_.clear();
}
return this;
}
/**
*
* The key expression for a map creation statement.
*
*
* .cel.expr.Expr map_key = 3;
*/
public dev.cel.expr.Expr.Builder getMapKeyBuilder() {
return getMapKeyFieldBuilder().getBuilder();
}
/**
*
* The key expression for a map creation statement.
*
*
* .cel.expr.Expr map_key = 3;
*/
@java.lang.Override
public dev.cel.expr.ExprOrBuilder getMapKeyOrBuilder() {
if ((keyKindCase_ == 3) && (mapKeyBuilder_ != null)) {
return mapKeyBuilder_.getMessageOrBuilder();
} else {
if (keyKindCase_ == 3) {
return (dev.cel.expr.Expr) keyKind_;
}
return dev.cel.expr.Expr.getDefaultInstance();
}
}
/**
*
* The key expression for a map creation statement.
*
*
* .cel.expr.Expr map_key = 3;
*/
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>
getMapKeyFieldBuilder() {
if (mapKeyBuilder_ == null) {
if (!(keyKindCase_ == 3)) {
keyKind_ = dev.cel.expr.Expr.getDefaultInstance();
}
mapKeyBuilder_ = new com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>(
(dev.cel.expr.Expr) keyKind_,
getParentForChildren(),
isClean());
keyKind_ = null;
}
keyKindCase_ = 3;
onChanged();
return mapKeyBuilder_;
}
private dev.cel.expr.Expr value_;
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder> valueBuilder_;
/**
*
* Required. The value assigned to the key.
*
* If the optional_entry field is true, the expression must resolve to an
* optional-typed value. If the optional value is present, the key will be
* set; however, if the optional value is absent, the key will be unset.
*
*
* .cel.expr.Expr value = 4;
* @return Whether the value field is set.
*/
public boolean hasValue() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* Required. The value assigned to the key.
*
* If the optional_entry field is true, the expression must resolve to an
* optional-typed value. If the optional value is present, the key will be
* set; however, if the optional value is absent, the key will be unset.
*
*
* .cel.expr.Expr value = 4;
* @return The value.
*/
public dev.cel.expr.Expr getValue() {
if (valueBuilder_ == null) {
return value_ == null ? dev.cel.expr.Expr.getDefaultInstance() : value_;
} else {
return valueBuilder_.getMessage();
}
}
/**
*
* Required. The value assigned to the key.
*
* If the optional_entry field is true, the expression must resolve to an
* optional-typed value. If the optional value is present, the key will be
* set; however, if the optional value is absent, the key will be unset.
*
*
* .cel.expr.Expr value = 4;
*/
public Builder setValue(dev.cel.expr.Expr value) {
if (valueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
} else {
valueBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Required. The value assigned to the key.
*
* If the optional_entry field is true, the expression must resolve to an
* optional-typed value. If the optional value is present, the key will be
* set; however, if the optional value is absent, the key will be unset.
*
*
* .cel.expr.Expr value = 4;
*/
public Builder setValue(
dev.cel.expr.Expr.Builder builderForValue) {
if (valueBuilder_ == null) {
value_ = builderForValue.build();
} else {
valueBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Required. The value assigned to the key.
*
* If the optional_entry field is true, the expression must resolve to an
* optional-typed value. If the optional value is present, the key will be
* set; however, if the optional value is absent, the key will be unset.
*
*
* .cel.expr.Expr value = 4;
*/
public Builder mergeValue(dev.cel.expr.Expr value) {
if (valueBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0) &&
value_ != null &&
value_ != dev.cel.expr.Expr.getDefaultInstance()) {
getValueBuilder().mergeFrom(value);
} else {
value_ = value;
}
} else {
valueBuilder_.mergeFrom(value);
}
if (value_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
* Required. The value assigned to the key.
*
* If the optional_entry field is true, the expression must resolve to an
* optional-typed value. If the optional value is present, the key will be
* set; however, if the optional value is absent, the key will be unset.
*
*
* .cel.expr.Expr value = 4;
*/
public Builder clearValue() {
bitField0_ = (bitField0_ & ~0x00000008);
value_ = null;
if (valueBuilder_ != null) {
valueBuilder_.dispose();
valueBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Required. The value assigned to the key.
*
* If the optional_entry field is true, the expression must resolve to an
* optional-typed value. If the optional value is present, the key will be
* set; however, if the optional value is absent, the key will be unset.
*
*
* .cel.expr.Expr value = 4;
*/
public dev.cel.expr.Expr.Builder getValueBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getValueFieldBuilder().getBuilder();
}
/**
*
* Required. The value assigned to the key.
*
* If the optional_entry field is true, the expression must resolve to an
* optional-typed value. If the optional value is present, the key will be
* set; however, if the optional value is absent, the key will be unset.
*
*
* .cel.expr.Expr value = 4;
*/
public dev.cel.expr.ExprOrBuilder getValueOrBuilder() {
if (valueBuilder_ != null) {
return valueBuilder_.getMessageOrBuilder();
} else {
return value_ == null ?
dev.cel.expr.Expr.getDefaultInstance() : value_;
}
}
/**
*
* Required. The value assigned to the key.
*
* If the optional_entry field is true, the expression must resolve to an
* optional-typed value. If the optional value is present, the key will be
* set; however, if the optional value is absent, the key will be unset.
*
*
* .cel.expr.Expr value = 4;
*/
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>
getValueFieldBuilder() {
if (valueBuilder_ == null) {
valueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>(
getValue(),
getParentForChildren(),
isClean());
value_ = null;
}
return valueBuilder_;
}
private boolean optionalEntry_ ;
/**
*
* Whether the key-value pair is optional.
*
*
* bool optional_entry = 5;
* @return The optionalEntry.
*/
@java.lang.Override
public boolean getOptionalEntry() {
return optionalEntry_;
}
/**
*
* Whether the key-value pair is optional.
*
*
* bool optional_entry = 5;
* @param value The optionalEntry to set.
* @return This builder for chaining.
*/
public Builder setOptionalEntry(boolean value) {
optionalEntry_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Whether the key-value pair is optional.
*
*
* bool optional_entry = 5;
* @return This builder for chaining.
*/
public Builder clearOptionalEntry() {
bitField0_ = (bitField0_ & ~0x00000010);
optionalEntry_ = false;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:cel.expr.Expr.CreateStruct.Entry)
}
// @@protoc_insertion_point(class_scope:cel.expr.Expr.CreateStruct.Entry)
private static final dev.cel.expr.Expr.CreateStruct.Entry DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.cel.expr.Expr.CreateStruct.Entry();
}
public static dev.cel.expr.Expr.CreateStruct.Entry getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Entry 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.Expr.CreateStruct.Entry getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int MESSAGE_NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object messageName_ = "";
/**
*
* The type name of the message to be created, empty when creating map
* literals.
*
*
* string message_name = 1;
* @return The messageName.
*/
@java.lang.Override
public java.lang.String getMessageName() {
java.lang.Object ref = messageName_;
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();
messageName_ = s;
return s;
}
}
/**
*
* The type name of the message to be created, empty when creating map
* literals.
*
*
* string message_name = 1;
* @return The bytes for messageName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getMessageNameBytes() {
java.lang.Object ref = messageName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
messageName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ENTRIES_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List entries_;
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
@java.lang.Override
public java.util.List getEntriesList() {
return entries_;
}
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
@java.lang.Override
public java.util.List extends dev.cel.expr.Expr.CreateStruct.EntryOrBuilder>
getEntriesOrBuilderList() {
return entries_;
}
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
@java.lang.Override
public int getEntriesCount() {
return entries_.size();
}
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
@java.lang.Override
public dev.cel.expr.Expr.CreateStruct.Entry getEntries(int index) {
return entries_.get(index);
}
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
@java.lang.Override
public dev.cel.expr.Expr.CreateStruct.EntryOrBuilder getEntriesOrBuilder(
int index) {
return entries_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(messageName_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 1, messageName_);
}
for (int i = 0; i < entries_.size(); i++) {
output.writeMessage(2, entries_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(messageName_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(1, messageName_);
}
for (int i = 0; i < entries_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, entries_.get(i));
}
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.Expr.CreateStruct)) {
return super.equals(obj);
}
dev.cel.expr.Expr.CreateStruct other = (dev.cel.expr.Expr.CreateStruct) obj;
if (!getMessageName()
.equals(other.getMessageName())) return false;
if (!getEntriesList()
.equals(other.getEntriesList())) 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();
hash = (37 * hash) + MESSAGE_NAME_FIELD_NUMBER;
hash = (53 * hash) + getMessageName().hashCode();
if (getEntriesCount() > 0) {
hash = (37 * hash) + ENTRIES_FIELD_NUMBER;
hash = (53 * hash) + getEntriesList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.cel.expr.Expr.CreateStruct parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.Expr.CreateStruct 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.Expr.CreateStruct parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.Expr.CreateStruct 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.Expr.CreateStruct parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.Expr.CreateStruct parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.cel.expr.Expr.CreateStruct parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static dev.cel.expr.Expr.CreateStruct 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.Expr.CreateStruct parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.cel.expr.Expr.CreateStruct 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.Expr.CreateStruct parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static dev.cel.expr.Expr.CreateStruct 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.Expr.CreateStruct 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 map or message creation expression.
*
* Maps are constructed as `{'key_name': 'value'}`. Message construction is
* similar, but prefixed with a type name and composed of field ids:
* `types.MyType{field_id: 'value'}`.
*
*
* Protobuf type {@code cel.expr.Expr.CreateStruct}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:cel.expr.Expr.CreateStruct)
dev.cel.expr.Expr.CreateStructOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_CreateStruct_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_CreateStruct_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.cel.expr.Expr.CreateStruct.class, dev.cel.expr.Expr.CreateStruct.Builder.class);
}
// Construct using dev.cel.expr.Expr.CreateStruct.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
messageName_ = "";
if (entriesBuilder_ == null) {
entries_ = java.util.Collections.emptyList();
} else {
entries_ = null;
entriesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_CreateStruct_descriptor;
}
@java.lang.Override
public dev.cel.expr.Expr.CreateStruct getDefaultInstanceForType() {
return dev.cel.expr.Expr.CreateStruct.getDefaultInstance();
}
@java.lang.Override
public dev.cel.expr.Expr.CreateStruct build() {
dev.cel.expr.Expr.CreateStruct result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.cel.expr.Expr.CreateStruct buildPartial() {
dev.cel.expr.Expr.CreateStruct result = new dev.cel.expr.Expr.CreateStruct(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(dev.cel.expr.Expr.CreateStruct result) {
if (entriesBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
entries_ = java.util.Collections.unmodifiableList(entries_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.entries_ = entries_;
} else {
result.entries_ = entriesBuilder_.build();
}
}
private void buildPartial0(dev.cel.expr.Expr.CreateStruct result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.messageName_ = messageName_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.cel.expr.Expr.CreateStruct) {
return mergeFrom((dev.cel.expr.Expr.CreateStruct)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.cel.expr.Expr.CreateStruct other) {
if (other == dev.cel.expr.Expr.CreateStruct.getDefaultInstance()) return this;
if (!other.getMessageName().isEmpty()) {
messageName_ = other.messageName_;
bitField0_ |= 0x00000001;
onChanged();
}
if (entriesBuilder_ == null) {
if (!other.entries_.isEmpty()) {
if (entries_.isEmpty()) {
entries_ = other.entries_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureEntriesIsMutable();
entries_.addAll(other.entries_);
}
onChanged();
}
} else {
if (!other.entries_.isEmpty()) {
if (entriesBuilder_.isEmpty()) {
entriesBuilder_.dispose();
entriesBuilder_ = null;
entries_ = other.entries_;
bitField0_ = (bitField0_ & ~0x00000002);
entriesBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getEntriesFieldBuilder() : null;
} else {
entriesBuilder_.addAllMessages(other.entries_);
}
}
}
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 10: {
messageName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
dev.cel.expr.Expr.CreateStruct.Entry m =
input.readMessage(
dev.cel.expr.Expr.CreateStruct.Entry.parser(),
extensionRegistry);
if (entriesBuilder_ == null) {
ensureEntriesIsMutable();
entries_.add(m);
} else {
entriesBuilder_.addMessage(m);
}
break;
} // case 18
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 java.lang.Object messageName_ = "";
/**
*
* The type name of the message to be created, empty when creating map
* literals.
*
*
* string message_name = 1;
* @return The messageName.
*/
public java.lang.String getMessageName() {
java.lang.Object ref = messageName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
messageName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The type name of the message to be created, empty when creating map
* literals.
*
*
* string message_name = 1;
* @return The bytes for messageName.
*/
public com.google.protobuf.ByteString
getMessageNameBytes() {
java.lang.Object ref = messageName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
messageName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The type name of the message to be created, empty when creating map
* literals.
*
*
* string message_name = 1;
* @param value The messageName to set.
* @return This builder for chaining.
*/
public Builder setMessageName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
messageName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The type name of the message to be created, empty when creating map
* literals.
*
*
* string message_name = 1;
* @return This builder for chaining.
*/
public Builder clearMessageName() {
messageName_ = getDefaultInstance().getMessageName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* The type name of the message to be created, empty when creating map
* literals.
*
*
* string message_name = 1;
* @param value The bytes for messageName to set.
* @return This builder for chaining.
*/
public Builder setMessageNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
messageName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.util.List entries_ =
java.util.Collections.emptyList();
private void ensureEntriesIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
entries_ = new java.util.ArrayList(entries_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
dev.cel.expr.Expr.CreateStruct.Entry, dev.cel.expr.Expr.CreateStruct.Entry.Builder, dev.cel.expr.Expr.CreateStruct.EntryOrBuilder> entriesBuilder_;
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
public java.util.List getEntriesList() {
if (entriesBuilder_ == null) {
return java.util.Collections.unmodifiableList(entries_);
} else {
return entriesBuilder_.getMessageList();
}
}
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
public int getEntriesCount() {
if (entriesBuilder_ == null) {
return entries_.size();
} else {
return entriesBuilder_.getCount();
}
}
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
public dev.cel.expr.Expr.CreateStruct.Entry getEntries(int index) {
if (entriesBuilder_ == null) {
return entries_.get(index);
} else {
return entriesBuilder_.getMessage(index);
}
}
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
public Builder setEntries(
int index, dev.cel.expr.Expr.CreateStruct.Entry value) {
if (entriesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEntriesIsMutable();
entries_.set(index, value);
onChanged();
} else {
entriesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
public Builder setEntries(
int index, dev.cel.expr.Expr.CreateStruct.Entry.Builder builderForValue) {
if (entriesBuilder_ == null) {
ensureEntriesIsMutable();
entries_.set(index, builderForValue.build());
onChanged();
} else {
entriesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
public Builder addEntries(dev.cel.expr.Expr.CreateStruct.Entry value) {
if (entriesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEntriesIsMutable();
entries_.add(value);
onChanged();
} else {
entriesBuilder_.addMessage(value);
}
return this;
}
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
public Builder addEntries(
int index, dev.cel.expr.Expr.CreateStruct.Entry value) {
if (entriesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEntriesIsMutable();
entries_.add(index, value);
onChanged();
} else {
entriesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
public Builder addEntries(
dev.cel.expr.Expr.CreateStruct.Entry.Builder builderForValue) {
if (entriesBuilder_ == null) {
ensureEntriesIsMutable();
entries_.add(builderForValue.build());
onChanged();
} else {
entriesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
public Builder addEntries(
int index, dev.cel.expr.Expr.CreateStruct.Entry.Builder builderForValue) {
if (entriesBuilder_ == null) {
ensureEntriesIsMutable();
entries_.add(index, builderForValue.build());
onChanged();
} else {
entriesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
public Builder addAllEntries(
java.lang.Iterable extends dev.cel.expr.Expr.CreateStruct.Entry> values) {
if (entriesBuilder_ == null) {
ensureEntriesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, entries_);
onChanged();
} else {
entriesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
public Builder clearEntries() {
if (entriesBuilder_ == null) {
entries_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
entriesBuilder_.clear();
}
return this;
}
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
public Builder removeEntries(int index) {
if (entriesBuilder_ == null) {
ensureEntriesIsMutable();
entries_.remove(index);
onChanged();
} else {
entriesBuilder_.remove(index);
}
return this;
}
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
public dev.cel.expr.Expr.CreateStruct.Entry.Builder getEntriesBuilder(
int index) {
return getEntriesFieldBuilder().getBuilder(index);
}
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
public dev.cel.expr.Expr.CreateStruct.EntryOrBuilder getEntriesOrBuilder(
int index) {
if (entriesBuilder_ == null) {
return entries_.get(index); } else {
return entriesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
public java.util.List extends dev.cel.expr.Expr.CreateStruct.EntryOrBuilder>
getEntriesOrBuilderList() {
if (entriesBuilder_ != null) {
return entriesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(entries_);
}
}
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
public dev.cel.expr.Expr.CreateStruct.Entry.Builder addEntriesBuilder() {
return getEntriesFieldBuilder().addBuilder(
dev.cel.expr.Expr.CreateStruct.Entry.getDefaultInstance());
}
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
public dev.cel.expr.Expr.CreateStruct.Entry.Builder addEntriesBuilder(
int index) {
return getEntriesFieldBuilder().addBuilder(
index, dev.cel.expr.Expr.CreateStruct.Entry.getDefaultInstance());
}
/**
*
* The entries in the creation expression.
*
*
* repeated .cel.expr.Expr.CreateStruct.Entry entries = 2;
*/
public java.util.List
getEntriesBuilderList() {
return getEntriesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
dev.cel.expr.Expr.CreateStruct.Entry, dev.cel.expr.Expr.CreateStruct.Entry.Builder, dev.cel.expr.Expr.CreateStruct.EntryOrBuilder>
getEntriesFieldBuilder() {
if (entriesBuilder_ == null) {
entriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
dev.cel.expr.Expr.CreateStruct.Entry, dev.cel.expr.Expr.CreateStruct.Entry.Builder, dev.cel.expr.Expr.CreateStruct.EntryOrBuilder>(
entries_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
entries_ = null;
}
return entriesBuilder_;
}
// @@protoc_insertion_point(builder_scope:cel.expr.Expr.CreateStruct)
}
// @@protoc_insertion_point(class_scope:cel.expr.Expr.CreateStruct)
private static final dev.cel.expr.Expr.CreateStruct DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.cel.expr.Expr.CreateStruct();
}
public static dev.cel.expr.Expr.CreateStruct getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CreateStruct 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.Expr.CreateStruct getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ComprehensionOrBuilder extends
// @@protoc_insertion_point(interface_extends:cel.expr.Expr.Comprehension)
com.google.protobuf.MessageOrBuilder {
/**
*
* The name of the first iteration variable.
* When the iter_range is a list, this variable is the list element.
* When the iter_range is a map, this variable is the map entry key.
*
*
* string iter_var = 1;
* @return The iterVar.
*/
java.lang.String getIterVar();
/**
*
* The name of the first iteration variable.
* When the iter_range is a list, this variable is the list element.
* When the iter_range is a map, this variable is the map entry key.
*
*
* string iter_var = 1;
* @return The bytes for iterVar.
*/
com.google.protobuf.ByteString
getIterVarBytes();
/**
*
* The name of the second iteration variable, empty if not set.
* When the iter_range is a list, this variable is the integer index.
* When the iter_range is a map, this variable is the map entry value.
* This field is only set for comprehension v2 macros.
*
*
* string iter_var2 = 8;
* @return The iterVar2.
*/
java.lang.String getIterVar2();
/**
*
* The name of the second iteration variable, empty if not set.
* When the iter_range is a list, this variable is the integer index.
* When the iter_range is a map, this variable is the map entry value.
* This field is only set for comprehension v2 macros.
*
*
* string iter_var2 = 8;
* @return The bytes for iterVar2.
*/
com.google.protobuf.ByteString
getIterVar2Bytes();
/**
*
* The range over which the comprehension iterates.
*
*
* .cel.expr.Expr iter_range = 2;
* @return Whether the iterRange field is set.
*/
boolean hasIterRange();
/**
*
* The range over which the comprehension iterates.
*
*
* .cel.expr.Expr iter_range = 2;
* @return The iterRange.
*/
dev.cel.expr.Expr getIterRange();
/**
*
* The range over which the comprehension iterates.
*
*
* .cel.expr.Expr iter_range = 2;
*/
dev.cel.expr.ExprOrBuilder getIterRangeOrBuilder();
/**
*
* The name of the variable used for accumulation of the result.
*
*
* string accu_var = 3;
* @return The accuVar.
*/
java.lang.String getAccuVar();
/**
*
* The name of the variable used for accumulation of the result.
*
*
* string accu_var = 3;
* @return The bytes for accuVar.
*/
com.google.protobuf.ByteString
getAccuVarBytes();
/**
*
* The initial value of the accumulator.
*
*
* .cel.expr.Expr accu_init = 4;
* @return Whether the accuInit field is set.
*/
boolean hasAccuInit();
/**
*
* The initial value of the accumulator.
*
*
* .cel.expr.Expr accu_init = 4;
* @return The accuInit.
*/
dev.cel.expr.Expr getAccuInit();
/**
*
* The initial value of the accumulator.
*
*
* .cel.expr.Expr accu_init = 4;
*/
dev.cel.expr.ExprOrBuilder getAccuInitOrBuilder();
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Returns false when the result has been computed and may be used as
* a hint to short-circuit the remainder of the comprehension.
*
*
* .cel.expr.Expr loop_condition = 5;
* @return Whether the loopCondition field is set.
*/
boolean hasLoopCondition();
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Returns false when the result has been computed and may be used as
* a hint to short-circuit the remainder of the comprehension.
*
*
* .cel.expr.Expr loop_condition = 5;
* @return The loopCondition.
*/
dev.cel.expr.Expr getLoopCondition();
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Returns false when the result has been computed and may be used as
* a hint to short-circuit the remainder of the comprehension.
*
*
* .cel.expr.Expr loop_condition = 5;
*/
dev.cel.expr.ExprOrBuilder getLoopConditionOrBuilder();
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Computes the next value of accu_var.
*
*
* .cel.expr.Expr loop_step = 6;
* @return Whether the loopStep field is set.
*/
boolean hasLoopStep();
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Computes the next value of accu_var.
*
*
* .cel.expr.Expr loop_step = 6;
* @return The loopStep.
*/
dev.cel.expr.Expr getLoopStep();
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Computes the next value of accu_var.
*
*
* .cel.expr.Expr loop_step = 6;
*/
dev.cel.expr.ExprOrBuilder getLoopStepOrBuilder();
/**
*
* An expression which can contain accu_var.
*
* Computes the result.
*
*
* .cel.expr.Expr result = 7;
* @return Whether the result field is set.
*/
boolean hasResult();
/**
*
* An expression which can contain accu_var.
*
* Computes the result.
*
*
* .cel.expr.Expr result = 7;
* @return The result.
*/
dev.cel.expr.Expr getResult();
/**
*
* An expression which can contain accu_var.
*
* Computes the result.
*
*
* .cel.expr.Expr result = 7;
*/
dev.cel.expr.ExprOrBuilder getResultOrBuilder();
}
/**
*
* A comprehension expression applied to a list or map.
*
* Comprehensions are not part of the core syntax, but enabled with macros.
* A macro matches a specific call signature within a parsed AST and replaces
* the call with an alternate AST block. Macro expansion happens at parse
* time.
*
* The following macros are supported within CEL:
*
* Aggregate type macros may be applied to all elements in a list or all keys
* in a map:
*
* * `all`, `exists`, `exists_one` - test a predicate expression against
* the inputs and return `true` if the predicate is satisfied for all,
* any, or only one value `list.all(x, x < 10)`.
* * `filter` - test a predicate expression against the inputs and return
* the subset of elements which satisfy the predicate:
* `payments.filter(p, p > 1000)`.
* * `map` - apply an expression to all elements in the input and return the
* output aggregate type: `[1, 2, 3].map(i, i * i)`.
*
* The `has(m.x)` macro tests whether the property `x` is present in struct
* `m`. The semantics of this macro depend on the type of `m`. For proto2
* messages `has(m.x)` is defined as 'defined, but not set`. For proto3, the
* macro tests whether the property is set to its default. For map and struct
* types, the macro tests whether the property `x` is defined on `m`.
*
* Comprehensions for the standard environment macros evaluation can be best
* visualized as the following pseudocode:
*
* ```
* let `accu_var` = `accu_init`
* for (let `iter_var` in `iter_range`) {
* if (!`loop_condition`) {
* break
* }
* `accu_var` = `loop_step`
* }
* return `result`
* ```
*
* Comprehensions for the optional V2 macros which support map-to-map
* translation differ slightly from the standard environment macros in that
* they expose both the key or index in addition to the value for each list
* or map entry:
*
* ```
* let `accu_var` = `accu_init`
* for (let `iter_var`, `iter_var2` in `iter_range`) {
* if (!`loop_condition`) {
* break
* }
* `accu_var` = `loop_step`
* }
* return `result`
* ```
*
*
* Protobuf type {@code cel.expr.Expr.Comprehension}
*/
public static final class Comprehension extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:cel.expr.Expr.Comprehension)
ComprehensionOrBuilder {
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= */ "",
Comprehension.class.getName());
}
// Use Comprehension.newBuilder() to construct.
private Comprehension(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private Comprehension() {
iterVar_ = "";
iterVar2_ = "";
accuVar_ = "";
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_Comprehension_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_Comprehension_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.cel.expr.Expr.Comprehension.class, dev.cel.expr.Expr.Comprehension.Builder.class);
}
private int bitField0_;
public static final int ITER_VAR_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object iterVar_ = "";
/**
*
* The name of the first iteration variable.
* When the iter_range is a list, this variable is the list element.
* When the iter_range is a map, this variable is the map entry key.
*
*
* string iter_var = 1;
* @return The iterVar.
*/
@java.lang.Override
public java.lang.String getIterVar() {
java.lang.Object ref = iterVar_;
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();
iterVar_ = s;
return s;
}
}
/**
*
* The name of the first iteration variable.
* When the iter_range is a list, this variable is the list element.
* When the iter_range is a map, this variable is the map entry key.
*
*
* string iter_var = 1;
* @return The bytes for iterVar.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIterVarBytes() {
java.lang.Object ref = iterVar_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
iterVar_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ITER_VAR2_FIELD_NUMBER = 8;
@SuppressWarnings("serial")
private volatile java.lang.Object iterVar2_ = "";
/**
*
* The name of the second iteration variable, empty if not set.
* When the iter_range is a list, this variable is the integer index.
* When the iter_range is a map, this variable is the map entry value.
* This field is only set for comprehension v2 macros.
*
*
* string iter_var2 = 8;
* @return The iterVar2.
*/
@java.lang.Override
public java.lang.String getIterVar2() {
java.lang.Object ref = iterVar2_;
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();
iterVar2_ = s;
return s;
}
}
/**
*
* The name of the second iteration variable, empty if not set.
* When the iter_range is a list, this variable is the integer index.
* When the iter_range is a map, this variable is the map entry value.
* This field is only set for comprehension v2 macros.
*
*
* string iter_var2 = 8;
* @return The bytes for iterVar2.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIterVar2Bytes() {
java.lang.Object ref = iterVar2_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
iterVar2_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ITER_RANGE_FIELD_NUMBER = 2;
private dev.cel.expr.Expr iterRange_;
/**
*
* The range over which the comprehension iterates.
*
*
* .cel.expr.Expr iter_range = 2;
* @return Whether the iterRange field is set.
*/
@java.lang.Override
public boolean hasIterRange() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The range over which the comprehension iterates.
*
*
* .cel.expr.Expr iter_range = 2;
* @return The iterRange.
*/
@java.lang.Override
public dev.cel.expr.Expr getIterRange() {
return iterRange_ == null ? dev.cel.expr.Expr.getDefaultInstance() : iterRange_;
}
/**
*
* The range over which the comprehension iterates.
*
*
* .cel.expr.Expr iter_range = 2;
*/
@java.lang.Override
public dev.cel.expr.ExprOrBuilder getIterRangeOrBuilder() {
return iterRange_ == null ? dev.cel.expr.Expr.getDefaultInstance() : iterRange_;
}
public static final int ACCU_VAR_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object accuVar_ = "";
/**
*
* The name of the variable used for accumulation of the result.
*
*
* string accu_var = 3;
* @return The accuVar.
*/
@java.lang.Override
public java.lang.String getAccuVar() {
java.lang.Object ref = accuVar_;
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();
accuVar_ = s;
return s;
}
}
/**
*
* The name of the variable used for accumulation of the result.
*
*
* string accu_var = 3;
* @return The bytes for accuVar.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAccuVarBytes() {
java.lang.Object ref = accuVar_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
accuVar_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ACCU_INIT_FIELD_NUMBER = 4;
private dev.cel.expr.Expr accuInit_;
/**
*
* The initial value of the accumulator.
*
*
* .cel.expr.Expr accu_init = 4;
* @return Whether the accuInit field is set.
*/
@java.lang.Override
public boolean hasAccuInit() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* The initial value of the accumulator.
*
*
* .cel.expr.Expr accu_init = 4;
* @return The accuInit.
*/
@java.lang.Override
public dev.cel.expr.Expr getAccuInit() {
return accuInit_ == null ? dev.cel.expr.Expr.getDefaultInstance() : accuInit_;
}
/**
*
* The initial value of the accumulator.
*
*
* .cel.expr.Expr accu_init = 4;
*/
@java.lang.Override
public dev.cel.expr.ExprOrBuilder getAccuInitOrBuilder() {
return accuInit_ == null ? dev.cel.expr.Expr.getDefaultInstance() : accuInit_;
}
public static final int LOOP_CONDITION_FIELD_NUMBER = 5;
private dev.cel.expr.Expr loopCondition_;
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Returns false when the result has been computed and may be used as
* a hint to short-circuit the remainder of the comprehension.
*
*
* .cel.expr.Expr loop_condition = 5;
* @return Whether the loopCondition field is set.
*/
@java.lang.Override
public boolean hasLoopCondition() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Returns false when the result has been computed and may be used as
* a hint to short-circuit the remainder of the comprehension.
*
*
* .cel.expr.Expr loop_condition = 5;
* @return The loopCondition.
*/
@java.lang.Override
public dev.cel.expr.Expr getLoopCondition() {
return loopCondition_ == null ? dev.cel.expr.Expr.getDefaultInstance() : loopCondition_;
}
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Returns false when the result has been computed and may be used as
* a hint to short-circuit the remainder of the comprehension.
*
*
* .cel.expr.Expr loop_condition = 5;
*/
@java.lang.Override
public dev.cel.expr.ExprOrBuilder getLoopConditionOrBuilder() {
return loopCondition_ == null ? dev.cel.expr.Expr.getDefaultInstance() : loopCondition_;
}
public static final int LOOP_STEP_FIELD_NUMBER = 6;
private dev.cel.expr.Expr loopStep_;
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Computes the next value of accu_var.
*
*
* .cel.expr.Expr loop_step = 6;
* @return Whether the loopStep field is set.
*/
@java.lang.Override
public boolean hasLoopStep() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Computes the next value of accu_var.
*
*
* .cel.expr.Expr loop_step = 6;
* @return The loopStep.
*/
@java.lang.Override
public dev.cel.expr.Expr getLoopStep() {
return loopStep_ == null ? dev.cel.expr.Expr.getDefaultInstance() : loopStep_;
}
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Computes the next value of accu_var.
*
*
* .cel.expr.Expr loop_step = 6;
*/
@java.lang.Override
public dev.cel.expr.ExprOrBuilder getLoopStepOrBuilder() {
return loopStep_ == null ? dev.cel.expr.Expr.getDefaultInstance() : loopStep_;
}
public static final int RESULT_FIELD_NUMBER = 7;
private dev.cel.expr.Expr result_;
/**
*
* An expression which can contain accu_var.
*
* Computes the result.
*
*
* .cel.expr.Expr result = 7;
* @return Whether the result field is set.
*/
@java.lang.Override
public boolean hasResult() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* An expression which can contain accu_var.
*
* Computes the result.
*
*
* .cel.expr.Expr result = 7;
* @return The result.
*/
@java.lang.Override
public dev.cel.expr.Expr getResult() {
return result_ == null ? dev.cel.expr.Expr.getDefaultInstance() : result_;
}
/**
*
* An expression which can contain accu_var.
*
* Computes the result.
*
*
* .cel.expr.Expr result = 7;
*/
@java.lang.Override
public dev.cel.expr.ExprOrBuilder getResultOrBuilder() {
return result_ == null ? dev.cel.expr.Expr.getDefaultInstance() : result_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(iterVar_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 1, iterVar_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getIterRange());
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(accuVar_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 3, accuVar_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(4, getAccuInit());
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(5, getLoopCondition());
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(6, getLoopStep());
}
if (((bitField0_ & 0x00000010) != 0)) {
output.writeMessage(7, getResult());
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(iterVar2_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 8, iterVar2_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(iterVar_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(1, iterVar_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getIterRange());
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(accuVar_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(3, accuVar_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getAccuInit());
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getLoopCondition());
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getLoopStep());
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getResult());
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(iterVar2_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(8, iterVar2_);
}
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.Expr.Comprehension)) {
return super.equals(obj);
}
dev.cel.expr.Expr.Comprehension other = (dev.cel.expr.Expr.Comprehension) obj;
if (!getIterVar()
.equals(other.getIterVar())) return false;
if (!getIterVar2()
.equals(other.getIterVar2())) return false;
if (hasIterRange() != other.hasIterRange()) return false;
if (hasIterRange()) {
if (!getIterRange()
.equals(other.getIterRange())) return false;
}
if (!getAccuVar()
.equals(other.getAccuVar())) return false;
if (hasAccuInit() != other.hasAccuInit()) return false;
if (hasAccuInit()) {
if (!getAccuInit()
.equals(other.getAccuInit())) return false;
}
if (hasLoopCondition() != other.hasLoopCondition()) return false;
if (hasLoopCondition()) {
if (!getLoopCondition()
.equals(other.getLoopCondition())) return false;
}
if (hasLoopStep() != other.hasLoopStep()) return false;
if (hasLoopStep()) {
if (!getLoopStep()
.equals(other.getLoopStep())) return false;
}
if (hasResult() != other.hasResult()) return false;
if (hasResult()) {
if (!getResult()
.equals(other.getResult())) 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();
hash = (37 * hash) + ITER_VAR_FIELD_NUMBER;
hash = (53 * hash) + getIterVar().hashCode();
hash = (37 * hash) + ITER_VAR2_FIELD_NUMBER;
hash = (53 * hash) + getIterVar2().hashCode();
if (hasIterRange()) {
hash = (37 * hash) + ITER_RANGE_FIELD_NUMBER;
hash = (53 * hash) + getIterRange().hashCode();
}
hash = (37 * hash) + ACCU_VAR_FIELD_NUMBER;
hash = (53 * hash) + getAccuVar().hashCode();
if (hasAccuInit()) {
hash = (37 * hash) + ACCU_INIT_FIELD_NUMBER;
hash = (53 * hash) + getAccuInit().hashCode();
}
if (hasLoopCondition()) {
hash = (37 * hash) + LOOP_CONDITION_FIELD_NUMBER;
hash = (53 * hash) + getLoopCondition().hashCode();
}
if (hasLoopStep()) {
hash = (37 * hash) + LOOP_STEP_FIELD_NUMBER;
hash = (53 * hash) + getLoopStep().hashCode();
}
if (hasResult()) {
hash = (37 * hash) + RESULT_FIELD_NUMBER;
hash = (53 * hash) + getResult().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.cel.expr.Expr.Comprehension parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.Expr.Comprehension 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.Expr.Comprehension parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.Expr.Comprehension 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.Expr.Comprehension parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.Expr.Comprehension parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.cel.expr.Expr.Comprehension parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static dev.cel.expr.Expr.Comprehension 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.Expr.Comprehension parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.cel.expr.Expr.Comprehension 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.Expr.Comprehension parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static dev.cel.expr.Expr.Comprehension 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.Expr.Comprehension 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 comprehension expression applied to a list or map.
*
* Comprehensions are not part of the core syntax, but enabled with macros.
* A macro matches a specific call signature within a parsed AST and replaces
* the call with an alternate AST block. Macro expansion happens at parse
* time.
*
* The following macros are supported within CEL:
*
* Aggregate type macros may be applied to all elements in a list or all keys
* in a map:
*
* * `all`, `exists`, `exists_one` - test a predicate expression against
* the inputs and return `true` if the predicate is satisfied for all,
* any, or only one value `list.all(x, x < 10)`.
* * `filter` - test a predicate expression against the inputs and return
* the subset of elements which satisfy the predicate:
* `payments.filter(p, p > 1000)`.
* * `map` - apply an expression to all elements in the input and return the
* output aggregate type: `[1, 2, 3].map(i, i * i)`.
*
* The `has(m.x)` macro tests whether the property `x` is present in struct
* `m`. The semantics of this macro depend on the type of `m`. For proto2
* messages `has(m.x)` is defined as 'defined, but not set`. For proto3, the
* macro tests whether the property is set to its default. For map and struct
* types, the macro tests whether the property `x` is defined on `m`.
*
* Comprehensions for the standard environment macros evaluation can be best
* visualized as the following pseudocode:
*
* ```
* let `accu_var` = `accu_init`
* for (let `iter_var` in `iter_range`) {
* if (!`loop_condition`) {
* break
* }
* `accu_var` = `loop_step`
* }
* return `result`
* ```
*
* Comprehensions for the optional V2 macros which support map-to-map
* translation differ slightly from the standard environment macros in that
* they expose both the key or index in addition to the value for each list
* or map entry:
*
* ```
* let `accu_var` = `accu_init`
* for (let `iter_var`, `iter_var2` in `iter_range`) {
* if (!`loop_condition`) {
* break
* }
* `accu_var` = `loop_step`
* }
* return `result`
* ```
*
*
* Protobuf type {@code cel.expr.Expr.Comprehension}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:cel.expr.Expr.Comprehension)
dev.cel.expr.Expr.ComprehensionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_Comprehension_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_Comprehension_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.cel.expr.Expr.Comprehension.class, dev.cel.expr.Expr.Comprehension.Builder.class);
}
// Construct using dev.cel.expr.Expr.Comprehension.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage
.alwaysUseFieldBuilders) {
getIterRangeFieldBuilder();
getAccuInitFieldBuilder();
getLoopConditionFieldBuilder();
getLoopStepFieldBuilder();
getResultFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
iterVar_ = "";
iterVar2_ = "";
iterRange_ = null;
if (iterRangeBuilder_ != null) {
iterRangeBuilder_.dispose();
iterRangeBuilder_ = null;
}
accuVar_ = "";
accuInit_ = null;
if (accuInitBuilder_ != null) {
accuInitBuilder_.dispose();
accuInitBuilder_ = null;
}
loopCondition_ = null;
if (loopConditionBuilder_ != null) {
loopConditionBuilder_.dispose();
loopConditionBuilder_ = null;
}
loopStep_ = null;
if (loopStepBuilder_ != null) {
loopStepBuilder_.dispose();
loopStepBuilder_ = null;
}
result_ = null;
if (resultBuilder_ != null) {
resultBuilder_.dispose();
resultBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_Comprehension_descriptor;
}
@java.lang.Override
public dev.cel.expr.Expr.Comprehension getDefaultInstanceForType() {
return dev.cel.expr.Expr.Comprehension.getDefaultInstance();
}
@java.lang.Override
public dev.cel.expr.Expr.Comprehension build() {
dev.cel.expr.Expr.Comprehension result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.cel.expr.Expr.Comprehension buildPartial() {
dev.cel.expr.Expr.Comprehension result = new dev.cel.expr.Expr.Comprehension(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(dev.cel.expr.Expr.Comprehension result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.iterVar_ = iterVar_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.iterVar2_ = iterVar2_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.iterRange_ = iterRangeBuilder_ == null
? iterRange_
: iterRangeBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.accuVar_ = accuVar_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.accuInit_ = accuInitBuilder_ == null
? accuInit_
: accuInitBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.loopCondition_ = loopConditionBuilder_ == null
? loopCondition_
: loopConditionBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.loopStep_ = loopStepBuilder_ == null
? loopStep_
: loopStepBuilder_.build();
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.result_ = resultBuilder_ == null
? result_
: resultBuilder_.build();
to_bitField0_ |= 0x00000010;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.cel.expr.Expr.Comprehension) {
return mergeFrom((dev.cel.expr.Expr.Comprehension)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.cel.expr.Expr.Comprehension other) {
if (other == dev.cel.expr.Expr.Comprehension.getDefaultInstance()) return this;
if (!other.getIterVar().isEmpty()) {
iterVar_ = other.iterVar_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getIterVar2().isEmpty()) {
iterVar2_ = other.iterVar2_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasIterRange()) {
mergeIterRange(other.getIterRange());
}
if (!other.getAccuVar().isEmpty()) {
accuVar_ = other.accuVar_;
bitField0_ |= 0x00000008;
onChanged();
}
if (other.hasAccuInit()) {
mergeAccuInit(other.getAccuInit());
}
if (other.hasLoopCondition()) {
mergeLoopCondition(other.getLoopCondition());
}
if (other.hasLoopStep()) {
mergeLoopStep(other.getLoopStep());
}
if (other.hasResult()) {
mergeResult(other.getResult());
}
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 10: {
iterVar_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
input.readMessage(
getIterRangeFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 18
case 26: {
accuVar_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 26
case 34: {
input.readMessage(
getAccuInitFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 34
case 42: {
input.readMessage(
getLoopConditionFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 42
case 50: {
input.readMessage(
getLoopStepFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000040;
break;
} // case 50
case 58: {
input.readMessage(
getResultFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000080;
break;
} // case 58
case 66: {
iterVar2_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 66
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 java.lang.Object iterVar_ = "";
/**
*
* The name of the first iteration variable.
* When the iter_range is a list, this variable is the list element.
* When the iter_range is a map, this variable is the map entry key.
*
*
* string iter_var = 1;
* @return The iterVar.
*/
public java.lang.String getIterVar() {
java.lang.Object ref = iterVar_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
iterVar_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The name of the first iteration variable.
* When the iter_range is a list, this variable is the list element.
* When the iter_range is a map, this variable is the map entry key.
*
*
* string iter_var = 1;
* @return The bytes for iterVar.
*/
public com.google.protobuf.ByteString
getIterVarBytes() {
java.lang.Object ref = iterVar_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
iterVar_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The name of the first iteration variable.
* When the iter_range is a list, this variable is the list element.
* When the iter_range is a map, this variable is the map entry key.
*
*
* string iter_var = 1;
* @param value The iterVar to set.
* @return This builder for chaining.
*/
public Builder setIterVar(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
iterVar_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The name of the first iteration variable.
* When the iter_range is a list, this variable is the list element.
* When the iter_range is a map, this variable is the map entry key.
*
*
* string iter_var = 1;
* @return This builder for chaining.
*/
public Builder clearIterVar() {
iterVar_ = getDefaultInstance().getIterVar();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* The name of the first iteration variable.
* When the iter_range is a list, this variable is the list element.
* When the iter_range is a map, this variable is the map entry key.
*
*
* string iter_var = 1;
* @param value The bytes for iterVar to set.
* @return This builder for chaining.
*/
public Builder setIterVarBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
iterVar_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object iterVar2_ = "";
/**
*
* The name of the second iteration variable, empty if not set.
* When the iter_range is a list, this variable is the integer index.
* When the iter_range is a map, this variable is the map entry value.
* This field is only set for comprehension v2 macros.
*
*
* string iter_var2 = 8;
* @return The iterVar2.
*/
public java.lang.String getIterVar2() {
java.lang.Object ref = iterVar2_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
iterVar2_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The name of the second iteration variable, empty if not set.
* When the iter_range is a list, this variable is the integer index.
* When the iter_range is a map, this variable is the map entry value.
* This field is only set for comprehension v2 macros.
*
*
* string iter_var2 = 8;
* @return The bytes for iterVar2.
*/
public com.google.protobuf.ByteString
getIterVar2Bytes() {
java.lang.Object ref = iterVar2_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
iterVar2_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The name of the second iteration variable, empty if not set.
* When the iter_range is a list, this variable is the integer index.
* When the iter_range is a map, this variable is the map entry value.
* This field is only set for comprehension v2 macros.
*
*
* string iter_var2 = 8;
* @param value The iterVar2 to set.
* @return This builder for chaining.
*/
public Builder setIterVar2(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
iterVar2_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The name of the second iteration variable, empty if not set.
* When the iter_range is a list, this variable is the integer index.
* When the iter_range is a map, this variable is the map entry value.
* This field is only set for comprehension v2 macros.
*
*
* string iter_var2 = 8;
* @return This builder for chaining.
*/
public Builder clearIterVar2() {
iterVar2_ = getDefaultInstance().getIterVar2();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* The name of the second iteration variable, empty if not set.
* When the iter_range is a list, this variable is the integer index.
* When the iter_range is a map, this variable is the map entry value.
* This field is only set for comprehension v2 macros.
*
*
* string iter_var2 = 8;
* @param value The bytes for iterVar2 to set.
* @return This builder for chaining.
*/
public Builder setIterVar2Bytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
iterVar2_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private dev.cel.expr.Expr iterRange_;
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder> iterRangeBuilder_;
/**
*
* The range over which the comprehension iterates.
*
*
* .cel.expr.Expr iter_range = 2;
* @return Whether the iterRange field is set.
*/
public boolean hasIterRange() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* The range over which the comprehension iterates.
*
*
* .cel.expr.Expr iter_range = 2;
* @return The iterRange.
*/
public dev.cel.expr.Expr getIterRange() {
if (iterRangeBuilder_ == null) {
return iterRange_ == null ? dev.cel.expr.Expr.getDefaultInstance() : iterRange_;
} else {
return iterRangeBuilder_.getMessage();
}
}
/**
*
* The range over which the comprehension iterates.
*
*
* .cel.expr.Expr iter_range = 2;
*/
public Builder setIterRange(dev.cel.expr.Expr value) {
if (iterRangeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
iterRange_ = value;
} else {
iterRangeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* The range over which the comprehension iterates.
*
*
* .cel.expr.Expr iter_range = 2;
*/
public Builder setIterRange(
dev.cel.expr.Expr.Builder builderForValue) {
if (iterRangeBuilder_ == null) {
iterRange_ = builderForValue.build();
} else {
iterRangeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* The range over which the comprehension iterates.
*
*
* .cel.expr.Expr iter_range = 2;
*/
public Builder mergeIterRange(dev.cel.expr.Expr value) {
if (iterRangeBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0) &&
iterRange_ != null &&
iterRange_ != dev.cel.expr.Expr.getDefaultInstance()) {
getIterRangeBuilder().mergeFrom(value);
} else {
iterRange_ = value;
}
} else {
iterRangeBuilder_.mergeFrom(value);
}
if (iterRange_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
* The range over which the comprehension iterates.
*
*
* .cel.expr.Expr iter_range = 2;
*/
public Builder clearIterRange() {
bitField0_ = (bitField0_ & ~0x00000004);
iterRange_ = null;
if (iterRangeBuilder_ != null) {
iterRangeBuilder_.dispose();
iterRangeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* The range over which the comprehension iterates.
*
*
* .cel.expr.Expr iter_range = 2;
*/
public dev.cel.expr.Expr.Builder getIterRangeBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getIterRangeFieldBuilder().getBuilder();
}
/**
*
* The range over which the comprehension iterates.
*
*
* .cel.expr.Expr iter_range = 2;
*/
public dev.cel.expr.ExprOrBuilder getIterRangeOrBuilder() {
if (iterRangeBuilder_ != null) {
return iterRangeBuilder_.getMessageOrBuilder();
} else {
return iterRange_ == null ?
dev.cel.expr.Expr.getDefaultInstance() : iterRange_;
}
}
/**
*
* The range over which the comprehension iterates.
*
*
* .cel.expr.Expr iter_range = 2;
*/
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>
getIterRangeFieldBuilder() {
if (iterRangeBuilder_ == null) {
iterRangeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>(
getIterRange(),
getParentForChildren(),
isClean());
iterRange_ = null;
}
return iterRangeBuilder_;
}
private java.lang.Object accuVar_ = "";
/**
*
* The name of the variable used for accumulation of the result.
*
*
* string accu_var = 3;
* @return The accuVar.
*/
public java.lang.String getAccuVar() {
java.lang.Object ref = accuVar_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
accuVar_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The name of the variable used for accumulation of the result.
*
*
* string accu_var = 3;
* @return The bytes for accuVar.
*/
public com.google.protobuf.ByteString
getAccuVarBytes() {
java.lang.Object ref = accuVar_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
accuVar_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The name of the variable used for accumulation of the result.
*
*
* string accu_var = 3;
* @param value The accuVar to set.
* @return This builder for chaining.
*/
public Builder setAccuVar(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
accuVar_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* The name of the variable used for accumulation of the result.
*
*
* string accu_var = 3;
* @return This builder for chaining.
*/
public Builder clearAccuVar() {
accuVar_ = getDefaultInstance().getAccuVar();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
* The name of the variable used for accumulation of the result.
*
*
* string accu_var = 3;
* @param value The bytes for accuVar to set.
* @return This builder for chaining.
*/
public Builder setAccuVarBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
accuVar_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private dev.cel.expr.Expr accuInit_;
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder> accuInitBuilder_;
/**
*
* The initial value of the accumulator.
*
*
* .cel.expr.Expr accu_init = 4;
* @return Whether the accuInit field is set.
*/
public boolean hasAccuInit() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* The initial value of the accumulator.
*
*
* .cel.expr.Expr accu_init = 4;
* @return The accuInit.
*/
public dev.cel.expr.Expr getAccuInit() {
if (accuInitBuilder_ == null) {
return accuInit_ == null ? dev.cel.expr.Expr.getDefaultInstance() : accuInit_;
} else {
return accuInitBuilder_.getMessage();
}
}
/**
*
* The initial value of the accumulator.
*
*
* .cel.expr.Expr accu_init = 4;
*/
public Builder setAccuInit(dev.cel.expr.Expr value) {
if (accuInitBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
accuInit_ = value;
} else {
accuInitBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* The initial value of the accumulator.
*
*
* .cel.expr.Expr accu_init = 4;
*/
public Builder setAccuInit(
dev.cel.expr.Expr.Builder builderForValue) {
if (accuInitBuilder_ == null) {
accuInit_ = builderForValue.build();
} else {
accuInitBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* The initial value of the accumulator.
*
*
* .cel.expr.Expr accu_init = 4;
*/
public Builder mergeAccuInit(dev.cel.expr.Expr value) {
if (accuInitBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0) &&
accuInit_ != null &&
accuInit_ != dev.cel.expr.Expr.getDefaultInstance()) {
getAccuInitBuilder().mergeFrom(value);
} else {
accuInit_ = value;
}
} else {
accuInitBuilder_.mergeFrom(value);
}
if (accuInit_ != null) {
bitField0_ |= 0x00000010;
onChanged();
}
return this;
}
/**
*
* The initial value of the accumulator.
*
*
* .cel.expr.Expr accu_init = 4;
*/
public Builder clearAccuInit() {
bitField0_ = (bitField0_ & ~0x00000010);
accuInit_ = null;
if (accuInitBuilder_ != null) {
accuInitBuilder_.dispose();
accuInitBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* The initial value of the accumulator.
*
*
* .cel.expr.Expr accu_init = 4;
*/
public dev.cel.expr.Expr.Builder getAccuInitBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getAccuInitFieldBuilder().getBuilder();
}
/**
*
* The initial value of the accumulator.
*
*
* .cel.expr.Expr accu_init = 4;
*/
public dev.cel.expr.ExprOrBuilder getAccuInitOrBuilder() {
if (accuInitBuilder_ != null) {
return accuInitBuilder_.getMessageOrBuilder();
} else {
return accuInit_ == null ?
dev.cel.expr.Expr.getDefaultInstance() : accuInit_;
}
}
/**
*
* The initial value of the accumulator.
*
*
* .cel.expr.Expr accu_init = 4;
*/
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>
getAccuInitFieldBuilder() {
if (accuInitBuilder_ == null) {
accuInitBuilder_ = new com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>(
getAccuInit(),
getParentForChildren(),
isClean());
accuInit_ = null;
}
return accuInitBuilder_;
}
private dev.cel.expr.Expr loopCondition_;
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder> loopConditionBuilder_;
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Returns false when the result has been computed and may be used as
* a hint to short-circuit the remainder of the comprehension.
*
*
* .cel.expr.Expr loop_condition = 5;
* @return Whether the loopCondition field is set.
*/
public boolean hasLoopCondition() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Returns false when the result has been computed and may be used as
* a hint to short-circuit the remainder of the comprehension.
*
*
* .cel.expr.Expr loop_condition = 5;
* @return The loopCondition.
*/
public dev.cel.expr.Expr getLoopCondition() {
if (loopConditionBuilder_ == null) {
return loopCondition_ == null ? dev.cel.expr.Expr.getDefaultInstance() : loopCondition_;
} else {
return loopConditionBuilder_.getMessage();
}
}
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Returns false when the result has been computed and may be used as
* a hint to short-circuit the remainder of the comprehension.
*
*
* .cel.expr.Expr loop_condition = 5;
*/
public Builder setLoopCondition(dev.cel.expr.Expr value) {
if (loopConditionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
loopCondition_ = value;
} else {
loopConditionBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Returns false when the result has been computed and may be used as
* a hint to short-circuit the remainder of the comprehension.
*
*
* .cel.expr.Expr loop_condition = 5;
*/
public Builder setLoopCondition(
dev.cel.expr.Expr.Builder builderForValue) {
if (loopConditionBuilder_ == null) {
loopCondition_ = builderForValue.build();
} else {
loopConditionBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Returns false when the result has been computed and may be used as
* a hint to short-circuit the remainder of the comprehension.
*
*
* .cel.expr.Expr loop_condition = 5;
*/
public Builder mergeLoopCondition(dev.cel.expr.Expr value) {
if (loopConditionBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0) &&
loopCondition_ != null &&
loopCondition_ != dev.cel.expr.Expr.getDefaultInstance()) {
getLoopConditionBuilder().mergeFrom(value);
} else {
loopCondition_ = value;
}
} else {
loopConditionBuilder_.mergeFrom(value);
}
if (loopCondition_ != null) {
bitField0_ |= 0x00000020;
onChanged();
}
return this;
}
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Returns false when the result has been computed and may be used as
* a hint to short-circuit the remainder of the comprehension.
*
*
* .cel.expr.Expr loop_condition = 5;
*/
public Builder clearLoopCondition() {
bitField0_ = (bitField0_ & ~0x00000020);
loopCondition_ = null;
if (loopConditionBuilder_ != null) {
loopConditionBuilder_.dispose();
loopConditionBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Returns false when the result has been computed and may be used as
* a hint to short-circuit the remainder of the comprehension.
*
*
* .cel.expr.Expr loop_condition = 5;
*/
public dev.cel.expr.Expr.Builder getLoopConditionBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getLoopConditionFieldBuilder().getBuilder();
}
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Returns false when the result has been computed and may be used as
* a hint to short-circuit the remainder of the comprehension.
*
*
* .cel.expr.Expr loop_condition = 5;
*/
public dev.cel.expr.ExprOrBuilder getLoopConditionOrBuilder() {
if (loopConditionBuilder_ != null) {
return loopConditionBuilder_.getMessageOrBuilder();
} else {
return loopCondition_ == null ?
dev.cel.expr.Expr.getDefaultInstance() : loopCondition_;
}
}
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Returns false when the result has been computed and may be used as
* a hint to short-circuit the remainder of the comprehension.
*
*
* .cel.expr.Expr loop_condition = 5;
*/
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>
getLoopConditionFieldBuilder() {
if (loopConditionBuilder_ == null) {
loopConditionBuilder_ = new com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>(
getLoopCondition(),
getParentForChildren(),
isClean());
loopCondition_ = null;
}
return loopConditionBuilder_;
}
private dev.cel.expr.Expr loopStep_;
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder> loopStepBuilder_;
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Computes the next value of accu_var.
*
*
* .cel.expr.Expr loop_step = 6;
* @return Whether the loopStep field is set.
*/
public boolean hasLoopStep() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Computes the next value of accu_var.
*
*
* .cel.expr.Expr loop_step = 6;
* @return The loopStep.
*/
public dev.cel.expr.Expr getLoopStep() {
if (loopStepBuilder_ == null) {
return loopStep_ == null ? dev.cel.expr.Expr.getDefaultInstance() : loopStep_;
} else {
return loopStepBuilder_.getMessage();
}
}
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Computes the next value of accu_var.
*
*
* .cel.expr.Expr loop_step = 6;
*/
public Builder setLoopStep(dev.cel.expr.Expr value) {
if (loopStepBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
loopStep_ = value;
} else {
loopStepBuilder_.setMessage(value);
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Computes the next value of accu_var.
*
*
* .cel.expr.Expr loop_step = 6;
*/
public Builder setLoopStep(
dev.cel.expr.Expr.Builder builderForValue) {
if (loopStepBuilder_ == null) {
loopStep_ = builderForValue.build();
} else {
loopStepBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Computes the next value of accu_var.
*
*
* .cel.expr.Expr loop_step = 6;
*/
public Builder mergeLoopStep(dev.cel.expr.Expr value) {
if (loopStepBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0) &&
loopStep_ != null &&
loopStep_ != dev.cel.expr.Expr.getDefaultInstance()) {
getLoopStepBuilder().mergeFrom(value);
} else {
loopStep_ = value;
}
} else {
loopStepBuilder_.mergeFrom(value);
}
if (loopStep_ != null) {
bitField0_ |= 0x00000040;
onChanged();
}
return this;
}
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Computes the next value of accu_var.
*
*
* .cel.expr.Expr loop_step = 6;
*/
public Builder clearLoopStep() {
bitField0_ = (bitField0_ & ~0x00000040);
loopStep_ = null;
if (loopStepBuilder_ != null) {
loopStepBuilder_.dispose();
loopStepBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Computes the next value of accu_var.
*
*
* .cel.expr.Expr loop_step = 6;
*/
public dev.cel.expr.Expr.Builder getLoopStepBuilder() {
bitField0_ |= 0x00000040;
onChanged();
return getLoopStepFieldBuilder().getBuilder();
}
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Computes the next value of accu_var.
*
*
* .cel.expr.Expr loop_step = 6;
*/
public dev.cel.expr.ExprOrBuilder getLoopStepOrBuilder() {
if (loopStepBuilder_ != null) {
return loopStepBuilder_.getMessageOrBuilder();
} else {
return loopStep_ == null ?
dev.cel.expr.Expr.getDefaultInstance() : loopStep_;
}
}
/**
*
* An expression which can contain iter_var, iter_var2, and accu_var.
*
* Computes the next value of accu_var.
*
*
* .cel.expr.Expr loop_step = 6;
*/
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>
getLoopStepFieldBuilder() {
if (loopStepBuilder_ == null) {
loopStepBuilder_ = new com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>(
getLoopStep(),
getParentForChildren(),
isClean());
loopStep_ = null;
}
return loopStepBuilder_;
}
private dev.cel.expr.Expr result_;
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder> resultBuilder_;
/**
*
* An expression which can contain accu_var.
*
* Computes the result.
*
*
* .cel.expr.Expr result = 7;
* @return Whether the result field is set.
*/
public boolean hasResult() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
* An expression which can contain accu_var.
*
* Computes the result.
*
*
* .cel.expr.Expr result = 7;
* @return The result.
*/
public dev.cel.expr.Expr getResult() {
if (resultBuilder_ == null) {
return result_ == null ? dev.cel.expr.Expr.getDefaultInstance() : result_;
} else {
return resultBuilder_.getMessage();
}
}
/**
*
* An expression which can contain accu_var.
*
* Computes the result.
*
*
* .cel.expr.Expr result = 7;
*/
public Builder setResult(dev.cel.expr.Expr value) {
if (resultBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
result_ = value;
} else {
resultBuilder_.setMessage(value);
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* An expression which can contain accu_var.
*
* Computes the result.
*
*
* .cel.expr.Expr result = 7;
*/
public Builder setResult(
dev.cel.expr.Expr.Builder builderForValue) {
if (resultBuilder_ == null) {
result_ = builderForValue.build();
} else {
resultBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* An expression which can contain accu_var.
*
* Computes the result.
*
*
* .cel.expr.Expr result = 7;
*/
public Builder mergeResult(dev.cel.expr.Expr value) {
if (resultBuilder_ == null) {
if (((bitField0_ & 0x00000080) != 0) &&
result_ != null &&
result_ != dev.cel.expr.Expr.getDefaultInstance()) {
getResultBuilder().mergeFrom(value);
} else {
result_ = value;
}
} else {
resultBuilder_.mergeFrom(value);
}
if (result_ != null) {
bitField0_ |= 0x00000080;
onChanged();
}
return this;
}
/**
*
* An expression which can contain accu_var.
*
* Computes the result.
*
*
* .cel.expr.Expr result = 7;
*/
public Builder clearResult() {
bitField0_ = (bitField0_ & ~0x00000080);
result_ = null;
if (resultBuilder_ != null) {
resultBuilder_.dispose();
resultBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* An expression which can contain accu_var.
*
* Computes the result.
*
*
* .cel.expr.Expr result = 7;
*/
public dev.cel.expr.Expr.Builder getResultBuilder() {
bitField0_ |= 0x00000080;
onChanged();
return getResultFieldBuilder().getBuilder();
}
/**
*
* An expression which can contain accu_var.
*
* Computes the result.
*
*
* .cel.expr.Expr result = 7;
*/
public dev.cel.expr.ExprOrBuilder getResultOrBuilder() {
if (resultBuilder_ != null) {
return resultBuilder_.getMessageOrBuilder();
} else {
return result_ == null ?
dev.cel.expr.Expr.getDefaultInstance() : result_;
}
}
/**
*
* An expression which can contain accu_var.
*
* Computes the result.
*
*
* .cel.expr.Expr result = 7;
*/
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>
getResultFieldBuilder() {
if (resultBuilder_ == null) {
resultBuilder_ = new com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>(
getResult(),
getParentForChildren(),
isClean());
result_ = null;
}
return resultBuilder_;
}
// @@protoc_insertion_point(builder_scope:cel.expr.Expr.Comprehension)
}
// @@protoc_insertion_point(class_scope:cel.expr.Expr.Comprehension)
private static final dev.cel.expr.Expr.Comprehension DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.cel.expr.Expr.Comprehension();
}
public static dev.cel.expr.Expr.Comprehension getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Comprehension 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.Expr.Comprehension getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int exprKindCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object exprKind_;
public enum ExprKindCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
CONST_EXPR(3),
IDENT_EXPR(4),
SELECT_EXPR(5),
CALL_EXPR(6),
LIST_EXPR(7),
STRUCT_EXPR(8),
COMPREHENSION_EXPR(9),
EXPRKIND_NOT_SET(0);
private final int value;
private ExprKindCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ExprKindCase valueOf(int value) {
return forNumber(value);
}
public static ExprKindCase forNumber(int value) {
switch (value) {
case 3: return CONST_EXPR;
case 4: return IDENT_EXPR;
case 5: return SELECT_EXPR;
case 6: return CALL_EXPR;
case 7: return LIST_EXPR;
case 8: return STRUCT_EXPR;
case 9: return COMPREHENSION_EXPR;
case 0: return EXPRKIND_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public ExprKindCase
getExprKindCase() {
return ExprKindCase.forNumber(
exprKindCase_);
}
public static final int ID_FIELD_NUMBER = 2;
private long id_ = 0L;
/**
*
* Required. An id assigned to this node by the parser which is unique in a
* given expression tree. This is used to associate type information and other
* attributes to a node in the parse tree.
*
*
* int64 id = 2;
* @return The id.
*/
@java.lang.Override
public long getId() {
return id_;
}
public static final int CONST_EXPR_FIELD_NUMBER = 3;
/**
*
* A constant expression.
*
*
* .cel.expr.Constant const_expr = 3;
* @return Whether the constExpr field is set.
*/
@java.lang.Override
public boolean hasConstExpr() {
return exprKindCase_ == 3;
}
/**
*
* A constant expression.
*
*
* .cel.expr.Constant const_expr = 3;
* @return The constExpr.
*/
@java.lang.Override
public dev.cel.expr.Constant getConstExpr() {
if (exprKindCase_ == 3) {
return (dev.cel.expr.Constant) exprKind_;
}
return dev.cel.expr.Constant.getDefaultInstance();
}
/**
*
* A constant expression.
*
*
* .cel.expr.Constant const_expr = 3;
*/
@java.lang.Override
public dev.cel.expr.ConstantOrBuilder getConstExprOrBuilder() {
if (exprKindCase_ == 3) {
return (dev.cel.expr.Constant) exprKind_;
}
return dev.cel.expr.Constant.getDefaultInstance();
}
public static final int IDENT_EXPR_FIELD_NUMBER = 4;
/**
*
* An identifier expression.
*
*
* .cel.expr.Expr.Ident ident_expr = 4;
* @return Whether the identExpr field is set.
*/
@java.lang.Override
public boolean hasIdentExpr() {
return exprKindCase_ == 4;
}
/**
*
* An identifier expression.
*
*
* .cel.expr.Expr.Ident ident_expr = 4;
* @return The identExpr.
*/
@java.lang.Override
public dev.cel.expr.Expr.Ident getIdentExpr() {
if (exprKindCase_ == 4) {
return (dev.cel.expr.Expr.Ident) exprKind_;
}
return dev.cel.expr.Expr.Ident.getDefaultInstance();
}
/**
*
* An identifier expression.
*
*
* .cel.expr.Expr.Ident ident_expr = 4;
*/
@java.lang.Override
public dev.cel.expr.Expr.IdentOrBuilder getIdentExprOrBuilder() {
if (exprKindCase_ == 4) {
return (dev.cel.expr.Expr.Ident) exprKind_;
}
return dev.cel.expr.Expr.Ident.getDefaultInstance();
}
public static final int SELECT_EXPR_FIELD_NUMBER = 5;
/**
*
* A field selection expression, e.g. `request.auth`.
*
*
* .cel.expr.Expr.Select select_expr = 5;
* @return Whether the selectExpr field is set.
*/
@java.lang.Override
public boolean hasSelectExpr() {
return exprKindCase_ == 5;
}
/**
*
* A field selection expression, e.g. `request.auth`.
*
*
* .cel.expr.Expr.Select select_expr = 5;
* @return The selectExpr.
*/
@java.lang.Override
public dev.cel.expr.Expr.Select getSelectExpr() {
if (exprKindCase_ == 5) {
return (dev.cel.expr.Expr.Select) exprKind_;
}
return dev.cel.expr.Expr.Select.getDefaultInstance();
}
/**
*
* A field selection expression, e.g. `request.auth`.
*
*
* .cel.expr.Expr.Select select_expr = 5;
*/
@java.lang.Override
public dev.cel.expr.Expr.SelectOrBuilder getSelectExprOrBuilder() {
if (exprKindCase_ == 5) {
return (dev.cel.expr.Expr.Select) exprKind_;
}
return dev.cel.expr.Expr.Select.getDefaultInstance();
}
public static final int CALL_EXPR_FIELD_NUMBER = 6;
/**
*
* A call expression, including calls to predefined functions and operators.
*
*
* .cel.expr.Expr.Call call_expr = 6;
* @return Whether the callExpr field is set.
*/
@java.lang.Override
public boolean hasCallExpr() {
return exprKindCase_ == 6;
}
/**
*
* A call expression, including calls to predefined functions and operators.
*
*
* .cel.expr.Expr.Call call_expr = 6;
* @return The callExpr.
*/
@java.lang.Override
public dev.cel.expr.Expr.Call getCallExpr() {
if (exprKindCase_ == 6) {
return (dev.cel.expr.Expr.Call) exprKind_;
}
return dev.cel.expr.Expr.Call.getDefaultInstance();
}
/**
*
* A call expression, including calls to predefined functions and operators.
*
*
* .cel.expr.Expr.Call call_expr = 6;
*/
@java.lang.Override
public dev.cel.expr.Expr.CallOrBuilder getCallExprOrBuilder() {
if (exprKindCase_ == 6) {
return (dev.cel.expr.Expr.Call) exprKind_;
}
return dev.cel.expr.Expr.Call.getDefaultInstance();
}
public static final int LIST_EXPR_FIELD_NUMBER = 7;
/**
*
* A list creation expression.
*
*
* .cel.expr.Expr.CreateList list_expr = 7;
* @return Whether the listExpr field is set.
*/
@java.lang.Override
public boolean hasListExpr() {
return exprKindCase_ == 7;
}
/**
*
* A list creation expression.
*
*
* .cel.expr.Expr.CreateList list_expr = 7;
* @return The listExpr.
*/
@java.lang.Override
public dev.cel.expr.Expr.CreateList getListExpr() {
if (exprKindCase_ == 7) {
return (dev.cel.expr.Expr.CreateList) exprKind_;
}
return dev.cel.expr.Expr.CreateList.getDefaultInstance();
}
/**
*
* A list creation expression.
*
*
* .cel.expr.Expr.CreateList list_expr = 7;
*/
@java.lang.Override
public dev.cel.expr.Expr.CreateListOrBuilder getListExprOrBuilder() {
if (exprKindCase_ == 7) {
return (dev.cel.expr.Expr.CreateList) exprKind_;
}
return dev.cel.expr.Expr.CreateList.getDefaultInstance();
}
public static final int STRUCT_EXPR_FIELD_NUMBER = 8;
/**
*
* A map or message creation expression.
*
*
* .cel.expr.Expr.CreateStruct struct_expr = 8;
* @return Whether the structExpr field is set.
*/
@java.lang.Override
public boolean hasStructExpr() {
return exprKindCase_ == 8;
}
/**
*
* A map or message creation expression.
*
*
* .cel.expr.Expr.CreateStruct struct_expr = 8;
* @return The structExpr.
*/
@java.lang.Override
public dev.cel.expr.Expr.CreateStruct getStructExpr() {
if (exprKindCase_ == 8) {
return (dev.cel.expr.Expr.CreateStruct) exprKind_;
}
return dev.cel.expr.Expr.CreateStruct.getDefaultInstance();
}
/**
*
* A map or message creation expression.
*
*
* .cel.expr.Expr.CreateStruct struct_expr = 8;
*/
@java.lang.Override
public dev.cel.expr.Expr.CreateStructOrBuilder getStructExprOrBuilder() {
if (exprKindCase_ == 8) {
return (dev.cel.expr.Expr.CreateStruct) exprKind_;
}
return dev.cel.expr.Expr.CreateStruct.getDefaultInstance();
}
public static final int COMPREHENSION_EXPR_FIELD_NUMBER = 9;
/**
*
* A comprehension expression.
*
*
* .cel.expr.Expr.Comprehension comprehension_expr = 9;
* @return Whether the comprehensionExpr field is set.
*/
@java.lang.Override
public boolean hasComprehensionExpr() {
return exprKindCase_ == 9;
}
/**
*
* A comprehension expression.
*
*
* .cel.expr.Expr.Comprehension comprehension_expr = 9;
* @return The comprehensionExpr.
*/
@java.lang.Override
public dev.cel.expr.Expr.Comprehension getComprehensionExpr() {
if (exprKindCase_ == 9) {
return (dev.cel.expr.Expr.Comprehension) exprKind_;
}
return dev.cel.expr.Expr.Comprehension.getDefaultInstance();
}
/**
*
* A comprehension expression.
*
*
* .cel.expr.Expr.Comprehension comprehension_expr = 9;
*/
@java.lang.Override
public dev.cel.expr.Expr.ComprehensionOrBuilder getComprehensionExprOrBuilder() {
if (exprKindCase_ == 9) {
return (dev.cel.expr.Expr.Comprehension) exprKind_;
}
return dev.cel.expr.Expr.Comprehension.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (id_ != 0L) {
output.writeInt64(2, id_);
}
if (exprKindCase_ == 3) {
output.writeMessage(3, (dev.cel.expr.Constant) exprKind_);
}
if (exprKindCase_ == 4) {
output.writeMessage(4, (dev.cel.expr.Expr.Ident) exprKind_);
}
if (exprKindCase_ == 5) {
output.writeMessage(5, (dev.cel.expr.Expr.Select) exprKind_);
}
if (exprKindCase_ == 6) {
output.writeMessage(6, (dev.cel.expr.Expr.Call) exprKind_);
}
if (exprKindCase_ == 7) {
output.writeMessage(7, (dev.cel.expr.Expr.CreateList) exprKind_);
}
if (exprKindCase_ == 8) {
output.writeMessage(8, (dev.cel.expr.Expr.CreateStruct) exprKind_);
}
if (exprKindCase_ == 9) {
output.writeMessage(9, (dev.cel.expr.Expr.Comprehension) exprKind_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (id_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, id_);
}
if (exprKindCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (dev.cel.expr.Constant) exprKind_);
}
if (exprKindCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, (dev.cel.expr.Expr.Ident) exprKind_);
}
if (exprKindCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, (dev.cel.expr.Expr.Select) exprKind_);
}
if (exprKindCase_ == 6) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, (dev.cel.expr.Expr.Call) exprKind_);
}
if (exprKindCase_ == 7) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, (dev.cel.expr.Expr.CreateList) exprKind_);
}
if (exprKindCase_ == 8) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, (dev.cel.expr.Expr.CreateStruct) exprKind_);
}
if (exprKindCase_ == 9) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, (dev.cel.expr.Expr.Comprehension) exprKind_);
}
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.Expr)) {
return super.equals(obj);
}
dev.cel.expr.Expr other = (dev.cel.expr.Expr) obj;
if (getId()
!= other.getId()) return false;
if (!getExprKindCase().equals(other.getExprKindCase())) return false;
switch (exprKindCase_) {
case 3:
if (!getConstExpr()
.equals(other.getConstExpr())) return false;
break;
case 4:
if (!getIdentExpr()
.equals(other.getIdentExpr())) return false;
break;
case 5:
if (!getSelectExpr()
.equals(other.getSelectExpr())) return false;
break;
case 6:
if (!getCallExpr()
.equals(other.getCallExpr())) return false;
break;
case 7:
if (!getListExpr()
.equals(other.getListExpr())) return false;
break;
case 8:
if (!getStructExpr()
.equals(other.getStructExpr())) return false;
break;
case 9:
if (!getComprehensionExpr()
.equals(other.getComprehensionExpr())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getId());
switch (exprKindCase_) {
case 3:
hash = (37 * hash) + CONST_EXPR_FIELD_NUMBER;
hash = (53 * hash) + getConstExpr().hashCode();
break;
case 4:
hash = (37 * hash) + IDENT_EXPR_FIELD_NUMBER;
hash = (53 * hash) + getIdentExpr().hashCode();
break;
case 5:
hash = (37 * hash) + SELECT_EXPR_FIELD_NUMBER;
hash = (53 * hash) + getSelectExpr().hashCode();
break;
case 6:
hash = (37 * hash) + CALL_EXPR_FIELD_NUMBER;
hash = (53 * hash) + getCallExpr().hashCode();
break;
case 7:
hash = (37 * hash) + LIST_EXPR_FIELD_NUMBER;
hash = (53 * hash) + getListExpr().hashCode();
break;
case 8:
hash = (37 * hash) + STRUCT_EXPR_FIELD_NUMBER;
hash = (53 * hash) + getStructExpr().hashCode();
break;
case 9:
hash = (37 * hash) + COMPREHENSION_EXPR_FIELD_NUMBER;
hash = (53 * hash) + getComprehensionExpr().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.cel.expr.Expr parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.Expr 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.Expr parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.Expr 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.Expr parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.Expr parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.cel.expr.Expr parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static dev.cel.expr.Expr 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.Expr parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.cel.expr.Expr 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.Expr parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static dev.cel.expr.Expr 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.Expr 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;
}
/**
*
* An abstract representation of a common expression.
*
* Expressions are abstractly represented as a collection of identifiers,
* select statements, function calls, literals, and comprehensions. All
* operators with the exception of the '.' operator are modelled as function
* calls. This makes it easy to represent new operators into the existing AST.
*
* All references within expressions must resolve to a
* [Decl][cel.expr.Decl] provided at type-check for an expression to be
* valid. A reference may either be a bare identifier `name` or a qualified
* identifier `google.api.name`. References may either refer to a value or a
* function declaration.
*
* For example, the expression `google.api.name.startsWith('expr')` references
* the declaration `google.api.name` within a
* [Expr.Select][cel.expr.Expr.Select] expression, and the function
* declaration `startsWith`.
*
*
* Protobuf type {@code cel.expr.Expr}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:cel.expr.Expr)
dev.cel.expr.ExprOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.cel.expr.Expr.class, dev.cel.expr.Expr.Builder.class);
}
// Construct using dev.cel.expr.Expr.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
id_ = 0L;
if (constExprBuilder_ != null) {
constExprBuilder_.clear();
}
if (identExprBuilder_ != null) {
identExprBuilder_.clear();
}
if (selectExprBuilder_ != null) {
selectExprBuilder_.clear();
}
if (callExprBuilder_ != null) {
callExprBuilder_.clear();
}
if (listExprBuilder_ != null) {
listExprBuilder_.clear();
}
if (structExprBuilder_ != null) {
structExprBuilder_.clear();
}
if (comprehensionExprBuilder_ != null) {
comprehensionExprBuilder_.clear();
}
exprKindCase_ = 0;
exprKind_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_Expr_descriptor;
}
@java.lang.Override
public dev.cel.expr.Expr getDefaultInstanceForType() {
return dev.cel.expr.Expr.getDefaultInstance();
}
@java.lang.Override
public dev.cel.expr.Expr build() {
dev.cel.expr.Expr result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.cel.expr.Expr buildPartial() {
dev.cel.expr.Expr result = new dev.cel.expr.Expr(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(dev.cel.expr.Expr result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.id_ = id_;
}
}
private void buildPartialOneofs(dev.cel.expr.Expr result) {
result.exprKindCase_ = exprKindCase_;
result.exprKind_ = this.exprKind_;
if (exprKindCase_ == 3 &&
constExprBuilder_ != null) {
result.exprKind_ = constExprBuilder_.build();
}
if (exprKindCase_ == 4 &&
identExprBuilder_ != null) {
result.exprKind_ = identExprBuilder_.build();
}
if (exprKindCase_ == 5 &&
selectExprBuilder_ != null) {
result.exprKind_ = selectExprBuilder_.build();
}
if (exprKindCase_ == 6 &&
callExprBuilder_ != null) {
result.exprKind_ = callExprBuilder_.build();
}
if (exprKindCase_ == 7 &&
listExprBuilder_ != null) {
result.exprKind_ = listExprBuilder_.build();
}
if (exprKindCase_ == 8 &&
structExprBuilder_ != null) {
result.exprKind_ = structExprBuilder_.build();
}
if (exprKindCase_ == 9 &&
comprehensionExprBuilder_ != null) {
result.exprKind_ = comprehensionExprBuilder_.build();
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.cel.expr.Expr) {
return mergeFrom((dev.cel.expr.Expr)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.cel.expr.Expr other) {
if (other == dev.cel.expr.Expr.getDefaultInstance()) return this;
if (other.getId() != 0L) {
setId(other.getId());
}
switch (other.getExprKindCase()) {
case CONST_EXPR: {
mergeConstExpr(other.getConstExpr());
break;
}
case IDENT_EXPR: {
mergeIdentExpr(other.getIdentExpr());
break;
}
case SELECT_EXPR: {
mergeSelectExpr(other.getSelectExpr());
break;
}
case CALL_EXPR: {
mergeCallExpr(other.getCallExpr());
break;
}
case LIST_EXPR: {
mergeListExpr(other.getListExpr());
break;
}
case STRUCT_EXPR: {
mergeStructExpr(other.getStructExpr());
break;
}
case COMPREHENSION_EXPR: {
mergeComprehensionExpr(other.getComprehensionExpr());
break;
}
case EXPRKIND_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 16: {
id_ = input.readInt64();
bitField0_ |= 0x00000001;
break;
} // case 16
case 26: {
input.readMessage(
getConstExprFieldBuilder().getBuilder(),
extensionRegistry);
exprKindCase_ = 3;
break;
} // case 26
case 34: {
input.readMessage(
getIdentExprFieldBuilder().getBuilder(),
extensionRegistry);
exprKindCase_ = 4;
break;
} // case 34
case 42: {
input.readMessage(
getSelectExprFieldBuilder().getBuilder(),
extensionRegistry);
exprKindCase_ = 5;
break;
} // case 42
case 50: {
input.readMessage(
getCallExprFieldBuilder().getBuilder(),
extensionRegistry);
exprKindCase_ = 6;
break;
} // case 50
case 58: {
input.readMessage(
getListExprFieldBuilder().getBuilder(),
extensionRegistry);
exprKindCase_ = 7;
break;
} // case 58
case 66: {
input.readMessage(
getStructExprFieldBuilder().getBuilder(),
extensionRegistry);
exprKindCase_ = 8;
break;
} // case 66
case 74: {
input.readMessage(
getComprehensionExprFieldBuilder().getBuilder(),
extensionRegistry);
exprKindCase_ = 9;
break;
} // case 74
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 exprKindCase_ = 0;
private java.lang.Object exprKind_;
public ExprKindCase
getExprKindCase() {
return ExprKindCase.forNumber(
exprKindCase_);
}
public Builder clearExprKind() {
exprKindCase_ = 0;
exprKind_ = null;
onChanged();
return this;
}
private int bitField0_;
private long id_ ;
/**
*
* Required. An id assigned to this node by the parser which is unique in a
* given expression tree. This is used to associate type information and other
* attributes to a node in the parse tree.
*
*
* int64 id = 2;
* @return The id.
*/
@java.lang.Override
public long getId() {
return id_;
}
/**
*
* Required. An id assigned to this node by the parser which is unique in a
* given expression tree. This is used to associate type information and other
* attributes to a node in the parse tree.
*
*
* int64 id = 2;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(long value) {
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Required. An id assigned to this node by the parser which is unique in a
* given expression tree. This is used to associate type information and other
* attributes to a node in the parse tree.
*
*
* int64 id = 2;
* @return This builder for chaining.
*/
public Builder clearId() {
bitField0_ = (bitField0_ & ~0x00000001);
id_ = 0L;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Constant, dev.cel.expr.Constant.Builder, dev.cel.expr.ConstantOrBuilder> constExprBuilder_;
/**
*
* A constant expression.
*
*
* .cel.expr.Constant const_expr = 3;
* @return Whether the constExpr field is set.
*/
@java.lang.Override
public boolean hasConstExpr() {
return exprKindCase_ == 3;
}
/**
*
* A constant expression.
*
*
* .cel.expr.Constant const_expr = 3;
* @return The constExpr.
*/
@java.lang.Override
public dev.cel.expr.Constant getConstExpr() {
if (constExprBuilder_ == null) {
if (exprKindCase_ == 3) {
return (dev.cel.expr.Constant) exprKind_;
}
return dev.cel.expr.Constant.getDefaultInstance();
} else {
if (exprKindCase_ == 3) {
return constExprBuilder_.getMessage();
}
return dev.cel.expr.Constant.getDefaultInstance();
}
}
/**
*
* A constant expression.
*
*
* .cel.expr.Constant const_expr = 3;
*/
public Builder setConstExpr(dev.cel.expr.Constant value) {
if (constExprBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
exprKind_ = value;
onChanged();
} else {
constExprBuilder_.setMessage(value);
}
exprKindCase_ = 3;
return this;
}
/**
*
* A constant expression.
*
*
* .cel.expr.Constant const_expr = 3;
*/
public Builder setConstExpr(
dev.cel.expr.Constant.Builder builderForValue) {
if (constExprBuilder_ == null) {
exprKind_ = builderForValue.build();
onChanged();
} else {
constExprBuilder_.setMessage(builderForValue.build());
}
exprKindCase_ = 3;
return this;
}
/**
*
* A constant expression.
*
*
* .cel.expr.Constant const_expr = 3;
*/
public Builder mergeConstExpr(dev.cel.expr.Constant value) {
if (constExprBuilder_ == null) {
if (exprKindCase_ == 3 &&
exprKind_ != dev.cel.expr.Constant.getDefaultInstance()) {
exprKind_ = dev.cel.expr.Constant.newBuilder((dev.cel.expr.Constant) exprKind_)
.mergeFrom(value).buildPartial();
} else {
exprKind_ = value;
}
onChanged();
} else {
if (exprKindCase_ == 3) {
constExprBuilder_.mergeFrom(value);
} else {
constExprBuilder_.setMessage(value);
}
}
exprKindCase_ = 3;
return this;
}
/**
*
* A constant expression.
*
*
* .cel.expr.Constant const_expr = 3;
*/
public Builder clearConstExpr() {
if (constExprBuilder_ == null) {
if (exprKindCase_ == 3) {
exprKindCase_ = 0;
exprKind_ = null;
onChanged();
}
} else {
if (exprKindCase_ == 3) {
exprKindCase_ = 0;
exprKind_ = null;
}
constExprBuilder_.clear();
}
return this;
}
/**
*
* A constant expression.
*
*
* .cel.expr.Constant const_expr = 3;
*/
public dev.cel.expr.Constant.Builder getConstExprBuilder() {
return getConstExprFieldBuilder().getBuilder();
}
/**
*
* A constant expression.
*
*
* .cel.expr.Constant const_expr = 3;
*/
@java.lang.Override
public dev.cel.expr.ConstantOrBuilder getConstExprOrBuilder() {
if ((exprKindCase_ == 3) && (constExprBuilder_ != null)) {
return constExprBuilder_.getMessageOrBuilder();
} else {
if (exprKindCase_ == 3) {
return (dev.cel.expr.Constant) exprKind_;
}
return dev.cel.expr.Constant.getDefaultInstance();
}
}
/**
*
* A constant expression.
*
*
* .cel.expr.Constant const_expr = 3;
*/
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Constant, dev.cel.expr.Constant.Builder, dev.cel.expr.ConstantOrBuilder>
getConstExprFieldBuilder() {
if (constExprBuilder_ == null) {
if (!(exprKindCase_ == 3)) {
exprKind_ = dev.cel.expr.Constant.getDefaultInstance();
}
constExprBuilder_ = new com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Constant, dev.cel.expr.Constant.Builder, dev.cel.expr.ConstantOrBuilder>(
(dev.cel.expr.Constant) exprKind_,
getParentForChildren(),
isClean());
exprKind_ = null;
}
exprKindCase_ = 3;
onChanged();
return constExprBuilder_;
}
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr.Ident, dev.cel.expr.Expr.Ident.Builder, dev.cel.expr.Expr.IdentOrBuilder> identExprBuilder_;
/**
*
* An identifier expression.
*
*
* .cel.expr.Expr.Ident ident_expr = 4;
* @return Whether the identExpr field is set.
*/
@java.lang.Override
public boolean hasIdentExpr() {
return exprKindCase_ == 4;
}
/**
*
* An identifier expression.
*
*
* .cel.expr.Expr.Ident ident_expr = 4;
* @return The identExpr.
*/
@java.lang.Override
public dev.cel.expr.Expr.Ident getIdentExpr() {
if (identExprBuilder_ == null) {
if (exprKindCase_ == 4) {
return (dev.cel.expr.Expr.Ident) exprKind_;
}
return dev.cel.expr.Expr.Ident.getDefaultInstance();
} else {
if (exprKindCase_ == 4) {
return identExprBuilder_.getMessage();
}
return dev.cel.expr.Expr.Ident.getDefaultInstance();
}
}
/**
*
* An identifier expression.
*
*
* .cel.expr.Expr.Ident ident_expr = 4;
*/
public Builder setIdentExpr(dev.cel.expr.Expr.Ident value) {
if (identExprBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
exprKind_ = value;
onChanged();
} else {
identExprBuilder_.setMessage(value);
}
exprKindCase_ = 4;
return this;
}
/**
*
* An identifier expression.
*
*
* .cel.expr.Expr.Ident ident_expr = 4;
*/
public Builder setIdentExpr(
dev.cel.expr.Expr.Ident.Builder builderForValue) {
if (identExprBuilder_ == null) {
exprKind_ = builderForValue.build();
onChanged();
} else {
identExprBuilder_.setMessage(builderForValue.build());
}
exprKindCase_ = 4;
return this;
}
/**
*
* An identifier expression.
*
*
* .cel.expr.Expr.Ident ident_expr = 4;
*/
public Builder mergeIdentExpr(dev.cel.expr.Expr.Ident value) {
if (identExprBuilder_ == null) {
if (exprKindCase_ == 4 &&
exprKind_ != dev.cel.expr.Expr.Ident.getDefaultInstance()) {
exprKind_ = dev.cel.expr.Expr.Ident.newBuilder((dev.cel.expr.Expr.Ident) exprKind_)
.mergeFrom(value).buildPartial();
} else {
exprKind_ = value;
}
onChanged();
} else {
if (exprKindCase_ == 4) {
identExprBuilder_.mergeFrom(value);
} else {
identExprBuilder_.setMessage(value);
}
}
exprKindCase_ = 4;
return this;
}
/**
*
* An identifier expression.
*
*
* .cel.expr.Expr.Ident ident_expr = 4;
*/
public Builder clearIdentExpr() {
if (identExprBuilder_ == null) {
if (exprKindCase_ == 4) {
exprKindCase_ = 0;
exprKind_ = null;
onChanged();
}
} else {
if (exprKindCase_ == 4) {
exprKindCase_ = 0;
exprKind_ = null;
}
identExprBuilder_.clear();
}
return this;
}
/**
*
* An identifier expression.
*
*
* .cel.expr.Expr.Ident ident_expr = 4;
*/
public dev.cel.expr.Expr.Ident.Builder getIdentExprBuilder() {
return getIdentExprFieldBuilder().getBuilder();
}
/**
*
* An identifier expression.
*
*
* .cel.expr.Expr.Ident ident_expr = 4;
*/
@java.lang.Override
public dev.cel.expr.Expr.IdentOrBuilder getIdentExprOrBuilder() {
if ((exprKindCase_ == 4) && (identExprBuilder_ != null)) {
return identExprBuilder_.getMessageOrBuilder();
} else {
if (exprKindCase_ == 4) {
return (dev.cel.expr.Expr.Ident) exprKind_;
}
return dev.cel.expr.Expr.Ident.getDefaultInstance();
}
}
/**
*
* An identifier expression.
*
*
* .cel.expr.Expr.Ident ident_expr = 4;
*/
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr.Ident, dev.cel.expr.Expr.Ident.Builder, dev.cel.expr.Expr.IdentOrBuilder>
getIdentExprFieldBuilder() {
if (identExprBuilder_ == null) {
if (!(exprKindCase_ == 4)) {
exprKind_ = dev.cel.expr.Expr.Ident.getDefaultInstance();
}
identExprBuilder_ = new com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr.Ident, dev.cel.expr.Expr.Ident.Builder, dev.cel.expr.Expr.IdentOrBuilder>(
(dev.cel.expr.Expr.Ident) exprKind_,
getParentForChildren(),
isClean());
exprKind_ = null;
}
exprKindCase_ = 4;
onChanged();
return identExprBuilder_;
}
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr.Select, dev.cel.expr.Expr.Select.Builder, dev.cel.expr.Expr.SelectOrBuilder> selectExprBuilder_;
/**
*
* A field selection expression, e.g. `request.auth`.
*
*
* .cel.expr.Expr.Select select_expr = 5;
* @return Whether the selectExpr field is set.
*/
@java.lang.Override
public boolean hasSelectExpr() {
return exprKindCase_ == 5;
}
/**
*
* A field selection expression, e.g. `request.auth`.
*
*
* .cel.expr.Expr.Select select_expr = 5;
* @return The selectExpr.
*/
@java.lang.Override
public dev.cel.expr.Expr.Select getSelectExpr() {
if (selectExprBuilder_ == null) {
if (exprKindCase_ == 5) {
return (dev.cel.expr.Expr.Select) exprKind_;
}
return dev.cel.expr.Expr.Select.getDefaultInstance();
} else {
if (exprKindCase_ == 5) {
return selectExprBuilder_.getMessage();
}
return dev.cel.expr.Expr.Select.getDefaultInstance();
}
}
/**
*
* A field selection expression, e.g. `request.auth`.
*
*
* .cel.expr.Expr.Select select_expr = 5;
*/
public Builder setSelectExpr(dev.cel.expr.Expr.Select value) {
if (selectExprBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
exprKind_ = value;
onChanged();
} else {
selectExprBuilder_.setMessage(value);
}
exprKindCase_ = 5;
return this;
}
/**
*
* A field selection expression, e.g. `request.auth`.
*
*
* .cel.expr.Expr.Select select_expr = 5;
*/
public Builder setSelectExpr(
dev.cel.expr.Expr.Select.Builder builderForValue) {
if (selectExprBuilder_ == null) {
exprKind_ = builderForValue.build();
onChanged();
} else {
selectExprBuilder_.setMessage(builderForValue.build());
}
exprKindCase_ = 5;
return this;
}
/**
*
* A field selection expression, e.g. `request.auth`.
*
*
* .cel.expr.Expr.Select select_expr = 5;
*/
public Builder mergeSelectExpr(dev.cel.expr.Expr.Select value) {
if (selectExprBuilder_ == null) {
if (exprKindCase_ == 5 &&
exprKind_ != dev.cel.expr.Expr.Select.getDefaultInstance()) {
exprKind_ = dev.cel.expr.Expr.Select.newBuilder((dev.cel.expr.Expr.Select) exprKind_)
.mergeFrom(value).buildPartial();
} else {
exprKind_ = value;
}
onChanged();
} else {
if (exprKindCase_ == 5) {
selectExprBuilder_.mergeFrom(value);
} else {
selectExprBuilder_.setMessage(value);
}
}
exprKindCase_ = 5;
return this;
}
/**
*
* A field selection expression, e.g. `request.auth`.
*
*
* .cel.expr.Expr.Select select_expr = 5;
*/
public Builder clearSelectExpr() {
if (selectExprBuilder_ == null) {
if (exprKindCase_ == 5) {
exprKindCase_ = 0;
exprKind_ = null;
onChanged();
}
} else {
if (exprKindCase_ == 5) {
exprKindCase_ = 0;
exprKind_ = null;
}
selectExprBuilder_.clear();
}
return this;
}
/**
*
* A field selection expression, e.g. `request.auth`.
*
*
* .cel.expr.Expr.Select select_expr = 5;
*/
public dev.cel.expr.Expr.Select.Builder getSelectExprBuilder() {
return getSelectExprFieldBuilder().getBuilder();
}
/**
*
* A field selection expression, e.g. `request.auth`.
*
*
* .cel.expr.Expr.Select select_expr = 5;
*/
@java.lang.Override
public dev.cel.expr.Expr.SelectOrBuilder getSelectExprOrBuilder() {
if ((exprKindCase_ == 5) && (selectExprBuilder_ != null)) {
return selectExprBuilder_.getMessageOrBuilder();
} else {
if (exprKindCase_ == 5) {
return (dev.cel.expr.Expr.Select) exprKind_;
}
return dev.cel.expr.Expr.Select.getDefaultInstance();
}
}
/**
*
* A field selection expression, e.g. `request.auth`.
*
*
* .cel.expr.Expr.Select select_expr = 5;
*/
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr.Select, dev.cel.expr.Expr.Select.Builder, dev.cel.expr.Expr.SelectOrBuilder>
getSelectExprFieldBuilder() {
if (selectExprBuilder_ == null) {
if (!(exprKindCase_ == 5)) {
exprKind_ = dev.cel.expr.Expr.Select.getDefaultInstance();
}
selectExprBuilder_ = new com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr.Select, dev.cel.expr.Expr.Select.Builder, dev.cel.expr.Expr.SelectOrBuilder>(
(dev.cel.expr.Expr.Select) exprKind_,
getParentForChildren(),
isClean());
exprKind_ = null;
}
exprKindCase_ = 5;
onChanged();
return selectExprBuilder_;
}
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr.Call, dev.cel.expr.Expr.Call.Builder, dev.cel.expr.Expr.CallOrBuilder> callExprBuilder_;
/**
*
* A call expression, including calls to predefined functions and operators.
*
*
* .cel.expr.Expr.Call call_expr = 6;
* @return Whether the callExpr field is set.
*/
@java.lang.Override
public boolean hasCallExpr() {
return exprKindCase_ == 6;
}
/**
*
* A call expression, including calls to predefined functions and operators.
*
*
* .cel.expr.Expr.Call call_expr = 6;
* @return The callExpr.
*/
@java.lang.Override
public dev.cel.expr.Expr.Call getCallExpr() {
if (callExprBuilder_ == null) {
if (exprKindCase_ == 6) {
return (dev.cel.expr.Expr.Call) exprKind_;
}
return dev.cel.expr.Expr.Call.getDefaultInstance();
} else {
if (exprKindCase_ == 6) {
return callExprBuilder_.getMessage();
}
return dev.cel.expr.Expr.Call.getDefaultInstance();
}
}
/**
*
* A call expression, including calls to predefined functions and operators.
*
*
* .cel.expr.Expr.Call call_expr = 6;
*/
public Builder setCallExpr(dev.cel.expr.Expr.Call value) {
if (callExprBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
exprKind_ = value;
onChanged();
} else {
callExprBuilder_.setMessage(value);
}
exprKindCase_ = 6;
return this;
}
/**
*
* A call expression, including calls to predefined functions and operators.
*
*
* .cel.expr.Expr.Call call_expr = 6;
*/
public Builder setCallExpr(
dev.cel.expr.Expr.Call.Builder builderForValue) {
if (callExprBuilder_ == null) {
exprKind_ = builderForValue.build();
onChanged();
} else {
callExprBuilder_.setMessage(builderForValue.build());
}
exprKindCase_ = 6;
return this;
}
/**
*
* A call expression, including calls to predefined functions and operators.
*
*
* .cel.expr.Expr.Call call_expr = 6;
*/
public Builder mergeCallExpr(dev.cel.expr.Expr.Call value) {
if (callExprBuilder_ == null) {
if (exprKindCase_ == 6 &&
exprKind_ != dev.cel.expr.Expr.Call.getDefaultInstance()) {
exprKind_ = dev.cel.expr.Expr.Call.newBuilder((dev.cel.expr.Expr.Call) exprKind_)
.mergeFrom(value).buildPartial();
} else {
exprKind_ = value;
}
onChanged();
} else {
if (exprKindCase_ == 6) {
callExprBuilder_.mergeFrom(value);
} else {
callExprBuilder_.setMessage(value);
}
}
exprKindCase_ = 6;
return this;
}
/**
*
* A call expression, including calls to predefined functions and operators.
*
*
* .cel.expr.Expr.Call call_expr = 6;
*/
public Builder clearCallExpr() {
if (callExprBuilder_ == null) {
if (exprKindCase_ == 6) {
exprKindCase_ = 0;
exprKind_ = null;
onChanged();
}
} else {
if (exprKindCase_ == 6) {
exprKindCase_ = 0;
exprKind_ = null;
}
callExprBuilder_.clear();
}
return this;
}
/**
*
* A call expression, including calls to predefined functions and operators.
*
*
* .cel.expr.Expr.Call call_expr = 6;
*/
public dev.cel.expr.Expr.Call.Builder getCallExprBuilder() {
return getCallExprFieldBuilder().getBuilder();
}
/**
*
* A call expression, including calls to predefined functions and operators.
*
*
* .cel.expr.Expr.Call call_expr = 6;
*/
@java.lang.Override
public dev.cel.expr.Expr.CallOrBuilder getCallExprOrBuilder() {
if ((exprKindCase_ == 6) && (callExprBuilder_ != null)) {
return callExprBuilder_.getMessageOrBuilder();
} else {
if (exprKindCase_ == 6) {
return (dev.cel.expr.Expr.Call) exprKind_;
}
return dev.cel.expr.Expr.Call.getDefaultInstance();
}
}
/**
*
* A call expression, including calls to predefined functions and operators.
*
*
* .cel.expr.Expr.Call call_expr = 6;
*/
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr.Call, dev.cel.expr.Expr.Call.Builder, dev.cel.expr.Expr.CallOrBuilder>
getCallExprFieldBuilder() {
if (callExprBuilder_ == null) {
if (!(exprKindCase_ == 6)) {
exprKind_ = dev.cel.expr.Expr.Call.getDefaultInstance();
}
callExprBuilder_ = new com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr.Call, dev.cel.expr.Expr.Call.Builder, dev.cel.expr.Expr.CallOrBuilder>(
(dev.cel.expr.Expr.Call) exprKind_,
getParentForChildren(),
isClean());
exprKind_ = null;
}
exprKindCase_ = 6;
onChanged();
return callExprBuilder_;
}
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr.CreateList, dev.cel.expr.Expr.CreateList.Builder, dev.cel.expr.Expr.CreateListOrBuilder> listExprBuilder_;
/**
*
* A list creation expression.
*
*
* .cel.expr.Expr.CreateList list_expr = 7;
* @return Whether the listExpr field is set.
*/
@java.lang.Override
public boolean hasListExpr() {
return exprKindCase_ == 7;
}
/**
*
* A list creation expression.
*
*
* .cel.expr.Expr.CreateList list_expr = 7;
* @return The listExpr.
*/
@java.lang.Override
public dev.cel.expr.Expr.CreateList getListExpr() {
if (listExprBuilder_ == null) {
if (exprKindCase_ == 7) {
return (dev.cel.expr.Expr.CreateList) exprKind_;
}
return dev.cel.expr.Expr.CreateList.getDefaultInstance();
} else {
if (exprKindCase_ == 7) {
return listExprBuilder_.getMessage();
}
return dev.cel.expr.Expr.CreateList.getDefaultInstance();
}
}
/**
*
* A list creation expression.
*
*
* .cel.expr.Expr.CreateList list_expr = 7;
*/
public Builder setListExpr(dev.cel.expr.Expr.CreateList value) {
if (listExprBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
exprKind_ = value;
onChanged();
} else {
listExprBuilder_.setMessage(value);
}
exprKindCase_ = 7;
return this;
}
/**
*
* A list creation expression.
*
*
* .cel.expr.Expr.CreateList list_expr = 7;
*/
public Builder setListExpr(
dev.cel.expr.Expr.CreateList.Builder builderForValue) {
if (listExprBuilder_ == null) {
exprKind_ = builderForValue.build();
onChanged();
} else {
listExprBuilder_.setMessage(builderForValue.build());
}
exprKindCase_ = 7;
return this;
}
/**
*
* A list creation expression.
*
*
* .cel.expr.Expr.CreateList list_expr = 7;
*/
public Builder mergeListExpr(dev.cel.expr.Expr.CreateList value) {
if (listExprBuilder_ == null) {
if (exprKindCase_ == 7 &&
exprKind_ != dev.cel.expr.Expr.CreateList.getDefaultInstance()) {
exprKind_ = dev.cel.expr.Expr.CreateList.newBuilder((dev.cel.expr.Expr.CreateList) exprKind_)
.mergeFrom(value).buildPartial();
} else {
exprKind_ = value;
}
onChanged();
} else {
if (exprKindCase_ == 7) {
listExprBuilder_.mergeFrom(value);
} else {
listExprBuilder_.setMessage(value);
}
}
exprKindCase_ = 7;
return this;
}
/**
*
* A list creation expression.
*
*
* .cel.expr.Expr.CreateList list_expr = 7;
*/
public Builder clearListExpr() {
if (listExprBuilder_ == null) {
if (exprKindCase_ == 7) {
exprKindCase_ = 0;
exprKind_ = null;
onChanged();
}
} else {
if (exprKindCase_ == 7) {
exprKindCase_ = 0;
exprKind_ = null;
}
listExprBuilder_.clear();
}
return this;
}
/**
*
* A list creation expression.
*
*
* .cel.expr.Expr.CreateList list_expr = 7;
*/
public dev.cel.expr.Expr.CreateList.Builder getListExprBuilder() {
return getListExprFieldBuilder().getBuilder();
}
/**
*
* A list creation expression.
*
*
* .cel.expr.Expr.CreateList list_expr = 7;
*/
@java.lang.Override
public dev.cel.expr.Expr.CreateListOrBuilder getListExprOrBuilder() {
if ((exprKindCase_ == 7) && (listExprBuilder_ != null)) {
return listExprBuilder_.getMessageOrBuilder();
} else {
if (exprKindCase_ == 7) {
return (dev.cel.expr.Expr.CreateList) exprKind_;
}
return dev.cel.expr.Expr.CreateList.getDefaultInstance();
}
}
/**
*
* A list creation expression.
*
*
* .cel.expr.Expr.CreateList list_expr = 7;
*/
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr.CreateList, dev.cel.expr.Expr.CreateList.Builder, dev.cel.expr.Expr.CreateListOrBuilder>
getListExprFieldBuilder() {
if (listExprBuilder_ == null) {
if (!(exprKindCase_ == 7)) {
exprKind_ = dev.cel.expr.Expr.CreateList.getDefaultInstance();
}
listExprBuilder_ = new com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr.CreateList, dev.cel.expr.Expr.CreateList.Builder, dev.cel.expr.Expr.CreateListOrBuilder>(
(dev.cel.expr.Expr.CreateList) exprKind_,
getParentForChildren(),
isClean());
exprKind_ = null;
}
exprKindCase_ = 7;
onChanged();
return listExprBuilder_;
}
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr.CreateStruct, dev.cel.expr.Expr.CreateStruct.Builder, dev.cel.expr.Expr.CreateStructOrBuilder> structExprBuilder_;
/**
*
* A map or message creation expression.
*
*
* .cel.expr.Expr.CreateStruct struct_expr = 8;
* @return Whether the structExpr field is set.
*/
@java.lang.Override
public boolean hasStructExpr() {
return exprKindCase_ == 8;
}
/**
*
* A map or message creation expression.
*
*
* .cel.expr.Expr.CreateStruct struct_expr = 8;
* @return The structExpr.
*/
@java.lang.Override
public dev.cel.expr.Expr.CreateStruct getStructExpr() {
if (structExprBuilder_ == null) {
if (exprKindCase_ == 8) {
return (dev.cel.expr.Expr.CreateStruct) exprKind_;
}
return dev.cel.expr.Expr.CreateStruct.getDefaultInstance();
} else {
if (exprKindCase_ == 8) {
return structExprBuilder_.getMessage();
}
return dev.cel.expr.Expr.CreateStruct.getDefaultInstance();
}
}
/**
*
* A map or message creation expression.
*
*
* .cel.expr.Expr.CreateStruct struct_expr = 8;
*/
public Builder setStructExpr(dev.cel.expr.Expr.CreateStruct value) {
if (structExprBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
exprKind_ = value;
onChanged();
} else {
structExprBuilder_.setMessage(value);
}
exprKindCase_ = 8;
return this;
}
/**
*
* A map or message creation expression.
*
*
* .cel.expr.Expr.CreateStruct struct_expr = 8;
*/
public Builder setStructExpr(
dev.cel.expr.Expr.CreateStruct.Builder builderForValue) {
if (structExprBuilder_ == null) {
exprKind_ = builderForValue.build();
onChanged();
} else {
structExprBuilder_.setMessage(builderForValue.build());
}
exprKindCase_ = 8;
return this;
}
/**
*
* A map or message creation expression.
*
*
* .cel.expr.Expr.CreateStruct struct_expr = 8;
*/
public Builder mergeStructExpr(dev.cel.expr.Expr.CreateStruct value) {
if (structExprBuilder_ == null) {
if (exprKindCase_ == 8 &&
exprKind_ != dev.cel.expr.Expr.CreateStruct.getDefaultInstance()) {
exprKind_ = dev.cel.expr.Expr.CreateStruct.newBuilder((dev.cel.expr.Expr.CreateStruct) exprKind_)
.mergeFrom(value).buildPartial();
} else {
exprKind_ = value;
}
onChanged();
} else {
if (exprKindCase_ == 8) {
structExprBuilder_.mergeFrom(value);
} else {
structExprBuilder_.setMessage(value);
}
}
exprKindCase_ = 8;
return this;
}
/**
*
* A map or message creation expression.
*
*
* .cel.expr.Expr.CreateStruct struct_expr = 8;
*/
public Builder clearStructExpr() {
if (structExprBuilder_ == null) {
if (exprKindCase_ == 8) {
exprKindCase_ = 0;
exprKind_ = null;
onChanged();
}
} else {
if (exprKindCase_ == 8) {
exprKindCase_ = 0;
exprKind_ = null;
}
structExprBuilder_.clear();
}
return this;
}
/**
*
* A map or message creation expression.
*
*
* .cel.expr.Expr.CreateStruct struct_expr = 8;
*/
public dev.cel.expr.Expr.CreateStruct.Builder getStructExprBuilder() {
return getStructExprFieldBuilder().getBuilder();
}
/**
*
* A map or message creation expression.
*
*
* .cel.expr.Expr.CreateStruct struct_expr = 8;
*/
@java.lang.Override
public dev.cel.expr.Expr.CreateStructOrBuilder getStructExprOrBuilder() {
if ((exprKindCase_ == 8) && (structExprBuilder_ != null)) {
return structExprBuilder_.getMessageOrBuilder();
} else {
if (exprKindCase_ == 8) {
return (dev.cel.expr.Expr.CreateStruct) exprKind_;
}
return dev.cel.expr.Expr.CreateStruct.getDefaultInstance();
}
}
/**
*
* A map or message creation expression.
*
*
* .cel.expr.Expr.CreateStruct struct_expr = 8;
*/
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr.CreateStruct, dev.cel.expr.Expr.CreateStruct.Builder, dev.cel.expr.Expr.CreateStructOrBuilder>
getStructExprFieldBuilder() {
if (structExprBuilder_ == null) {
if (!(exprKindCase_ == 8)) {
exprKind_ = dev.cel.expr.Expr.CreateStruct.getDefaultInstance();
}
structExprBuilder_ = new com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr.CreateStruct, dev.cel.expr.Expr.CreateStruct.Builder, dev.cel.expr.Expr.CreateStructOrBuilder>(
(dev.cel.expr.Expr.CreateStruct) exprKind_,
getParentForChildren(),
isClean());
exprKind_ = null;
}
exprKindCase_ = 8;
onChanged();
return structExprBuilder_;
}
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr.Comprehension, dev.cel.expr.Expr.Comprehension.Builder, dev.cel.expr.Expr.ComprehensionOrBuilder> comprehensionExprBuilder_;
/**
*
* A comprehension expression.
*
*
* .cel.expr.Expr.Comprehension comprehension_expr = 9;
* @return Whether the comprehensionExpr field is set.
*/
@java.lang.Override
public boolean hasComprehensionExpr() {
return exprKindCase_ == 9;
}
/**
*
* A comprehension expression.
*
*
* .cel.expr.Expr.Comprehension comprehension_expr = 9;
* @return The comprehensionExpr.
*/
@java.lang.Override
public dev.cel.expr.Expr.Comprehension getComprehensionExpr() {
if (comprehensionExprBuilder_ == null) {
if (exprKindCase_ == 9) {
return (dev.cel.expr.Expr.Comprehension) exprKind_;
}
return dev.cel.expr.Expr.Comprehension.getDefaultInstance();
} else {
if (exprKindCase_ == 9) {
return comprehensionExprBuilder_.getMessage();
}
return dev.cel.expr.Expr.Comprehension.getDefaultInstance();
}
}
/**
*
* A comprehension expression.
*
*
* .cel.expr.Expr.Comprehension comprehension_expr = 9;
*/
public Builder setComprehensionExpr(dev.cel.expr.Expr.Comprehension value) {
if (comprehensionExprBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
exprKind_ = value;
onChanged();
} else {
comprehensionExprBuilder_.setMessage(value);
}
exprKindCase_ = 9;
return this;
}
/**
*
* A comprehension expression.
*
*
* .cel.expr.Expr.Comprehension comprehension_expr = 9;
*/
public Builder setComprehensionExpr(
dev.cel.expr.Expr.Comprehension.Builder builderForValue) {
if (comprehensionExprBuilder_ == null) {
exprKind_ = builderForValue.build();
onChanged();
} else {
comprehensionExprBuilder_.setMessage(builderForValue.build());
}
exprKindCase_ = 9;
return this;
}
/**
*
* A comprehension expression.
*
*
* .cel.expr.Expr.Comprehension comprehension_expr = 9;
*/
public Builder mergeComprehensionExpr(dev.cel.expr.Expr.Comprehension value) {
if (comprehensionExprBuilder_ == null) {
if (exprKindCase_ == 9 &&
exprKind_ != dev.cel.expr.Expr.Comprehension.getDefaultInstance()) {
exprKind_ = dev.cel.expr.Expr.Comprehension.newBuilder((dev.cel.expr.Expr.Comprehension) exprKind_)
.mergeFrom(value).buildPartial();
} else {
exprKind_ = value;
}
onChanged();
} else {
if (exprKindCase_ == 9) {
comprehensionExprBuilder_.mergeFrom(value);
} else {
comprehensionExprBuilder_.setMessage(value);
}
}
exprKindCase_ = 9;
return this;
}
/**
*
* A comprehension expression.
*
*
* .cel.expr.Expr.Comprehension comprehension_expr = 9;
*/
public Builder clearComprehensionExpr() {
if (comprehensionExprBuilder_ == null) {
if (exprKindCase_ == 9) {
exprKindCase_ = 0;
exprKind_ = null;
onChanged();
}
} else {
if (exprKindCase_ == 9) {
exprKindCase_ = 0;
exprKind_ = null;
}
comprehensionExprBuilder_.clear();
}
return this;
}
/**
*
* A comprehension expression.
*
*
* .cel.expr.Expr.Comprehension comprehension_expr = 9;
*/
public dev.cel.expr.Expr.Comprehension.Builder getComprehensionExprBuilder() {
return getComprehensionExprFieldBuilder().getBuilder();
}
/**
*
* A comprehension expression.
*
*
* .cel.expr.Expr.Comprehension comprehension_expr = 9;
*/
@java.lang.Override
public dev.cel.expr.Expr.ComprehensionOrBuilder getComprehensionExprOrBuilder() {
if ((exprKindCase_ == 9) && (comprehensionExprBuilder_ != null)) {
return comprehensionExprBuilder_.getMessageOrBuilder();
} else {
if (exprKindCase_ == 9) {
return (dev.cel.expr.Expr.Comprehension) exprKind_;
}
return dev.cel.expr.Expr.Comprehension.getDefaultInstance();
}
}
/**
*
* A comprehension expression.
*
*
* .cel.expr.Expr.Comprehension comprehension_expr = 9;
*/
private com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr.Comprehension, dev.cel.expr.Expr.Comprehension.Builder, dev.cel.expr.Expr.ComprehensionOrBuilder>
getComprehensionExprFieldBuilder() {
if (comprehensionExprBuilder_ == null) {
if (!(exprKindCase_ == 9)) {
exprKind_ = dev.cel.expr.Expr.Comprehension.getDefaultInstance();
}
comprehensionExprBuilder_ = new com.google.protobuf.SingleFieldBuilder<
dev.cel.expr.Expr.Comprehension, dev.cel.expr.Expr.Comprehension.Builder, dev.cel.expr.Expr.ComprehensionOrBuilder>(
(dev.cel.expr.Expr.Comprehension) exprKind_,
getParentForChildren(),
isClean());
exprKind_ = null;
}
exprKindCase_ = 9;
onChanged();
return comprehensionExprBuilder_;
}
// @@protoc_insertion_point(builder_scope:cel.expr.Expr)
}
// @@protoc_insertion_point(class_scope:cel.expr.Expr)
private static final dev.cel.expr.Expr DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.cel.expr.Expr();
}
public static dev.cel.expr.Expr getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Expr 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.Expr getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}