Package com.google.api.expr.v1beta1
Class Expr.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<Expr,Expr.Builder>
com.google.api.expr.v1beta1.Expr.Builder
- All Implemented Interfaces:
ExprOrBuilder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,Cloneable
- Enclosing class:
- Expr
public static final class Expr.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<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.v1beta1.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.v1beta1.Expr.Select] expression, and the function declaration `startsWith`.Protobuf type
google.api.expr.v1beta1.Expr
-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance
-
Method Summary
Modifier and TypeMethodDescriptionA call expression, including calls to predefined functions and operators.A comprehension expression.clearId()
Required.An identifier expression.A list creation expression.A literal expression.A field selection expression, e.g.A map or object creation expression.A call expression, including calls to predefined functions and operators.A comprehension expression.int
getId()
Required.An identifier expression.A list creation expression.A literal expression.A field selection expression, e.g.A map or object creation expression.boolean
A call expression, including calls to predefined functions and operators.boolean
A comprehension expression.boolean
An identifier expression.boolean
A list creation expression.boolean
A literal expression.boolean
A field selection expression, e.g.boolean
A map or object creation expression.mergeCallExpr
(Expr.Call value) A call expression, including calls to predefined functions and operators.A comprehension expression.mergeIdentExpr
(Expr.Ident value) An identifier expression.mergeListExpr
(Expr.CreateList value) A list creation expression.mergeLiteralExpr
(Literal value) A literal expression.mergeSelectExpr
(Expr.Select value) A field selection expression, e.g.mergeStructExpr
(Expr.CreateStruct value) A map or object creation expression.setCallExpr
(Expr.Call value) A call expression, including calls to predefined functions and operators.setCallExpr
(Expr.Call.Builder builderForValue) A call expression, including calls to predefined functions and operators.A comprehension expression.setComprehensionExpr
(Expr.Comprehension.Builder builderForValue) A comprehension expression.setId
(int value) Required.setIdentExpr
(Expr.Ident value) An identifier expression.setIdentExpr
(Expr.Ident.Builder builderForValue) An identifier expression.setListExpr
(Expr.CreateList value) A list creation expression.setListExpr
(Expr.CreateList.Builder builderForValue) A list creation expression.setLiteralExpr
(Literal value) A literal expression.setLiteralExpr
(Literal.Builder builderForValue) A literal expression.setSelectExpr
(Expr.Select value) A field selection expression, e.g.setSelectExpr
(Expr.Select.Builder builderForValue) A field selection expression, e.g.setStructExpr
(Expr.CreateStruct value) A map or object creation expression.setStructExpr
(Expr.CreateStruct.Builder builderForValue) A map or object creation expression.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFrom
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
getExprKindCase
- Specified by:
getExprKindCase
in interfaceExprOrBuilder
-
clearExprKind
-
getId
public int 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.
int32 id = 2 [json_name = "id"];
- Specified by:
getId
in interfaceExprOrBuilder
- Returns:
- The id.
-
setId
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.
int32 id = 2 [json_name = "id"];
- Parameters:
value
- The id to set.- Returns:
- This builder for chaining.
-
clearId
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.
int32 id = 2 [json_name = "id"];
- Returns:
- This builder for chaining.
-
hasLiteralExpr
public boolean hasLiteralExpr()A literal expression.
.google.api.expr.v1beta1.Literal literal_expr = 3 [json_name = "literalExpr"];
- Specified by:
hasLiteralExpr
in interfaceExprOrBuilder
- Returns:
- Whether the literalExpr field is set.
-
getLiteralExpr
A literal expression.
.google.api.expr.v1beta1.Literal literal_expr = 3 [json_name = "literalExpr"];
- Specified by:
getLiteralExpr
in interfaceExprOrBuilder
- Returns:
- The literalExpr.
-
setLiteralExpr
A literal expression.
.google.api.expr.v1beta1.Literal literal_expr = 3 [json_name = "literalExpr"];
-
setLiteralExpr
A literal expression.
.google.api.expr.v1beta1.Literal literal_expr = 3 [json_name = "literalExpr"];
-
mergeLiteralExpr
A literal expression.
.google.api.expr.v1beta1.Literal literal_expr = 3 [json_name = "literalExpr"];
-
clearLiteralExpr
A literal expression.
.google.api.expr.v1beta1.Literal literal_expr = 3 [json_name = "literalExpr"];
-
hasIdentExpr
public boolean hasIdentExpr()An identifier expression.
.google.api.expr.v1beta1.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.v1beta1.Expr.Ident ident_expr = 4 [json_name = "identExpr"];
- Specified by:
getIdentExpr
in interfaceExprOrBuilder
- Returns:
- The identExpr.
-
setIdentExpr
An identifier expression.
.google.api.expr.v1beta1.Expr.Ident ident_expr = 4 [json_name = "identExpr"];
-
setIdentExpr
An identifier expression.
.google.api.expr.v1beta1.Expr.Ident ident_expr = 4 [json_name = "identExpr"];
-
mergeIdentExpr
An identifier expression.
.google.api.expr.v1beta1.Expr.Ident ident_expr = 4 [json_name = "identExpr"];
-
clearIdentExpr
An identifier expression.
.google.api.expr.v1beta1.Expr.Ident ident_expr = 4 [json_name = "identExpr"];
-
hasSelectExpr
public boolean hasSelectExpr()A field selection expression, e.g. `request.auth`.
.google.api.expr.v1beta1.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.v1beta1.Expr.Select select_expr = 5 [json_name = "selectExpr"];
- Specified by:
getSelectExpr
in interfaceExprOrBuilder
- Returns:
- The selectExpr.
-
setSelectExpr
A field selection expression, e.g. `request.auth`.
.google.api.expr.v1beta1.Expr.Select select_expr = 5 [json_name = "selectExpr"];
-
setSelectExpr
A field selection expression, e.g. `request.auth`.
.google.api.expr.v1beta1.Expr.Select select_expr = 5 [json_name = "selectExpr"];
-
mergeSelectExpr
A field selection expression, e.g. `request.auth`.
.google.api.expr.v1beta1.Expr.Select select_expr = 5 [json_name = "selectExpr"];
-
clearSelectExpr
A field selection expression, e.g. `request.auth`.
.google.api.expr.v1beta1.Expr.Select select_expr = 5 [json_name = "selectExpr"];
-
hasCallExpr
public boolean hasCallExpr()A call expression, including calls to predefined functions and operators.
.google.api.expr.v1beta1.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.v1beta1.Expr.Call call_expr = 6 [json_name = "callExpr"];
- Specified by:
getCallExpr
in interfaceExprOrBuilder
- Returns:
- The callExpr.
-
setCallExpr
A call expression, including calls to predefined functions and operators.
.google.api.expr.v1beta1.Expr.Call call_expr = 6 [json_name = "callExpr"];
-
setCallExpr
A call expression, including calls to predefined functions and operators.
.google.api.expr.v1beta1.Expr.Call call_expr = 6 [json_name = "callExpr"];
-
mergeCallExpr
A call expression, including calls to predefined functions and operators.
.google.api.expr.v1beta1.Expr.Call call_expr = 6 [json_name = "callExpr"];
-
clearCallExpr
A call expression, including calls to predefined functions and operators.
.google.api.expr.v1beta1.Expr.Call call_expr = 6 [json_name = "callExpr"];
-
hasListExpr
public boolean hasListExpr()A list creation expression.
.google.api.expr.v1beta1.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.v1beta1.Expr.CreateList list_expr = 7 [json_name = "listExpr"];
- Specified by:
getListExpr
in interfaceExprOrBuilder
- Returns:
- The listExpr.
-
setListExpr
A list creation expression.
.google.api.expr.v1beta1.Expr.CreateList list_expr = 7 [json_name = "listExpr"];
-
setListExpr
A list creation expression.
.google.api.expr.v1beta1.Expr.CreateList list_expr = 7 [json_name = "listExpr"];
-
mergeListExpr
A list creation expression.
.google.api.expr.v1beta1.Expr.CreateList list_expr = 7 [json_name = "listExpr"];
-
clearListExpr
A list creation expression.
.google.api.expr.v1beta1.Expr.CreateList list_expr = 7 [json_name = "listExpr"];
-
hasStructExpr
public boolean hasStructExpr()A map or object creation expression.
.google.api.expr.v1beta1.Expr.CreateStruct struct_expr = 8 [json_name = "structExpr"];
- Specified by:
hasStructExpr
in interfaceExprOrBuilder
- Returns:
- Whether the structExpr field is set.
-
getStructExpr
A map or object creation expression.
.google.api.expr.v1beta1.Expr.CreateStruct struct_expr = 8 [json_name = "structExpr"];
- Specified by:
getStructExpr
in interfaceExprOrBuilder
- Returns:
- The structExpr.
-
setStructExpr
A map or object creation expression.
.google.api.expr.v1beta1.Expr.CreateStruct struct_expr = 8 [json_name = "structExpr"];
-
setStructExpr
A map or object creation expression.
.google.api.expr.v1beta1.Expr.CreateStruct struct_expr = 8 [json_name = "structExpr"];
-
mergeStructExpr
A map or object creation expression.
.google.api.expr.v1beta1.Expr.CreateStruct struct_expr = 8 [json_name = "structExpr"];
-
clearStructExpr
A map or object creation expression.
.google.api.expr.v1beta1.Expr.CreateStruct struct_expr = 8 [json_name = "structExpr"];
-
hasComprehensionExpr
public boolean hasComprehensionExpr()A comprehension expression.
.google.api.expr.v1beta1.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.v1beta1.Expr.Comprehension comprehension_expr = 9 [json_name = "comprehensionExpr"];
- Specified by:
getComprehensionExpr
in interfaceExprOrBuilder
- Returns:
- The comprehensionExpr.
-
setComprehensionExpr
A comprehension expression.
.google.api.expr.v1beta1.Expr.Comprehension comprehension_expr = 9 [json_name = "comprehensionExpr"];
-
setComprehensionExpr
A comprehension expression.
.google.api.expr.v1beta1.Expr.Comprehension comprehension_expr = 9 [json_name = "comprehensionExpr"];
-
mergeComprehensionExpr
A comprehension expression.
.google.api.expr.v1beta1.Expr.Comprehension comprehension_expr = 9 [json_name = "comprehensionExpr"];
-
clearComprehensionExpr
A comprehension expression.
.google.api.expr.v1beta1.Expr.Comprehension comprehension_expr = 9 [json_name = "comprehensionExpr"];
-