public sealed class Expr : IMessage<Expr>, IEquatable<Expr>, IDeepCloneable<Expr>, IBufferMessage, IMessage
Reference documentation and code samples for the Compute Engine v1 API class 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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-08 UTC."],[[["\u003cp\u003eThe latest version of the \u003ccode\u003eExpr\u003c/code\u003e class within the Google.Cloud.Compute.V1 API is version 3.6.0, with numerous prior versions available dating back to 1.0.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eExpr\u003c/code\u003e class represents a textual expression using the Common Expression Language (CEL) syntax, similar to C, and it is used for defining logic, comparisons, equality checks, and data manipulation.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eExpr\u003c/code\u003e instances contain optional fields such as \u003ccode\u003eDescription\u003c/code\u003e, \u003ccode\u003eExpression\u003c/code\u003e, \u003ccode\u003eLocation\u003c/code\u003e, and \u003ccode\u003eTitle\u003c/code\u003e, allowing for documentation, the CEL code itself, location information, and a short title.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eExpr\u003c/code\u003e class inherits from the \u003ccode\u003eobject\u003c/code\u003e class and implements various interfaces including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eExpr\u003c/code\u003e class contains constructors such as a parameterless constructor and one that accepts another instance of the \u003ccode\u003eExpr\u003c/code\u003e class, and various properties to define and check if different fields are set.\u003c/p\u003e\n"]]],[],null,["# Compute Engine v1 API - Class Expr (3.13.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.13.0 (latest)](/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Expr)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.12.0/Google.Cloud.Compute.V1.Expr)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.11.0/Google.Cloud.Compute.V1.Expr)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.10.0/Google.Cloud.Compute.V1.Expr)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.9.0/Google.Cloud.Compute.V1.Expr)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.8.0/Google.Cloud.Compute.V1.Expr)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.7.0/Google.Cloud.Compute.V1.Expr)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.6.0/Google.Cloud.Compute.V1.Expr)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.5.0/Google.Cloud.Compute.V1.Expr)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.4.0/Google.Cloud.Compute.V1.Expr)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.3.0/Google.Cloud.Compute.V1.Expr)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.2.0/Google.Cloud.Compute.V1.Expr)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.1.0/Google.Cloud.Compute.V1.Expr)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.0.0/Google.Cloud.Compute.V1.Expr)\n- [2.17.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.17.0/Google.Cloud.Compute.V1.Expr)\n- [2.16.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.16.0/Google.Cloud.Compute.V1.Expr)\n- [2.15.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.15.0/Google.Cloud.Compute.V1.Expr)\n- [2.14.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.14.0/Google.Cloud.Compute.V1.Expr)\n- [2.13.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.13.0/Google.Cloud.Compute.V1.Expr)\n- [2.12.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.12.0/Google.Cloud.Compute.V1.Expr)\n- [2.11.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.11.0/Google.Cloud.Compute.V1.Expr)\n- [2.10.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.10.0/Google.Cloud.Compute.V1.Expr)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.9.0/Google.Cloud.Compute.V1.Expr)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.8.0/Google.Cloud.Compute.V1.Expr)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.7.0/Google.Cloud.Compute.V1.Expr)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.6.0/Google.Cloud.Compute.V1.Expr)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.5.0/Google.Cloud.Compute.V1.Expr)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.4.0/Google.Cloud.Compute.V1.Expr)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.3.0/Google.Cloud.Compute.V1.Expr)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.2.0/Google.Cloud.Compute.V1.Expr)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.1.0/Google.Cloud.Compute.V1.Expr)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.0.0/Google.Cloud.Compute.V1.Expr)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/1.4.0/Google.Cloud.Compute.V1.Expr)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/1.3.0/Google.Cloud.Compute.V1.Expr)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/1.2.0/Google.Cloud.Compute.V1.Expr)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/1.1.0/Google.Cloud.Compute.V1.Expr)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/1.0.0/Google.Cloud.Compute.V1.Expr) \n\n public sealed class Expr : IMessage\u003cExpr\u003e, IEquatable\u003cExpr\u003e, IDeepCloneable\u003cExpr\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Compute Engine v1 API class Expr.\n\nRepresents 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 \u003chttps://github.com/google/cel-spec\u003e. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() \\\u003c 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. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Expr \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Expr](/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Expr), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Expr](/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Expr), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Expr](/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Expr), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Compute.V1](/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Compute.V1.dll\n\nConstructors\n------------\n\n### Expr()\n\n public Expr()\n\n### Expr(Expr)\n\n public Expr(Expr other)\n\nProperties\n----------\n\n### Description\n\n public string Description { get; set; }\n\nOptional. 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 public string Expression { get; set; }\n\nTextual representation of an expression in Common Expression Language syntax.\n\n### HasDescription\n\n public bool HasDescription { get; }\n\nGets whether the \"description\" field is set\n\n### HasExpression\n\n public bool HasExpression { get; }\n\nGets whether the \"expression\" field is set\n\n### HasLocation\n\n public bool HasLocation { get; }\n\nGets whether the \"location\" field is set\n\n### HasTitle\n\n public bool HasTitle { get; }\n\nGets whether the \"title\" field is set\n\n### Location\n\n public string Location { get; set; }\n\nOptional. 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 public string Title { get; set; }\n\nOptional. 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."]]