Class Expr (2.13.0)

publicfinalclassExprextendsGeneratedMessageV3implementsExprOrBuilder

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.

Protobuf typegoogle.type.Expr

Implements

ExprOrBuilder

Inherited Members

Static Fields

DESCRIPTION_FIELD_NUMBER

publicstaticfinalintDESCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

EXPRESSION_FIELD_NUMBER

publicstaticfinalintEXPRESSION_FIELD_NUMBER
Field Value
TypeDescription
int

LOCATION_FIELD_NUMBER

publicstaticfinalintLOCATION_FIELD_NUMBER
Field Value
TypeDescription
int

TITLE_FIELD_NUMBER

publicstaticfinalintTITLE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

publicstaticExprgetDefaultInstance()
Returns
TypeDescription
Expr

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

publicstaticExpr.BuildernewBuilder()
Returns
TypeDescription
Expr.Builder

newBuilder(Expr prototype)

publicstaticExpr.BuildernewBuilder(Exprprototype)
Parameter
NameDescription
prototypeExpr
Returns
TypeDescription
Expr.Builder

parseDelimitedFrom(InputStream input)

publicstaticExprparseDelimitedFrom(InputStreaminput)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Expr
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticExprparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Expr
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

publicstaticExprparseFrom(byte[]data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Expr
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticExprparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Expr
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticExprparseFrom(ByteStringdata)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Expr
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticExprparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Expr
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticExprparseFrom(CodedInputStreaminput)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Expr
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticExprparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Expr
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

publicstaticExprparseFrom(InputStreaminput)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Expr
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticExprparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Expr
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

publicstaticExprparseFrom(ByteBufferdata)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Expr
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticExprparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Expr
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

publicstaticParser<Expr>parser()
Returns
TypeDescription
Parser<Expr>

Methods

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

publicExprgetDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for description.

getExpression()

publicStringgetExpression()

Textual representation of an expression in Common Expression Language syntax.

string expression = 1;

Returns
TypeDescription
String

The expression.

getExpressionBytes()

publicByteStringgetExpressionBytes()

Textual representation of an expression in Common Expression Language syntax.

string expression = 1;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for location.

getParserForType()

publicParser<Expr>getParserForType()
Returns
TypeDescription
Parser<Expr>
Overrides

getSerializedSize()

publicintgetSerializedSize()
Returns
TypeDescription
int
Overrides

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
TypeDescription
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
TypeDescription
ByteString

The bytes for title.

getUnknownFields()

publicfinalUnknownFieldSetgetUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hashCode()

publicinthashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

publicExpr.BuildernewBuilderForType()
Returns
TypeDescription
Expr.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedExpr.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Expr.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

publicExpr.BuildertoBuilder()
Returns
TypeDescription
Expr.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
NameDescription
outputCodedOutputStream
OverridesExceptions
TypeDescription
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.