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

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

There is a newer version: 0.7.1
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: cel/expr/syntax.proto

package dev.cel.expr;

/**
 * 
 * Source information collected at parse time.
 * 
* * Protobuf type {@code cel.expr.SourceInfo} */ public final class SourceInfo extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:cel.expr.SourceInfo) SourceInfoOrBuilder { private static final long serialVersionUID = 0L; // Use SourceInfo.newBuilder() to construct. private SourceInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private SourceInfo() { syntaxVersion_ = ""; location_ = ""; lineOffsets_ = emptyIntList(); extensions_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new SourceInfo(); } @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_SourceInfo_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 4: return internalGetPositions(); case 5: return internalGetMacroCalls(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return dev.cel.expr.SyntaxProto.internal_static_cel_expr_SourceInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( dev.cel.expr.SourceInfo.class, dev.cel.expr.SourceInfo.Builder.class); } public interface ExtensionOrBuilder extends // @@protoc_insertion_point(interface_extends:cel.expr.SourceInfo.Extension) com.google.protobuf.MessageOrBuilder { /** *
     * Identifier for the extension. Example: constant_folding
     * 
* * string id = 1; * @return The id. */ java.lang.String getId(); /** *
     * Identifier for the extension. Example: constant_folding
     * 
* * string id = 1; * @return The bytes for id. */ com.google.protobuf.ByteString getIdBytes(); /** *
     * If set, the listed components must understand the extension for the
     * expression to evaluate correctly.
     * This field has set semantics, repeated values should be deduplicated.
     * 
* * repeated .cel.expr.SourceInfo.Extension.Component affected_components = 2; * @return A list containing the affectedComponents. */ java.util.List getAffectedComponentsList(); /** *
     * If set, the listed components must understand the extension for the
     * expression to evaluate correctly.
     * This field has set semantics, repeated values should be deduplicated.
     * 
* * repeated .cel.expr.SourceInfo.Extension.Component affected_components = 2; * @return The count of affectedComponents. */ int getAffectedComponentsCount(); /** *
     * If set, the listed components must understand the extension for the
     * expression to evaluate correctly.
     * This field has set semantics, repeated values should be deduplicated.
     * 
* * repeated .cel.expr.SourceInfo.Extension.Component affected_components = 2; * @param index The index of the element to return. * @return The affectedComponents at the given index. */ dev.cel.expr.SourceInfo.Extension.Component getAffectedComponents(int index); /** *
     * If set, the listed components must understand the extension for the
     * expression to evaluate correctly.
     * This field has set semantics, repeated values should be deduplicated.
     * 
* * repeated .cel.expr.SourceInfo.Extension.Component affected_components = 2; * @return A list containing the enum numeric values on the wire for affectedComponents. */ java.util.List getAffectedComponentsValueList(); /** *
     * If set, the listed components must understand the extension for the
     * expression to evaluate correctly.
     * This field has set semantics, repeated values should be deduplicated.
     * 
* * repeated .cel.expr.SourceInfo.Extension.Component affected_components = 2; * @param index The index of the value to return. * @return The enum numeric value on the wire of affectedComponents at the given index. */ int getAffectedComponentsValue(int index); /** *
     * Version info. May be skipped if it isn't meaningful for the extension.
     * (for example constant_folding might always be v0.0).
     * 
* * .cel.expr.SourceInfo.Extension.Version version = 3; * @return Whether the version field is set. */ boolean hasVersion(); /** *
     * Version info. May be skipped if it isn't meaningful for the extension.
     * (for example constant_folding might always be v0.0).
     * 
* * .cel.expr.SourceInfo.Extension.Version version = 3; * @return The version. */ dev.cel.expr.SourceInfo.Extension.Version getVersion(); /** *
     * Version info. May be skipped if it isn't meaningful for the extension.
     * (for example constant_folding might always be v0.0).
     * 
* * .cel.expr.SourceInfo.Extension.Version version = 3; */ dev.cel.expr.SourceInfo.Extension.VersionOrBuilder getVersionOrBuilder(); } /** *
   * An extension that was requested for the source expression.
   * 
* * Protobuf type {@code cel.expr.SourceInfo.Extension} */ public static final class Extension extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:cel.expr.SourceInfo.Extension) ExtensionOrBuilder { private static final long serialVersionUID = 0L; // Use Extension.newBuilder() to construct. private Extension(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Extension() { id_ = ""; affectedComponents_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Extension(); } @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_SourceInfo_Extension_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return dev.cel.expr.SyntaxProto.internal_static_cel_expr_SourceInfo_Extension_fieldAccessorTable .ensureFieldAccessorsInitialized( dev.cel.expr.SourceInfo.Extension.class, dev.cel.expr.SourceInfo.Extension.Builder.class); } /** *
     * CEL component specifier.
     * 
* * Protobuf enum {@code cel.expr.SourceInfo.Extension.Component} */ public enum Component implements com.google.protobuf.ProtocolMessageEnum { /** *
       * Unspecified, default.
       * 
* * COMPONENT_UNSPECIFIED = 0; */ COMPONENT_UNSPECIFIED(0), /** *
       * Parser. Converts a CEL string to an AST.
       * 
* * COMPONENT_PARSER = 1; */ COMPONENT_PARSER(1), /** *
       * Type checker. Checks that references in an AST are defined and types
       * agree.
       * 
* * COMPONENT_TYPE_CHECKER = 2; */ COMPONENT_TYPE_CHECKER(2), /** *
       * Runtime. Evaluates a parsed and optionally checked CEL AST against a
       * context.
       * 
* * COMPONENT_RUNTIME = 3; */ COMPONENT_RUNTIME(3), UNRECOGNIZED(-1), ; /** *
       * Unspecified, default.
       * 
* * COMPONENT_UNSPECIFIED = 0; */ public static final int COMPONENT_UNSPECIFIED_VALUE = 0; /** *
       * Parser. Converts a CEL string to an AST.
       * 
* * COMPONENT_PARSER = 1; */ public static final int COMPONENT_PARSER_VALUE = 1; /** *
       * Type checker. Checks that references in an AST are defined and types
       * agree.
       * 
* * COMPONENT_TYPE_CHECKER = 2; */ public static final int COMPONENT_TYPE_CHECKER_VALUE = 2; /** *
       * Runtime. Evaluates a parsed and optionally checked CEL AST against a
       * context.
       * 
* * COMPONENT_RUNTIME = 3; */ public static final int COMPONENT_RUNTIME_VALUE = 3; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Component valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static Component forNumber(int value) { switch (value) { case 0: return COMPONENT_UNSPECIFIED; case 1: return COMPONENT_PARSER; case 2: return COMPONENT_TYPE_CHECKER; case 3: return COMPONENT_RUNTIME; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< Component> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Component findValueByNumber(int number) { return Component.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return dev.cel.expr.SourceInfo.Extension.getDescriptor().getEnumTypes().get(0); } private static final Component[] VALUES = values(); public static Component valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private Component(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:cel.expr.SourceInfo.Extension.Component) } public interface VersionOrBuilder extends // @@protoc_insertion_point(interface_extends:cel.expr.SourceInfo.Extension.Version) com.google.protobuf.MessageOrBuilder { /** *
       * Major version changes indicate different required support level from
       * the required components.
       * 
* * int64 major = 1; * @return The major. */ long getMajor(); /** *
       * Minor version changes must not change the observed behavior from
       * existing implementations, but may be provided informationally.
       * 
* * int64 minor = 2; * @return The minor. */ long getMinor(); } /** *
     * Version
     * 
* * Protobuf type {@code cel.expr.SourceInfo.Extension.Version} */ public static final class Version extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:cel.expr.SourceInfo.Extension.Version) VersionOrBuilder { private static final long serialVersionUID = 0L; // Use Version.newBuilder() to construct. private Version(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Version() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Version(); } @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_SourceInfo_Extension_Version_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return dev.cel.expr.SyntaxProto.internal_static_cel_expr_SourceInfo_Extension_Version_fieldAccessorTable .ensureFieldAccessorsInitialized( dev.cel.expr.SourceInfo.Extension.Version.class, dev.cel.expr.SourceInfo.Extension.Version.Builder.class); } public static final int MAJOR_FIELD_NUMBER = 1; private long major_; /** *
       * Major version changes indicate different required support level from
       * the required components.
       * 
* * int64 major = 1; * @return The major. */ @java.lang.Override public long getMajor() { return major_; } public static final int MINOR_FIELD_NUMBER = 2; private long minor_; /** *
       * Minor version changes must not change the observed behavior from
       * existing implementations, but may be provided informationally.
       * 
* * int64 minor = 2; * @return The minor. */ @java.lang.Override public long getMinor() { return minor_; } 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 (major_ != 0L) { output.writeInt64(1, major_); } if (minor_ != 0L) { output.writeInt64(2, minor_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (major_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(1, major_); } if (minor_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(2, minor_); } 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.SourceInfo.Extension.Version)) { return super.equals(obj); } dev.cel.expr.SourceInfo.Extension.Version other = (dev.cel.expr.SourceInfo.Extension.Version) obj; if (getMajor() != other.getMajor()) return false; if (getMinor() != other.getMinor()) 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) + MAJOR_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getMajor()); hash = (37 * hash) + MINOR_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getMinor()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static dev.cel.expr.SourceInfo.Extension.Version parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static dev.cel.expr.SourceInfo.Extension.Version 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.SourceInfo.Extension.Version parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static dev.cel.expr.SourceInfo.Extension.Version 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.SourceInfo.Extension.Version parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static dev.cel.expr.SourceInfo.Extension.Version parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static dev.cel.expr.SourceInfo.Extension.Version parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static dev.cel.expr.SourceInfo.Extension.Version 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.SourceInfo.Extension.Version parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static dev.cel.expr.SourceInfo.Extension.Version 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.SourceInfo.Extension.Version parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static dev.cel.expr.SourceInfo.Extension.Version 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.SourceInfo.Extension.Version 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; } /** *
       * Version
       * 
* * Protobuf type {@code cel.expr.SourceInfo.Extension.Version} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:cel.expr.SourceInfo.Extension.Version) dev.cel.expr.SourceInfo.Extension.VersionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return dev.cel.expr.SyntaxProto.internal_static_cel_expr_SourceInfo_Extension_Version_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return dev.cel.expr.SyntaxProto.internal_static_cel_expr_SourceInfo_Extension_Version_fieldAccessorTable .ensureFieldAccessorsInitialized( dev.cel.expr.SourceInfo.Extension.Version.class, dev.cel.expr.SourceInfo.Extension.Version.Builder.class); } // Construct using dev.cel.expr.SourceInfo.Extension.Version.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); major_ = 0L; minor_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return dev.cel.expr.SyntaxProto.internal_static_cel_expr_SourceInfo_Extension_Version_descriptor; } @java.lang.Override public dev.cel.expr.SourceInfo.Extension.Version getDefaultInstanceForType() { return dev.cel.expr.SourceInfo.Extension.Version.getDefaultInstance(); } @java.lang.Override public dev.cel.expr.SourceInfo.Extension.Version build() { dev.cel.expr.SourceInfo.Extension.Version result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public dev.cel.expr.SourceInfo.Extension.Version buildPartial() { dev.cel.expr.SourceInfo.Extension.Version result = new dev.cel.expr.SourceInfo.Extension.Version(this); result.major_ = major_; result.minor_ = minor_; 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.SourceInfo.Extension.Version) { return mergeFrom((dev.cel.expr.SourceInfo.Extension.Version)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(dev.cel.expr.SourceInfo.Extension.Version other) { if (other == dev.cel.expr.SourceInfo.Extension.Version.getDefaultInstance()) return this; if (other.getMajor() != 0L) { setMajor(other.getMajor()); } if (other.getMinor() != 0L) { setMinor(other.getMinor()); } 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: { major_ = input.readInt64(); break; } // case 8 case 16: { minor_ = input.readInt64(); break; } // case 16 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 long major_ ; /** *
         * Major version changes indicate different required support level from
         * the required components.
         * 
* * int64 major = 1; * @return The major. */ @java.lang.Override public long getMajor() { return major_; } /** *
         * Major version changes indicate different required support level from
         * the required components.
         * 
* * int64 major = 1; * @param value The major to set. * @return This builder for chaining. */ public Builder setMajor(long value) { major_ = value; onChanged(); return this; } /** *
         * Major version changes indicate different required support level from
         * the required components.
         * 
* * int64 major = 1; * @return This builder for chaining. */ public Builder clearMajor() { major_ = 0L; onChanged(); return this; } private long minor_ ; /** *
         * Minor version changes must not change the observed behavior from
         * existing implementations, but may be provided informationally.
         * 
* * int64 minor = 2; * @return The minor. */ @java.lang.Override public long getMinor() { return minor_; } /** *
         * Minor version changes must not change the observed behavior from
         * existing implementations, but may be provided informationally.
         * 
* * int64 minor = 2; * @param value The minor to set. * @return This builder for chaining. */ public Builder setMinor(long value) { minor_ = value; onChanged(); return this; } /** *
         * Minor version changes must not change the observed behavior from
         * existing implementations, but may be provided informationally.
         * 
* * int64 minor = 2; * @return This builder for chaining. */ public Builder clearMinor() { minor_ = 0L; onChanged(); return this; } @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.SourceInfo.Extension.Version) } // @@protoc_insertion_point(class_scope:cel.expr.SourceInfo.Extension.Version) private static final dev.cel.expr.SourceInfo.Extension.Version DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new dev.cel.expr.SourceInfo.Extension.Version(); } public static dev.cel.expr.SourceInfo.Extension.Version getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Version 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.SourceInfo.Extension.Version getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int ID_FIELD_NUMBER = 1; private volatile java.lang.Object id_; /** *
     * Identifier for the extension. Example: constant_folding
     * 
* * string id = 1; * @return The id. */ @java.lang.Override public java.lang.String getId() { java.lang.Object ref = id_; 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(); id_ = s; return s; } } /** *
     * Identifier for the extension. Example: constant_folding
     * 
* * string id = 1; * @return The bytes for id. */ @java.lang.Override public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int AFFECTED_COMPONENTS_FIELD_NUMBER = 2; private java.util.List affectedComponents_; private static final com.google.protobuf.Internal.ListAdapter.Converter< java.lang.Integer, dev.cel.expr.SourceInfo.Extension.Component> affectedComponents_converter_ = new com.google.protobuf.Internal.ListAdapter.Converter< java.lang.Integer, dev.cel.expr.SourceInfo.Extension.Component>() { public dev.cel.expr.SourceInfo.Extension.Component convert(java.lang.Integer from) { @SuppressWarnings("deprecation") dev.cel.expr.SourceInfo.Extension.Component result = dev.cel.expr.SourceInfo.Extension.Component.valueOf(from); return result == null ? dev.cel.expr.SourceInfo.Extension.Component.UNRECOGNIZED : result; } }; /** *
     * If set, the listed components must understand the extension for the
     * expression to evaluate correctly.
     * This field has set semantics, repeated values should be deduplicated.
     * 
* * repeated .cel.expr.SourceInfo.Extension.Component affected_components = 2; * @return A list containing the affectedComponents. */ @java.lang.Override public java.util.List getAffectedComponentsList() { return new com.google.protobuf.Internal.ListAdapter< java.lang.Integer, dev.cel.expr.SourceInfo.Extension.Component>(affectedComponents_, affectedComponents_converter_); } /** *
     * If set, the listed components must understand the extension for the
     * expression to evaluate correctly.
     * This field has set semantics, repeated values should be deduplicated.
     * 
* * repeated .cel.expr.SourceInfo.Extension.Component affected_components = 2; * @return The count of affectedComponents. */ @java.lang.Override public int getAffectedComponentsCount() { return affectedComponents_.size(); } /** *
     * If set, the listed components must understand the extension for the
     * expression to evaluate correctly.
     * This field has set semantics, repeated values should be deduplicated.
     * 
* * repeated .cel.expr.SourceInfo.Extension.Component affected_components = 2; * @param index The index of the element to return. * @return The affectedComponents at the given index. */ @java.lang.Override public dev.cel.expr.SourceInfo.Extension.Component getAffectedComponents(int index) { return affectedComponents_converter_.convert(affectedComponents_.get(index)); } /** *
     * If set, the listed components must understand the extension for the
     * expression to evaluate correctly.
     * This field has set semantics, repeated values should be deduplicated.
     * 
* * repeated .cel.expr.SourceInfo.Extension.Component affected_components = 2; * @return A list containing the enum numeric values on the wire for affectedComponents. */ @java.lang.Override public java.util.List getAffectedComponentsValueList() { return affectedComponents_; } /** *
     * If set, the listed components must understand the extension for the
     * expression to evaluate correctly.
     * This field has set semantics, repeated values should be deduplicated.
     * 
* * repeated .cel.expr.SourceInfo.Extension.Component affected_components = 2; * @param index The index of the value to return. * @return The enum numeric value on the wire of affectedComponents at the given index. */ @java.lang.Override public int getAffectedComponentsValue(int index) { return affectedComponents_.get(index); } private int affectedComponentsMemoizedSerializedSize; public static final int VERSION_FIELD_NUMBER = 3; private dev.cel.expr.SourceInfo.Extension.Version version_; /** *
     * Version info. May be skipped if it isn't meaningful for the extension.
     * (for example constant_folding might always be v0.0).
     * 
* * .cel.expr.SourceInfo.Extension.Version version = 3; * @return Whether the version field is set. */ @java.lang.Override public boolean hasVersion() { return version_ != null; } /** *
     * Version info. May be skipped if it isn't meaningful for the extension.
     * (for example constant_folding might always be v0.0).
     * 
* * .cel.expr.SourceInfo.Extension.Version version = 3; * @return The version. */ @java.lang.Override public dev.cel.expr.SourceInfo.Extension.Version getVersion() { return version_ == null ? dev.cel.expr.SourceInfo.Extension.Version.getDefaultInstance() : version_; } /** *
     * Version info. May be skipped if it isn't meaningful for the extension.
     * (for example constant_folding might always be v0.0).
     * 
* * .cel.expr.SourceInfo.Extension.Version version = 3; */ @java.lang.Override public dev.cel.expr.SourceInfo.Extension.VersionOrBuilder getVersionOrBuilder() { return getVersion(); } 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(); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } if (getAffectedComponentsList().size() > 0) { output.writeUInt32NoTag(18); output.writeUInt32NoTag(affectedComponentsMemoizedSerializedSize); } for (int i = 0; i < affectedComponents_.size(); i++) { output.writeEnumNoTag(affectedComponents_.get(i)); } if (version_ != null) { output.writeMessage(3, getVersion()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } { int dataSize = 0; for (int i = 0; i < affectedComponents_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeEnumSizeNoTag(affectedComponents_.get(i)); } size += dataSize; if (!getAffectedComponentsList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream .computeUInt32SizeNoTag(dataSize); }affectedComponentsMemoizedSerializedSize = dataSize; } if (version_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getVersion()); } 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.SourceInfo.Extension)) { return super.equals(obj); } dev.cel.expr.SourceInfo.Extension other = (dev.cel.expr.SourceInfo.Extension) obj; if (!getId() .equals(other.getId())) return false; if (!affectedComponents_.equals(other.affectedComponents_)) return false; if (hasVersion() != other.hasVersion()) return false; if (hasVersion()) { if (!getVersion() .equals(other.getVersion())) 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) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); if (getAffectedComponentsCount() > 0) { hash = (37 * hash) + AFFECTED_COMPONENTS_FIELD_NUMBER; hash = (53 * hash) + affectedComponents_.hashCode(); } if (hasVersion()) { hash = (37 * hash) + VERSION_FIELD_NUMBER; hash = (53 * hash) + getVersion().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static dev.cel.expr.SourceInfo.Extension parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static dev.cel.expr.SourceInfo.Extension 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.SourceInfo.Extension parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static dev.cel.expr.SourceInfo.Extension 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.SourceInfo.Extension parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static dev.cel.expr.SourceInfo.Extension parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static dev.cel.expr.SourceInfo.Extension parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static dev.cel.expr.SourceInfo.Extension 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.SourceInfo.Extension parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static dev.cel.expr.SourceInfo.Extension 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.SourceInfo.Extension parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static dev.cel.expr.SourceInfo.Extension 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.SourceInfo.Extension 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 extension that was requested for the source expression.
     * 
* * Protobuf type {@code cel.expr.SourceInfo.Extension} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:cel.expr.SourceInfo.Extension) dev.cel.expr.SourceInfo.ExtensionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return dev.cel.expr.SyntaxProto.internal_static_cel_expr_SourceInfo_Extension_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return dev.cel.expr.SyntaxProto.internal_static_cel_expr_SourceInfo_Extension_fieldAccessorTable .ensureFieldAccessorsInitialized( dev.cel.expr.SourceInfo.Extension.class, dev.cel.expr.SourceInfo.Extension.Builder.class); } // Construct using dev.cel.expr.SourceInfo.Extension.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); id_ = ""; affectedComponents_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); if (versionBuilder_ == null) { version_ = null; } else { version_ = null; versionBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return dev.cel.expr.SyntaxProto.internal_static_cel_expr_SourceInfo_Extension_descriptor; } @java.lang.Override public dev.cel.expr.SourceInfo.Extension getDefaultInstanceForType() { return dev.cel.expr.SourceInfo.Extension.getDefaultInstance(); } @java.lang.Override public dev.cel.expr.SourceInfo.Extension build() { dev.cel.expr.SourceInfo.Extension result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public dev.cel.expr.SourceInfo.Extension buildPartial() { dev.cel.expr.SourceInfo.Extension result = new dev.cel.expr.SourceInfo.Extension(this); int from_bitField0_ = bitField0_; result.id_ = id_; if (((bitField0_ & 0x00000001) != 0)) { affectedComponents_ = java.util.Collections.unmodifiableList(affectedComponents_); bitField0_ = (bitField0_ & ~0x00000001); } result.affectedComponents_ = affectedComponents_; if (versionBuilder_ == null) { result.version_ = version_; } else { result.version_ = versionBuilder_.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.SourceInfo.Extension) { return mergeFrom((dev.cel.expr.SourceInfo.Extension)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(dev.cel.expr.SourceInfo.Extension other) { if (other == dev.cel.expr.SourceInfo.Extension.getDefaultInstance()) return this; if (!other.getId().isEmpty()) { id_ = other.id_; onChanged(); } if (!other.affectedComponents_.isEmpty()) { if (affectedComponents_.isEmpty()) { affectedComponents_ = other.affectedComponents_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureAffectedComponentsIsMutable(); affectedComponents_.addAll(other.affectedComponents_); } onChanged(); } if (other.hasVersion()) { mergeVersion(other.getVersion()); } 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: { id_ = input.readStringRequireUtf8(); break; } // case 10 case 16: { int tmpRaw = input.readEnum(); ensureAffectedComponentsIsMutable(); affectedComponents_.add(tmpRaw); break; } // case 16 case 18: { int length = input.readRawVarint32(); int oldLimit = input.pushLimit(length); while(input.getBytesUntilLimit() > 0) { int tmpRaw = input.readEnum(); ensureAffectedComponentsIsMutable(); affectedComponents_.add(tmpRaw); } input.popLimit(oldLimit); break; } // case 18 case 26: { input.readMessage( getVersionFieldBuilder().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 int bitField0_; private java.lang.Object id_ = ""; /** *
       * Identifier for the extension. Example: constant_folding
       * 
