Class Expr.Builder (2.24.0)

public static final class Expr.Builder extends GeneratedMessageV3.Builder<Expr.Builder> implements ExprOrBuilder

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() &lt; 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' &amp;&amp; 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 type google.type.Expr

Implements

ExprOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Expr.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Expr.Builder
Overrides

build()

public Expr build()
Returns
TypeDescription
Expr

buildPartial()

public Expr buildPartial()
Returns
TypeDescription
Expr

clear()

public Expr.Builder clear()
Returns
TypeDescription
Expr.Builder
Overrides

clearDescription()

public Expr.Builder clearDescription()

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
Expr.Builder

This builder for chaining.

clearExpression()

public Expr.Builder clearExpression()

Textual representation of an expression in Common Expression Language syntax.

string expression = 1;

Returns
TypeDescription
Expr.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Expr.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Expr.Builder
Overrides

clearLocation()

public Expr.Builder clearLocation()

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
Expr.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Expr.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Expr.Builder
Overrides

clearTitle()

public Expr.Builder clearTitle()

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
Expr.Builder

This builder for chaining.

clone()

public Expr.Builder clone()
Returns
TypeDescription
Expr.Builder
Overrides

getDefaultInstanceForType()

public Expr getDefaultInstanceForType()
Returns
TypeDescription
Expr

getDescription()

public String getDescription()

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()

public ByteString getDescriptionBytes()

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.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getExpression()

public String getExpression()

Textual representation of an expression in Common Expression Language syntax.

string expression = 1;

Returns
TypeDescription
String

The expression.

getExpressionBytes()

public ByteString getExpressionBytes()

Textual representation of an expression in Common Expression Language syntax.

string expression = 1;

Returns
TypeDescription
ByteString

The bytes for expression.

getLocation()

public String getLocation()

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()

public ByteString getLocationBytes()

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.

getTitle()

public String getTitle()

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()

public ByteString getTitleBytes()

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.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Expr.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Expr.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Expr.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Expr.Builder
Overrides

mergeFrom(Expr other)

public Expr.Builder mergeFrom(Expr other)
Parameter
NameDescription
otherExpr
Returns
TypeDescription
Expr.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Expr.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Expr.Builder
Overrides

setDescription(String value)

public Expr.Builder setDescription(String value)

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;

Parameter
NameDescription
valueString

The description to set.

Returns
TypeDescription
Expr.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Expr.Builder setDescriptionBytes(ByteString value)

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;

Parameter
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
Expr.Builder

This builder for chaining.

setExpression(String value)

public Expr.Builder setExpression(String value)

Textual representation of an expression in Common Expression Language syntax.

string expression = 1;

Parameter
NameDescription
valueString

The expression to set.

Returns
TypeDescription
Expr.Builder

This builder for chaining.

setExpressionBytes(ByteString value)

public Expr.Builder setExpressionBytes(ByteString value)

Textual representation of an expression in Common Expression Language syntax.

string expression = 1;

Parameter
NameDescription
valueByteString

The bytes for expression to set.

Returns
TypeDescription
Expr.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Expr.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Expr.Builder
Overrides

setLocation(String value)

public Expr.Builder setLocation(String value)

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;

Parameter
NameDescription
valueString

The location to set.

Returns
TypeDescription
Expr.Builder

This builder for chaining.

setLocationBytes(ByteString value)

public Expr.Builder setLocationBytes(ByteString value)

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;

Parameter
NameDescription
valueByteString

The bytes for location to set.

Returns
TypeDescription
Expr.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Expr.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Expr.Builder
Overrides

setTitle(String value)

public Expr.Builder setTitle(String value)

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;

Parameter
NameDescription
valueString

The title to set.

Returns
TypeDescription
Expr.Builder

This builder for chaining.

setTitleBytes(ByteString value)

public Expr.Builder setTitleBytes(ByteString value)

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;

Parameter
NameDescription
valueByteString

The bytes for title to set.

Returns
TypeDescription
Expr.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Expr.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Expr.Builder
Overrides