SourceInfo
extends Message
in package
Source information collected at parse time.
Generated from protobuf message google.api.expr.v1beta1.SourceInfo
Table of Contents
Properties
- $location : mixed
- The location name. All position information attached to an expression is relative to this location.
- $line_offsets : mixed
- Monotonically increasing list of character offsets where newlines appear.
- $positions : mixed
- A map from the parse node id (e.g. `Expr.id`) to the character offset within source.
Methods
- __construct() : mixed
- Constructor.
- getLineOffsets() : RepeatedField
- Monotonically increasing list of character offsets where newlines appear.
- getLocation() : string
- The location name. All position information attached to an expression is relative to this location.
- getPositions() : MapField
- A map from the parse node id (e.g. `Expr.id`) to the character offset within source.
- setLineOffsets() : $this
- Monotonically increasing list of character offsets where newlines appear.
- setLocation() : $this
- The location name. All position information attached to an expression is relative to this location.
- setPositions() : $this
- A map from the parse node id (e.g. `Expr.id`) to the character offset within source.
Properties
$location
The location name. All position information attached to an expression is relative to this location.
protected
mixed
$location
= ''
The location could be a file, UI element, or similar. For example,
acme/app/AnvilPolicy.cel.
Generated from protobuf field string location = 2 [json_name = "location"];
$line_offsets
Monotonically increasing list of character offsets where newlines appear.
private
mixed
$line_offsets
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].
Generated from protobuf field repeated int32 line_offsets = 3 [json_name = "lineOffsets"];
$positions
A map from the parse node id (e.g. `Expr.id`) to the character offset within source.
private
mixed
$positions
Generated from protobuf field map<int32, int32> positions = 4 [json_name = "positions"];
Methods
__construct()
Constructor.
public
__construct([array<string|int, mixed> $data = NULL ]) : mixed
Parameters
- $data : array<string|int, mixed> = NULL
-
{ Optional. Data for populating the Message object.
@type string $location 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`. @type array<int>|\Google\Protobuf\Internal\RepeatedField $line_offsets 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]`. @type array|\Google\Protobuf\Internal\MapField $positions A map from the parse node id (e.g. `Expr.id`) to the character offset within source.}
getLineOffsets()
Monotonically increasing list of character offsets where newlines appear.
public
getLineOffsets() : RepeatedField
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].
Generated from protobuf field repeated int32 line_offsets = 3 [json_name = "lineOffsets"];
Return values
RepeatedFieldgetLocation()
The location name. All position information attached to an expression is relative to this location.
public
getLocation() : string
The location could be a file, UI element, or similar. For example,
acme/app/AnvilPolicy.cel.
Generated from protobuf field string location = 2 [json_name = "location"];
Return values
stringgetPositions()
A map from the parse node id (e.g. `Expr.id`) to the character offset within source.
public
getPositions() : MapField
Generated from protobuf field map<int32, int32> positions = 4 [json_name = "positions"];
Return values
MapFieldsetLineOffsets()
Monotonically increasing list of character offsets where newlines appear.
public
setLineOffsets(array<string|int, int>|RepeatedField $var) : $this
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].
Generated from protobuf field repeated int32 line_offsets = 3 [json_name = "lineOffsets"];
Parameters
- $var : array<string|int, int>|RepeatedField
Return values
$thissetLocation()
The location name. All position information attached to an expression is relative to this location.
public
setLocation(string $var) : $this
The location could be a file, UI element, or similar. For example,
acme/app/AnvilPolicy.cel.
Generated from protobuf field string location = 2 [json_name = "location"];
Parameters
- $var : string
Return values
$thissetPositions()
A map from the parse node id (e.g. `Expr.id`) to the character offset within source.
public
setPositions(array<string|int, mixed>|MapField $var) : $this
Generated from protobuf field map<int32, int32> positions = 4 [json_name = "positions"];
Parameters
- $var : array<string|int, mixed>|MapField