* * string id = 1; * @return The id. */ public java.lang.String getId() { java.lang.Object ref = id_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); id_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Identifier for the extension. Example: constant_folding
       * 
* * string id = 1; * @return The bytes for id. */ public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Identifier for the extension. Example: constant_folding
       * 
* * string id = 1; * @param value The id to set. * @return This builder for chaining. */ public Builder setId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } id_ = value; onChanged(); return this; } /** *
       * Identifier for the extension. Example: constant_folding
       * 
* * string id = 1; * @return This builder for chaining. */ public Builder clearId() { id_ = getDefaultInstance().getId(); onChanged(); return this; } /** *
       * Identifier for the extension. Example: constant_folding
       * 
* * string id = 1; * @param value The bytes for id to set. * @return This builder for chaining. */ public Builder setIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); id_ = value; onChanged(); return this; } private java.util.List affectedComponents_ = java.util.Collections.emptyList(); private void ensureAffectedComponentsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { affectedComponents_ = new java.util.ArrayList(affectedComponents_); bitField0_ |= 0x00000001; } } /** *
       * If set, the listed components must understand the extension for the
       * expression to evaluate correctly.
       * This field has set semantics, repeated values should be deduplicated.
       * 
* * repeated .cel.expr.SourceInfo.Extension.Component affected_components = 2; * @return A list containing the affectedComponents. */ public java.util.List getAffectedComponentsList() { return new com.google.protobuf.Internal.ListAdapter< java.lang.Integer, dev.cel.expr.SourceInfo.Extension.Component>(affectedComponents_, affectedComponents_converter_); } /** *
       * If set, the listed components must understand the extension for the
       * expression to evaluate correctly.
       * This field has set semantics, repeated values should be deduplicated.
       * 
* * repeated .cel.expr.SourceInfo.Extension.Component affected_components = 2; * @return The count of affectedComponents. */ public int getAffectedComponentsCount() { return affectedComponents_.size(); } /** *
       * If set, the listed components must understand the extension for the
       * expression to evaluate correctly.
       * This field has set semantics, repeated values should be deduplicated.
       * 
* * repeated .cel.expr.SourceInfo.Extension.Component affected_components = 2; * @param index The index of the element to return. * @return The affectedComponents at the given index. */ public dev.cel.expr.SourceInfo.Extension.Component getAffectedComponents(int index) { return affectedComponents_converter_.convert(affectedComponents_.get(index)); } /** *
       * If set, the listed components must understand the extension for the
       * expression to evaluate correctly.
       * This field has set semantics, repeated values should be deduplicated.
       * 
* * repeated .cel.expr.SourceInfo.Extension.Component affected_components = 2; * @param index The index to set the value at. * @param value The affectedComponents to set. * @return This builder for chaining. */ public Builder setAffectedComponents( int index, dev.cel.expr.SourceInfo.Extension.Component value) { if (value == null) { throw new NullPointerException(); } ensureAffectedComponentsIsMutable(); affectedComponents_.set(index, value.getNumber()); onChanged(); return this; } /** *
       * If set, the listed components must understand the extension for the
       * expression to evaluate correctly.
       * This field has set semantics, repeated values should be deduplicated.
       * 
* * repeated .cel.expr.SourceInfo.Extension.Component affected_components = 2; * @param value The affectedComponents to add. * @return This builder for chaining. */ public Builder addAffectedComponents(dev.cel.expr.SourceInfo.Extension.Component value) { if (value == null) { throw new NullPointerException(); } ensureAffectedComponentsIsMutable(); affectedComponents_.add(value.getNumber()); onChanged(); return this; } /** *
       * If set, the listed components must understand the extension for the
       * expression to evaluate correctly.
       * This field has set semantics, repeated values should be deduplicated.
       * 
* * repeated .cel.expr.SourceInfo.Extension.Component affected_components = 2; * @param values The affectedComponents to add. * @return This builder for chaining. */ public Builder addAllAffectedComponents( java.lang.Iterable values) { ensureAffectedComponentsIsMutable(); for (dev.cel.expr.SourceInfo.Extension.Component value : values) { affectedComponents_.add(value.getNumber()); } onChanged(); return this; } /** *
       * If set, the listed components must understand the extension for the
       * expression to evaluate correctly.
       * This field has set semantics, repeated values should be deduplicated.
       * 
* * repeated .cel.expr.SourceInfo.Extension.Component affected_components = 2; * @return This builder for chaining. */ public Builder clearAffectedComponents() { affectedComponents_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
       * If set, the listed components must understand the extension for the
       * expression to evaluate correctly.
       * This field has set semantics, repeated values should be deduplicated.
       * 
* * repeated .cel.expr.SourceInfo.Extension.Component affected_components = 2; * @return A list containing the enum numeric values on the wire for affectedComponents. */ public java.util.List getAffectedComponentsValueList() { return java.util.Collections.unmodifiableList(affectedComponents_); } /** *
       * If set, the listed components must understand the extension for the
       * expression to evaluate correctly.
       * This field has set semantics, repeated values should be deduplicated.
       * 
* * repeated .cel.expr.SourceInfo.Extension.Component affected_components = 2; * @param index The index of the value to return. * @return The enum numeric value on the wire of affectedComponents at the given index. */ public int getAffectedComponentsValue(int index) { return affectedComponents_.get(index); } /** *
       * If set, the listed components must understand the extension for the
       * expression to evaluate correctly.
       * This field has set semantics, repeated values should be deduplicated.
       * 
* * repeated .cel.expr.SourceInfo.Extension.Component affected_components = 2; * @param index The index of the value to return. * @return The enum numeric value on the wire of affectedComponents at the given index. * @return This builder for chaining. */ public Builder setAffectedComponentsValue( int index, int value) { ensureAffectedComponentsIsMutable(); affectedComponents_.set(index, value); onChanged(); return this; } /** *
       * If set, the listed components must understand the extension for the
       * expression to evaluate correctly.
       * This field has set semantics, repeated values should be deduplicated.
       * 
* * repeated .cel.expr.SourceInfo.Extension.Component affected_components = 2; * @param value The enum numeric value on the wire for affectedComponents to add. * @return This builder for chaining. */ public Builder addAffectedComponentsValue(int value) { ensureAffectedComponentsIsMutable(); affectedComponents_.add(value); onChanged(); return this; } /** *
       * If set, the listed components must understand the extension for the
       * expression to evaluate correctly.
       * This field has set semantics, repeated values should be deduplicated.
       * 
* * repeated .cel.expr.SourceInfo.Extension.Component affected_components = 2; * @param values The enum numeric values on the wire for affectedComponents to add. * @return This builder for chaining. */ public Builder addAllAffectedComponentsValue( java.lang.Iterable values) { ensureAffectedComponentsIsMutable(); for (int value : values) { affectedComponents_.add(value); } onChanged(); return this; } private dev.cel.expr.SourceInfo.Extension.Version version_; private com.google.protobuf.SingleFieldBuilderV3< dev.cel.expr.SourceInfo.Extension.Version, dev.cel.expr.SourceInfo.Extension.Version.Builder, dev.cel.expr.SourceInfo.Extension.VersionOrBuilder> versionBuilder_; /** *
       * Version info. May be skipped if it isn't meaningful for the extension.
       * (for example constant_folding might always be v0.0).
       * 
* * .cel.expr.SourceInfo.Extension.Version version = 3; * @return Whether the version field is set. */ public boolean hasVersion() { return versionBuilder_ != null || version_ != null; } /** *
       * Version info. May be skipped if it isn't meaningful for the extension.
       * (for example constant_folding might always be v0.0).
       * 
* * .cel.expr.SourceInfo.Extension.Version version = 3; * @return The version. */ public dev.cel.expr.SourceInfo.Extension.Version getVersion() { if (versionBuilder_ == null) { return version_ == null ? dev.cel.expr.SourceInfo.Extension.Version.getDefaultInstance() : version_; } else { return versionBuilder_.getMessage(); } } /** *
       * Version info. May be skipped if it isn't meaningful for the extension.
       * (for example constant_folding might always be v0.0).
       * 
* * .cel.expr.SourceInfo.Extension.Version version = 3; */ public Builder setVersion(dev.cel.expr.SourceInfo.Extension.Version value) { if (versionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } version_ = value; onChanged(); } else { versionBuilder_.setMessage(value); } return this; } /** *
       * Version info. May be skipped if it isn't meaningful for the extension.
       * (for example constant_folding might always be v0.0).
       * 
* * .cel.expr.SourceInfo.Extension.Version version = 3; */ public Builder setVersion( dev.cel.expr.SourceInfo.Extension.Version.Builder builderForValue) { if (versionBuilder_ == null) { version_ = builderForValue.build(); onChanged(); } else { versionBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * Version info. May be skipped if it isn't meaningful for the extension.
       * (for example constant_folding might always be v0.0).
       * 
* * .cel.expr.SourceInfo.Extension.Version version = 3; */ public Builder mergeVersion(dev.cel.expr.SourceInfo.Extension.Version value) { if (versionBuilder_ == null) { if (version_ != null) { version_ = dev.cel.expr.SourceInfo.Extension.Version.newBuilder(version_).mergeFrom(value).buildPartial(); } else { version_ = value; } onChanged(); } else { versionBuilder_.mergeFrom(value); } return this; } /** *
       * Version info. May be skipped if it isn't meaningful for the extension.
       * (for example constant_folding might always be v0.0).
       * 
* * .cel.expr.SourceInfo.Extension.Version version = 3; */ public Builder clearVersion() { if (versionBuilder_ == null) { version_ = null; onChanged(); } else { version_ = null; versionBuilder_ = null; } return this; } /** *
       * Version info. May be skipped if it isn't meaningful for the extension.
       * (for example constant_folding might always be v0.0).
       * 
* * .cel.expr.SourceInfo.Extension.Version version = 3; */ public dev.cel.expr.SourceInfo.Extension.Version.Builder getVersionBuilder() { onChanged(); return getVersionFieldBuilder().getBuilder(); } /** *
       * Version info. May be skipped if it isn't meaningful for the extension.
       * (for example constant_folding might always be v0.0).
       * 
* * .cel.expr.SourceInfo.Extension.Version version = 3; */ public dev.cel.expr.SourceInfo.Extension.VersionOrBuilder getVersionOrBuilder() { if (versionBuilder_ != null) { return versionBuilder_.getMessageOrBuilder(); } else { return version_ == null ? dev.cel.expr.SourceInfo.Extension.Version.getDefaultInstance() : version_; } } /** *
       * Version info. May be skipped if it isn't meaningful for the extension.
       * (for example constant_folding might always be v0.0).
       * 
* * .cel.expr.SourceInfo.Extension.Version version = 3; */ private com.google.protobuf.SingleFieldBuilderV3< dev.cel.expr.SourceInfo.Extension.Version, dev.cel.expr.SourceInfo.Extension.Version.Builder, dev.cel.expr.SourceInfo.Extension.VersionOrBuilder> getVersionFieldBuilder() { if (versionBuilder_ == null) { versionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< dev.cel.expr.SourceInfo.Extension.Version, dev.cel.expr.SourceInfo.Extension.Version.Builder, dev.cel.expr.SourceInfo.Extension.VersionOrBuilder>( getVersion(), getParentForChildren(), isClean()); version_ = null; } return versionBuilder_; } @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.SourceInfo.Extension) } // @@protoc_insertion_point(class_scope:cel.expr.SourceInfo.Extension) private static final dev.cel.expr.SourceInfo.Extension DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new dev.cel.expr.SourceInfo.Extension(); } public static dev.cel.expr.SourceInfo.Extension getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Extension 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.SourceInfo.Extension getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int SYNTAX_VERSION_FIELD_NUMBER = 1; private volatile java.lang.Object syntaxVersion_; /** *
   * The syntax version of the source, e.g. `cel1`.
   * 
* * string syntax_version = 1; * @return The syntaxVersion. */ @java.lang.Override public java.lang.String getSyntaxVersion() { java.lang.Object ref = syntaxVersion_; 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(); syntaxVersion_ = s; return s; } } /** *
   * The syntax version of the source, e.g. `cel1`.
   * 
* * string syntax_version = 1; * @return The bytes for syntaxVersion. */ @java.lang.Override public com.google.protobuf.ByteString getSyntaxVersionBytes() { java.lang.Object ref = syntaxVersion_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); syntaxVersion_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LOCATION_FIELD_NUMBER = 2; private volatile java.lang.Object location_; /** *
   * The location name. All position information attached to an expression is
   * relative to this location.
   * The location could be a file, UI element, or similar. For example,
   * `acme/app/AnvilPolicy.cel`.
   * 
* * string location = 2; * @return The location. */ @java.lang.Override public java.lang.String getLocation() { java.lang.Object ref = location_; 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(); location_ = s; return s; } } /** *
   * The location name. All position information attached to an expression is
   * relative to this location.
   * The location could be a file, UI element, or similar. For example,
   * `acme/app/AnvilPolicy.cel`.
   * 
* * string location = 2; * @return The bytes for location. */ @java.lang.Override public com.google.protobuf.ByteString getLocationBytes() { java.lang.Object ref = location_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); location_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LINE_OFFSETS_FIELD_NUMBER = 3; private com.google.protobuf.Internal.IntList lineOffsets_; /** *
   * Monotonically increasing list of code point offsets where newlines
   * `\n` appear.
   * The line number of a given position is the index `i` where for a given
   * `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The
   * column may be derived from `id_positions[id] - line_offsets[i]`.
   * 
* * repeated int32 line_offsets = 3; * @return A list containing the lineOffsets. */ @java.lang.Override public java.util.List getLineOffsetsList() { return lineOffsets_; } /** *
   * Monotonically increasing list of code point offsets where newlines
   * `\n` appear.
   * The line number of a given position is the index `i` where for a given
   * `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The
   * column may be derived from `id_positions[id] - line_offsets[i]`.
   * 
* * repeated int32 line_offsets = 3; * @return The count of lineOffsets. */ public int getLineOffsetsCount() { return lineOffsets_.size(); } /** *
   * Monotonically increasing list of code point offsets where newlines
   * `\n` appear.
   * The line number of a given position is the index `i` where for a given
   * `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The
   * column may be derived from `id_positions[id] - line_offsets[i]`.
   * 
* * repeated int32 line_offsets = 3; * @param index The index of the element to return. * @return The lineOffsets at the given index. */ public int getLineOffsets(int index) { return lineOffsets_.getInt(index); } private int lineOffsetsMemoizedSerializedSize = -1; public static final int POSITIONS_FIELD_NUMBER = 4; private static final class PositionsDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.Long, java.lang.Integer> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( dev.cel.expr.SyntaxProto.internal_static_cel_expr_SourceInfo_PositionsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.INT64, 0L, com.google.protobuf.WireFormat.FieldType.INT32, 0); } private com.google.protobuf.MapField< java.lang.Long, java.lang.Integer> positions_; private com.google.protobuf.MapField internalGetPositions() { if (positions_ == null) { return com.google.protobuf.MapField.emptyMapField( PositionsDefaultEntryHolder.defaultEntry); } return positions_; } public int getPositionsCount() { return internalGetPositions().getMap().size(); } /** *
   * A map from the parse node id (e.g. `Expr.id`) to the code point offset
   * within the source.
   * 
* * map<int64, int32> positions = 4; */ @java.lang.Override public boolean containsPositions( long key) { return internalGetPositions().getMap().containsKey(key); } /** * Use {@link #getPositionsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getPositions() { return getPositionsMap(); } /** *
   * A map from the parse node id (e.g. `Expr.id`) to the code point offset
   * within the source.
   * 
* * map<int64, int32> positions = 4; */ @java.lang.Override public java.util.Map getPositionsMap() { return internalGetPositions().getMap(); } /** *
   * A map from the parse node id (e.g. `Expr.id`) to the code point offset
   * within the source.
   * 
* * map<int64, int32> positions = 4; */ @java.lang.Override public int getPositionsOrDefault( long key, int defaultValue) { java.util.Map map = internalGetPositions().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
   * A map from the parse node id (e.g. `Expr.id`) to the code point offset
   * within the source.
   * 
* * map<int64, int32> positions = 4; */ @java.lang.Override public int getPositionsOrThrow( long key) { java.util.Map map = internalGetPositions().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int MACRO_CALLS_FIELD_NUMBER = 5; private static final class MacroCallsDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.Long, dev.cel.expr.Expr> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( dev.cel.expr.SyntaxProto.internal_static_cel_expr_SourceInfo_MacroCallsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.INT64, 0L, com.google.protobuf.WireFormat.FieldType.MESSAGE, dev.cel.expr.Expr.getDefaultInstance()); } private com.google.protobuf.MapField< java.lang.Long, dev.cel.expr.Expr> macroCalls_; private com.google.protobuf.MapField internalGetMacroCalls() { if (macroCalls_ == null) { return com.google.protobuf.MapField.emptyMapField( MacroCallsDefaultEntryHolder.defaultEntry); } return macroCalls_; } public int getMacroCallsCount() { return internalGetMacroCalls().getMap().size(); } /** *
   * A map from the parse node id where a macro replacement was made to the
   * call `Expr` that resulted in a macro expansion.
   * For example, `has(value.field)` is a function call that is replaced by a
   * `test_only` field selection in the AST. Likewise, the call
   * `list.exists(e, e > 10)` translates to a comprehension expression. The key
   * in the map corresponds to the expression id of the expanded macro, and the
   * value is the call `Expr` that was replaced.
   * 
* * map<int64, .cel.expr.Expr> macro_calls = 5; */ @java.lang.Override public boolean containsMacroCalls( long key) { return internalGetMacroCalls().getMap().containsKey(key); } /** * Use {@link #getMacroCallsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getMacroCalls() { return getMacroCallsMap(); } /** *
   * A map from the parse node id where a macro replacement was made to the
   * call `Expr` that resulted in a macro expansion.
   * For example, `has(value.field)` is a function call that is replaced by a
   * `test_only` field selection in the AST. Likewise, the call
   * `list.exists(e, e > 10)` translates to a comprehension expression. The key
   * in the map corresponds to the expression id of the expanded macro, and the
   * value is the call `Expr` that was replaced.
   * 
* * map<int64, .cel.expr.Expr> macro_calls = 5; */ @java.lang.Override public java.util.Map getMacroCallsMap() { return internalGetMacroCalls().getMap(); } /** *
   * A map from the parse node id where a macro replacement was made to the
   * call `Expr` that resulted in a macro expansion.
   * For example, `has(value.field)` is a function call that is replaced by a
   * `test_only` field selection in the AST. Likewise, the call
   * `list.exists(e, e > 10)` translates to a comprehension expression. The key
   * in the map corresponds to the expression id of the expanded macro, and the
   * value is the call `Expr` that was replaced.
   * 
* * map<int64, .cel.expr.Expr> macro_calls = 5; */ @java.lang.Override public dev.cel.expr.Expr getMacroCallsOrDefault( long key, dev.cel.expr.Expr defaultValue) { java.util.Map map = internalGetMacroCalls().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
   * A map from the parse node id where a macro replacement was made to the
   * call `Expr` that resulted in a macro expansion.
   * For example, `has(value.field)` is a function call that is replaced by a
   * `test_only` field selection in the AST. Likewise, the call
   * `list.exists(e, e > 10)` translates to a comprehension expression. The key
   * in the map corresponds to the expression id of the expanded macro, and the
   * value is the call `Expr` that was replaced.
   * 
* * map<int64, .cel.expr.Expr> macro_calls = 5; */ @java.lang.Override public dev.cel.expr.Expr getMacroCallsOrThrow( long key) { java.util.Map map = internalGetMacroCalls().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int EXTENSIONS_FIELD_NUMBER = 6; private java.util.List extensions_; /** *
   * A list of tags for extensions that were used while parsing or type checking
   * the source expression. For example, optimizations that require special
   * runtime support may be specified.
   * These are used to check feature support between components in separate
   * implementations. This can be used to either skip redundant work or
   * report an error if the extension is unsupported.
   * 
* * repeated .cel.expr.SourceInfo.Extension extensions = 6; */ @java.lang.Override public java.util.List getExtensionsList() { return extensions_; } /** *
   * A list of tags for extensions that were used while parsing or type checking
   * the source expression. For example, optimizations that require special
   * runtime support may be specified.
   * These are used to check feature support between components in separate
   * implementations. This can be used to either skip redundant work or
   * report an error if the extension is unsupported.
   * 
* * repeated .cel.expr.SourceInfo.Extension extensions = 6; */ @java.lang.Override public java.util.List getExtensionsOrBuilderList() { return extensions_; } /** *
   * A list of tags for extensions that were used while parsing or type checking
   * the source expression. For example, optimizations that require special
   * runtime support may be specified.
   * These are used to check feature support between components in separate
   * implementations. This can be used to either skip redundant work or
   * report an error if the extension is unsupported.
   * 
* * repeated .cel.expr.SourceInfo.Extension extensions = 6; */ @java.lang.Override public int getExtensionsCount() { return extensions_.size(); } /** *
   * A list of tags for extensions that were used while parsing or type checking
   * the source expression. For example, optimizations that require special
   * runtime support may be specified.
   * These are used to check feature support between components in separate
   * implementations. This can be used to either skip redundant work or
   * report an error if the extension is unsupported.
   * 
* * repeated .cel.expr.SourceInfo.Extension extensions = 6; */ @java.lang.Override public dev.cel.expr.SourceInfo.Extension getExtensions(int index) { return extensions_.get(index); } /** *
   * A list of tags for extensions that were used while parsing or type checking
   * the source expression. For example, optimizations that require special
   * runtime support may be specified.
   * These are used to check feature support between components in separate
   * implementations. This can be used to either skip redundant work or
   * report an error if the extension is unsupported.
   * 
* * repeated .cel.expr.SourceInfo.Extension extensions = 6; */ @java.lang.Override public dev.cel.expr.SourceInfo.ExtensionOrBuilder getExtensionsOrBuilder( int index) { return extensions_.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 { getSerializedSize(); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(syntaxVersion_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, syntaxVersion_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, location_); } if (getLineOffsetsList().size() > 0) { output.writeUInt32NoTag(26); output.writeUInt32NoTag(lineOffsetsMemoizedSerializedSize); } for (int i = 0; i < lineOffsets_.size(); i++) { output.writeInt32NoTag(lineOffsets_.getInt(i)); } com.google.protobuf.GeneratedMessageV3 .serializeLongMapTo( output, internalGetPositions(), PositionsDefaultEntryHolder.defaultEntry, 4); com.google.protobuf.GeneratedMessageV3 .serializeLongMapTo( output, internalGetMacroCalls(), MacroCallsDefaultEntryHolder.defaultEntry, 5); for (int i = 0; i < extensions_.size(); i++) { output.writeMessage(6, extensions_.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.GeneratedMessageV3.isStringEmpty(syntaxVersion_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, syntaxVersion_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, location_); } { int dataSize = 0; for (int i = 0; i < lineOffsets_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeInt32SizeNoTag(lineOffsets_.getInt(i)); } size += dataSize; if (!getLineOffsetsList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream .computeInt32SizeNoTag(dataSize); } lineOffsetsMemoizedSerializedSize = dataSize; } for (java.util.Map.Entry entry : internalGetPositions().getMap().entrySet()) { com.google.protobuf.MapEntry positions__ = PositionsDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, positions__); } for (java.util.Map.Entry entry : internalGetMacroCalls().getMap().entrySet()) { com.google.protobuf.MapEntry macroCalls__ = MacroCallsDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, macroCalls__); } for (int i = 0; i < extensions_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, extensions_.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.SourceInfo)) { return super.equals(obj); } dev.cel.expr.SourceInfo other = (dev.cel.expr.SourceInfo) obj; if (!getSyntaxVersion() .equals(other.getSyntaxVersion())) return false; if (!getLocation() .equals(other.getLocation())) return false; if (!getLineOffsetsList() .equals(other.getLineOffsetsList())) return false; if (!internalGetPositions().equals( other.internalGetPositions())) return false; if (!internalGetMacroCalls().equals( other.internalGetMacroCalls())) return false; if (!getExtensionsList() .equals(other.getExtensionsList())) 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) + SYNTAX_VERSION_FIELD_NUMBER; hash = (53 * hash) + getSyntaxVersion().hashCode(); hash = (37 * hash) + LOCATION_FIELD_NUMBER; hash = (53 * hash) + getLocation().hashCode(); if (getLineOffsetsCount() > 0) { hash = (37 * hash) + LINE_OFFSETS_FIELD_NUMBER; hash = (53 * hash) + getLineOffsetsList().hashCode(); } if (!internalGetPositions().getMap().isEmpty()) { hash = (37 * hash) + POSITIONS_FIELD_NUMBER; hash = (53 * hash) + internalGetPositions().hashCode(); } if (!internalGetMacroCalls().getMap().isEmpty()) { hash = (37 * hash) + MACRO_CALLS_FIELD_NUMBER; hash = (53 * hash) + internalGetMacroCalls().hashCode(); } if (getExtensionsCount() > 0) { hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER; hash = (53 * hash) + getExtensionsList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static dev.cel.expr.SourceInfo parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static dev.cel.expr.SourceInfo 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.SourceInfo parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static dev.cel.expr.SourceInfo 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.SourceInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static dev.cel.expr.SourceInfo parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static dev.cel.expr.SourceInfo parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static dev.cel.expr.SourceInfo 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.SourceInfo parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static dev.cel.expr.SourceInfo 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.SourceInfo parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static dev.cel.expr.SourceInfo 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.SourceInfo 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; } /** *
   * Source information collected at parse time.
   * 
* * Protobuf type {@code cel.expr.SourceInfo} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:cel.expr.SourceInfo) dev.cel.expr.SourceInfoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return dev.cel.expr.SyntaxProto.internal_static_cel_expr_SourceInfo_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 4: return internalGetPositions(); case 5: return internalGetMacroCalls(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMutableMapField( int number) { switch (number) { case 4: return internalGetMutablePositions(); case 5: return internalGetMutableMacroCalls(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return dev.cel.expr.SyntaxProto.internal_static_cel_expr_SourceInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( dev.cel.expr.SourceInfo.class, dev.cel.expr.SourceInfo.Builder.class); } // Construct using dev.cel.expr.SourceInfo.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); syntaxVersion_ = ""; location_ = ""; lineOffsets_ = emptyIntList(); bitField0_ = (bitField0_ & ~0x00000001); internalGetMutablePositions().clear(); internalGetMutableMacroCalls().clear(); if (extensionsBuilder_ == null) { extensions_ = java.util.Collections.emptyList(); } else { extensions_ = null; extensionsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return dev.cel.expr.SyntaxProto.internal_static_cel_expr_SourceInfo_descriptor; } @java.lang.Override public dev.cel.expr.SourceInfo getDefaultInstanceForType() { return dev.cel.expr.SourceInfo.getDefaultInstance(); } @java.lang.Override public dev.cel.expr.SourceInfo build() { dev.cel.expr.SourceInfo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public dev.cel.expr.SourceInfo buildPartial() { dev.cel.expr.SourceInfo result = new dev.cel.expr.SourceInfo(this); int from_bitField0_ = bitField0_; result.syntaxVersion_ = syntaxVersion_; result.location_ = location_; if (((bitField0_ & 0x00000001) != 0)) { lineOffsets_.makeImmutable(); bitField0_ = (bitField0_ & ~0x00000001); } result.lineOffsets_ = lineOffsets_; result.positions_ = internalGetPositions(); result.positions_.makeImmutable(); result.macroCalls_ = internalGetMacroCalls(); result.macroCalls_.makeImmutable(); if (extensionsBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0)) { extensions_ = java.util.Collections.unmodifiableList(extensions_); bitField0_ = (bitField0_ & ~0x00000008); } result.extensions_ = extensions_; } else { result.extensions_ = extensionsBuilder_.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.SourceInfo) { return mergeFrom((dev.cel.expr.SourceInfo)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(dev.cel.expr.SourceInfo other) { if (other == dev.cel.expr.SourceInfo.getDefaultInstance()) return this; if (!other.getSyntaxVersion().isEmpty()) { syntaxVersion_ = other.syntaxVersion_; onChanged(); } if (!other.getLocation().isEmpty()) { location_ = other.location_; onChanged(); } if (!other.lineOffsets_.isEmpty()) { if (lineOffsets_.isEmpty()) { lineOffsets_ = other.lineOffsets_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureLineOffsetsIsMutable(); lineOffsets_.addAll(other.lineOffsets_); } onChanged(); } internalGetMutablePositions().mergeFrom( other.internalGetPositions()); internalGetMutableMacroCalls().mergeFrom( other.internalGetMacroCalls()); if (extensionsBuilder_ == null) { if (!other.extensions_.isEmpty()) { if (extensions_.isEmpty()) { extensions_ = other.extensions_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensureExtensionsIsMutable(); extensions_.addAll(other.extensions_); } onChanged(); } } else { if (!other.extensions_.isEmpty()) { if (extensionsBuilder_.isEmpty()) { extensionsBuilder_.dispose(); extensionsBuilder_ = null; extensions_ = other.extensions_; bitField0_ = (bitField0_ & ~0x00000008); extensionsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getExtensionsFieldBuilder() : null; } else { extensionsBuilder_.addAllMessages(other.extensions_); } } } 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: { syntaxVersion_ = input.readStringRequireUtf8(); break; } // case 10 case 18: { location_ = input.readStringRequireUtf8(); break; } // case 18 case 24: { int v = input.readInt32(); ensureLineOffsetsIsMutable(); lineOffsets_.addInt(v); break; } // case 24 case 26: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); ensureLineOffsetsIsMutable(); while (input.getBytesUntilLimit() > 0) { lineOffsets_.addInt(input.readInt32()); } input.popLimit(limit); break; } // case 26 case 34: { com.google.protobuf.MapEntry positions__ = input.readMessage( PositionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutablePositions().getMutableMap().put( positions__.getKey(), positions__.getValue()); break; } // case 34 case 42: { com.google.protobuf.MapEntry macroCalls__ = input.readMessage( MacroCallsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableMacroCalls().getMutableMap().put( macroCalls__.getKey(), macroCalls__.getValue()); break; } // case 42 case 50: { dev.cel.expr.SourceInfo.Extension m = input.readMessage( dev.cel.expr.SourceInfo.Extension.parser(), extensionRegistry); if (extensionsBuilder_ == null) { ensureExtensionsIsMutable(); extensions_.add(m); } else { extensionsBuilder_.addMessage(m); } break; } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object syntaxVersion_ = ""; /** *
     * The syntax version of the source, e.g. `cel1`.
     * 
* * string syntax_version = 1; * @return The syntaxVersion. */ public java.lang.String getSyntaxVersion() { java.lang.Object ref = syntaxVersion_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); syntaxVersion_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * The syntax version of the source, e.g. `cel1`.
     * 
* * string syntax_version = 1; * @return The bytes for syntaxVersion. */ public com.google.protobuf.ByteString getSyntaxVersionBytes() { java.lang.Object ref = syntaxVersion_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); syntaxVersion_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * The syntax version of the source, e.g. `cel1`.
     * 
* * string syntax_version = 1; * @param value The syntaxVersion to set. * @return This builder for chaining. */ public Builder setSyntaxVersion( java.lang.String value) { if (value == null) { throw new NullPointerException(); } syntaxVersion_ = value; onChanged(); return this; } /** *
     * The syntax version of the source, e.g. `cel1`.
     * 
* * string syntax_version = 1; * @return This builder for chaining. */ public Builder clearSyntaxVersion() { syntaxVersion_ = getDefaultInstance().getSyntaxVersion(); onChanged(); return this; } /** *
     * The syntax version of the source, e.g. `cel1`.
     * 
* * string syntax_version = 1; * @param value The bytes for syntaxVersion to set. * @return This builder for chaining. */ public Builder setSyntaxVersionBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); syntaxVersion_ = value; onChanged(); return this; } private java.lang.Object location_ = ""; /** *
     * The location name. All position information attached to an expression is
     * relative to this location.
     * The location could be a file, UI element, or similar. For example,
     * `acme/app/AnvilPolicy.cel`.
     * 
* * string location = 2; * @return The location. */ public java.lang.String getLocation() { java.lang.Object ref = location_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); location_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * The location name. All position information attached to an expression is
     * relative to this location.
     * The location could be a file, UI element, or similar. For example,
     * `acme/app/AnvilPolicy.cel`.
     * 
