Package com.google.api.expr.v1alpha1
Class Expr
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.api.expr.v1alpha1.Expr
- All Implemented Interfaces:
ExprOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
An abstract representation of a common expression.
Expressions are abstractly represented as a collection of identifiers,
select statements, function calls, literals, and comprehensions. All
operators with the exception of the '.' operator are modelled as function
calls. This makes it easy to represent new operators into the existing AST.
All references within expressions must resolve to a [Decl][google.api.expr.v1alpha1.Decl] provided at
type-check for an expression to be valid. A reference may either be a bare
identifier `name` or a qualified identifier `google.api.name`. References
may either refer to a value or a function declaration.
For example, the expression `google.api.name.startsWith('expr')` references
the declaration `google.api.name` within a [Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression, and
the function declaration `startsWith`.
Protobuf type google.api.expr.v1alpha1.Expr- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAn abstract representation of a common expression.static final classA call expression, including calls to predefined functions and operators.static interfacestatic final classA comprehension expression applied to a list or map.static interfacestatic final classA list creation expression.static interfacestatic final classA map or message creation expression.static interfacestatic enumstatic final classAn identifier expression.static interfacestatic final classA field selection expression.static interfaceNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intprivate static final Exprprivate Objectprivate intprivate longstatic final intstatic final intstatic final intprivate byteprivate static final com.google.protobuf.Parser<Expr> static final intprivate static final longstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanA call expression, including calls to predefined functions and operators.A call expression, including calls to predefined functions and operators.A comprehension expression.A comprehension expression.A literal expression.A literal expression.static Exprstatic final com.google.protobuf.Descriptors.DescriptorlonggetId()Required.An identifier expression.An identifier expression.A list creation expression.A list creation expression.com.google.protobuf.Parser<Expr> A field selection expression, e.g.A field selection expression, e.g.intA map or message creation expression.A map or message creation expression.booleanA call expression, including calls to predefined functions and operators.booleanA comprehension expression.booleanA literal expression.inthashCode()booleanAn identifier expression.booleanA list creation expression.booleanA field selection expression, e.g.booleanA map or message creation expression.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic Expr.Builderstatic Expr.BuildernewBuilder(Expr prototype) protected Expr.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static ExprparseDelimitedFrom(InputStream input) static ExprparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ExprparseFrom(byte[] data) static ExprparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ExprparseFrom(com.google.protobuf.ByteString data) static ExprparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ExprparseFrom(com.google.protobuf.CodedInputStream input) static ExprparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ExprparseFrom(InputStream input) static ExprparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ExprparseFrom(ByteBuffer data) static ExprparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<Expr> parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
exprKindCase_
private int exprKindCase_ -
exprKind_
-
ID_FIELD_NUMBER
public static final int ID_FIELD_NUMBER- See Also:
-
id_
private long id_ -
CONST_EXPR_FIELD_NUMBER
public static final int CONST_EXPR_FIELD_NUMBER- See Also:
-
IDENT_EXPR_FIELD_NUMBER
public static final int IDENT_EXPR_FIELD_NUMBER- See Also:
-
SELECT_EXPR_FIELD_NUMBER
public static final int SELECT_EXPR_FIELD_NUMBER- See Also:
-
CALL_EXPR_FIELD_NUMBER
public static final int CALL_EXPR_FIELD_NUMBER- See Also:
-
LIST_EXPR_FIELD_NUMBER
public static final int LIST_EXPR_FIELD_NUMBER- See Also:
-
STRUCT_EXPR_FIELD_NUMBER
public static final int STRUCT_EXPR_FIELD_NUMBER- See Also:
-
COMPREHENSION_EXPR_FIELD_NUMBER
public static final int COMPREHENSION_EXPR_FIELD_NUMBER- See Also:
-
memoizedIsInitialized
private byte memoizedIsInitialized -
DEFAULT_INSTANCE
-
PARSER
-
-
Constructor Details
-
Expr
private Expr(com.google.protobuf.GeneratedMessage.Builder<?> builder) -
Expr
private Expr()
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
getExprKindCase
- Specified by:
getExprKindCasein interfaceExprOrBuilder
-
getId
public long getId()Required. An id assigned to this node by the parser which is unique in a given expression tree. This is used to associate type information and other attributes to a node in the parse tree.
int64 id = 2;- Specified by:
getIdin interfaceExprOrBuilder- Returns:
- The id.
-
hasConstExpr
public boolean hasConstExpr()A literal expression.
.google.api.expr.v1alpha1.Constant const_expr = 3;- Specified by:
hasConstExprin interfaceExprOrBuilder- Returns:
- Whether the constExpr field is set.
-
getConstExpr
A literal expression.
.google.api.expr.v1alpha1.Constant const_expr = 3;- Specified by:
getConstExprin interfaceExprOrBuilder- Returns:
- The constExpr.
-
getConstExprOrBuilder
A literal expression.
.google.api.expr.v1alpha1.Constant const_expr = 3;- Specified by:
getConstExprOrBuilderin interfaceExprOrBuilder
-
hasIdentExpr
public boolean hasIdentExpr()An identifier expression.
.google.api.expr.v1alpha1.Expr.Ident ident_expr = 4;- Specified by:
hasIdentExprin interfaceExprOrBuilder- Returns:
- Whether the identExpr field is set.
-
getIdentExpr
An identifier expression.
.google.api.expr.v1alpha1.Expr.Ident ident_expr = 4;- Specified by:
getIdentExprin interfaceExprOrBuilder- Returns:
- The identExpr.
-
getIdentExprOrBuilder
An identifier expression.
.google.api.expr.v1alpha1.Expr.Ident ident_expr = 4;- Specified by:
getIdentExprOrBuilderin interfaceExprOrBuilder
-
hasSelectExpr
public boolean hasSelectExpr()A field selection expression, e.g. `request.auth`.
.google.api.expr.v1alpha1.Expr.Select select_expr = 5;- Specified by:
hasSelectExprin interfaceExprOrBuilder- Returns:
- Whether the selectExpr field is set.
-
getSelectExpr
A field selection expression, e.g. `request.auth`.
.google.api.expr.v1alpha1.Expr.Select select_expr = 5;- Specified by:
getSelectExprin interfaceExprOrBuilder- Returns:
- The selectExpr.
-
getSelectExprOrBuilder
A field selection expression, e.g. `request.auth`.
.google.api.expr.v1alpha1.Expr.Select select_expr = 5;- Specified by:
getSelectExprOrBuilderin interfaceExprOrBuilder
-
hasCallExpr
public boolean hasCallExpr()A call expression, including calls to predefined functions and operators.
.google.api.expr.v1alpha1.Expr.Call call_expr = 6;- Specified by:
hasCallExprin interfaceExprOrBuilder- Returns:
- Whether the callExpr field is set.
-
getCallExpr
A call expression, including calls to predefined functions and operators.
.google.api.expr.v1alpha1.Expr.Call call_expr = 6;- Specified by:
getCallExprin interfaceExprOrBuilder- Returns:
- The callExpr.
-
getCallExprOrBuilder
A call expression, including calls to predefined functions and operators.
.google.api.expr.v1alpha1.Expr.Call call_expr = 6;- Specified by:
getCallExprOrBuilderin interfaceExprOrBuilder
-
hasListExpr
public boolean hasListExpr()A list creation expression.
.google.api.expr.v1alpha1.Expr.CreateList list_expr = 7;- Specified by:
hasListExprin interfaceExprOrBuilder- Returns:
- Whether the listExpr field is set.
-
getListExpr
A list creation expression.
.google.api.expr.v1alpha1.Expr.CreateList list_expr = 7;- Specified by:
getListExprin interfaceExprOrBuilder- Returns:
- The listExpr.
-
getListExprOrBuilder
A list creation expression.
.google.api.expr.v1alpha1.Expr.CreateList list_expr = 7;- Specified by:
getListExprOrBuilderin interfaceExprOrBuilder
-
hasStructExpr
public boolean hasStructExpr()A map or message creation expression.
.google.api.expr.v1alpha1.Expr.CreateStruct struct_expr = 8;- Specified by:
hasStructExprin interfaceExprOrBuilder- Returns:
- Whether the structExpr field is set.
-
getStructExpr
A map or message creation expression.
.google.api.expr.v1alpha1.Expr.CreateStruct struct_expr = 8;- Specified by:
getStructExprin interfaceExprOrBuilder- Returns:
- The structExpr.
-
getStructExprOrBuilder
A map or message creation expression.
.google.api.expr.v1alpha1.Expr.CreateStruct struct_expr = 8;- Specified by:
getStructExprOrBuilderin interfaceExprOrBuilder
-
hasComprehensionExpr
public boolean hasComprehensionExpr()A comprehension expression.
.google.api.expr.v1alpha1.Expr.Comprehension comprehension_expr = 9;- Specified by:
hasComprehensionExprin interfaceExprOrBuilder- Returns:
- Whether the comprehensionExpr field is set.
-
getComprehensionExpr
A comprehension expression.
.google.api.expr.v1alpha1.Expr.Comprehension comprehension_expr = 9;- Specified by:
getComprehensionExprin interfaceExprOrBuilder- Returns:
- The comprehensionExpr.
-
getComprehensionExprOrBuilder
A comprehension expression.
.google.api.expr.v1alpha1.Expr.Comprehension comprehension_expr = 9;- Specified by:
getComprehensionExprOrBuilderin interfaceExprOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Expr parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Expr parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Expr parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Expr parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Expr parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Expr parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Expr parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Expr parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
- Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-