Class Decl.FunctionDecl.Overload

  • All Implemented Interfaces:
    Decl.FunctionDecl.OverloadOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.io.Serializable
    Enclosing class:
    Decl.FunctionDecl

    public static final class Decl.FunctionDecl.Overload
    extends com.google.protobuf.GeneratedMessageV3
    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
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Decl.FunctionDecl.Overload.Builder
      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.GeneratedMessageV3

        com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,​BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,​BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • Method Detail

      • newInstance

        protected java.lang.Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getUnknownFields

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
        Specified by:
        getUnknownFields in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getUnknownFields in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getOverloadId

        public java.lang.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;
        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;
        Specified by:
        getOverloadIdBytes in interface Decl.FunctionDecl.OverloadOrBuilder
        Returns:
        The bytes for overloadId.
      • getParamsList

        public java.util.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;
        Specified by:
        getParamsList in interface Decl.FunctionDecl.OverloadOrBuilder
      • getParamsOrBuilderList

        public java.util.List<? extends TypeOrBuilder> 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;
        Specified by:
        getParamsOrBuilderList 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;
        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;
        Specified by:
        getParams in interface Decl.FunctionDecl.OverloadOrBuilder
      • getParamsOrBuilder

        public TypeOrBuilder getParamsOrBuilder​(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;
        Specified by:
        getParamsOrBuilder in interface Decl.FunctionDecl.OverloadOrBuilder
      • getTypeParamsList

        public com.google.protobuf.ProtocolStringList 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;
        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;
        Specified by:
        getTypeParamsCount in interface Decl.FunctionDecl.OverloadOrBuilder
        Returns:
        The count of typeParams.
      • getTypeParams

        public java.lang.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;
        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;
        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.
      • 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;
        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;
        Specified by:
        getResultType in interface Decl.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;
        Specified by:
        getIsInstanceFunction in interface Decl.FunctionDecl.OverloadOrBuilder
        Returns:
        The isInstanceFunction.
      • isInitialized

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

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

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

        public boolean equals​(java.lang.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 Decl.FunctionDecl.Overload parseFrom​(java.nio.ByteBuffer data)
                                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Decl.FunctionDecl.Overload parseFrom​(java.nio.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

        public static Decl.FunctionDecl.Overload parseFrom​(java.io.InputStream input)
                                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static Decl.FunctionDecl.Overload parseFrom​(java.io.InputStream input,
                                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static Decl.FunctionDecl.Overload parseDelimitedFrom​(java.io.InputStream input)
                                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static Decl.FunctionDecl.Overload parseDelimitedFrom​(java.io.InputStream input,
                                                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static Decl.FunctionDecl.Overload parseFrom​(com.google.protobuf.CodedInputStream input)
                                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static Decl.FunctionDecl.Overload parseFrom​(com.google.protobuf.CodedInputStream input,
                                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • newBuilderForType

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

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

        protected Decl.FunctionDecl.Overload.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<Decl.FunctionDecl.Overload> 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.GeneratedMessageV3
      • getDefaultInstanceForType

        public Decl.FunctionDecl.Overload getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder