Documentation

SourceInfo extends Message
in package

Source information collected at parse time.

Generated from protobuf message google.api.expr.v1alpha1.SourceInfo

Table of Contents

Properties

$location  : mixed
The location name. All position information attached to an expression is relative to this location.
$syntax_version  : mixed
The syntax version of the source, e.g. `cel1`.
$line_offsets  : mixed
Monotonically increasing list of code point offsets where newlines `\n` appear.
$macro_calls  : mixed
A map from the parse node id where a macro replacement was made to the call `Expr` that resulted in a macro expansion.
$positions  : mixed
A map from the parse node id (e.g. `Expr.id`) to the code point offset within the source.

Methods

__construct()  : mixed
Constructor.
getLineOffsets()  : RepeatedField
Monotonically increasing list of code point offsets where newlines `\n` appear.
getLocation()  : string
The location name. All position information attached to an expression is relative to this location.
getMacroCalls()  : MapField
A map from the parse node id where a macro replacement was made to the call `Expr` that resulted in a macro expansion.
getPositions()  : MapField
A map from the parse node id (e.g. `Expr.id`) to the code point offset within the source.
getSyntaxVersion()  : string
The syntax version of the source, e.g. `cel1`.
setLineOffsets()  : $this
Monotonically increasing list of code point offsets where newlines `\n` appear.
setLocation()  : $this
The location name. All position information attached to an expression is relative to this location.
setMacroCalls()  : $this
A map from the parse node id where a macro replacement was made to the call `Expr` that resulted in a macro expansion.
setPositions()  : $this
A map from the parse node id (e.g. `Expr.id`) to the code point offset within the source.
setSyntaxVersion()  : $this
The syntax version of the source, e.g. `cel1`.

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"];

$syntax_version

The syntax version of the source, e.g. `cel1`.

protected mixed $syntax_version = ''

Generated from protobuf field string syntax_version = 1 [json_name = "syntaxVersion"];

$line_offsets

Monotonically increasing list of code point offsets where newlines `\n` 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"];

$macro_calls

A map from the parse node id where a macro replacement was made to the call `Expr` that resulted in a macro expansion.

private mixed $macro_calls

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.

Generated from protobuf field map<int64, .google.api.expr.v1alpha1.Expr> macro_calls = 5 [json_name = "macroCalls"];

$positions

A map from the parse node id (e.g. `Expr.id`) to the code point offset within the source.

private mixed $positions

Generated from protobuf field map<int64, 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 $syntax_version
      The syntax version of the source, e.g. `cel1`.
@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 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]`.
@type array|\Google\Protobuf\Internal\MapField $positions
      A map from the parse node id (e.g. `Expr.id`) to the code point offset
      within the source.
@type array|\Google\Protobuf\Internal\MapField $macro_calls
      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.

}

getLineOffsets()

Monotonically increasing list of code point offsets where newlines `\n` 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
RepeatedField

getLocation()

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
string

getMacroCalls()

A map from the parse node id where a macro replacement was made to the call `Expr` that resulted in a macro expansion.

public getMacroCalls() : MapField

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.

Generated from protobuf field map<int64, .google.api.expr.v1alpha1.Expr> macro_calls = 5 [json_name = "macroCalls"];

Return values
MapField

getPositions()

A map from the parse node id (e.g. `Expr.id`) to the code point offset within the source.

public getPositions() : MapField

Generated from protobuf field map<int64, int32> positions = 4 [json_name = "positions"];

Return values
MapField

getSyntaxVersion()

The syntax version of the source, e.g. `cel1`.

public getSyntaxVersion() : string

Generated from protobuf field string syntax_version = 1 [json_name = "syntaxVersion"];

Return values
string

setLineOffsets()

Monotonically increasing list of code point offsets where newlines `\n` 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
$this

setLocation()

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
$this

setMacroCalls()

A map from the parse node id where a macro replacement was made to the call `Expr` that resulted in a macro expansion.

public setMacroCalls(array<string|int, mixed>|MapField $var) : $this

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.

Generated from protobuf field map<int64, .google.api.expr.v1alpha1.Expr> macro_calls = 5 [json_name = "macroCalls"];

Parameters
$var : array<string|int, mixed>|MapField
Return values
$this

setPositions()

A map from the parse node id (e.g. `Expr.id`) to the code point offset within the source.

public setPositions(array<string|int, mixed>|MapField $var) : $this

Generated from protobuf field map<int64, int32> positions = 4 [json_name = "positions"];

Parameters
$var : array<string|int, mixed>|MapField
Return values
$this

setSyntaxVersion()

The syntax version of the source, e.g. `cel1`.

public setSyntaxVersion(string $var) : $this

Generated from protobuf field string syntax_version = 1 [json_name = "syntaxVersion"];

Parameters
$var : string
Return values
$this

        
On this page

Search results