gcp_bigquery_client/model/
expr.rs

1use serde::{Deserialize, Serialize};
2
3/// Expr : Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression
4/// language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example
5/// (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100
6/// chars\" expression: \"document.summary.size() < 100\" Example (Equality): title: \"Requestor is owner\"
7/// description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\"
8/// Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\"
9/// expression: \"document.type != 'private' && document.type != 'internal'\" Example (Data Manipulation):
10/// title: \"Notification string\" description: \"Create a notification string with a timestamp.\"
11/// expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that
12/// may be referenced within an expression are determined by the service that evaluates it. See the service
13/// documentation for additional information.
14
15#[derive(Debug, Default, Clone, Serialize, Deserialize)]
16#[serde(rename_all = "camelCase")]
17pub struct Expr {
18    /// Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
19    #[serde(skip_serializing_if = "Option::is_none")]
20    pub description: Option<String>,
21    /// Textual representation of an expression in Common Expression Language syntax.
22    #[serde(skip_serializing_if = "Option::is_none")]
23    pub expression: Option<String>,
24    /// Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
25    #[serde(skip_serializing_if = "Option::is_none")]
26    pub location: Option<String>,
27    /// 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.
28    #[serde(skip_serializing_if = "Option::is_none")]
29    pub title: Option<String>,
30}