public final class SourceInfo extends com.google.protobuf.GeneratedMessageV3 implements SourceInfoOrBuilder
Source information collected at parse time.Protobuf type
google.api.expr.v1alpha1.SourceInfo
Modifier and Type | Class and Description |
---|---|
static class |
SourceInfo.Builder
Source information collected at parse time.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
Modifier and Type | Field and Description |
---|---|
static int |
LINE_OFFSETS_FIELD_NUMBER |
static int |
LOCATION_FIELD_NUMBER |
static int |
MACRO_CALLS_FIELD_NUMBER |
static int |
POSITIONS_FIELD_NUMBER |
static int |
SYNTAX_VERSION_FIELD_NUMBER |
Modifier and Type | Method and Description |
---|---|
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.
|
boolean |
containsPositions(long key)
A map from the parse node id (e.g.
|
boolean |
equals(Object obj) |
static SourceInfo |
getDefaultInstance() |
SourceInfo |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
int |
getLineOffsets(int index)
Monotonically increasing list of character offsets where newlines appear.
|
int |
getLineOffsetsCount()
Monotonically increasing list of character offsets where newlines appear.
|
List<Integer> |
getLineOffsetsList()
Monotonically increasing list of character offsets where newlines appear.
|
String |
getLocation()
The location name.
|
com.google.protobuf.ByteString |
getLocationBytes()
The location name.
|
Map<Long,Expr> |
getMacroCalls()
Deprecated.
|
int |
getMacroCallsCount()
A map from the parse node id where a macro replacement was made to the
call `Expr` that resulted in a macro expansion.
|
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.
|
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.
|
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.
|
com.google.protobuf.Parser<SourceInfo> |
getParserForType() |
Map<Long,Integer> |
getPositions()
Deprecated.
|
int |
getPositionsCount()
A map from the parse node id (e.g.
|
Map<Long,Integer> |
getPositionsMap()
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 |
getPositionsOrThrow(long key)
A map from the parse node id (e.g.
|
int |
getSerializedSize() |
String |
getSyntaxVersion()
The syntax version of the source, e.g.
|
com.google.protobuf.ByteString |
getSyntaxVersionBytes()
The syntax version of the source, e.g.
|
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected com.google.protobuf.MapField |
internalGetMapField(int number) |
boolean |
isInitialized() |
static SourceInfo.Builder |
newBuilder() |
static SourceInfo.Builder |
newBuilder(SourceInfo prototype) |
SourceInfo.Builder |
newBuilderForType() |
protected SourceInfo.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static SourceInfo |
parseDelimitedFrom(InputStream input) |
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(ByteBuffer data) |
static SourceInfo |
parseFrom(ByteBuffer 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 |
parseFrom(InputStream input) |
static SourceInfo |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<SourceInfo> |
parser() |
SourceInfo.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public static final int SYNTAX_VERSION_FIELD_NUMBER
public static final int LOCATION_FIELD_NUMBER
public static final int LINE_OFFSETS_FIELD_NUMBER
public static final int POSITIONS_FIELD_NUMBER
public static final int MACRO_CALLS_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance
in class com.google.protobuf.GeneratedMessageV3
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields
in interface com.google.protobuf.MessageOrBuilder
getUnknownFields
in class com.google.protobuf.GeneratedMessageV3
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.MapField internalGetMapField(int number)
internalGetMapField
in class com.google.protobuf.GeneratedMessageV3
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class com.google.protobuf.GeneratedMessageV3
public String getSyntaxVersion()
The syntax version of the source, e.g. `cel1`.
string syntax_version = 1;
getSyntaxVersion
in interface SourceInfoOrBuilder
public com.google.protobuf.ByteString getSyntaxVersionBytes()
The syntax version of the source, e.g. `cel1`.
string syntax_version = 1;
getSyntaxVersionBytes
in interface SourceInfoOrBuilder
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;
getLocation
in interface SourceInfoOrBuilder
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;
getLocationBytes
in interface SourceInfoOrBuilder
public List<Integer> getLineOffsetsList()
Monotonically increasing list of character offsets where newlines 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;
getLineOffsetsList
in interface SourceInfoOrBuilder
public int getLineOffsetsCount()
Monotonically increasing list of character offsets where newlines 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;
getLineOffsetsCount
in interface SourceInfoOrBuilder
public int getLineOffsets(int index)
Monotonically increasing list of character offsets where newlines 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;
getLineOffsets
in interface SourceInfoOrBuilder
public int getPositionsCount()
SourceInfoOrBuilder
A map from the parse node id (e.g. `Expr.id`) to the character offset within source.
map<int64, int32> positions = 4;
getPositionsCount
in interface SourceInfoOrBuilder
public boolean containsPositions(long key)
A map from the parse node id (e.g. `Expr.id`) to the character offset within source.
map<int64, int32> positions = 4;
containsPositions
in interface SourceInfoOrBuilder
@Deprecated public Map<Long,Integer> getPositions()
getPositionsMap()
instead.getPositions
in interface SourceInfoOrBuilder
public Map<Long,Integer> getPositionsMap()
A map from the parse node id (e.g. `Expr.id`) to the character offset within source.
map<int64, int32> positions = 4;
getPositionsMap
in interface SourceInfoOrBuilder
public int getPositionsOrDefault(long key, int defaultValue)
A map from the parse node id (e.g. `Expr.id`) to the character offset within source.
map<int64, int32> positions = 4;
getPositionsOrDefault
in interface SourceInfoOrBuilder
public int getPositionsOrThrow(long key)
A map from the parse node id (e.g. `Expr.id`) to the character offset within source.
map<int64, int32> positions = 4;
getPositionsOrThrow
in interface SourceInfoOrBuilder
public int getMacroCallsCount()
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;
getMacroCallsCount
in interface SourceInfoOrBuilder
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;
containsMacroCalls
in interface SourceInfoOrBuilder
@Deprecated public Map<Long,Expr> getMacroCalls()
getMacroCallsMap()
instead.getMacroCalls
in interface SourceInfoOrBuilder
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;
getMacroCallsMap
in interface SourceInfoOrBuilder
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;
getMacroCallsOrDefault
in interface SourceInfoOrBuilder
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;
getMacroCallsOrThrow
in interface SourceInfoOrBuilder
public final boolean isInitialized()
isInitialized
in interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
in class com.google.protobuf.GeneratedMessageV3
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
writeTo
in interface com.google.protobuf.MessageLite
writeTo
in class com.google.protobuf.GeneratedMessageV3
IOException
public int getSerializedSize()
getSerializedSize
in interface com.google.protobuf.MessageLite
getSerializedSize
in class com.google.protobuf.GeneratedMessageV3
public boolean equals(Object obj)
equals
in interface com.google.protobuf.Message
equals
in class com.google.protobuf.AbstractMessage
public int hashCode()
hashCode
in interface com.google.protobuf.Message
hashCode
in class com.google.protobuf.AbstractMessage
public static SourceInfo parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static SourceInfo parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static SourceInfo parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static SourceInfo parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static SourceInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static SourceInfo parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static SourceInfo parseFrom(InputStream input) throws IOException
IOException
public static SourceInfo parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static SourceInfo parseDelimitedFrom(InputStream input) throws IOException
IOException
public static SourceInfo parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static SourceInfo parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOException
public static SourceInfo parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public SourceInfo.Builder newBuilderForType()
newBuilderForType
in interface com.google.protobuf.Message
newBuilderForType
in interface com.google.protobuf.MessageLite
public static SourceInfo.Builder newBuilder()
public static SourceInfo.Builder newBuilder(SourceInfo prototype)
public SourceInfo.Builder toBuilder()
toBuilder
in interface com.google.protobuf.Message
toBuilder
in interface com.google.protobuf.MessageLite
protected SourceInfo.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType
in class com.google.protobuf.GeneratedMessageV3
public static SourceInfo getDefaultInstance()
public static com.google.protobuf.Parser<SourceInfo> parser()
public com.google.protobuf.Parser<SourceInfo> getParserForType()
getParserForType
in interface com.google.protobuf.Message
getParserForType
in interface com.google.protobuf.MessageLite
getParserForType
in class com.google.protobuf.GeneratedMessageV3
public SourceInfo getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder
Copyright © 2018–2021 The Envoy Project. All rights reserved.