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
  • Method Details

    • getExprKindCase

      public Expr.ExprKindCase getExprKindCase()
      Specified by:
      getExprKindCase in interface ExprOrBuilder
    • clearExprKind

      public Expr.Builder 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 interface ExprOrBuilder
      Returns:
      The id.
    • setId

      public Expr.Builder setId(int value)
       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

      public Expr.Builder 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 interface ExprOrBuilder
      Returns:
      Whether the literalExpr field is set.
    • getLiteralExpr

      public Literal getLiteralExpr()
       A literal expression.
       
      .google.api.expr.v1beta1.Literal literal_expr = 3 [json_name = "literalExpr"];
      Specified by:
      getLiteralExpr in interface ExprOrBuilder
      Returns:
      The literalExpr.
    • setLiteralExpr

      public Expr.Builder setLiteralExpr(Literal value)
       A literal expression.
       
      .google.api.expr.v1beta1.Literal literal_expr = 3 [json_name = "literalExpr"];
    • setLiteralExpr

      public Expr.Builder setLiteralExpr(Literal.Builder builderForValue)
       A literal expression.
       
      .google.api.expr.v1beta1.Literal literal_expr = 3 [json_name = "literalExpr"];
    • mergeLiteralExpr

      public Expr.Builder mergeLiteralExpr(Literal value)
       A literal expression.
       
      .google.api.expr.v1beta1.Literal literal_expr = 3 [json_name = "literalExpr"];
    • clearLiteralExpr

      public Expr.Builder 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 interface ExprOrBuilder
      Returns:
      Whether the identExpr field is set.
    • getIdentExpr

      public Expr.Ident getIdentExpr()
       An identifier expression.
       
      .google.api.expr.v1beta1.Expr.Ident ident_expr = 4 [json_name = "identExpr"];
      Specified by:
      getIdentExpr in interface ExprOrBuilder
      Returns:
      The identExpr.
    • setIdentExpr

      public Expr.Builder setIdentExpr(Expr.Ident value)
       An identifier expression.
       
      .google.api.expr.v1beta1.Expr.Ident ident_expr = 4 [json_name = "identExpr"];
    • setIdentExpr

      public Expr.Builder setIdentExpr(Expr.Ident.Builder builderForValue)
       An identifier expression.
       
      .google.api.expr.v1beta1.Expr.Ident ident_expr = 4 [json_name = "identExpr"];
    • mergeIdentExpr

      public Expr.Builder mergeIdentExpr(Expr.Ident value)
       An identifier expression.
       
      .google.api.expr.v1beta1.Expr.Ident ident_expr = 4 [json_name = "identExpr"];
    • clearIdentExpr

      public Expr.Builder 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 interface ExprOrBuilder
      Returns:
      Whether the selectExpr field is set.
    • getSelectExpr

      public Expr.Select 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 interface ExprOrBuilder
      Returns:
      The selectExpr.
    • setSelectExpr

      public Expr.Builder setSelectExpr(Expr.Select value)
       A field selection expression, e.g. `request.auth`.
       
      .google.api.expr.v1beta1.Expr.Select select_expr = 5 [json_name = "selectExpr"];
    • setSelectExpr

      public Expr.Builder setSelectExpr(Expr.Select.Builder builderForValue)
       A field selection expression, e.g. `request.auth`.
       
      .google.api.expr.v1beta1.Expr.Select select_expr = 5 [json_name = "selectExpr"];
    • mergeSelectExpr

      public Expr.Builder mergeSelectExpr(Expr.Select value)
       A field selection expression, e.g. `request.auth`.
       
      .google.api.expr.v1beta1.Expr.Select select_expr = 5 [json_name = "selectExpr"];
    • clearSelectExpr

      public Expr.Builder 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 interface ExprOrBuilder
      Returns:
      Whether the callExpr field is set.
    • getCallExpr

      public Expr.Call 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 interface ExprOrBuilder
      Returns:
      The callExpr.
    • setCallExpr

      public Expr.Builder setCallExpr(Expr.Call value)
       A call expression, including calls to predefined functions and operators.
       
      .google.api.expr.v1beta1.Expr.Call call_expr = 6 [json_name = "callExpr"];
    • setCallExpr

      public Expr.Builder setCallExpr(Expr.Call.Builder builderForValue)
       A call expression, including calls to predefined functions and operators.
       
      .google.api.expr.v1beta1.Expr.Call call_expr = 6 [json_name = "callExpr"];
    • mergeCallExpr

      public Expr.Builder mergeCallExpr(Expr.Call value)
       A call expression, including calls to predefined functions and operators.
       
      .google.api.expr.v1beta1.Expr.Call call_expr = 6 [json_name = "callExpr"];
    • clearCallExpr

      public Expr.Builder 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 interface ExprOrBuilder
      Returns:
      Whether the listExpr field is set.
    • getListExpr

      public Expr.CreateList getListExpr()
       A list creation expression.
       
      .google.api.expr.v1beta1.Expr.CreateList list_expr = 7 [json_name = "listExpr"];
      Specified by:
      getListExpr in interface ExprOrBuilder
      Returns:
      The listExpr.
    • setListExpr

      public Expr.Builder setListExpr(Expr.CreateList value)
       A list creation expression.
       
      .google.api.expr.v1beta1.Expr.CreateList list_expr = 7 [json_name = "listExpr"];
    • setListExpr

      public Expr.Builder setListExpr(Expr.CreateList.Builder builderForValue)
       A list creation expression.
       
      .google.api.expr.v1beta1.Expr.CreateList list_expr = 7 [json_name = "listExpr"];
    • mergeListExpr

      public Expr.Builder mergeListExpr(Expr.CreateList value)
       A list creation expression.
       
      .google.api.expr.v1beta1.Expr.CreateList list_expr = 7 [json_name = "listExpr"];
    • clearListExpr

      public Expr.Builder 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 interface ExprOrBuilder
      Returns:
      Whether the structExpr field is set.
    • getStructExpr

      public Expr.CreateStruct getStructExpr()
       A map or object creation expression.
       
      .google.api.expr.v1beta1.Expr.CreateStruct struct_expr = 8 [json_name = "structExpr"];
      Specified by:
      getStructExpr in interface ExprOrBuilder
      Returns:
      The structExpr.
    • setStructExpr

      public Expr.Builder setStructExpr(Expr.CreateStruct value)
       A map or object creation expression.
       
      .google.api.expr.v1beta1.Expr.CreateStruct struct_expr = 8 [json_name = "structExpr"];
    • setStructExpr

      public Expr.Builder setStructExpr(Expr.CreateStruct.Builder builderForValue)
       A map or object creation expression.
       
      .google.api.expr.v1beta1.Expr.CreateStruct struct_expr = 8 [json_name = "structExpr"];
    • mergeStructExpr

      public Expr.Builder mergeStructExpr(Expr.CreateStruct value)
       A map or object creation expression.
       
      .google.api.expr.v1beta1.Expr.CreateStruct struct_expr = 8 [json_name = "structExpr"];
    • clearStructExpr

      public Expr.Builder 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 interface ExprOrBuilder
      Returns:
      Whether the comprehensionExpr field is set.
    • getComprehensionExpr

      public Expr.Comprehension getComprehensionExpr()
       A comprehension expression.
       
      .google.api.expr.v1beta1.Expr.Comprehension comprehension_expr = 9 [json_name = "comprehensionExpr"];
      Specified by:
      getComprehensionExpr in interface ExprOrBuilder
      Returns:
      The comprehensionExpr.
    • setComprehensionExpr

      public Expr.Builder setComprehensionExpr(Expr.Comprehension value)
       A comprehension expression.
       
      .google.api.expr.v1beta1.Expr.Comprehension comprehension_expr = 9 [json_name = "comprehensionExpr"];
    • setComprehensionExpr

      public Expr.Builder setComprehensionExpr(Expr.Comprehension.Builder builderForValue)
       A comprehension expression.
       
      .google.api.expr.v1beta1.Expr.Comprehension comprehension_expr = 9 [json_name = "comprehensionExpr"];
    • mergeComprehensionExpr

      public Expr.Builder mergeComprehensionExpr(Expr.Comprehension value)
       A comprehension expression.
       
      .google.api.expr.v1beta1.Expr.Comprehension comprehension_expr = 9 [json_name = "comprehensionExpr"];
    • clearComprehensionExpr

      public Expr.Builder clearComprehensionExpr()
       A comprehension expression.
       
      .google.api.expr.v1beta1.Expr.Comprehension comprehension_expr = 9 [json_name = "comprehensionExpr"];