Package com.google.api.expr.v1alpha1
Class SourceInfo
java.lang.Object
com.google.protobuf.AbstractMessageLite<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite<SourceInfo,SourceInfo.Builder>
com.google.api.expr.v1alpha1.SourceInfo
- All Implemented Interfaces:
SourceInfoOrBuilder
,com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
public final class SourceInfo
extends com.google.protobuf.GeneratedMessageLite<SourceInfo,SourceInfo.Builder>
implements SourceInfoOrBuilder
Source information collected at parse time.Protobuf type
google.api.expr.v1alpha1.SourceInfo
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Source information collected at parse time.static final class
An extension that was requested for the source expression.static interface
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageLite
com.google.protobuf.GeneratedMessageLite.DefaultInstanceBasedParser<T extends com.google.protobuf.GeneratedMessageLite<T,
?>>, com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageLite.GeneratedExtension<ContainingType extends com.google.protobuf.MessageLite, Type extends Object>, com.google.protobuf.GeneratedMessageLite.MethodToInvoke, com.google.protobuf.GeneratedMessageLite.SerializedForm Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
Fields inherited from class com.google.protobuf.GeneratedMessageLite
unknownFields
Fields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode
-
Method Summary
Modifier and TypeMethodDescriptionboolean
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.protected final Object
dynamicMethod
(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) static SourceInfo
getExtensions
(int index) A list of tags for extensions that were used while parsing or type checking the source expression.int
A list of tags for extensions that were used while parsing or type checking the source expression.A list of tags for extensions that were used while parsing or type checking the source expression.getExtensionsOrBuilder
(int index) A list of tags for extensions that were used while parsing or type checking the source expression.List<? extends SourceInfo.ExtensionOrBuilder>
A list of tags for extensions that were used while parsing or type checking the source expression.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.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.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
getPositionsOrThrow
(long key) A map from the parse node id (e.g.The syntax version of the source, e.g.com.google.protobuf.ByteString
The syntax version of the source, e.g.static SourceInfo.Builder
static SourceInfo.Builder
newBuilder
(SourceInfo prototype) 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
(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 SourceInfo
parseFrom
(ByteBuffer data) static SourceInfo
parseFrom
(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<SourceInfo>
parser()
Methods inherited from class com.google.protobuf.GeneratedMessageLite
createBuilder, createBuilder, dynamicMethod, dynamicMethod, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstanceForType, getParserForType, getSerializedSize, hashCode, isInitialized, isInitialized, makeImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newMessageInfo, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parseUnknownField, registerDefaultInstance, toBuilder, toString, writeTo
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.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Field Details
-
SYNTAX_VERSION_FIELD_NUMBER
public static final int SYNTAX_VERSION_FIELD_NUMBER- See Also:
-
LOCATION_FIELD_NUMBER
public static final int LOCATION_FIELD_NUMBER- See Also:
-
LINE_OFFSETS_FIELD_NUMBER
public static final int LINE_OFFSETS_FIELD_NUMBER- See Also:
-
POSITIONS_FIELD_NUMBER
public static final int POSITIONS_FIELD_NUMBER- See Also:
-
MACRO_CALLS_FIELD_NUMBER
public static final int MACRO_CALLS_FIELD_NUMBER- See Also:
-
EXTENSIONS_FIELD_NUMBER
public static final int EXTENSIONS_FIELD_NUMBER- See Also:
-
-
Method Details
-
getSyntaxVersion
The syntax version of the source, e.g. `cel1`.
string syntax_version = 1 [json_name = "syntaxVersion"];
- Specified by:
getSyntaxVersion
in interfaceSourceInfoOrBuilder
- Returns:
- The syntaxVersion.
-
getSyntaxVersionBytes
public com.google.protobuf.ByteString getSyntaxVersionBytes()The syntax version of the source, e.g. `cel1`.
string syntax_version = 1 [json_name = "syntaxVersion"];
- Specified by:
getSyntaxVersionBytes
in interfaceSourceInfoOrBuilder
- Returns:
- The bytes for syntaxVersion.
-
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 [json_name = "location"];
- Specified by:
getLocation
in interfaceSourceInfoOrBuilder
- 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 [json_name = "location"];
- Specified by:
getLocationBytes
in interfaceSourceInfoOrBuilder
- Returns:
- The bytes for location.
-
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 [json_name = "lineOffsets"];
- Specified by:
getLineOffsetsList
in interfaceSourceInfoOrBuilder
- 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 [json_name = "lineOffsets"];
- Specified by:
getLineOffsetsCount
in interfaceSourceInfoOrBuilder
- 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 [json_name = "lineOffsets"];
- Specified by:
getLineOffsets
in interfaceSourceInfoOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The lineOffsets at the given index.
-
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 [json_name = "positions"];
- Specified by:
getPositionsCount
in interfaceSourceInfoOrBuilder
-
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 [json_name = "positions"];
- Specified by:
containsPositions
in interfaceSourceInfoOrBuilder
-
getPositions
Deprecated.UsegetPositionsMap()
instead.- Specified by:
getPositions
in interfaceSourceInfoOrBuilder
-
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 [json_name = "positions"];
- Specified by:
getPositionsMap
in interfaceSourceInfoOrBuilder
-
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 [json_name = "positions"];
- Specified by:
getPositionsOrDefault
in interfaceSourceInfoOrBuilder
-
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 [json_name = "positions"];
- Specified by:
getPositionsOrThrow
in interfaceSourceInfoOrBuilder
-
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 [json_name = "macroCalls"];
- Specified by:
getMacroCallsCount
in interfaceSourceInfoOrBuilder
-
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 [json_name = "macroCalls"];
- Specified by:
containsMacroCalls
in interfaceSourceInfoOrBuilder
-
getMacroCalls
Deprecated.UsegetMacroCallsMap()
instead.- Specified by:
getMacroCalls
in interfaceSourceInfoOrBuilder
-
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 [json_name = "macroCalls"];
- Specified by:
getMacroCallsMap
in interfaceSourceInfoOrBuilder
-
getMacroCallsOrDefault
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 [json_name = "macroCalls"];
- Specified by:
getMacroCallsOrDefault
in interfaceSourceInfoOrBuilder
-
getMacroCallsOrThrow
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 [json_name = "macroCalls"];
- Specified by:
getMacroCallsOrThrow
in interfaceSourceInfoOrBuilder
-
getExtensionsList
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 .google.api.expr.v1alpha1.SourceInfo.Extension extensions = 6 [json_name = "extensions"];
- Specified by:
getExtensionsList
in interfaceSourceInfoOrBuilder
-
getExtensionsOrBuilderList
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 .google.api.expr.v1alpha1.SourceInfo.Extension extensions = 6 [json_name = "extensions"];
-
getExtensionsCount
public int getExtensionsCount()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 .google.api.expr.v1alpha1.SourceInfo.Extension extensions = 6 [json_name = "extensions"];
- Specified by:
getExtensionsCount
in interfaceSourceInfoOrBuilder
-
getExtensions
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 .google.api.expr.v1alpha1.SourceInfo.Extension extensions = 6 [json_name = "extensions"];
- Specified by:
getExtensions
in interfaceSourceInfoOrBuilder
-
getExtensionsOrBuilder
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 .google.api.expr.v1alpha1.SourceInfo.Extension extensions = 6 [json_name = "extensions"];
-
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
- Throws:
IOException
-
parseFrom
public static SourceInfo parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static SourceInfo parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static SourceInfo parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilder
-
newBuilder
-
dynamicMethod
protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) - Specified by:
dynamicMethod
in classcom.google.protobuf.GeneratedMessageLite<SourceInfo,
SourceInfo.Builder>
-
getDefaultInstance
-
parser
-