All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dev.cel.expr.ParsedExpr Maven / Gradle / Ivy

The newest version!
// 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 expression together with source information as returned by the parser.
 * 
* * Protobuf type {@code cel.expr.ParsedExpr} */ public final class ParsedExpr extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:cel.expr.ParsedExpr) ParsedExprOrBuilder { 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= */ "", ParsedExpr.class.getName()); } // Use ParsedExpr.newBuilder() to construct. private ParsedExpr(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ParsedExpr() { } 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.GeneratedMessage.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); } private int bitField0_; 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 ((bitField0_ & 0x00000001) != 0); } /** *
   * 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 expr_ == null ? dev.cel.expr.Expr.getDefaultInstance() : expr_; } 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 ((bitField0_ & 0x00000002) != 0); } /** *
   * 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 sourceInfo_ == null ? dev.cel.expr.SourceInfo.getDefaultInstance() : sourceInfo_; } 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(2, getExpr()); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(3, getSourceInfo()); } 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(2, getExpr()); } if (((bitField0_ & 0x00000002) != 0)) { 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.GeneratedMessage .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.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static dev.cel.expr.ParsedExpr parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .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.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static dev.cel.expr.ParsedExpr parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .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.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.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.GeneratedMessage.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.GeneratedMessage.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.GeneratedMessage.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() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { getExprFieldBuilder(); getSourceInfoFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; expr_ = null; if (exprBuilder_ != null) { exprBuilder_.dispose(); exprBuilder_ = null; } sourceInfo_ = null; if (sourceInfoBuilder_ != null) { sourceInfoBuilder_.dispose(); 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 (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(dev.cel.expr.ParsedExpr result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.expr_ = exprBuilder_ == null ? expr_ : exprBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.sourceInfo_ = sourceInfoBuilder_ == null ? sourceInfo_ : sourceInfoBuilder_.build(); to_bitField0_ |= 0x00000002; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof dev.cel.expr.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); bitField0_ |= 0x00000001; break; } // case 18 case 26: { input.readMessage( getSourceInfoFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; 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 expr_; private com.google.protobuf.SingleFieldBuilder< 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 ((bitField0_ & 0x00000001) != 0); } /** *
     * 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; } else { exprBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); 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(); } else { exprBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     * The parsed expression.
     * 
* * .cel.expr.Expr expr = 2; */ public Builder mergeExpr(dev.cel.expr.Expr value) { if (exprBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && expr_ != null && expr_ != dev.cel.expr.Expr.getDefaultInstance()) { getExprBuilder().mergeFrom(value); } else { expr_ = value; } } else { exprBuilder_.mergeFrom(value); } if (expr_ != null) { bitField0_ |= 0x00000001; onChanged(); } return this; } /** *
     * The parsed expression.
     * 
* * .cel.expr.Expr expr = 2; */ public Builder clearExpr() { bitField0_ = (bitField0_ & ~0x00000001); expr_ = null; if (exprBuilder_ != null) { exprBuilder_.dispose(); exprBuilder_ = null; } onChanged(); return this; } /** *
     * The parsed expression.
     * 
* * .cel.expr.Expr expr = 2; */ public dev.cel.expr.Expr.Builder getExprBuilder() { bitField0_ |= 0x00000001; 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.SingleFieldBuilder< dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder> getExprFieldBuilder() { if (exprBuilder_ == null) { exprBuilder_ = new com.google.protobuf.SingleFieldBuilder< dev.cel.expr.Expr, dev.cel.expr.Expr.Builder, dev.cel.expr.ExprOrBuilder>( getExpr(), getParentForChildren(), isClean()); expr_ = null; } return exprBuilder_; } private dev.cel.expr.SourceInfo sourceInfo_; private com.google.protobuf.SingleFieldBuilder< dev.cel.expr.SourceInfo, dev.cel.expr.SourceInfo.Builder, dev.cel.expr.SourceInfoOrBuilder> sourceInfoBuilder_; /** *
     * The source info derived from input that generated the parsed `expr`.
     * 
* * .cel.expr.SourceInfo source_info = 3; * @return Whether the sourceInfo field is set. */ public boolean hasSourceInfo() { return ((bitField0_ & 0x00000002) != 0); } /** *
     * 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; } else { sourceInfoBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); 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(); } else { sourceInfoBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); 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 (((bitField0_ & 0x00000002) != 0) && sourceInfo_ != null && sourceInfo_ != dev.cel.expr.SourceInfo.getDefaultInstance()) { getSourceInfoBuilder().mergeFrom(value); } else { sourceInfo_ = value; } } else { sourceInfoBuilder_.mergeFrom(value); } if (sourceInfo_ != null) { bitField0_ |= 0x00000002; onChanged(); } return this; } /** *
     * The source info derived from input that generated the parsed `expr`.
     * 
* * .cel.expr.SourceInfo source_info = 3; */ public Builder clearSourceInfo() { bitField0_ = (bitField0_ & ~0x00000002); sourceInfo_ = null; if (sourceInfoBuilder_ != null) { sourceInfoBuilder_.dispose(); sourceInfoBuilder_ = null; } onChanged(); 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() { bitField0_ |= 0x00000002; 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.SingleFieldBuilder< dev.cel.expr.SourceInfo, dev.cel.expr.SourceInfo.Builder, dev.cel.expr.SourceInfoOrBuilder> getSourceInfoFieldBuilder() { if (sourceInfoBuilder_ == null) { sourceInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder< dev.cel.expr.SourceInfo, dev.cel.expr.SourceInfo.Builder, dev.cel.expr.SourceInfoOrBuilder>( getSourceInfo(), getParentForChildren(), isClean()); sourceInfo_ = null; } return sourceInfoBuilder_; } // @@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 - 2024 Weber Informatics LLC | Privacy Policy