Package com.google.api.expr.v1alpha1
Class SourceInfo.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<SourceInfo,SourceInfo.Builder>
com.google.api.expr.v1alpha1.SourceInfo.Builder
- All Implemented Interfaces:
SourceInfoOrBuilder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,Cloneable
- Enclosing class:
- SourceInfo
public static final class SourceInfo.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<SourceInfo,SourceInfo.Builder>
implements SourceInfoOrBuilder
Source information collected at parse time.Protobuf type
google.api.expr.v1alpha1.SourceInfo-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescriptionaddAllExtensions(Iterable<? extends SourceInfo.Extension> values) A list of tags for extensions that were used while parsing or type checking the source expression.addAllLineOffsets(Iterable<? extends Integer> values) Monotonically increasing list of code point offsets where newlines `\n` appear.addExtensions(int index, SourceInfo.Extension value) A list of tags for extensions that were used while parsing or type checking the source expression.addExtensions(int index, SourceInfo.Extension.Builder builderForValue) 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.addExtensions(SourceInfo.Extension.Builder builderForValue) A list of tags for extensions that were used while parsing or type checking the source expression.addLineOffsets(int value) Monotonically increasing list of code point offsets where newlines `\n` appear.A list of tags for extensions that were used while parsing or type checking the source expression.Monotonically increasing list of code point offsets where newlines `\n` appear.The location name.The syntax version of the source, e.g.booleancontainsMacroCalls(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.booleancontainsPositions(long key) A map from the parse node id (e.g.getExtensions(int index) A list of tags for extensions that were used while parsing or type checking the source expression.intA 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.intgetLineOffsets(int index) Monotonically increasing list of code point offsets where newlines `\n` appear.intMonotonically 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.ByteStringThe location name.Deprecated.intA 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.intA map from the parse node id (e.g.A map from the parse node id (e.g.intgetPositionsOrDefault(long key, int defaultValue) A map from the parse node id (e.g.intgetPositionsOrThrow(long key) A map from the parse node id (e.g.The syntax version of the source, e.g.com.google.protobuf.ByteStringThe syntax version of the source, e.g.putAllMacroCalls(Map<Long, Expr> values) A map from the parse node id where a macro replacement was made to the call `Expr` that resulted in a macro expansion.putAllPositions(Map<Long, Integer> values) A map from the parse node id (e.g.putMacroCalls(long key, Expr value) A map from the parse node id where a macro replacement was made to the call `Expr` that resulted in a macro expansion.putPositions(long key, int value) A map from the parse node id (e.g.removeExtensions(int index) A list of tags for extensions that were used while parsing or type checking the source expression.removeMacroCalls(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.removePositions(long key) A map from the parse node id (e.g.setExtensions(int index, SourceInfo.Extension value) A list of tags for extensions that were used while parsing or type checking the source expression.setExtensions(int index, SourceInfo.Extension.Builder builderForValue) A list of tags for extensions that were used while parsing or type checking the source expression.setLineOffsets(int index, int value) Monotonically increasing list of code point offsets where newlines `\n` appear.setLocation(String value) The location name.setLocationBytes(com.google.protobuf.ByteString value) The location name.setSyntaxVersion(String value) The syntax version of the source, e.g.setSyntaxVersionBytes(com.google.protobuf.ByteString value) The syntax version of the source, e.g.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFromMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
getSyntaxVersion
The syntax version of the source, e.g. `cel1`.
string syntax_version = 1 [json_name = "syntaxVersion"];- Specified by:
getSyntaxVersionin 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:
getSyntaxVersionBytesin interfaceSourceInfoOrBuilder- Returns:
- The bytes for syntaxVersion.
-
setSyntaxVersion
The syntax version of the source, e.g. `cel1`.
string syntax_version = 1 [json_name = "syntaxVersion"];- Parameters:
value- The syntaxVersion to set.- Returns:
- This builder for chaining.
-
clearSyntaxVersion
The syntax version of the source, e.g. `cel1`.
string syntax_version = 1 [json_name = "syntaxVersion"];- Returns:
- This builder for chaining.
-
setSyntaxVersionBytes
The syntax version of the source, e.g. `cel1`.
string syntax_version = 1 [json_name = "syntaxVersion"];- Parameters:
value- The bytes for syntaxVersion to set.- Returns:
- This builder for chaining.
-
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:
getLocationin 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:
getLocationBytesin interfaceSourceInfoOrBuilder- Returns:
- The bytes for location.
-
setLocation
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"];- Parameters:
value- The location to set.- Returns:
- This builder for chaining.
-
clearLocation
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"];- Returns:
- This builder for chaining.
-
setLocationBytes
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"];- Parameters:
value- The bytes for location to set.- Returns:
- This builder for chaining.
-
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:
getLineOffsetsListin 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:
getLineOffsetsCountin 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:
getLineOffsetsin interfaceSourceInfoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The lineOffsets at the given index.
-
setLineOffsets
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"];- Parameters:
value- The lineOffsets to set.- Returns:
- This builder for chaining.
-
addLineOffsets
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"];- Parameters:
value- The lineOffsets to add.- Returns:
- This builder for chaining.
-
addAllLineOffsets
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"];- Parameters:
values- The lineOffsets to add.- Returns:
- This builder for chaining.
-
clearLineOffsets
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"];- Returns:
- This builder for chaining.
-
getPositionsCount
public int getPositionsCount()Description copied from interface:SourceInfoOrBuilderA 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:
getPositionsCountin 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:
containsPositionsin interfaceSourceInfoOrBuilder
-
clearPositions
-
removePositions
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"]; -
getPositions
Deprecated.UsegetPositionsMap()instead.- Specified by:
getPositionsin 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:
getPositionsMapin 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:
getPositionsOrDefaultin 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:
getPositionsOrThrowin interfaceSourceInfoOrBuilder
-
putPositions
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"]; -
putAllPositions
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"]; -
getMacroCallsCount
public int getMacroCallsCount()Description copied from interface:SourceInfoOrBuilderA 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:
getMacroCallsCountin 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:
containsMacroCallsin interfaceSourceInfoOrBuilder
-
clearMacroCalls
-
removeMacroCalls
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"]; -
getMacroCalls
Deprecated.UsegetMacroCallsMap()instead.- Specified by:
getMacroCallsin 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:
getMacroCallsMapin 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:
getMacroCallsOrDefaultin 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:
getMacroCallsOrThrowin interfaceSourceInfoOrBuilder
-
putMacroCalls
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"]; -
putAllMacroCalls
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"]; -
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:
getExtensionsListin interfaceSourceInfoOrBuilder
-
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:
getExtensionsCountin 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:
getExtensionsin interfaceSourceInfoOrBuilder
-
setExtensions
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"]; -
setExtensions
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"]; -
addExtensions
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"]; -
addExtensions
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"]; -
addExtensions
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"]; -
addExtensions
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"]; -
addAllExtensions
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"]; -
clearExtensions
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"]; -
removeExtensions
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"];
-