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

public final class Expr extends com.google.protobuf.GeneratedMessage 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
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • exprKindCase_

      private int exprKindCase_
    • exprKind_

      private Object 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

      private static final Expr DEFAULT_INSTANCE
    • PARSER

      private static final com.google.protobuf.Parser<Expr> 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:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getExprKindCase

      public Expr.ExprKindCase getExprKindCase()
      Specified by:
      getExprKindCase in interface ExprOrBuilder
    • 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:
      getId in interface ExprOrBuilder
      Returns:
      The id.
    • hasConstExpr

      public boolean hasConstExpr()
       A literal expression.
       
      .google.api.expr.v1alpha1.Constant const_expr = 3;
      Specified by:
      hasConstExpr in interface ExprOrBuilder
      Returns:
      Whether the constExpr field is set.
    • getConstExpr

      public Constant getConstExpr()
       A literal expression.
       
      .google.api.expr.v1alpha1.Constant const_expr = 3;
      Specified by:
      getConstExpr in interface ExprOrBuilder
      Returns:
      The constExpr.
    • getConstExprOrBuilder

      public ConstantOrBuilder getConstExprOrBuilder()
       A literal expression.
       
      .google.api.expr.v1alpha1.Constant const_expr = 3;
      Specified by:
      getConstExprOrBuilder in interface ExprOrBuilder
    • hasIdentExpr

      public boolean hasIdentExpr()
       An identifier expression.
       
      .google.api.expr.v1alpha1.Expr.Ident ident_expr = 4;
      Specified by:
      hasIdentExpr in interface ExprOrBuilder
      Returns:
      Whether the identExpr field is set.
    • getIdentExpr

      public Expr.Ident getIdentExpr()
       An identifier expression.
       
      .google.api.expr.v1alpha1.Expr.Ident ident_expr = 4;
      Specified by:
      getIdentExpr in interface ExprOrBuilder
      Returns:
      The identExpr.
    • getIdentExprOrBuilder

      public Expr.IdentOrBuilder getIdentExprOrBuilder()
       An identifier expression.
       
      .google.api.expr.v1alpha1.Expr.Ident ident_expr = 4;
      Specified by:
      getIdentExprOrBuilder in interface ExprOrBuilder
    • hasSelectExpr

      public boolean hasSelectExpr()
       A field selection expression, e.g. `request.auth`.
       
      .google.api.expr.v1alpha1.Expr.Select select_expr = 5;
      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.v1alpha1.Expr.Select select_expr = 5;
      Specified by:
      getSelectExpr in interface ExprOrBuilder
      Returns:
      The selectExpr.
    • getSelectExprOrBuilder

      public Expr.SelectOrBuilder getSelectExprOrBuilder()
       A field selection expression, e.g. `request.auth`.
       
      .google.api.expr.v1alpha1.Expr.Select select_expr = 5;
      Specified by:
      getSelectExprOrBuilder in interface ExprOrBuilder
    • 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:
      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.v1alpha1.Expr.Call call_expr = 6;
      Specified by:
      getCallExpr in interface ExprOrBuilder
      Returns:
      The callExpr.
    • getCallExprOrBuilder

      public Expr.CallOrBuilder getCallExprOrBuilder()
       A call expression, including calls to predefined functions and operators.
       
      .google.api.expr.v1alpha1.Expr.Call call_expr = 6;
      Specified by:
      getCallExprOrBuilder in interface ExprOrBuilder
    • hasListExpr

      public boolean hasListExpr()
       A list creation expression.
       
      .google.api.expr.v1alpha1.Expr.CreateList list_expr = 7;
      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.v1alpha1.Expr.CreateList list_expr = 7;
      Specified by:
      getListExpr in interface ExprOrBuilder
      Returns:
      The listExpr.
    • getListExprOrBuilder

      public Expr.CreateListOrBuilder getListExprOrBuilder()
       A list creation expression.
       
      .google.api.expr.v1alpha1.Expr.CreateList list_expr = 7;
      Specified by:
      getListExprOrBuilder in interface ExprOrBuilder
    • hasStructExpr

      public boolean hasStructExpr()
       A map or message creation expression.
       
      .google.api.expr.v1alpha1.Expr.CreateStruct struct_expr = 8;
      Specified by:
      hasStructExpr in interface ExprOrBuilder
      Returns:
      Whether the structExpr field is set.
    • getStructExpr

      public Expr.CreateStruct getStructExpr()
       A map or message creation expression.
       
      .google.api.expr.v1alpha1.Expr.CreateStruct struct_expr = 8;
      Specified by:
      getStructExpr in interface ExprOrBuilder
      Returns:
      The structExpr.
    • getStructExprOrBuilder

      public Expr.CreateStructOrBuilder getStructExprOrBuilder()
       A map or message creation expression.
       
      .google.api.expr.v1alpha1.Expr.CreateStruct struct_expr = 8;
      Specified by:
      getStructExprOrBuilder in interface ExprOrBuilder
    • hasComprehensionExpr

      public boolean hasComprehensionExpr()
       A comprehension expression.
       
      .google.api.expr.v1alpha1.Expr.Comprehension comprehension_expr = 9;
      Specified by:
      hasComprehensionExpr in interface ExprOrBuilder
      Returns:
      Whether the comprehensionExpr field is set.
    • getComprehensionExpr

      public Expr.Comprehension getComprehensionExpr()
       A comprehension expression.
       
      .google.api.expr.v1alpha1.Expr.Comprehension comprehension_expr = 9;
      Specified by:
      getComprehensionExpr in interface ExprOrBuilder
      Returns:
      The comprehensionExpr.
    • getComprehensionExprOrBuilder

      public Expr.ComprehensionOrBuilder getComprehensionExprOrBuilder()
       A comprehension expression.
       
      .google.api.expr.v1alpha1.Expr.Comprehension comprehension_expr = 9;
      Specified by:
      getComprehensionExprOrBuilder in interface ExprOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.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

      public static Expr parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      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

      public static Expr parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Expr parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Expr parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Expr parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Expr parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Expr parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public Expr.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static Expr.Builder newBuilder()
    • newBuilder

      public static Expr.Builder newBuilder(Expr prototype)
    • toBuilder

      public Expr.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Expr.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static Expr getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Expr> parser()
    • getParserForType

      public com.google.protobuf.Parser<Expr> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public Expr getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder