Package com.google.api.expr.v1alpha1
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
-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance
-
Method Summary
Modifier and TypeMethodDescriptionaddAllParams
(Iterable<? extends Type> values) List of function parameter [Type][google.api.expr.v1alpha1.Type] values.addAllTypeParams
(Iterable<String> values) The type param names associated with the function declaration.List of function parameter [Type][google.api.expr.v1alpha1.Type] values.addParams
(int index, Type.Builder builderForValue) List of function parameter [Type][google.api.expr.v1alpha1.Type] values.List of function parameter [Type][google.api.expr.v1alpha1.Type] values.addParams
(Type.Builder builderForValue) List of function parameter [Type][google.api.expr.v1alpha1.Type] values.addTypeParams
(String value) The type param names associated with the function declaration.addTypeParamsBytes
(com.google.protobuf.ByteString value) The type param names associated with the function declaration.clearDoc()
Documentation string for the overload.Whether the function is to be used in a method call-style `x.f(...)` or a function call-style `f(x, ...)`.Required.List of function parameter [Type][google.api.expr.v1alpha1.Type] values.Required.The type param names associated with the function declaration.getDoc()
Documentation string for the overload.com.google.protobuf.ByteString
Documentation string for the overload.boolean
Whether the function is to be used in a method call-style `x.f(...)` or a function call-style `f(x, ...)`.Required.com.google.protobuf.ByteString
Required.getParams
(int index) List of function parameter [Type][google.api.expr.v1alpha1.Type] values.int
List of function parameter [Type][google.api.expr.v1alpha1.Type] values.List of function parameter [Type][google.api.expr.v1alpha1.Type] values.Required.getTypeParams
(int index) The type param names associated with the function declaration.com.google.protobuf.ByteString
getTypeParamsBytes
(int index) The type param names associated with the function declaration.int
The type param names associated with the function declaration.The type param names associated with the function declaration.boolean
Required.mergeResultType
(Type value) Required.removeParams
(int index) List of function parameter [Type][google.api.expr.v1alpha1.Type] values.Documentation string for the overload.setDocBytes
(com.google.protobuf.ByteString value) Documentation string for the overload.setIsInstanceFunction
(boolean value) Whether the function is to be used in a method call-style `x.f(...)` or a function call-style `f(x, ...)`.setOverloadId
(String value) Required.setOverloadIdBytes
(com.google.protobuf.ByteString value) Required.List of function parameter [Type][google.api.expr.v1alpha1.Type] values.setParams
(int index, Type.Builder builderForValue) List of function parameter [Type][google.api.expr.v1alpha1.Type] values.setResultType
(Type value) Required.setResultType
(Type.Builder builderForValue) Required.setTypeParams
(int index, String value) The type param names associated with the function declaration.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
-
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 interfaceDecl.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 interfaceDecl.FunctionDecl.OverloadOrBuilder
- Returns:
- The bytes for overloadId.
-
setOverloadId
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
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
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
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 interfaceDecl.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 interfaceDecl.FunctionDecl.OverloadOrBuilder
-
getParams
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 interfaceDecl.FunctionDecl.OverloadOrBuilder
-
setParams
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
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
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
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
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
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
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
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
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
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 interfaceDecl.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 interfaceDecl.FunctionDecl.OverloadOrBuilder
- Returns:
- The count of typeParams.
-
getTypeParams
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 interfaceDecl.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 interfaceDecl.FunctionDecl.OverloadOrBuilder
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the typeParams at the given index.
-
setTypeParams
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
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
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
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
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 interfaceDecl.FunctionDecl.OverloadOrBuilder
- Returns:
- Whether the resultType field is set.
-
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 interfaceDecl.FunctionDecl.OverloadOrBuilder
- Returns:
- The resultType.
-
setResultType
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
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
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
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 interfaceDecl.FunctionDecl.OverloadOrBuilder
- Returns:
- The isInstanceFunction.
-
setIsInstanceFunction
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
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
Documentation string for the overload.
string doc = 6 [json_name = "doc"];
- Specified by:
getDoc
in interfaceDecl.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 interfaceDecl.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
Documentation string for the overload.
string doc = 6 [json_name = "doc"];
- Parameters:
value
- The bytes for doc to set.- Returns:
- This builder for chaining.
-