public sealed class Expr : IMessage<Expr>, IEquatable<Expr>, IDeepCloneable<Expr>, IBufferMessage, IMessage
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 athttps://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"]],[["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-04 UTC."],[[["\u003cp\u003e\u003ccode\u003eExpr\u003c/code\u003e represents a textual expression using the Common Expression Language (CEL) syntax, which is similar to C in its structure.\u003c/p\u003e\n"],["\u003cp\u003eCEL expressions, as represented by \u003ccode\u003eExpr\u003c/code\u003e, can be used for various operations including comparisons, equality checks, logic operations, and data manipulation, with examples provided for each.\u003c/p\u003e\n"],["\u003cp\u003eThe specific variables and functions usable within an \u003ccode\u003eExpr\u003c/code\u003e are defined by the service that evaluates the expression, thus requiring service-specific documentation for complete information.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eExpr\u003c/code\u003e objects include properties for the expression itself, a title, description, and location for error reporting, enhancing its usability and clarity.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eExpr\u003c/code\u003e class provides methods for cloning, calculating size, merging data, checking for equality, and handling input/output streams, enabling comprehensive manipulation and interaction with the expression data.\u003c/p\u003e\n"]]],[],null,["# Class Expr (2.17.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.17.0 (latest)](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Type.Expr)\n- [2.15.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.15.0/Google.Type.Expr)\n- [2.10.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.10.0/Google.Type.Expr)\n- [2.2.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.2.0/Google.Type.Expr) \n\n public sealed class Expr : IMessage\u003cExpr\u003e, IEquatable\u003cExpr\u003e, IDeepCloneable\u003cExpr\u003e, IBufferMessage, IMessage\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\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\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\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.Api.CommonProtos/latest/Google.Type.Expr), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Expr](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Type.Expr), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Expr](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Type.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.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals)\n\nNamespace\n---------\n\n[Google.Type](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Type)\n\nAssembly\n--------\n\nGoogle.Api.CommonProtos.dll\n\nConstructors\n------------\n\n### Expr()\n\n public Expr()\n\n### Expr(Expr)\n\n public Expr(Expr other)\n\nFields\n------\n\n### DescriptionFieldNumber\n\n public const int DescriptionFieldNumber = 3\n\nField number for the \"description\" field.\n\n### ExpressionFieldNumber\n\n public const int ExpressionFieldNumber = 1\n\nField number for the \"expression\" field.\n\n### LocationFieldNumber\n\n public const int LocationFieldNumber = 4\n\nField number for the \"location\" field.\n\n### TitleFieldNumber\n\n public const int TitleFieldNumber = 2\n\nField number for the \"title\" field.\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\ndescribes the expression, e.g. when hovered over it in a UI.\n\n### Descriptor\n\n public static MessageDescriptor Descriptor { get; }\n\n### Expression\n\n public string Expression { get; set; }\n\nTextual representation of an expression in Common Expression Language\nsyntax.\n\n### Location\n\n public string Location { get; set; }\n\nOptional. String indicating the location of the expression for error\nreporting, e.g. a file name and a position in the file.\n\n### Parser\n\n public static MessageParser\u003cExpr\u003e Parser { get; }\n\n### Title\n\n public string Title { get; set; }\n\nOptional. Title for the expression, i.e. a short string describing\nits purpose. This can be used e.g. in UIs which allow to enter the\nexpression.\n\nMethods\n-------\n\n### CalculateSize()\n\n public int CalculateSize()\n\n### Clone()\n\n public Expr Clone()\n\n### Equals(Expr)\n\n public bool Equals(Expr other)\n\n### Equals(object)\n\n public override bool Equals(object other)\n\n**Overrides** \n[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object))\n\n### GetHashCode()\n\n public override int GetHashCode()\n\n**Overrides** \n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode)\n\n### MergeFrom(CodedInputStream)\n\n public void MergeFrom(CodedInputStream input)\n\n### MergeFrom(Expr)\n\n public void MergeFrom(Expr other)\n\n### ToString()\n\n public override string ToString()\n\n**Overrides** \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\n### WriteTo(CodedOutputStream)\n\n public void WriteTo(CodedOutputStream output)"]]