dev.cel.expr.ParsedExpr Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: cel/expr/syntax.proto
package dev.cel.expr;
/**
*
* An expression together with source information as returned by the parser.
*
*
* Protobuf type {@code cel.expr.ParsedExpr}
*/
public final class ParsedExpr extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:cel.expr.ParsedExpr)
ParsedExprOrBuilder {
private static final long serialVersionUID = 0L;
// Use ParsedExpr.newBuilder() to construct.
private ParsedExpr(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ParsedExpr() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ParsedExpr();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_ParsedExpr_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_ParsedExpr_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.cel.expr.ParsedExpr.class, dev.cel.expr.ParsedExpr.Builder.class);
}
public static final int EXPR_FIELD_NUMBER = 2;
private dev.cel.expr.Expr expr_;
/**
*
* The parsed expression.
*
*
* .cel.expr.Expr expr = 2;
* @return Whether the expr field is set.
*/
@java.lang.Override
public boolean hasExpr() {
return expr_ != null;
}
/**
*
* The parsed expression.
*
*
* .cel.expr.Expr expr = 2;
* @return The expr.
*/
@java.lang.Override
public dev.cel.expr.Expr getExpr() {
return expr_ == null ? dev.cel.expr.Expr.getDefaultInstance() : expr_;
}
/**
*
* The parsed expression.
*
*
* .cel.expr.Expr expr = 2;
*/
@java.lang.Override
public dev.cel.expr.ExprOrBuilder getExprOrBuilder() {
return getExpr();
}
public static final int SOURCE_INFO_FIELD_NUMBER = 3;
private dev.cel.expr.SourceInfo sourceInfo_;
/**
*
* The source info derived from input that generated the parsed `expr`.
*
*
* .cel.expr.SourceInfo source_info = 3;
* @return Whether the sourceInfo field is set.
*/
@java.lang.Override
public boolean hasSourceInfo() {
return sourceInfo_ != null;
}
/**
*
* The source info derived from input that generated the parsed `expr`.
*
*
* .cel.expr.SourceInfo source_info = 3;
* @return The sourceInfo.
*/
@java.lang.Override
public dev.cel.expr.SourceInfo getSourceInfo() {
return sourceInfo_ == null ? dev.cel.expr.SourceInfo.getDefaultInstance() : sourceInfo_;
}
/**
*
* The source info derived from input that generated the parsed `expr`.
*
*
* .cel.expr.SourceInfo source_info = 3;
*/
@java.lang.Override
public dev.cel.expr.SourceInfoOrBuilder getSourceInfoOrBuilder() {
return getSourceInfo();
}
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 (expr_ != null) {
output.writeMessage(2, getExpr());
}
if (sourceInfo_ != null) {
output.writeMessage(3, getSourceInfo());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (expr_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getExpr());
}
if (sourceInfo_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getSourceInfo());
}
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.ParsedExpr)) {
return super.equals(obj);
}
dev.cel.expr.ParsedExpr other = (dev.cel.expr.ParsedExpr) obj;
if (hasExpr() != other.hasExpr()) return false;
if (hasExpr()) {
if (!getExpr()
.equals(other.getExpr())) return false;
}
if (hasSourceInfo() != other.hasSourceInfo()) return false;
if (hasSourceInfo()) {
if (!getSourceInfo()
.equals(other.getSourceInfo())) 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 (hasExpr()) {
hash = (37 * hash) + EXPR_FIELD_NUMBER;
hash = (53 * hash) + getExpr().hashCode();
}
if (hasSourceInfo()) {
hash = (37 * hash) + SOURCE_INFO_FIELD_NUMBER;
hash = (53 * hash) + getSourceInfo().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.cel.expr.ParsedExpr parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.ParsedExpr 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.ParsedExpr parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.ParsedExpr 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.ParsedExpr parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.cel.expr.ParsedExpr parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.cel.expr.ParsedExpr parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.cel.expr.ParsedExpr parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static dev.cel.expr.ParsedExpr parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.cel.expr.ParsedExpr parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static dev.cel.expr.ParsedExpr parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.cel.expr.ParsedExpr parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(dev.cel.expr.ParsedExpr prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* An expression together with source information as returned by the parser.
*
*
* Protobuf type {@code cel.expr.ParsedExpr}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:cel.expr.ParsedExpr)
dev.cel.expr.ParsedExprOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_ParsedExpr_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_ParsedExpr_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.cel.expr.ParsedExpr.class, dev.cel.expr.ParsedExpr.Builder.class);
}
// Construct using dev.cel.expr.ParsedExpr.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
if (exprBuilder_ == null) {
expr_ = null;
} else {
expr_ = null;
exprBuilder_ = null;
}
if (sourceInfoBuilder_ == null) {
sourceInfo_ = null;
} else {
sourceInfo_ = null;
sourceInfoBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.cel.expr.SyntaxProto.internal_static_cel_expr_ParsedExpr_descriptor;
}
@java.lang.Override
public dev.cel.expr.ParsedExpr getDefaultInstanceForType() {
return dev.cel.expr.ParsedExpr.getDefaultInstance();
}
@java.lang.Override
public dev.cel.expr.ParsedExpr build() {
dev.cel.expr.ParsedExpr result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.cel.expr.ParsedExpr buildPartial() {
dev.cel.expr.ParsedExpr result = new dev.cel.expr.ParsedExpr(this);
if (exprBuilder_ == null) {
result.expr_ = expr_;
} else {
result.expr_ = exprBuilder_.build();
}
if (sourceInfoBuilder_ == null) {
result.sourceInfo_ = sourceInfo_;
} else {
result.sourceInfo_ = sourceInfoBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.cel.expr.ParsedExpr) {
return mergeFrom((dev.cel.expr.ParsedExpr)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.cel.expr.ParsedExpr other) {
if (other == dev.cel.expr.ParsedExpr.getDefaultInstance()) return this;
if (other.hasExpr()) {
mergeExpr(other.getExpr());
}
if (other.hasSourceInfo()) {
mergeSourceInfo(other.getSourceInfo());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 18: {
input.readMessage(
getExprFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 18
case 26: {
input.readMessage(
getSourceInfoFieldBuilder().getBuilder(),
extensionRegistry);
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 dev.cel.expr.Expr expr_;
private com.google.protobuf.SingleFieldBuilderV3<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder> exprBuilder_;
/**
*
* The parsed expression.
*
*
* .cel.expr.Expr expr = 2;
* @return Whether the expr field is set.
*/
public boolean hasExpr() {
return exprBuilder_ != null || expr_ != null;
}
/**
*
* The parsed expression.
*
*
* .cel.expr.Expr expr = 2;
* @return The expr.
*/
public dev.cel.expr.Expr getExpr() {
if (exprBuilder_ == null) {
return expr_ == null ? dev.cel.expr.Expr.getDefaultInstance() : expr_;
} else {
return exprBuilder_.getMessage();
}
}
/**
*
* The parsed expression.
*
*
* .cel.expr.Expr expr = 2;
*/
public Builder setExpr(dev.cel.expr.Expr value) {
if (exprBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
expr_ = value;
onChanged();
} else {
exprBuilder_.setMessage(value);
}
return this;
}
/**
*
* The parsed expression.
*
*
* .cel.expr.Expr expr = 2;
*/
public Builder setExpr(
dev.cel.expr.Expr.Builder builderForValue) {
if (exprBuilder_ == null) {
expr_ = builderForValue.build();
onChanged();
} else {
exprBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The parsed expression.
*
*
* .cel.expr.Expr expr = 2;
*/
public Builder mergeExpr(dev.cel.expr.Expr value) {
if (exprBuilder_ == null) {
if (expr_ != null) {
expr_ =
dev.cel.expr.Expr.newBuilder(expr_).mergeFrom(value).buildPartial();
} else {
expr_ = value;
}
onChanged();
} else {
exprBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The parsed expression.
*
*
* .cel.expr.Expr expr = 2;
*/
public Builder clearExpr() {
if (exprBuilder_ == null) {
expr_ = null;
onChanged();
} else {
expr_ = null;
exprBuilder_ = null;
}
return this;
}
/**
*
* The parsed expression.
*
*
* .cel.expr.Expr expr = 2;
*/
public dev.cel.expr.Expr.Builder getExprBuilder() {
onChanged();
return getExprFieldBuilder().getBuilder();
}
/**
*
* The parsed expression.
*
*
* .cel.expr.Expr expr = 2;
*/
public dev.cel.expr.ExprOrBuilder getExprOrBuilder() {
if (exprBuilder_ != null) {
return exprBuilder_.getMessageOrBuilder();
} else {
return expr_ == null ?
dev.cel.expr.Expr.getDefaultInstance() : expr_;
}
}
/**
*
* The parsed expression.
*
*
* .cel.expr.Expr expr = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>
getExprFieldBuilder() {
if (exprBuilder_ == null) {
exprBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>(
getExpr(),
getParentForChildren(),
isClean());
expr_ = null;
}
return exprBuilder_;
}
private dev.cel.expr.SourceInfo sourceInfo_;
private com.google.protobuf.SingleFieldBuilderV3<
dev.cel.expr.SourceInfo, dev.cel.expr.SourceInfo.Builder, dev.cel.expr.SourceInfoOrBuilder> sourceInfoBuilder_;
/**
*
* The source info derived from input that generated the parsed `expr`.
*
*
* .cel.expr.SourceInfo source_info = 3;
* @return Whether the sourceInfo field is set.
*/
public boolean hasSourceInfo() {
return sourceInfoBuilder_ != null || sourceInfo_ != null;
}
/**
*
* The source info derived from input that generated the parsed `expr`.
*
*
* .cel.expr.SourceInfo source_info = 3;
* @return The sourceInfo.
*/
public dev.cel.expr.SourceInfo getSourceInfo() {
if (sourceInfoBuilder_ == null) {
return sourceInfo_ == null ? dev.cel.expr.SourceInfo.getDefaultInstance() : sourceInfo_;
} else {
return sourceInfoBuilder_.getMessage();
}
}
/**
*
* The source info derived from input that generated the parsed `expr`.
*
*
* .cel.expr.SourceInfo source_info = 3;
*/
public Builder setSourceInfo(dev.cel.expr.SourceInfo value) {
if (sourceInfoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
sourceInfo_ = value;
onChanged();
} else {
sourceInfoBuilder_.setMessage(value);
}
return this;
}
/**
*
* The source info derived from input that generated the parsed `expr`.
*
*
* .cel.expr.SourceInfo source_info = 3;
*/
public Builder setSourceInfo(
dev.cel.expr.SourceInfo.Builder builderForValue) {
if (sourceInfoBuilder_ == null) {
sourceInfo_ = builderForValue.build();
onChanged();
} else {
sourceInfoBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The source info derived from input that generated the parsed `expr`.
*
*
* .cel.expr.SourceInfo source_info = 3;
*/
public Builder mergeSourceInfo(dev.cel.expr.SourceInfo value) {
if (sourceInfoBuilder_ == null) {
if (sourceInfo_ != null) {
sourceInfo_ =
dev.cel.expr.SourceInfo.newBuilder(sourceInfo_).mergeFrom(value).buildPartial();
} else {
sourceInfo_ = value;
}
onChanged();
} else {
sourceInfoBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The source info derived from input that generated the parsed `expr`.
*
*
* .cel.expr.SourceInfo source_info = 3;
*/
public Builder clearSourceInfo() {
if (sourceInfoBuilder_ == null) {
sourceInfo_ = null;
onChanged();
} else {
sourceInfo_ = null;
sourceInfoBuilder_ = null;
}
return this;
}
/**
*
* The source info derived from input that generated the parsed `expr`.
*
*
* .cel.expr.SourceInfo source_info = 3;
*/
public dev.cel.expr.SourceInfo.Builder getSourceInfoBuilder() {
onChanged();
return getSourceInfoFieldBuilder().getBuilder();
}
/**
*
* The source info derived from input that generated the parsed `expr`.
*
*
* .cel.expr.SourceInfo source_info = 3;
*/
public dev.cel.expr.SourceInfoOrBuilder getSourceInfoOrBuilder() {
if (sourceInfoBuilder_ != null) {
return sourceInfoBuilder_.getMessageOrBuilder();
} else {
return sourceInfo_ == null ?
dev.cel.expr.SourceInfo.getDefaultInstance() : sourceInfo_;
}
}
/**
*
* The source info derived from input that generated the parsed `expr`.
*
*
* .cel.expr.SourceInfo source_info = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
dev.cel.expr.SourceInfo, dev.cel.expr.SourceInfo.Builder, dev.cel.expr.SourceInfoOrBuilder>
getSourceInfoFieldBuilder() {
if (sourceInfoBuilder_ == null) {
sourceInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
dev.cel.expr.SourceInfo, dev.cel.expr.SourceInfo.Builder, dev.cel.expr.SourceInfoOrBuilder>(
getSourceInfo(),
getParentForChildren(),
isClean());
sourceInfo_ = null;
}
return sourceInfoBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:cel.expr.ParsedExpr)
}
// @@protoc_insertion_point(class_scope:cel.expr.ParsedExpr)
private static final dev.cel.expr.ParsedExpr DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.cel.expr.ParsedExpr();
}
public static dev.cel.expr.ParsedExpr getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ParsedExpr 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.ParsedExpr getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy