Class Expr (1.12.0)

public final class Expr extends GeneratedMessageV3 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() < 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 type google.cloud.compute.v1.Expr

Implements

ExprOrBuilder

Static Fields

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

EXPRESSION_FIELD_NUMBER

public static final int EXPRESSION_FIELD_NUMBER
Field Value
TypeDescription
int

LOCATION_FIELD_NUMBER

public static final int LOCATION_FIELD_NUMBER
Field Value
TypeDescription
int

TITLE_FIELD_NUMBER

public static final int TITLE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Expr getDefaultInstance()
Returns
TypeDescription
Expr

getDescriptor()

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

newBuilder()

public static Expr.Builder newBuilder()
Returns
TypeDescription
Expr.Builder

newBuilder(Expr prototype)

public static Expr.Builder newBuilder(Expr prototype)
Parameter
NameDescription
prototypeExpr
Returns
TypeDescription
Expr.Builder

parseDelimitedFrom(InputStream input)

public static Expr parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Expr
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Expr parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Expr
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Expr parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Expr
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Expr parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Expr
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Expr parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Expr
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Expr parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Expr
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Expr parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Expr
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Expr parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Expr
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Expr parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Expr
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Expr parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Expr
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Expr parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Expr
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Expr parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Expr
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Expr> parser()
Returns
TypeDescription
Parser<Expr>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
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.

optional string description = 422937596;

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.

optional string description = 422937596;

Returns
TypeDescription
ByteString

The bytes for description.

getExpression()

public String getExpression()

Textual representation of an expression in Common Expression Language syntax.

optional string expression = 352031384;

Returns
TypeDescription
String

The expression.

getExpressionBytes()

public ByteString getExpressionBytes()

Textual representation of an expression in Common Expression Language syntax.

optional string expression = 352031384;

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.

optional string location = 290430901;

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.

optional string location = 290430901;

Returns
TypeDescription
ByteString

The bytes for location.

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

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.

optional string title = 110371416;

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.

optional string title = 110371416;

Returns
TypeDescription
ByteString

The bytes for title.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasDescription()

public boolean hasDescription()

Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.

optional string description = 422937596;

Returns
TypeDescription
boolean

Whether the description field is set.

hasExpression()

public boolean hasExpression()

Textual representation of an expression in Common Expression Language syntax.

optional string expression = 352031384;

Returns
TypeDescription
boolean

Whether the expression field is set.

hasLocation()

public boolean hasLocation()

Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.

optional string location = 290430901;

Returns
TypeDescription
boolean

Whether the location field is set.

hasTitle()

public boolean hasTitle()

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.

optional string title = 110371416;

Returns
TypeDescription
boolean

Whether the title field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Expr.Builder newBuilderForType()
Returns
TypeDescription
Expr.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Expr.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Expr.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Expr.Builder toBuilder()
Returns
TypeDescription
Expr.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException