Package google.type

索引

  • Expr(メッセージ)

Expr

Common Expression Language(CEL)構文のテキスト式を表します。CEL は C に似た式言語です。CEL の構文とセマンティクスは、https://github.com/google/cel-spec に記載されています。

例(比較):

title: "Summary size limit"
description: "Determines if a summary is less than 100 chars"
expression: "document.summary.size() < 100"

例(同等):

title: "Requestor is owner"
description: "Determines if requestor is the document owner"
expression: "document.owner == request.auth.claims.email"

例(論理):

title: "Public documents"
description: "Determine whether the document should be publicly visible"
expression: "document.type != 'private' && document.type != 'internal'"

例(データ操作):

title: "Notification string"
description: "Create a notification string with a timestamp."
expression: "'New message received at ' + string(document.create_time)"

式内で参照できる正確な変数と関数は、式を評価するサービスによって決定されます。詳細については、サービスのドキュメントをご覧ください。

フィールド
expression

string

Common Expression Language 構文による式のテキスト表現。

title

string

省略可。式のタイトル。式の目的を説明する短い文字列です。たとえば、式を入力できる UI でこれを使用します。

description

string

省略可。式の説明。式を説明する長いテキストです。たとえば、UI で式にカーソルを合わせたときに表示されます。

location

string

省略可。エラー報告用に式の場所を示す文字列。たとえば、ファイル名とファイル内の位置です。