* * string location = 2; * @return The bytes for location. */ public com.google.protobuf.ByteString getLocationBytes() { java.lang.Object ref = location_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); location_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * The location name. All position information attached to an expression is
     * relative to this location.
     * The location could be a file, UI element, or similar. For example,
     * `acme/app/AnvilPolicy.cel`.
     * 
* * string location = 2; * @param value The location to set. * @return This builder for chaining. */ public Builder setLocation( java.lang.String value) { if (value == null) { throw new NullPointerException(); } location_ = value; onChanged(); return this; } /** *
     * The location name. All position information attached to an expression is
     * relative to this location.
     * The location could be a file, UI element, or similar. For example,
     * `acme/app/AnvilPolicy.cel`.
     * 
* * string location = 2; * @return This builder for chaining. */ public Builder clearLocation() { location_ = getDefaultInstance().getLocation(); onChanged(); return this; } /** *
     * The location name. All position information attached to an expression is
     * relative to this location.
     * The location could be a file, UI element, or similar. For example,
     * `acme/app/AnvilPolicy.cel`.
     * 
* * string location = 2; * @param value The bytes for location to set. * @return This builder for chaining. */ public Builder setLocationBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); location_ = value; onChanged(); return this; } private com.google.protobuf.Internal.IntList lineOffsets_ = emptyIntList(); private void ensureLineOffsetsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { lineOffsets_ = mutableCopy(lineOffsets_); bitField0_ |= 0x00000001; } } /** *
     * Monotonically increasing list of code point offsets where newlines
     * `\n` appear.
     * The line number of a given position is the index `i` where for a given
     * `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The
     * column may be derived from `id_positions[id] - line_offsets[i]`.
     * 
* * repeated int32 line_offsets = 3; * @return A list containing the lineOffsets. */ public java.util.List getLineOffsetsList() { return ((bitField0_ & 0x00000001) != 0) ? java.util.Collections.unmodifiableList(lineOffsets_) : lineOffsets_; } /** *
     * Monotonically increasing list of code point offsets where newlines
     * `\n` appear.
     * The line number of a given position is the index `i` where for a given
     * `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The
     * column may be derived from `id_positions[id] - line_offsets[i]`.
     * 
* * repeated int32 line_offsets = 3; * @return The count of lineOffsets. */ public int getLineOffsetsCount() { return lineOffsets_.size(); } /** *
     * Monotonically increasing list of code point offsets where newlines
     * `\n` appear.
     * The line number of a given position is the index `i` where for a given
     * `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The
     * column may be derived from `id_positions[id] - line_offsets[i]`.
     * 
* * repeated int32 line_offsets = 3; * @param index The index of the element to return. * @return The lineOffsets at the given index. */ public int getLineOffsets(int index) { return lineOffsets_.getInt(index); } /** *
     * Monotonically increasing list of code point offsets where newlines
     * `\n` appear.
     * The line number of a given position is the index `i` where for a given
     * `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The
     * column may be derived from `id_positions[id] - line_offsets[i]`.
     * 
* * repeated int32 line_offsets = 3; * @param index The index to set the value at. * @param value The lineOffsets to set. * @return This builder for chaining. */ public Builder setLineOffsets( int index, int value) { ensureLineOffsetsIsMutable(); lineOffsets_.setInt(index, value); onChanged(); return this; } /** *
     * Monotonically increasing list of code point offsets where newlines
     * `\n` appear.
     * The line number of a given position is the index `i` where for a given
     * `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The
     * column may be derived from `id_positions[id] - line_offsets[i]`.
     * 
* * repeated int32 line_offsets = 3; * @param value The lineOffsets to add. * @return This builder for chaining. */ public Builder addLineOffsets(int value) { ensureLineOffsetsIsMutable(); lineOffsets_.addInt(value); onChanged(); return this; } /** *
     * Monotonically increasing list of code point offsets where newlines
     * `\n` appear.
     * The line number of a given position is the index `i` where for a given
     * `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The
     * column may be derived from `id_positions[id] - line_offsets[i]`.
     * 
* * repeated int32 line_offsets = 3; * @param values The lineOffsets to add. * @return This builder for chaining. */ public Builder addAllLineOffsets( java.lang.Iterable values) { ensureLineOffsetsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, lineOffsets_); onChanged(); return this; } /** *
     * Monotonically increasing list of code point offsets where newlines
     * `\n` appear.
     * The line number of a given position is the index `i` where for a given
     * `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The
     * column may be derived from `id_positions[id] - line_offsets[i]`.
     * 
* * repeated int32 line_offsets = 3; * @return This builder for chaining. */ public Builder clearLineOffsets() { lineOffsets_ = emptyIntList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } private com.google.protobuf.MapField< java.lang.Long, java.lang.Integer> positions_; private com.google.protobuf.MapField internalGetPositions() { if (positions_ == null) { return com.google.protobuf.MapField.emptyMapField( PositionsDefaultEntryHolder.defaultEntry); } return positions_; } private com.google.protobuf.MapField internalGetMutablePositions() { onChanged();; if (positions_ == null) { positions_ = com.google.protobuf.MapField.newMapField( PositionsDefaultEntryHolder.defaultEntry); } if (!positions_.isMutable()) { positions_ = positions_.copy(); } return positions_; } public int getPositionsCount() { return internalGetPositions().getMap().size(); } /** *
     * A map from the parse node id (e.g. `Expr.id`) to the code point offset
     * within the source.
     * 
* * map<int64, int32> positions = 4; */ @java.lang.Override public boolean containsPositions( long key) { return internalGetPositions().getMap().containsKey(key); } /** * Use {@link #getPositionsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getPositions() { return getPositionsMap(); } /** *
     * A map from the parse node id (e.g. `Expr.id`) to the code point offset
     * within the source.
     * 
* * map<int64, int32> positions = 4; */ @java.lang.Override public java.util.Map getPositionsMap() { return internalGetPositions().getMap(); } /** *
     * A map from the parse node id (e.g. `Expr.id`) to the code point offset
     * within the source.
     * 
* * map<int64, int32> positions = 4; */ @java.lang.Override public int getPositionsOrDefault( long key, int defaultValue) { java.util.Map map = internalGetPositions().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
     * A map from the parse node id (e.g. `Expr.id`) to the code point offset
     * within the source.
     * 
* * map<int64, int32> positions = 4; */ @java.lang.Override public int getPositionsOrThrow( long key) { java.util.Map map = internalGetPositions().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearPositions() { internalGetMutablePositions().getMutableMap() .clear(); return this; } /** *
     * A map from the parse node id (e.g. `Expr.id`) to the code point offset
     * within the source.
     * 
* * map<int64, int32> positions = 4; */ public Builder removePositions( long key) { internalGetMutablePositions().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutablePositions() { return internalGetMutablePositions().getMutableMap(); } /** *
     * A map from the parse node id (e.g. `Expr.id`) to the code point offset
     * within the source.
     * 
* * map<int64, int32> positions = 4; */ public Builder putPositions( long key, int value) { internalGetMutablePositions().getMutableMap() .put(key, value); return this; } /** *
     * A map from the parse node id (e.g. `Expr.id`) to the code point offset
     * within the source.
     * 
* * map<int64, int32> positions = 4; */ public Builder putAllPositions( java.util.Map values) { internalGetMutablePositions().getMutableMap() .putAll(values); return this; } private com.google.protobuf.MapField< java.lang.Long, dev.cel.expr.Expr> macroCalls_; private com.google.protobuf.MapField internalGetMacroCalls() { if (macroCalls_ == null) { return com.google.protobuf.MapField.emptyMapField( MacroCallsDefaultEntryHolder.defaultEntry); } return macroCalls_; } private com.google.protobuf.MapField internalGetMutableMacroCalls() { onChanged();; if (macroCalls_ == null) { macroCalls_ = com.google.protobuf.MapField.newMapField( MacroCallsDefaultEntryHolder.defaultEntry); } if (!macroCalls_.isMutable()) { macroCalls_ = macroCalls_.copy(); } return macroCalls_; } public int getMacroCallsCount() { return internalGetMacroCalls().getMap().size(); } /** *
     * A map from the parse node id where a macro replacement was made to the
     * call `Expr` that resulted in a macro expansion.
     * For example, `has(value.field)` is a function call that is replaced by a
     * `test_only` field selection in the AST. Likewise, the call
     * `list.exists(e, e > 10)` translates to a comprehension expression. The key
     * in the map corresponds to the expression id of the expanded macro, and the
     * value is the call `Expr` that was replaced.
     * 
* * map<int64, .cel.expr.Expr> macro_calls = 5; */ @java.lang.Override public boolean containsMacroCalls( long key) { return internalGetMacroCalls().getMap().containsKey(key); } /** * Use {@link #getMacroCallsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getMacroCalls() { return getMacroCallsMap(); } /** *
     * A map from the parse node id where a macro replacement was made to the
     * call `Expr` that resulted in a macro expansion.
     * For example, `has(value.field)` is a function call that is replaced by a
     * `test_only` field selection in the AST. Likewise, the call
     * `list.exists(e, e > 10)` translates to a comprehension expression. The key
     * in the map corresponds to the expression id of the expanded macro, and the
     * value is the call `Expr` that was replaced.
     * 
* * map<int64, .cel.expr.Expr> macro_calls = 5; */ @java.lang.Override public java.util.Map getMacroCallsMap() { return internalGetMacroCalls().getMap(); } /** *
     * A map from the parse node id where a macro replacement was made to the
     * call `Expr` that resulted in a macro expansion.
     * For example, `has(value.field)` is a function call that is replaced by a
     * `test_only` field selection in the AST. Likewise, the call
     * `list.exists(e, e > 10)` translates to a comprehension expression. The key
     * in the map corresponds to the expression id of the expanded macro, and the
     * value is the call `Expr` that was replaced.
     * 
* * map<int64, .cel.expr.Expr> macro_calls = 5; */ @java.lang.Override public dev.cel.expr.Expr getMacroCallsOrDefault( long key, dev.cel.expr.Expr defaultValue) { java.util.Map map = internalGetMacroCalls().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
     * A map from the parse node id where a macro replacement was made to the
     * call `Expr` that resulted in a macro expansion.
     * For example, `has(value.field)` is a function call that is replaced by a
     * `test_only` field selection in the AST. Likewise, the call
     * `list.exists(e, e > 10)` translates to a comprehension expression. The key
     * in the map corresponds to the expression id of the expanded macro, and the
     * value is the call `Expr` that was replaced.
     * 
* * map<int64, .cel.expr.Expr> macro_calls = 5; */ @java.lang.Override public dev.cel.expr.Expr getMacroCallsOrThrow( long key) { java.util.Map map = internalGetMacroCalls().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearMacroCalls() { internalGetMutableMacroCalls().getMutableMap() .clear(); return this; } /** *
     * A map from the parse node id where a macro replacement was made to the
     * call `Expr` that resulted in a macro expansion.
     * For example, `has(value.field)` is a function call that is replaced by a
     * `test_only` field selection in the AST. Likewise, the call
     * `list.exists(e, e > 10)` translates to a comprehension expression. The key
     * in the map corresponds to the expression id of the expanded macro, and the
     * value is the call `Expr` that was replaced.
     * 
* * map<int64, .cel.expr.Expr> macro_calls = 5; */ public Builder removeMacroCalls( long key) { internalGetMutableMacroCalls().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableMacroCalls() { return internalGetMutableMacroCalls().getMutableMap(); } /** *
     * A map from the parse node id where a macro replacement was made to the
     * call `Expr` that resulted in a macro expansion.
     * For example, `has(value.field)` is a function call that is replaced by a
     * `test_only` field selection in the AST. Likewise, the call
     * `list.exists(e, e > 10)` translates to a comprehension expression. The key
     * in the map corresponds to the expression id of the expanded macro, and the
     * value is the call `Expr` that was replaced.
     * 
* * map<int64, .cel.expr.Expr> macro_calls = 5; */ public Builder putMacroCalls( long key, dev.cel.expr.Expr value) { if (value == null) { throw new NullPointerException("map value"); } internalGetMutableMacroCalls().getMutableMap() .put(key, value); return this; } /** *
     * A map from the parse node id where a macro replacement was made to the
     * call `Expr` that resulted in a macro expansion.
     * For example, `has(value.field)` is a function call that is replaced by a
     * `test_only` field selection in the AST. Likewise, the call
     * `list.exists(e, e > 10)` translates to a comprehension expression. The key
     * in the map corresponds to the expression id of the expanded macro, and the
     * value is the call `Expr` that was replaced.
     * 
* * map<int64, .cel.expr.Expr> macro_calls = 5; */ public Builder putAllMacroCalls( java.util.Map values) { internalGetMutableMacroCalls().getMutableMap() .putAll(values); return this; } private java.util.List extensions_ = java.util.Collections.emptyList(); private void ensureExtensionsIsMutable() { if (!((bitField0_ & 0x00000008) != 0)) { extensions_ = new java.util.ArrayList(extensions_); bitField0_ |= 0x00000008; } } private com.google.protobuf.RepeatedFieldBuilderV3< dev.cel.expr.SourceInfo.Extension, dev.cel.expr.SourceInfo.Extension.Builder, dev.cel.expr.SourceInfo.ExtensionOrBuilder> extensionsBuilder_; /** *
     * A list of tags for extensions that were used while parsing or type checking
     * the source expression. For example, optimizations that require special
     * runtime support may be specified.
     * These are used to check feature support between components in separate
     * implementations. This can be used to either skip redundant work or
     * report an error if the extension is unsupported.
     * 
* * repeated .cel.expr.SourceInfo.Extension extensions = 6; */ public java.util.List getExtensionsList() { if (extensionsBuilder_ == null) { return java.util.Collections.unmodifiableList(extensions_); } else { return extensionsBuilder_.getMessageList(); } } /** *
     * A list of tags for extensions that were used while parsing or type checking
     * the source expression. For example, optimizations that require special
     * runtime support may be specified.
     * These are used to check feature support between components in separate
     * implementations. This can be used to either skip redundant work or
     * report an error if the extension is unsupported.
     * 
* * repeated .cel.expr.SourceInfo.Extension extensions = 6; */ public int getExtensionsCount() { if (extensionsBuilder_ == null) { return extensions_.size(); } else { return extensionsBuilder_.getCount(); } } /** *
     * A list of tags for extensions that were used while parsing or type checking
     * the source expression. For example, optimizations that require special
     * runtime support may be specified.
     * These are used to check feature support between components in separate
     * implementations. This can be used to either skip redundant work or
     * report an error if the extension is unsupported.
     * 
* * repeated .cel.expr.SourceInfo.Extension extensions = 6; */ public dev.cel.expr.SourceInfo.Extension getExtensions(int index) { if (extensionsBuilder_ == null) { return extensions_.get(index); } else { return extensionsBuilder_.getMessage(index); } } /** *
     * A list of tags for extensions that were used while parsing or type checking
     * the source expression. For example, optimizations that require special
     * runtime support may be specified.
     * These are used to check feature support between components in separate
     * implementations. This can be used to either skip redundant work or
     * report an error if the extension is unsupported.
     * 
* * repeated .cel.expr.SourceInfo.Extension extensions = 6; */ public Builder setExtensions( int index, dev.cel.expr.SourceInfo.Extension value) { if (extensionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureExtensionsIsMutable(); extensions_.set(index, value); onChanged(); } else { extensionsBuilder_.setMessage(index, value); } return this; } /** *
     * A list of tags for extensions that were used while parsing or type checking
     * the source expression. For example, optimizations that require special
     * runtime support may be specified.
     * These are used to check feature support between components in separate
     * implementations. This can be used to either skip redundant work or
     * report an error if the extension is unsupported.
     * 
* * repeated .cel.expr.SourceInfo.Extension extensions = 6; */ public Builder setExtensions( int index, dev.cel.expr.SourceInfo.Extension.Builder builderForValue) { if (extensionsBuilder_ == null) { ensureExtensionsIsMutable(); extensions_.set(index, builderForValue.build()); onChanged(); } else { extensionsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * A list of tags for extensions that were used while parsing or type checking
     * the source expression. For example, optimizations that require special
     * runtime support may be specified.
     * These are used to check feature support between components in separate
     * implementations. This can be used to either skip redundant work or
     * report an error if the extension is unsupported.
     * 
* * repeated .cel.expr.SourceInfo.Extension extensions = 6; */ public Builder addExtensions(dev.cel.expr.SourceInfo.Extension value) { if (extensionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureExtensionsIsMutable(); extensions_.add(value); onChanged(); } else { extensionsBuilder_.addMessage(value); } return this; } /** *
     * A list of tags for extensions that were used while parsing or type checking
     * the source expression. For example, optimizations that require special
     * runtime support may be specified.
     * These are used to check feature support between components in separate
     * implementations. This can be used to either skip redundant work or
     * report an error if the extension is unsupported.
     * 
* * repeated .cel.expr.SourceInfo.Extension extensions = 6; */ public Builder addExtensions( int index, dev.cel.expr.SourceInfo.Extension value) { if (extensionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureExtensionsIsMutable(); extensions_.add(index, value); onChanged(); } else { extensionsBuilder_.addMessage(index, value); } return this; } /** *
     * A list of tags for extensions that were used while parsing or type checking
     * the source expression. For example, optimizations that require special
     * runtime support may be specified.
     * These are used to check feature support between components in separate
     * implementations. This can be used to either skip redundant work or
     * report an error if the extension is unsupported.
     * 
* * repeated .cel.expr.SourceInfo.Extension extensions = 6; */ public Builder addExtensions( dev.cel.expr.SourceInfo.Extension.Builder builderForValue) { if (extensionsBuilder_ == null) { ensureExtensionsIsMutable(); extensions_.add(builderForValue.build()); onChanged(); } else { extensionsBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * A list of tags for extensions that were used while parsing or type checking
     * the source expression. For example, optimizations that require special
     * runtime support may be specified.
     * These are used to check feature support between components in separate
     * implementations. This can be used to either skip redundant work or
     * report an error if the extension is unsupported.
     * 
* * repeated .cel.expr.SourceInfo.Extension extensions = 6; */ public Builder addExtensions( int index, dev.cel.expr.SourceInfo.Extension.Builder builderForValue) { if (extensionsBuilder_ == null) { ensureExtensionsIsMutable(); extensions_.add(index, builderForValue.build()); onChanged(); } else { extensionsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * A list of tags for extensions that were used while parsing or type checking
     * the source expression. For example, optimizations that require special
     * runtime support may be specified.
     * These are used to check feature support between components in separate
     * implementations. This can be used to either skip redundant work or
     * report an error if the extension is unsupported.
     * 
* * repeated .cel.expr.SourceInfo.Extension extensions = 6; */ public Builder addAllExtensions( java.lang.Iterable values) { if (extensionsBuilder_ == null) { ensureExtensionsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, extensions_); onChanged(); } else { extensionsBuilder_.addAllMessages(values); } return this; } /** *
     * A list of tags for extensions that were used while parsing or type checking
     * the source expression. For example, optimizations that require special
     * runtime support may be specified.
     * These are used to check feature support between components in separate
     * implementations. This can be used to either skip redundant work or
     * report an error if the extension is unsupported.
     * 
* * repeated .cel.expr.SourceInfo.Extension extensions = 6; */ public Builder clearExtensions() { if (extensionsBuilder_ == null) { extensions_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { extensionsBuilder_.clear(); } return this; } /** *
     * A list of tags for extensions that were used while parsing or type checking
     * the source expression. For example, optimizations that require special
     * runtime support may be specified.
     * These are used to check feature support between components in separate
     * implementations. This can be used to either skip redundant work or
     * report an error if the extension is unsupported.
     * 
* * repeated .cel.expr.SourceInfo.Extension extensions = 6; */ public Builder removeExtensions(int index) { if (extensionsBuilder_ == null) { ensureExtensionsIsMutable(); extensions_.remove(index); onChanged(); } else { extensionsBuilder_.remove(index); } return this; } /** *
     * A list of tags for extensions that were used while parsing or type checking
     * the source expression. For example, optimizations that require special
     * runtime support may be specified.
     * These are used to check feature support between components in separate
     * implementations. This can be used to either skip redundant work or
     * report an error if the extension is unsupported.
     * 
* * repeated .cel.expr.SourceInfo.Extension extensions = 6; */ public dev.cel.expr.SourceInfo.Extension.Builder getExtensionsBuilder( int index) { return getExtensionsFieldBuilder().getBuilder(index); } /** *
     * A list of tags for extensions that were used while parsing or type checking
     * the source expression. For example, optimizations that require special
     * runtime support may be specified.
     * These are used to check feature support between components in separate
     * implementations. This can be used to either skip redundant work or
     * report an error if the extension is unsupported.
     * 
* * repeated .cel.expr.SourceInfo.Extension extensions = 6; */ public dev.cel.expr.SourceInfo.ExtensionOrBuilder getExtensionsOrBuilder( int index) { if (extensionsBuilder_ == null) { return extensions_.get(index); } else { return extensionsBuilder_.getMessageOrBuilder(index); } } /** *
     * A list of tags for extensions that were used while parsing or type checking
     * the source expression. For example, optimizations that require special
     * runtime support may be specified.
     * These are used to check feature support between components in separate
     * implementations. This can be used to either skip redundant work or
     * report an error if the extension is unsupported.
     * 
* * repeated .cel.expr.SourceInfo.Extension extensions = 6; */ public java.util.List getExtensionsOrBuilderList() { if (extensionsBuilder_ != null) { return extensionsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(extensions_); } } /** *
     * A list of tags for extensions that were used while parsing or type checking
     * the source expression. For example, optimizations that require special
     * runtime support may be specified.
     * These are used to check feature support between components in separate
     * implementations. This can be used to either skip redundant work or
     * report an error if the extension is unsupported.
     * 
* * repeated .cel.expr.SourceInfo.Extension extensions = 6; */ public dev.cel.expr.SourceInfo.Extension.Builder addExtensionsBuilder() { return getExtensionsFieldBuilder().addBuilder( dev.cel.expr.SourceInfo.Extension.getDefaultInstance()); } /** *
     * A list of tags for extensions that were used while parsing or type checking
     * the source expression. For example, optimizations that require special
     * runtime support may be specified.
     * These are used to check feature support between components in separate
     * implementations. This can be used to either skip redundant work or
     * report an error if the extension is unsupported.
     * 
* * repeated .cel.expr.SourceInfo.Extension extensions = 6; */ public dev.cel.expr.SourceInfo.Extension.Builder addExtensionsBuilder( int index) { return getExtensionsFieldBuilder().addBuilder( index, dev.cel.expr.SourceInfo.Extension.getDefaultInstance()); } /** *
     * A list of tags for extensions that were used while parsing or type checking
     * the source expression. For example, optimizations that require special
     * runtime support may be specified.
     * These are used to check feature support between components in separate
     * implementations. This can be used to either skip redundant work or
     * report an error if the extension is unsupported.
     * 
* * repeated .cel.expr.SourceInfo.Extension extensions = 6; */ public java.util.List getExtensionsBuilderList() { return getExtensionsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< dev.cel.expr.SourceInfo.Extension, dev.cel.expr.SourceInfo.Extension.Builder, dev.cel.expr.SourceInfo.ExtensionOrBuilder> getExtensionsFieldBuilder() { if (extensionsBuilder_ == null) { extensionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< dev.cel.expr.SourceInfo.Extension, dev.cel.expr.SourceInfo.Extension.Builder, dev.cel.expr.SourceInfo.ExtensionOrBuilder>( extensions_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); extensions_ = null; } return extensionsBuilder_; } @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.SourceInfo) } // @@protoc_insertion_point(class_scope:cel.expr.SourceInfo) private static final dev.cel.expr.SourceInfo DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new dev.cel.expr.SourceInfo(); } public static dev.cel.expr.SourceInfo getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public SourceInfo 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.SourceInfo getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy