Class Expr (2.46.0) Stay organized with collections Save and categorize content based on your preferences.
- 2.65.0 (latest)
- 2.64.1
- 2.63.2
- 2.62.0
- 2.61.3
- 2.60.0
- 2.59.2
- 2.58.0
- 2.57.0
- 2.56.0
- 2.54.1
- 2.53.0
- 2.52.0
- 2.51.0
- 2.50.1
- 2.49.0
- 2.48.0
- 2.46.0
- 2.45.1
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.40.0
- 2.39.1
- 2.38.0
- 2.37.1
- 2.36.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.30.0
- 2.29.0
- 2.28.0
- 2.27.0
- 2.26.0
- 2.25.1
- 2.24.0
- 2.23.1
- 2.22.1
- 2.21.1
- 2.15.0
- 2.14.3
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.6
- 2.8.4
- 2.7.4
publicfinalclassExprextendsGeneratedMessageV3implementsExprOrBuilderRepresents 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.
Protobuf typegoogle.type.Expr
Inheritance
Object >AbstractMessageLite<MessageType,BuilderType> >AbstractMessage >GeneratedMessageV3 >ExprImplements
ExprOrBuilderInherited Members
Static Fields
DESCRIPTION_FIELD_NUMBER
publicstaticfinalintDESCRIPTION_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int | |
EXPRESSION_FIELD_NUMBER
publicstaticfinalintEXPRESSION_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int | |
LOCATION_FIELD_NUMBER
publicstaticfinalintLOCATION_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int | |
TITLE_FIELD_NUMBER
publicstaticfinalintTITLE_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int | |
Static Methods
getDefaultInstance()
publicstaticExprgetDefaultInstance()| Returns | |
|---|---|
| Type | Description |
Expr | |
getDescriptor()
publicstaticfinalDescriptors.DescriptorgetDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor | |
newBuilder()
publicstaticExpr.BuildernewBuilder()| Returns | |
|---|---|
| Type | Description |
Expr.Builder | |
newBuilder(Expr prototype)
publicstaticExpr.BuildernewBuilder(Exprprototype)| Parameter | |
|---|---|
| Name | Description |
prototype | Expr |
| Returns | |
|---|---|
| Type | Description |
Expr.Builder | |
parseDelimitedFrom(InputStream input)
publicstaticExprparseDelimitedFrom(InputStreaminput)| Parameter | |
|---|---|
| Name | Description |
input | InputStream |
| Returns | |
|---|---|
| Type | Description |
Expr | |
| Exceptions | |
|---|---|
| Type | Description |
IOException | |
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
publicstaticExprparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input | InputStream |
extensionRegistry | ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
Expr | |
| Exceptions | |
|---|---|
| Type | Description |
IOException | |
parseFrom(byte[] data)
publicstaticExprparseFrom(byte[]data)| Parameter | |
|---|---|
| Name | Description |
data | byte[] |
| Returns | |
|---|---|
| Type | Description |
Expr | |
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException | |
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
publicstaticExprparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)| Parameters | |
|---|---|
| Name | Description |
data | byte[] |
extensionRegistry | ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
Expr | |
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException | |
parseFrom(ByteString data)
publicstaticExprparseFrom(ByteStringdata)| Parameter | |
|---|---|
| Name | Description |
data | ByteString |
| Returns | |
|---|---|
| Type | Description |
Expr | |
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException | |
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
publicstaticExprparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)| Parameters | |
|---|---|
| Name | Description |
data | ByteString |
extensionRegistry | ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
Expr | |
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException | |
parseFrom(CodedInputStream input)
publicstaticExprparseFrom(CodedInputStreaminput)| Parameter | |
|---|---|
| Name | Description |
input | CodedInputStream |
| Returns | |
|---|---|
| Type | Description |
Expr | |
| Exceptions | |
|---|---|
| Type | Description |
IOException | |
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
publicstaticExprparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
Expr | |
| Exceptions | |
|---|---|
| Type | Description |
IOException | |
parseFrom(InputStream input)
publicstaticExprparseFrom(InputStreaminput)| Parameter | |
|---|---|
| Name | Description |
input | InputStream |
| Returns | |
|---|---|
| Type | Description |
Expr | |
| Exceptions | |
|---|---|
| Type | Description |
IOException | |
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
publicstaticExprparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input | InputStream |
extensionRegistry | ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
Expr | |
| Exceptions | |
|---|---|
| Type | Description |
IOException | |
parseFrom(ByteBuffer data)
publicstaticExprparseFrom(ByteBufferdata)| Parameter | |
|---|---|
| Name | Description |
data | ByteBuffer |
| Returns | |
|---|---|
| Type | Description |
Expr | |
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException | |
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
publicstaticExprparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)| Parameters | |
|---|---|
| Name | Description |
data | ByteBuffer |
extensionRegistry | ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
Expr | |
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException | |
parser()
publicstaticParser<Expr>parser()| Returns | |
|---|---|
| Type | Description |
Parser<Expr> | |
Methods
equals(Object obj)
publicbooleanequals(Objectobj)| Parameter | |
|---|---|
| Name | Description |
obj | Object |
| Returns | |
|---|---|
| Type | Description |
boolean | |
getDefaultInstanceForType()
publicExprgetDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
Expr | |
getDescription()
publicStringgetDescription()Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
string description = 3;
| Returns | |
|---|---|
| Type | Description |
String | The description. |
getDescriptionBytes()
publicByteStringgetDescriptionBytes()Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
string description = 3;
| Returns | |
|---|---|
| Type | Description |
ByteString | The bytes for description. |
getExpression()
publicStringgetExpression()Textual representation of an expression in Common Expression Language syntax.
string expression = 1;
| Returns | |
|---|---|
| Type | Description |
String | The expression. |
getExpressionBytes()
publicByteStringgetExpressionBytes()Textual representation of an expression in Common Expression Language syntax.
string expression = 1;
| Returns | |
|---|---|
| Type | Description |
ByteString | The bytes for expression. |
getLocation()
publicStringgetLocation()Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
string location = 4;
| Returns | |
|---|---|
| Type | Description |
String | The location. |
getLocationBytes()
publicByteStringgetLocationBytes()Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
string location = 4;
| Returns | |
|---|---|
| Type | Description |
ByteString | The bytes for location. |
getParserForType()
publicParser<Expr>getParserForType()| Returns | |
|---|---|
| Type | Description |
Parser<Expr> | |
getSerializedSize()
publicintgetSerializedSize()| Returns | |
|---|---|
| Type | Description |
int | |
getTitle()
publicStringgetTitle()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.
string title = 2;
| Returns | |
|---|---|
| Type | Description |
String | The title. |
getTitleBytes()
publicByteStringgetTitleBytes()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.
string title = 2;
| Returns | |
|---|---|
| Type | Description |
ByteString | The bytes for title. |
hashCode()
publicinthashCode()| Returns | |
|---|---|
| Type | Description |
int | |
internalGetFieldAccessorTable()
protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable | |
isInitialized()
publicfinalbooleanisInitialized()| Returns | |
|---|---|
| Type | Description |
boolean | |
newBuilderForType()
publicExpr.BuildernewBuilderForType()| Returns | |
|---|---|
| Type | Description |
Expr.Builder | |
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protectedExpr.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)| Parameter | |
|---|---|
| Name | Description |
parent | BuilderParent |
| Returns | |
|---|---|
| Type | Description |
Expr.Builder | |
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)| Parameter | |
|---|---|
| Name | Description |
unused | UnusedPrivateParameter |
| Returns | |
|---|---|
| Type | Description |
Object | |
toBuilder()
publicExpr.BuildertoBuilder()| Returns | |
|---|---|
| Type | Description |
Expr.Builder | |
writeTo(CodedOutputStream output)
publicvoidwriteTo(CodedOutputStreamoutput)| Parameter | |
|---|---|
| Name | Description |
output | CodedOutputStream |
| Exceptions | |
|---|---|
| Type | Description |
IOException | |
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-01-31 UTC.