Package com.google.api.expr.v1alpha1
Class Decl.FunctionDecl.Overload
java.lang.Object
com.google.protobuf.AbstractMessageLite<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite<Decl.FunctionDecl.Overload,Decl.FunctionDecl.Overload.Builder>
com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload
- All Implemented Interfaces:
Decl.FunctionDecl.OverloadOrBuilder
,com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
- Enclosing class:
- Decl.FunctionDecl
public static final class Decl.FunctionDecl.Overload
extends com.google.protobuf.GeneratedMessageLite<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
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
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.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageLite
com.google.protobuf.GeneratedMessageLite.DefaultInstanceBasedParser<T extends com.google.protobuf.GeneratedMessageLite<T,
?>>, com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageLite.GeneratedExtension<ContainingType extends com.google.protobuf.MessageLite, Type extends Object>, com.google.protobuf.GeneratedMessageLite.MethodToInvoke, com.google.protobuf.GeneratedMessageLite.SerializedForm Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
Fields inherited from class com.google.protobuf.GeneratedMessageLite
unknownFields
Fields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode
-
Method Summary
Modifier and TypeMethodDescriptionprotected final Object
dynamicMethod
(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) static Decl.FunctionDecl.Overload
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.getParamsOrBuilder
(int index) List of function parameter [Type][google.api.expr.v1alpha1.Type] values.List<? extends TypeOrBuilder>
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.newBuilder
(Decl.FunctionDecl.Overload prototype) static Decl.FunctionDecl.Overload
parseDelimitedFrom
(InputStream input) static Decl.FunctionDecl.Overload
parseDelimitedFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Decl.FunctionDecl.Overload
parseFrom
(byte[] data) static Decl.FunctionDecl.Overload
parseFrom
(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Decl.FunctionDecl.Overload
parseFrom
(com.google.protobuf.ByteString data) static Decl.FunctionDecl.Overload
parseFrom
(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Decl.FunctionDecl.Overload
parseFrom
(com.google.protobuf.CodedInputStream input) static Decl.FunctionDecl.Overload
parseFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Decl.FunctionDecl.Overload
parseFrom
(InputStream input) static Decl.FunctionDecl.Overload
parseFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Decl.FunctionDecl.Overload
parseFrom
(ByteBuffer data) static Decl.FunctionDecl.Overload
parseFrom
(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<Decl.FunctionDecl.Overload>
parser()
Methods inherited from class com.google.protobuf.GeneratedMessageLite
createBuilder, createBuilder, dynamicMethod, dynamicMethod, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstanceForType, getParserForType, getSerializedSize, hashCode, isInitialized, isInitialized, makeImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newMessageInfo, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parseUnknownField, registerDefaultInstance, toBuilder, toString, writeTo
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Field Details
-
OVERLOAD_ID_FIELD_NUMBER
public static final int OVERLOAD_ID_FIELD_NUMBER- See Also:
-
PARAMS_FIELD_NUMBER
public static final int PARAMS_FIELD_NUMBER- See Also:
-
TYPE_PARAMS_FIELD_NUMBER
public static final int TYPE_PARAMS_FIELD_NUMBER- See Also:
-
RESULT_TYPE_FIELD_NUMBER
public static final int RESULT_TYPE_FIELD_NUMBER- See Also:
-
IS_INSTANCE_FUNCTION_FIELD_NUMBER
public static final int IS_INSTANCE_FUNCTION_FIELD_NUMBER- See Also:
-
DOC_FIELD_NUMBER
public static final int DOC_FIELD_NUMBER- See Also:
-
-
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.
-
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
-
getParamsOrBuilderList
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"];
-
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
-
getParamsOrBuilder
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.
-
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.
-
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.
-
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.
-
parseFrom
public static Decl.FunctionDecl.Overload parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Decl.FunctionDecl.Overload parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Decl.FunctionDecl.Overload parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Decl.FunctionDecl.Overload parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Decl.FunctionDecl.Overload parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Decl.FunctionDecl.Overload parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Decl.FunctionDecl.Overload parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Decl.FunctionDecl.Overload parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static Decl.FunctionDecl.Overload parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static Decl.FunctionDecl.Overload parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilder
-
newBuilder
-
dynamicMethod
protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) - Specified by:
dynamicMethod
in classcom.google.protobuf.GeneratedMessageLite<Decl.FunctionDecl.Overload,
Decl.FunctionDecl.Overload.Builder>
-
getDefaultInstance
-
parser
-