Expr
extends Message
in package
Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec.
Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
Generated from protobuf message google.type.Expr
Table of Contents
Properties
- $description : mixed
- Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
- $expression : mixed
- Textual representation of an expression in Common Expression Language syntax.
- $location : mixed
- Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
- $title : mixed
- Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Methods
- __construct() : mixed
- Constructor.
- getDescription() : string
- Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
- getExpression() : string
- Textual representation of an expression in Common Expression Language syntax.
- getLocation() : string
- Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
- getTitle() : string
- Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
- setDescription() : $this
- Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
- setExpression() : $this
- Textual representation of an expression in Common Expression Language syntax.
- setLocation() : $this
- Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
- setTitle() : $this
- Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Properties
$description
Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
protected
mixed
$description
= ''
Generated from protobuf field string description = 3 [json_name = "description"];
$expression
Textual representation of an expression in Common Expression Language syntax.
protected
mixed
$expression
= ''
Generated from protobuf field string expression = 1 [json_name = "expression"];
$location
Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
protected
mixed
$location
= ''
Generated from protobuf field string location = 4 [json_name = "location"];
$title
Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
protected
mixed
$title
= ''
Generated from protobuf field string title = 2 [json_name = "title"];
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 $expression Textual representation of an expression in Common Expression Language syntax. @type string $title Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. @type string $description Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. @type string $location Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.}
getDescription()
Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
public
getDescription() : string
Generated from protobuf field string description = 3 [json_name = "description"];
Return values
stringgetExpression()
Textual representation of an expression in Common Expression Language syntax.
public
getExpression() : string
Generated from protobuf field string expression = 1 [json_name = "expression"];
Return values
stringgetLocation()
Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
public
getLocation() : string
Generated from protobuf field string location = 4 [json_name = "location"];
Return values
stringgetTitle()
Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
public
getTitle() : string
Generated from protobuf field string title = 2 [json_name = "title"];
Return values
stringsetDescription()
Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
public
setDescription(string $var) : $this
Generated from protobuf field string description = 3 [json_name = "description"];
Parameters
- $var : string
Return values
$thissetExpression()
Textual representation of an expression in Common Expression Language syntax.
public
setExpression(string $var) : $this
Generated from protobuf field string expression = 1 [json_name = "expression"];
Parameters
- $var : string
Return values
$thissetLocation()
Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
public
setLocation(string $var) : $this
Generated from protobuf field string location = 4 [json_name = "location"];
Parameters
- $var : string
Return values
$thissetTitle()
Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
public
setTitle(string $var) : $this
Generated from protobuf field string title = 2 [json_name = "title"];
Parameters
- $var : string