Package com.google.api.expr.v1beta1
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.v1beta1.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.v1beta1.SourceInfo
-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance
-
Method Summary
Modifier and TypeMethodDescriptionaddAllLineOffsets
(Iterable<? extends Integer> values) Monotonically increasing list of character offsets where newlines appear.addLineOffsets
(int value) Monotonically increasing list of character offsets where newlines appear.Monotonically increasing list of character offsets where newlines appear.The location name.boolean
containsPositions
(int key) A map from the parse node id (e.g.int
getLineOffsets
(int index) Monotonically increasing list of character offsets where newlines appear.int
Monotonically increasing list of character offsets where newlines appear.Monotonically increasing list of character offsets where newlines appear.The location name.com.google.protobuf.ByteString
The location name.Deprecated.int
A map from the parse node id (e.g.A map from the parse node id (e.g.int
getPositionsOrDefault
(int key, int defaultValue) A map from the parse node id (e.g.int
getPositionsOrThrow
(int key) A map from the parse node id (e.g.putAllPositions
(Map<Integer, Integer> values) A map from the parse node id (e.g.putPositions
(int key, int value) A map from the parse node id (e.g.removePositions
(int key) A map from the parse node id (e.g.setLineOffsets
(int index, int value) Monotonically increasing list of character offsets where newlines appear.setLocation
(String value) The location name.setLocationBytes
(com.google.protobuf.ByteString value) The location name.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFrom
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
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.
-
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 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 [json_name = "lineOffsets"];
- Specified by:
getLineOffsetsList
in interfaceSourceInfoOrBuilder
- Returns:
- A list containing the lineOffsets.
-
getLineOffsetsCount
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 [json_name = "lineOffsets"];
- Specified by:
getLineOffsetsCount
in interfaceSourceInfoOrBuilder
- Returns:
- The count of lineOffsets.
-
getLineOffsets
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 [json_name = "lineOffsets"];
- Specified by:
getLineOffsets
in interfaceSourceInfoOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The lineOffsets at the given index.
-
setLineOffsets
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 [json_name = "lineOffsets"];
- Parameters:
value
- The lineOffsets to set.- Returns:
- This builder for chaining.
-
addLineOffsets
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 [json_name = "lineOffsets"];
- Parameters:
value
- The lineOffsets to add.- Returns:
- This builder for chaining.
-
addAllLineOffsets
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 [json_name = "lineOffsets"];
- Parameters:
values
- The lineOffsets to add.- Returns:
- This builder for chaining.
-
clearLineOffsets
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 [json_name = "lineOffsets"];
- Returns:
- This builder for chaining.
-
getPositionsCount
public int getPositionsCount()Description copied from interface:SourceInfoOrBuilder
A map from the parse node id (e.g. `Expr.id`) to the character offset within source.
map<int32, int32> positions = 4 [json_name = "positions"];
- Specified by:
getPositionsCount
in interfaceSourceInfoOrBuilder
-
containsPositions
public boolean containsPositions(int key) A map from the parse node id (e.g. `Expr.id`) to the character offset within source.
map<int32, int32> positions = 4 [json_name = "positions"];
- Specified by:
containsPositions
in interfaceSourceInfoOrBuilder
-
clearPositions
-
removePositions
A map from the parse node id (e.g. `Expr.id`) to the character offset within source.
map<int32, int32> positions = 4 [json_name = "positions"];
-
getPositions
Deprecated.UsegetPositionsMap()
instead.- Specified by:
getPositions
in interfaceSourceInfoOrBuilder
-
getPositionsMap
A map from the parse node id (e.g. `Expr.id`) to the character offset within source.
map<int32, int32> positions = 4 [json_name = "positions"];
- Specified by:
getPositionsMap
in interfaceSourceInfoOrBuilder
-
getPositionsOrDefault
public int getPositionsOrDefault(int key, int defaultValue) A map from the parse node id (e.g. `Expr.id`) to the character offset within source.
map<int32, int32> positions = 4 [json_name = "positions"];
- Specified by:
getPositionsOrDefault
in interfaceSourceInfoOrBuilder
-
getPositionsOrThrow
public int getPositionsOrThrow(int key) A map from the parse node id (e.g. `Expr.id`) to the character offset within source.
map<int32, int32> positions = 4 [json_name = "positions"];
- Specified by:
getPositionsOrThrow
in interfaceSourceInfoOrBuilder
-
putPositions
A map from the parse node id (e.g. `Expr.id`) to the character offset within source.
map<int32, int32> positions = 4 [json_name = "positions"];
-
putAllPositions
A map from the parse node id (e.g. `Expr.id`) to the character offset within source.
map<int32, int32> positions = 4 [json_name = "positions"];
-