Class Decl.FunctionDecl.Overload.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<Decl.FunctionDecl.Overload,Decl.FunctionDecl.Overload.Builder>
com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.Builder
All Implemented Interfaces:
Decl.FunctionDecl.OverloadOrBuilder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, Cloneable
Enclosing class:
Decl.FunctionDecl.Overload

public static final class Decl.FunctionDecl.Overload.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<Decl.FunctionDecl.Overload,Decl.FunctionDecl.Overload.Builder> implements Decl.FunctionDecl.OverloadOrBuilder
 An overload indicates a function's parameter types and return type, and
 may optionally include a function body described in terms of
 [Expr][google.api.expr.v1alpha1.Expr] values.

 Functions overloads are declared in either a function or method
 call-style. For methods, the `params[0]` is the expected type of the
 target receiver.

 Overloads must have non-overlapping argument types after erasure of all
 parameterized type variables (similar as type erasure in Java).
 
Protobuf type google.api.expr.v1alpha1.Decl.FunctionDecl.Overload
  • Method Details

    • getOverloadId

      public String getOverloadId()
       Required. Globally unique overload name of the function which reflects
       the function name and argument types.
      
       This will be used by a [Reference][google.api.expr.v1alpha1.Reference]
       to indicate the `overload_id` that was resolved for the function
       `name`.
       
      string overload_id = 1 [json_name = "overloadId"];
      Specified by:
      getOverloadId in interface Decl.FunctionDecl.OverloadOrBuilder
      Returns:
      The overloadId.
    • getOverloadIdBytes

      public com.google.protobuf.ByteString getOverloadIdBytes()
       Required. Globally unique overload name of the function which reflects
       the function name and argument types.
      
       This will be used by a [Reference][google.api.expr.v1alpha1.Reference]
       to indicate the `overload_id` that was resolved for the function
       `name`.
       
      string overload_id = 1 [json_name = "overloadId"];
      Specified by:
      getOverloadIdBytes in interface Decl.FunctionDecl.OverloadOrBuilder
      Returns:
      The bytes for overloadId.
    • setOverloadId

      public Decl.FunctionDecl.Overload.Builder setOverloadId(String value)
       Required. Globally unique overload name of the function which reflects
       the function name and argument types.
      
       This will be used by a [Reference][google.api.expr.v1alpha1.Reference]
       to indicate the `overload_id` that was resolved for the function
       `name`.
       
      string overload_id = 1 [json_name = "overloadId"];
      Parameters:
      value - The overloadId to set.
      Returns:
      This builder for chaining.
    • clearOverloadId

      public Decl.FunctionDecl.Overload.Builder clearOverloadId()
       Required. Globally unique overload name of the function which reflects
       the function name and argument types.
      
       This will be used by a [Reference][google.api.expr.v1alpha1.Reference]
       to indicate the `overload_id` that was resolved for the function
       `name`.
       
      string overload_id = 1 [json_name = "overloadId"];
      Returns:
      This builder for chaining.
    • setOverloadIdBytes

      public Decl.FunctionDecl.Overload.Builder setOverloadIdBytes(com.google.protobuf.ByteString value)
       Required. Globally unique overload name of the function which reflects
       the function name and argument types.
      
       This will be used by a [Reference][google.api.expr.v1alpha1.Reference]
       to indicate the `overload_id` that was resolved for the function
       `name`.
       
      string overload_id = 1 [json_name = "overloadId"];
      Parameters:
      value - The bytes for overloadId to set.
      Returns:
      This builder for chaining.
    • getParamsList

      public List<Type> getParamsList()
       List of function parameter [Type][google.api.expr.v1alpha1.Type]
       values.
      
       Param types are disjoint after generic type parameters have been
       replaced with the type `DYN`. Since the `DYN` type is compatible with
       any other type, this means that if `A` is a type parameter, the
       function types `int<A>` and `int<int>` are not disjoint. Likewise,
       `map<string, string>` is not disjoint from `map<K, V>`.
      
       When the `result_type` of a function is a generic type param, the
       type param name also appears as the `type` of on at least one params.
       
      repeated .google.api.expr.v1alpha1.Type params = 2 [json_name = "params"];
      Specified by:
      getParamsList in interface Decl.FunctionDecl.OverloadOrBuilder
    • getParamsCount

      public int getParamsCount()
       List of function parameter [Type][google.api.expr.v1alpha1.Type]
       values.
      
       Param types are disjoint after generic type parameters have been
       replaced with the type `DYN`. Since the `DYN` type is compatible with
       any other type, this means that if `A` is a type parameter, the
       function types `int<A>` and `int<int>` are not disjoint. Likewise,
       `map<string, string>` is not disjoint from `map<K, V>`.
      
       When the `result_type` of a function is a generic type param, the
       type param name also appears as the `type` of on at least one params.
       
      repeated .google.api.expr.v1alpha1.Type params = 2 [json_name = "params"];
      Specified by:
      getParamsCount in interface Decl.FunctionDecl.OverloadOrBuilder
    • getParams

      public Type getParams(int index)
       List of function parameter [Type][google.api.expr.v1alpha1.Type]
       values.
      
       Param types are disjoint after generic type parameters have been
       replaced with the type `DYN`. Since the `DYN` type is compatible with
       any other type, this means that if `A` is a type parameter, the
       function types `int<A>` and `int<int>` are not disjoint. Likewise,
       `map<string, string>` is not disjoint from `map<K, V>`.
      
       When the `result_type` of a function is a generic type param, the
       type param name also appears as the `type` of on at least one params.
       
      repeated .google.api.expr.v1alpha1.Type params = 2 [json_name = "params"];
      Specified by:
      getParams in interface Decl.FunctionDecl.OverloadOrBuilder
    • setParams

      public Decl.FunctionDecl.Overload.Builder setParams(int index, Type value)
       List of function parameter [Type][google.api.expr.v1alpha1.Type]
       values.
      
       Param types are disjoint after generic type parameters have been
       replaced with the type `DYN`. Since the `DYN` type is compatible with
       any other type, this means that if `A` is a type parameter, the
       function types `int<A>` and `int<int>` are not disjoint. Likewise,
       `map<string, string>` is not disjoint from `map<K, V>`.
      
       When the `result_type` of a function is a generic type param, the
       type param name also appears as the `type` of on at least one params.
       
      repeated .google.api.expr.v1alpha1.Type params = 2 [json_name = "params"];
    • setParams

      public Decl.FunctionDecl.Overload.Builder setParams(int index, Type.Builder builderForValue)
       List of function parameter [Type][google.api.expr.v1alpha1.Type]
       values.
      
       Param types are disjoint after generic type parameters have been
       replaced with the type `DYN`. Since the `DYN` type is compatible with
       any other type, this means that if `A` is a type parameter, the
       function types `int<A>` and `int<int>` are not disjoint. Likewise,
       `map<string, string>` is not disjoint from `map<K, V>`.
      
       When the `result_type` of a function is a generic type param, the
       type param name also appears as the `type` of on at least one params.
       
      repeated .google.api.expr.v1alpha1.Type params = 2 [json_name = "params"];
    • addParams

      public Decl.FunctionDecl.Overload.Builder addParams(Type value)
       List of function parameter [Type][google.api.expr.v1alpha1.Type]
       values.
      
       Param types are disjoint after generic type parameters have been
       replaced with the type `DYN`. Since the `DYN` type is compatible with
       any other type, this means that if `A` is a type parameter, the
       function types `int<A>` and `int<int>` are not disjoint. Likewise,
       `map<string, string>` is not disjoint from `map<K, V>`.
      
       When the `result_type` of a function is a generic type param, the
       type param name also appears as the `type` of on at least one params.
       
      repeated .google.api.expr.v1alpha1.Type params = 2 [json_name = "params"];
    • addParams

      public Decl.FunctionDecl.Overload.Builder addParams(int index, Type value)
       List of function parameter [Type][google.api.expr.v1alpha1.Type]
       values.
      
       Param types are disjoint after generic type parameters have been
       replaced with the type `DYN`. Since the `DYN` type is compatible with
       any other type, this means that if `A` is a type parameter, the
       function types `int<A>` and `int<int>` are not disjoint. Likewise,
       `map<string, string>` is not disjoint from `map<K, V>`.
      
       When the `result_type` of a function is a generic type param, the
       type param name also appears as the `type` of on at least one params.
       
      repeated .google.api.expr.v1alpha1.Type params = 2 [json_name = "params"];
    • addParams

      public Decl.FunctionDecl.Overload.Builder addParams(Type.Builder builderForValue)
       List of function parameter [Type][google.api.expr.v1alpha1.Type]
       values.
      
       Param types are disjoint after generic type parameters have been
       replaced with the type `DYN`. Since the `DYN` type is compatible with
       any other type, this means that if `A` is a type parameter, the
       function types `int<A>` and `int<int>` are not disjoint. Likewise,
       `map<string, string>` is not disjoint from `map<K, V>`.
      
       When the `result_type` of a function is a generic type param, the
       type param name also appears as the `type` of on at least one params.
       
      repeated .google.api.expr.v1alpha1.Type params = 2 [json_name = "params"];
    • addParams

      public Decl.FunctionDecl.Overload.Builder addParams(int index, Type.Builder builderForValue)
       List of function parameter [Type][google.api.expr.v1alpha1.Type]
       values.
      
       Param types are disjoint after generic type parameters have been
       replaced with the type `DYN`. Since the `DYN` type is compatible with
       any other type, this means that if `A` is a type parameter, the
       function types `int<A>` and `int<int>` are not disjoint. Likewise,
       `map<string, string>` is not disjoint from `map<K, V>`.
      
       When the `result_type` of a function is a generic type param, the
       type param name also appears as the `type` of on at least one params.
       
      repeated .google.api.expr.v1alpha1.Type params = 2 [json_name = "params"];
    • addAllParams

      public Decl.FunctionDecl.Overload.Builder addAllParams(Iterable<? extends Type> values)
       List of function parameter [Type][google.api.expr.v1alpha1.Type]
       values.
      
       Param types are disjoint after generic type parameters have been
       replaced with the type `DYN`. Since the `DYN` type is compatible with
       any other type, this means that if `A` is a type parameter, the
       function types `int<A>` and `int<int>` are not disjoint. Likewise,
       `map<string, string>` is not disjoint from `map<K, V>`.
      
       When the `result_type` of a function is a generic type param, the
       type param name also appears as the `type` of on at least one params.
       
      repeated .google.api.expr.v1alpha1.Type params = 2 [json_name = "params"];
    • clearParams

      public Decl.FunctionDecl.Overload.Builder clearParams()
       List of function parameter [Type][google.api.expr.v1alpha1.Type]
       values.
      
       Param types are disjoint after generic type parameters have been
       replaced with the type `DYN`. Since the `DYN` type is compatible with
       any other type, this means that if `A` is a type parameter, the
       function types `int<A>` and `int<int>` are not disjoint. Likewise,
       `map<string, string>` is not disjoint from `map<K, V>`.
      
       When the `result_type` of a function is a generic type param, the
       type param name also appears as the `type` of on at least one params.
       
      repeated .google.api.expr.v1alpha1.Type params = 2 [json_name = "params"];
    • removeParams

      public Decl.FunctionDecl.Overload.Builder removeParams(int index)
       List of function parameter [Type][google.api.expr.v1alpha1.Type]
       values.
      
       Param types are disjoint after generic type parameters have been
       replaced with the type `DYN`. Since the `DYN` type is compatible with
       any other type, this means that if `A` is a type parameter, the
       function types `int<A>` and `int<int>` are not disjoint. Likewise,
       `map<string, string>` is not disjoint from `map<K, V>`.
      
       When the `result_type` of a function is a generic type param, the
       type param name also appears as the `type` of on at least one params.
       
      repeated .google.api.expr.v1alpha1.Type params = 2 [json_name = "params"];
    • getTypeParamsList

      public List<String> getTypeParamsList()
       The type param names associated with the function declaration.
      
       For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
       the type params of `K, V`.
       
      repeated string type_params = 3 [json_name = "typeParams"];
      Specified by:
      getTypeParamsList in interface Decl.FunctionDecl.OverloadOrBuilder
      Returns:
      A list containing the typeParams.
    • getTypeParamsCount

      public int getTypeParamsCount()
       The type param names associated with the function declaration.
      
       For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
       the type params of `K, V`.
       
      repeated string type_params = 3 [json_name = "typeParams"];
      Specified by:
      getTypeParamsCount in interface Decl.FunctionDecl.OverloadOrBuilder
      Returns:
      The count of typeParams.
    • getTypeParams

      public String getTypeParams(int index)
       The type param names associated with the function declaration.
      
       For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
       the type params of `K, V`.
       
      repeated string type_params = 3 [json_name = "typeParams"];
      Specified by:
      getTypeParams in interface Decl.FunctionDecl.OverloadOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The typeParams at the given index.
    • getTypeParamsBytes

      public com.google.protobuf.ByteString getTypeParamsBytes(int index)
       The type param names associated with the function declaration.
      
       For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
       the type params of `K, V`.
       
      repeated string type_params = 3 [json_name = "typeParams"];
      Specified by:
      getTypeParamsBytes in interface Decl.FunctionDecl.OverloadOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the typeParams at the given index.
    • setTypeParams

      public Decl.FunctionDecl.Overload.Builder setTypeParams(int index, String value)
       The type param names associated with the function declaration.
      
       For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
       the type params of `K, V`.
       
      repeated string type_params = 3 [json_name = "typeParams"];
      Parameters:
      index - The index to set the value at.
      value - The typeParams to set.
      Returns:
      This builder for chaining.
    • addTypeParams

      public Decl.FunctionDecl.Overload.Builder addTypeParams(String value)
       The type param names associated with the function declaration.
      
       For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
       the type params of `K, V`.
       
      repeated string type_params = 3 [json_name = "typeParams"];
      Parameters:
      value - The typeParams to add.
      Returns:
      This builder for chaining.
    • addAllTypeParams

      public Decl.FunctionDecl.Overload.Builder addAllTypeParams(Iterable<String> values)
       The type param names associated with the function declaration.
      
       For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
       the type params of `K, V`.
       
      repeated string type_params = 3 [json_name = "typeParams"];
      Parameters:
      values - The typeParams to add.
      Returns:
      This builder for chaining.
    • clearTypeParams

      public Decl.FunctionDecl.Overload.Builder clearTypeParams()
       The type param names associated with the function declaration.
      
       For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
       the type params of `K, V`.
       
      repeated string type_params = 3 [json_name = "typeParams"];
      Returns:
      This builder for chaining.
    • addTypeParamsBytes

      public Decl.FunctionDecl.Overload.Builder addTypeParamsBytes(com.google.protobuf.ByteString value)
       The type param names associated with the function declaration.
      
       For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
       the type params of `K, V`.
       
      repeated string type_params = 3 [json_name = "typeParams"];
      Parameters:
      value - The bytes of the typeParams to add.
      Returns:
      This builder for chaining.
    • hasResultType

      public boolean hasResultType()
       Required. The result type of the function. For example, the operator
       `string.isEmpty()` would have `result_type` of `kind: BOOL`.
       
      .google.api.expr.v1alpha1.Type result_type = 4 [json_name = "resultType"];
      Specified by:
      hasResultType in interface Decl.FunctionDecl.OverloadOrBuilder
      Returns:
      Whether the resultType field is set.
    • getResultType

      public Type getResultType()
       Required. The result type of the function. For example, the operator
       `string.isEmpty()` would have `result_type` of `kind: BOOL`.
       
      .google.api.expr.v1alpha1.Type result_type = 4 [json_name = "resultType"];
      Specified by:
      getResultType in interface Decl.FunctionDecl.OverloadOrBuilder
      Returns:
      The resultType.
    • setResultType

      public Decl.FunctionDecl.Overload.Builder setResultType(Type value)
       Required. The result type of the function. For example, the operator
       `string.isEmpty()` would have `result_type` of `kind: BOOL`.
       
      .google.api.expr.v1alpha1.Type result_type = 4 [json_name = "resultType"];
    • setResultType

      public Decl.FunctionDecl.Overload.Builder setResultType(Type.Builder builderForValue)
       Required. The result type of the function. For example, the operator
       `string.isEmpty()` would have `result_type` of `kind: BOOL`.
       
      .google.api.expr.v1alpha1.Type result_type = 4 [json_name = "resultType"];
    • mergeResultType

      public Decl.FunctionDecl.Overload.Builder mergeResultType(Type value)
       Required. The result type of the function. For example, the operator
       `string.isEmpty()` would have `result_type` of `kind: BOOL`.
       
      .google.api.expr.v1alpha1.Type result_type = 4 [json_name = "resultType"];
    • clearResultType

      public Decl.FunctionDecl.Overload.Builder clearResultType()
       Required. The result type of the function. For example, the operator
       `string.isEmpty()` would have `result_type` of `kind: BOOL`.
       
      .google.api.expr.v1alpha1.Type result_type = 4 [json_name = "resultType"];
    • getIsInstanceFunction

      public boolean getIsInstanceFunction()
       Whether the function is to be used in a method call-style `x.f(...)`
       or a function call-style `f(x, ...)`.
      
       For methods, the first parameter declaration, `params[0]` is the
       expected type of the target receiver.
       
      bool is_instance_function = 5 [json_name = "isInstanceFunction"];
      Specified by:
      getIsInstanceFunction in interface Decl.FunctionDecl.OverloadOrBuilder
      Returns:
      The isInstanceFunction.
    • setIsInstanceFunction

      public Decl.FunctionDecl.Overload.Builder setIsInstanceFunction(boolean value)
       Whether the function is to be used in a method call-style `x.f(...)`
       or a function call-style `f(x, ...)`.
      
       For methods, the first parameter declaration, `params[0]` is the
       expected type of the target receiver.
       
      bool is_instance_function = 5 [json_name = "isInstanceFunction"];
      Parameters:
      value - The isInstanceFunction to set.
      Returns:
      This builder for chaining.
    • clearIsInstanceFunction

      public Decl.FunctionDecl.Overload.Builder clearIsInstanceFunction()
       Whether the function is to be used in a method call-style `x.f(...)`
       or a function call-style `f(x, ...)`.
      
       For methods, the first parameter declaration, `params[0]` is the
       expected type of the target receiver.
       
      bool is_instance_function = 5 [json_name = "isInstanceFunction"];
      Returns:
      This builder for chaining.
    • getDoc

      public String getDoc()
       Documentation string for the overload.
       
      string doc = 6 [json_name = "doc"];
      Specified by:
      getDoc in interface Decl.FunctionDecl.OverloadOrBuilder
      Returns:
      The doc.
    • getDocBytes

      public com.google.protobuf.ByteString getDocBytes()
       Documentation string for the overload.
       
      string doc = 6 [json_name = "doc"];
      Specified by:
      getDocBytes in interface Decl.FunctionDecl.OverloadOrBuilder
      Returns:
      The bytes for doc.
    • setDoc

       Documentation string for the overload.
       
      string doc = 6 [json_name = "doc"];
      Parameters:
      value - The doc to set.
      Returns:
      This builder for chaining.
    • clearDoc

       Documentation string for the overload.
       
      string doc = 6 [json_name = "doc"];
      Returns:
      This builder for chaining.
    • setDocBytes

      public Decl.FunctionDecl.Overload.Builder setDocBytes(com.google.protobuf.ByteString value)
       Documentation string for the overload.
       
      string doc = 6 [json_name = "doc"];
      Parameters:
      value - The bytes for doc to set.
      Returns:
      This builder for chaining.