Class SourceInfo

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.api.expr.v1alpha1.SourceInfo
All Implemented Interfaces:
SourceInfoOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

public final class SourceInfo extends com.google.protobuf.GeneratedMessage implements SourceInfoOrBuilder
 Source information collected at parse time.
 
Protobuf type google.api.expr.v1alpha1.SourceInfo
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    Source information collected at parse time.
    private static final class 
     
    private static final class 
     

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage

    com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,T>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage

    com.google.protobuf.AbstractMessage.BuilderParent

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final SourceInfo
     
    static final int
     
    private com.google.protobuf.Internal.IntList
     
    private int
     
    private Object
     
    static final int
     
    static final int
     
    private com.google.protobuf.MapField<Long,Expr>
     
    private byte
     
    private static final com.google.protobuf.Parser<SourceInfo>
     
    private com.google.protobuf.MapField<Long,Integer>
     
    static final int
     
    private static final long
     
    static final int
     
    private Object
     

    Fields inherited from class com.google.protobuf.GeneratedMessage

    alwaysUseFieldBuilders, unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessage

    memoizedSize

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
    private
    SourceInfo(com.google.protobuf.GeneratedMessage.Builder<?> builder)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    A map from the parse node id where a macro replacement was made to the call `Expr` that resulted in a macro expansion.
    boolean
    A map from the parse node id (e.g.
    boolean
     
    static SourceInfo
     
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    int
    getLineOffsets(int index)
    Monotonically increasing list of code point offsets where newlines `\n` appear.
    int
    Monotonically increasing list of code point offsets where newlines `\n` appear.
    Monotonically increasing list of code point offsets where newlines `\n` appear.
    The location name.
    com.google.protobuf.ByteString
    The location name.
    Deprecated.
    int
    A map from the parse node id where a macro replacement was made to the call `Expr` that resulted in a macro expansion.
    A map from the parse node id where a macro replacement was made to the call `Expr` that resulted in a macro expansion.
    getMacroCallsOrDefault(long key, Expr defaultValue)
    A map from the parse node id where a macro replacement was made to the call `Expr` that resulted in a macro expansion.
    A map from the parse node id where a macro replacement was made to the call `Expr` that resulted in a macro expansion.
    com.google.protobuf.Parser<SourceInfo>
     
    Deprecated.
    int
    A map from the parse node id (e.g.
    A map from the parse node id (e.g.
    int
    getPositionsOrDefault(long key, int defaultValue)
    A map from the parse node id (e.g.
    int
    A map from the parse node id (e.g.
    int
     
    The syntax version of the source, e.g.
    com.google.protobuf.ByteString
    The syntax version of the source, e.g.
    int
     
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    private com.google.protobuf.MapField<Long,Expr>
     
    protected com.google.protobuf.MapFieldReflectionAccessor
     
    private com.google.protobuf.MapField<Long,Integer>
     
    final boolean
     
     
     
     
    newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
     
    static SourceInfo
     
    static SourceInfo
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static SourceInfo
    parseFrom(byte[] data)
     
    static SourceInfo
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static SourceInfo
    parseFrom(com.google.protobuf.ByteString data)
     
    static SourceInfo
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static SourceInfo
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    static SourceInfo
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static SourceInfo
     
    static SourceInfo
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static SourceInfo
     
    static SourceInfo
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<SourceInfo>
     
     
    void
    writeTo(com.google.protobuf.CodedOutputStream output)
     

    Methods inherited from class com.google.protobuf.GeneratedMessage

    canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag

    Methods inherited from class com.google.protobuf.AbstractMessage

    findInitializationErrors, getInitializationErrorString, hashFields, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLite

    toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • SYNTAX_VERSION_FIELD_NUMBER

      public static final int SYNTAX_VERSION_FIELD_NUMBER
      See Also:
    • syntaxVersion_

      private volatile Object syntaxVersion_
    • LOCATION_FIELD_NUMBER

      public static final int LOCATION_FIELD_NUMBER
      See Also:
    • location_

      private volatile Object location_
    • LINE_OFFSETS_FIELD_NUMBER

      public static final int LINE_OFFSETS_FIELD_NUMBER
      See Also:
    • lineOffsets_

      private com.google.protobuf.Internal.IntList lineOffsets_
    • lineOffsetsMemoizedSerializedSize

      private int lineOffsetsMemoizedSerializedSize
    • POSITIONS_FIELD_NUMBER

      public static final int POSITIONS_FIELD_NUMBER
      See Also:
    • positions_

      private com.google.protobuf.MapField<Long,Integer> positions_
    • MACRO_CALLS_FIELD_NUMBER

      public static final int MACRO_CALLS_FIELD_NUMBER
      See Also:
    • macroCalls_

      private com.google.protobuf.MapField<Long,Expr> macroCalls_
    • memoizedIsInitialized

      private byte memoizedIsInitialized
    • DEFAULT_INSTANCE

      private static final SourceInfo DEFAULT_INSTANCE
    • PARSER

      private static final com.google.protobuf.Parser<SourceInfo> PARSER
  • Constructor Details

    • SourceInfo

      private SourceInfo(com.google.protobuf.GeneratedMessage.Builder<?> builder)
    • SourceInfo

      private SourceInfo()
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getSyntaxVersion

      public String getSyntaxVersion()
       The syntax version of the source, e.g. `cel1`.
       
      string syntax_version = 1;
      Specified by:
      getSyntaxVersion in interface SourceInfoOrBuilder
      Returns:
      The syntaxVersion.
    • getSyntaxVersionBytes

      public com.google.protobuf.ByteString getSyntaxVersionBytes()
       The syntax version of the source, e.g. `cel1`.
       
      string syntax_version = 1;
      Specified by:
      getSyntaxVersionBytes in interface SourceInfoOrBuilder
      Returns:
      The bytes for syntaxVersion.
    • getLocation

      public String getLocation()
       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;
      Specified by:
      getLocation in interface SourceInfoOrBuilder
      Returns:
      The location.
    • getLocationBytes

      public com.google.protobuf.ByteString getLocationBytes()
       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;
      Specified by:
      getLocationBytes in interface SourceInfoOrBuilder
      Returns:
      The bytes for location.
    • getLineOffsetsList

      public List<Integer> getLineOffsetsList()
       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 derivd from `id_positions[id] - line_offsets[i]`.
       
      repeated int32 line_offsets = 3;
      Specified by:
      getLineOffsetsList in interface SourceInfoOrBuilder
      Returns:
      A list containing the lineOffsets.
    • getLineOffsetsCount

      public int getLineOffsetsCount()
       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 derivd from `id_positions[id] - line_offsets[i]`.
       
      repeated int32 line_offsets = 3;
      Specified by:
      getLineOffsetsCount in interface SourceInfoOrBuilder
      Returns:
      The count of lineOffsets.
    • getLineOffsets

      public int getLineOffsets(int 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 derivd from `id_positions[id] - line_offsets[i]`.
       
      repeated int32 line_offsets = 3;
      Specified by:
      getLineOffsets in interface SourceInfoOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The lineOffsets at the given index.
    • internalGetPositions

      private com.google.protobuf.MapField<Long,Integer> internalGetPositions()
    • getPositionsCount

      public int getPositionsCount()
      Description copied from interface: SourceInfoOrBuilder
       A map from the parse node id (e.g. `Expr.id`) to the code point offset
       within the source.
       
      map<int64, int32> positions = 4;
      Specified by:
      getPositionsCount in interface SourceInfoOrBuilder
    • containsPositions

      public boolean containsPositions(long key)
       A map from the parse node id (e.g. `Expr.id`) to the code point offset
       within the source.
       
      map<int64, int32> positions = 4;
      Specified by:
      containsPositions in interface SourceInfoOrBuilder
    • getPositions

      @Deprecated public Map<Long,Integer> getPositions()
      Deprecated.
      Use getPositionsMap() instead.
      Specified by:
      getPositions in interface SourceInfoOrBuilder
    • getPositionsMap

      public Map<Long,Integer> 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;
      Specified by:
      getPositionsMap in interface SourceInfoOrBuilder
    • getPositionsOrDefault

      public int getPositionsOrDefault(long key, int 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;
      Specified by:
      getPositionsOrDefault in interface SourceInfoOrBuilder
    • getPositionsOrThrow

      public int getPositionsOrThrow(long key)
       A map from the parse node id (e.g. `Expr.id`) to the code point offset
       within the source.
       
      map<int64, int32> positions = 4;
      Specified by:
      getPositionsOrThrow in interface SourceInfoOrBuilder
    • internalGetMacroCalls

      private com.google.protobuf.MapField<Long,Expr> internalGetMacroCalls()
    • getMacroCallsCount

      public int getMacroCallsCount()
      Description copied from interface: SourceInfoOrBuilder
       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, .google.api.expr.v1alpha1.Expr> macro_calls = 5;
      Specified by:
      getMacroCallsCount in interface SourceInfoOrBuilder
    • containsMacroCalls

      public boolean containsMacroCalls(long key)
       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, .google.api.expr.v1alpha1.Expr> macro_calls = 5;
      Specified by:
      containsMacroCalls in interface SourceInfoOrBuilder
    • getMacroCalls

      @Deprecated public Map<Long,Expr> getMacroCalls()
      Deprecated.
      Use getMacroCallsMap() instead.
      Specified by:
      getMacroCalls in interface SourceInfoOrBuilder
    • getMacroCallsMap

      public Map<Long,Expr> 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, .google.api.expr.v1alpha1.Expr> macro_calls = 5;
      Specified by:
      getMacroCallsMap in interface SourceInfoOrBuilder
    • getMacroCallsOrDefault

      public Expr getMacroCallsOrDefault(long key, Expr 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, .google.api.expr.v1alpha1.Expr> macro_calls = 5;
      Specified by:
      getMacroCallsOrDefault in interface SourceInfoOrBuilder
    • getMacroCallsOrThrow

      public Expr getMacroCallsOrThrow(long key)
       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, .google.api.expr.v1alpha1.Expr> macro_calls = 5;
      Specified by:
      getMacroCallsOrThrow in interface SourceInfoOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static SourceInfo parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static SourceInfo parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static SourceInfo parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static SourceInfo parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static SourceInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static SourceInfo parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static SourceInfo parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static SourceInfo parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static SourceInfo parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static SourceInfo parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static SourceInfo parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static SourceInfo parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public SourceInfo.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static SourceInfo.Builder newBuilder()
    • newBuilder

      public static SourceInfo.Builder newBuilder(SourceInfo prototype)
    • toBuilder

      public SourceInfo.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected SourceInfo.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static SourceInfo getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<SourceInfo> parser()
    • getParserForType

      public com.google.protobuf.Parser<SourceInfo> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public SourceInfo getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder