Package com.google.api.expr.v1alpha1
Class Expr
java.lang.Object
com.google.protobuf.AbstractMessageLite<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite<Expr,Expr.Builder>
com.google.api.expr.v1alpha1.Expr
- All Implemented Interfaces:
ExprOrBuilder
,com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
public final class Expr
extends com.google.protobuf.GeneratedMessageLite<Expr,Expr.Builder>
implements ExprOrBuilder
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
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
An abstract representation of a common expression.static final class
A call expression, including calls to predefined functions and operators.static interface
static final class
A comprehension expression applied to a list or map.static interface
static final class
A list creation expression.static interface
static final class
A map or message creation expression.static interface
static enum
static final class
An identifier expression.static interface
static final class
A field selection expression.static interface
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageLite
com.google.protobuf.GeneratedMessageLite.DefaultInstanceBasedParser<T extends com.google.protobuf.GeneratedMessageLite<T,
?>>, com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageLite.GeneratedExtension<ContainingType extends com.google.protobuf.MessageLite, Type extends Object>, com.google.protobuf.GeneratedMessageLite.MethodToInvoke, com.google.protobuf.GeneratedMessageLite.SerializedForm Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Fields inherited from class com.google.protobuf.GeneratedMessageLite
unknownFields
Fields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode
-
Method Summary
Modifier and TypeMethodDescriptionprotected final Object
dynamicMethod
(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) A call expression, including calls to predefined functions and operators.A comprehension expression.A literal expression.static Expr
long
getId()
Required.An identifier expression.A list creation expression.A field selection expression, e.g.A map or message creation expression.boolean
A call expression, including calls to predefined functions and operators.boolean
A comprehension expression.boolean
A literal expression.boolean
An identifier expression.boolean
A list creation expression.boolean
A field selection expression, e.g.boolean
A map or message creation expression.static Expr.Builder
static Expr.Builder
newBuilder
(Expr prototype) static Expr
parseDelimitedFrom
(InputStream input) static Expr
parseDelimitedFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Expr
parseFrom
(byte[] data) static Expr
parseFrom
(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Expr
parseFrom
(com.google.protobuf.ByteString data) static Expr
parseFrom
(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Expr
parseFrom
(com.google.protobuf.CodedInputStream input) static Expr
parseFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Expr
parseFrom
(InputStream input) static Expr
parseFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Expr
parseFrom
(ByteBuffer data) static Expr
parseFrom
(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<Expr>
parser()
Methods inherited from class com.google.protobuf.GeneratedMessageLite
createBuilder, createBuilder, dynamicMethod, dynamicMethod, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstanceForType, getParserForType, getSerializedSize, hashCode, isInitialized, isInitialized, makeImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newMessageInfo, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parseUnknownField, registerDefaultInstance, toBuilder, toString, writeTo
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Field Details
-
ID_FIELD_NUMBER
public static final int ID_FIELD_NUMBER- See Also:
-
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:
-
-
Method Details
-
getExprKindCase
- Specified by:
getExprKindCase
in 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 [json_name = "id"];
- Specified by:
getId
in interfaceExprOrBuilder
- Returns:
- The id.
-
hasConstExpr
public boolean hasConstExpr()A literal expression.
.google.api.expr.v1alpha1.Constant const_expr = 3 [json_name = "constExpr"];
- Specified by:
hasConstExpr
in interfaceExprOrBuilder
- Returns:
- Whether the constExpr field is set.
-
getConstExpr
A literal expression.
.google.api.expr.v1alpha1.Constant const_expr = 3 [json_name = "constExpr"];
- Specified by:
getConstExpr
in interfaceExprOrBuilder
- Returns:
- The constExpr.
-
hasIdentExpr
public boolean hasIdentExpr()An identifier expression.
.google.api.expr.v1alpha1.Expr.Ident ident_expr = 4 [json_name = "identExpr"];
- Specified by:
hasIdentExpr
in interfaceExprOrBuilder
- Returns:
- Whether the identExpr field is set.
-
getIdentExpr
An identifier expression.
.google.api.expr.v1alpha1.Expr.Ident ident_expr = 4 [json_name = "identExpr"];
- Specified by:
getIdentExpr
in interfaceExprOrBuilder
- Returns:
- The identExpr.
-
hasSelectExpr
public boolean hasSelectExpr()A field selection expression, e.g. `request.auth`.
.google.api.expr.v1alpha1.Expr.Select select_expr = 5 [json_name = "selectExpr"];
- Specified by:
hasSelectExpr
in 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 [json_name = "selectExpr"];
- Specified by:
getSelectExpr
in interfaceExprOrBuilder
- Returns:
- The selectExpr.
-
hasCallExpr
public boolean hasCallExpr()A call expression, including calls to predefined functions and operators.
.google.api.expr.v1alpha1.Expr.Call call_expr = 6 [json_name = "callExpr"];
- Specified by:
hasCallExpr
in 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 [json_name = "callExpr"];
- Specified by:
getCallExpr
in interfaceExprOrBuilder
- Returns:
- The callExpr.
-
hasListExpr
public boolean hasListExpr()A list creation expression.
.google.api.expr.v1alpha1.Expr.CreateList list_expr = 7 [json_name = "listExpr"];
- Specified by:
hasListExpr
in interfaceExprOrBuilder
- Returns:
- Whether the listExpr field is set.
-
getListExpr
A list creation expression.
.google.api.expr.v1alpha1.Expr.CreateList list_expr = 7 [json_name = "listExpr"];
- Specified by:
getListExpr
in interfaceExprOrBuilder
- Returns:
- The listExpr.
-
hasStructExpr
public boolean hasStructExpr()A map or message creation expression.
.google.api.expr.v1alpha1.Expr.CreateStruct struct_expr = 8 [json_name = "structExpr"];
- Specified by:
hasStructExpr
in interfaceExprOrBuilder
- Returns:
- Whether the structExpr field is set.
-
getStructExpr
A map or message creation expression.
.google.api.expr.v1alpha1.Expr.CreateStruct struct_expr = 8 [json_name = "structExpr"];
- Specified by:
getStructExpr
in interfaceExprOrBuilder
- Returns:
- The structExpr.
-
hasComprehensionExpr
public boolean hasComprehensionExpr()A comprehension expression.
.google.api.expr.v1alpha1.Expr.Comprehension comprehension_expr = 9 [json_name = "comprehensionExpr"];
- Specified by:
hasComprehensionExpr
in interfaceExprOrBuilder
- Returns:
- Whether the comprehensionExpr field is set.
-
getComprehensionExpr
A comprehension expression.
.google.api.expr.v1alpha1.Expr.Comprehension comprehension_expr = 9 [json_name = "comprehensionExpr"];
- Specified by:
getComprehensionExpr
in interfaceExprOrBuilder
- Returns:
- The comprehensionExpr.
-
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
-
newBuilder
-
newBuilder
-
dynamicMethod
protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) - Specified by:
dynamicMethod
in classcom.google.protobuf.GeneratedMessageLite<Expr,
Expr.Builder>
-
getDefaultInstance
-
parser
-