Reference documentation and code samples for the Cloud Security Command Center V1 API class Google::Type::Expr.
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.
(::String) — Optional. Description of the expression. This is a longer text which
describes the expression, e.g. when hovered over it in a UI.
#description=
defdescription=(value)->::String
Parameter
value (::String) — Optional. Description of the expression. This is a longer text which
describes the expression, e.g. when hovered over it in a UI.
Returns
(::String) — Optional. Description of the expression. This is a longer text which
describes the expression, e.g. when hovered over it in a UI.
#expression
defexpression()->::String
Returns
(::String) — Textual representation of an expression in Common Expression Language
syntax.
#expression=
defexpression=(value)->::String
Parameter
value (::String) — Textual representation of an expression in Common Expression Language
syntax.
Returns
(::String) — Textual representation of an expression in Common Expression Language
syntax.
#location
deflocation()->::String
Returns
(::String) — Optional. String indicating the location of the expression for error
reporting, e.g. a file name and a position in the file.
#location=
deflocation=(value)->::String
Parameter
value (::String) — Optional. String indicating the location of the expression for error
reporting, e.g. a file name and a position in the file.
Returns
(::String) — Optional. String indicating the location of the expression for error
reporting, e.g. a file name and a position in the file.
#title
deftitle()->::String
Returns
(::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.
#title=
deftitle=(value)->::String
Parameter
value (::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.
Returns
(::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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Cloud Security Command Center V1 API - Class Google::Type::Expr (v1.5.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.5.0 (latest)](/ruby/docs/reference/google-cloud-security_center-v1/latest/Google-Type-Expr)\n- [1.4.1](/ruby/docs/reference/google-cloud-security_center-v1/1.4.1/Google-Type-Expr)\n- [1.3.0](/ruby/docs/reference/google-cloud-security_center-v1/1.3.0/Google-Type-Expr)\n- [1.2.0](/ruby/docs/reference/google-cloud-security_center-v1/1.2.0/Google-Type-Expr)\n- [1.1.0](/ruby/docs/reference/google-cloud-security_center-v1/1.1.0/Google-Type-Expr)\n- [1.0.0](/ruby/docs/reference/google-cloud-security_center-v1/1.0.0/Google-Type-Expr)\n- [0.41.0](/ruby/docs/reference/google-cloud-security_center-v1/0.41.0/Google-Type-Expr)\n- [0.40.0](/ruby/docs/reference/google-cloud-security_center-v1/0.40.0/Google-Type-Expr)\n- [0.39.0](/ruby/docs/reference/google-cloud-security_center-v1/0.39.0/Google-Type-Expr)\n- [0.38.0](/ruby/docs/reference/google-cloud-security_center-v1/0.38.0/Google-Type-Expr)\n- [0.37.0](/ruby/docs/reference/google-cloud-security_center-v1/0.37.0/Google-Type-Expr)\n- [0.36.0](/ruby/docs/reference/google-cloud-security_center-v1/0.36.0/Google-Type-Expr)\n- [0.35.0](/ruby/docs/reference/google-cloud-security_center-v1/0.35.0/Google-Type-Expr)\n- [0.34.2](/ruby/docs/reference/google-cloud-security_center-v1/0.34.2/Google-Type-Expr)\n- [0.33.0](/ruby/docs/reference/google-cloud-security_center-v1/0.33.0/Google-Type-Expr)\n- [0.32.0](/ruby/docs/reference/google-cloud-security_center-v1/0.32.0/Google-Type-Expr)\n- [0.31.1](/ruby/docs/reference/google-cloud-security_center-v1/0.31.1/Google-Type-Expr)\n- [0.30.0](/ruby/docs/reference/google-cloud-security_center-v1/0.30.0/Google-Type-Expr)\n- [0.29.1](/ruby/docs/reference/google-cloud-security_center-v1/0.29.1/Google-Type-Expr)\n- [0.28.0](/ruby/docs/reference/google-cloud-security_center-v1/0.28.0/Google-Type-Expr)\n- [0.27.0](/ruby/docs/reference/google-cloud-security_center-v1/0.27.0/Google-Type-Expr)\n- [0.26.0](/ruby/docs/reference/google-cloud-security_center-v1/0.26.0/Google-Type-Expr)\n- [0.25.1](/ruby/docs/reference/google-cloud-security_center-v1/0.25.1/Google-Type-Expr)\n- [0.24.0](/ruby/docs/reference/google-cloud-security_center-v1/0.24.0/Google-Type-Expr)\n- [0.23.0](/ruby/docs/reference/google-cloud-security_center-v1/0.23.0/Google-Type-Expr)\n- [0.22.0](/ruby/docs/reference/google-cloud-security_center-v1/0.22.0/Google-Type-Expr)\n- [0.21.0](/ruby/docs/reference/google-cloud-security_center-v1/0.21.0/Google-Type-Expr)\n- [0.20.0](/ruby/docs/reference/google-cloud-security_center-v1/0.20.0/Google-Type-Expr)\n- [0.19.0](/ruby/docs/reference/google-cloud-security_center-v1/0.19.0/Google-Type-Expr)\n- [0.18.0](/ruby/docs/reference/google-cloud-security_center-v1/0.18.0/Google-Type-Expr)\n- [0.17.0](/ruby/docs/reference/google-cloud-security_center-v1/0.17.0/Google-Type-Expr)\n- [0.16.0](/ruby/docs/reference/google-cloud-security_center-v1/0.16.0/Google-Type-Expr)\n- [0.15.0](/ruby/docs/reference/google-cloud-security_center-v1/0.15.0/Google-Type-Expr)\n- [0.14.0](/ruby/docs/reference/google-cloud-security_center-v1/0.14.0/Google-Type-Expr)\n- [0.13.0](/ruby/docs/reference/google-cloud-security_center-v1/0.13.0/Google-Type-Expr)\n- [0.12.1](/ruby/docs/reference/google-cloud-security_center-v1/0.12.1/Google-Type-Expr)\n- [0.11.1](/ruby/docs/reference/google-cloud-security_center-v1/0.11.1/Google-Type-Expr) \nReference documentation and code samples for the Cloud Security Command Center V1 API class Google::Type::Expr.\n\nRepresents a textual expression in the Common Expression Language (CEL)\nsyntax. CEL is a C-like expression language. The syntax and semantics of CEL\nare documented at \u003chttps://github.com/google/cel-spec\u003e.\n\n\nExample (Comparison): \n\n title: \"Summary size limit\"\n description: \"Determines if a summary is less than 100 chars\"\n expression: \"document.summary.size() \u003c 100\"\n\nExample (Equality): \n\n title: \"Requestor is owner\"\n description: \"Determines if requestor is the document owner\"\n expression: \"document.owner == request.auth.claims.email\"\n\nExample (Logic): \n\n title: \"Public documents\"\n description: \"Determine whether the document should be publicly visible\"\n expression: \"document.type != 'private' && document.type != 'internal'\"\n\nExample (Data Manipulation): \n\n title: \"Notification string\"\n description: \"Create a notification string with a timestamp.\"\n expression: \"'New message received at ' + string(document.create_time)\"\n\n\u003cbr /\u003e\n\nThe exact variables and functions that may be referenced within an expression\nare determined by the service that evaluates it. See the service\ndocumentation for additional information. \n\nInherits\n--------\n\n- [Object](./Google-Cloud-SecurityCenter-V1-Kubernetes-Object) \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #description\n\n def description() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.\n\n### #description=\n\n def description=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. \n**Returns**\n\n- (::String) --- Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.\n\n### #expression\n\n def expression() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Textual representation of an expression in Common Expression Language syntax.\n\n### #expression=\n\n def expression=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Textual representation of an expression in Common Expression Language syntax. \n**Returns**\n\n- (::String) --- Textual representation of an expression in Common Expression Language syntax.\n\n### #location\n\n def location() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.\n\n### #location=\n\n def location=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. \n**Returns**\n\n- (::String) --- Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.\n\n### #title\n\n def title() -\u003e ::String\n\n**Returns**\n\n- (::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.\n\n### #title=\n\n def title=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::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. \n**Returns**\n\n- (::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."]]