# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from pyinjective.proto.injective.erc20.v1beta1 import query_pb2 as injective_dot_erc20_dot_v1beta1_dot_query__pb2


class QueryStub(object):
    """Query defines the gRPC querier service.
    """

    def __init__(self, channel):
        """Constructor.

        Args:
            channel: A grpc.Channel.
        """
        self.Params = channel.unary_unary(
                '/injective.erc20.v1beta1.Query/Params',
                request_serializer=injective_dot_erc20_dot_v1beta1_dot_query__pb2.QueryParamsRequest.SerializeToString,
                response_deserializer=injective_dot_erc20_dot_v1beta1_dot_query__pb2.QueryParamsResponse.FromString,
                _registered_method=True)
        self.AllTokenPairs = channel.unary_unary(
                '/injective.erc20.v1beta1.Query/AllTokenPairs',
                request_serializer=injective_dot_erc20_dot_v1beta1_dot_query__pb2.QueryAllTokenPairsRequest.SerializeToString,
                response_deserializer=injective_dot_erc20_dot_v1beta1_dot_query__pb2.QueryAllTokenPairsResponse.FromString,
                _registered_method=True)
        self.TokenPairByDenom = channel.unary_unary(
                '/injective.erc20.v1beta1.Query/TokenPairByDenom',
                request_serializer=injective_dot_erc20_dot_v1beta1_dot_query__pb2.QueryTokenPairByDenomRequest.SerializeToString,
                response_deserializer=injective_dot_erc20_dot_v1beta1_dot_query__pb2.QueryTokenPairByDenomResponse.FromString,
                _registered_method=True)
        self.TokenPairByERC20Address = channel.unary_unary(
                '/injective.erc20.v1beta1.Query/TokenPairByERC20Address',
                request_serializer=injective_dot_erc20_dot_v1beta1_dot_query__pb2.QueryTokenPairByERC20AddressRequest.SerializeToString,
                response_deserializer=injective_dot_erc20_dot_v1beta1_dot_query__pb2.QueryTokenPairByERC20AddressResponse.FromString,
                _registered_method=True)


class QueryServicer(object):
    """Query defines the gRPC querier service.
    """

    def Params(self, request, context):
        """Params defines a gRPC query method that returns the erc20 module's
        parameters.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AllTokenPairs(self, request, context):
        """AllTokenPairs defines a gRPC query method that returns the erc20
        module's created token pairs.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def TokenPairByDenom(self, request, context):
        """TokenPairByDenom defines a gRPC query method that returns the erc20
        module's token pair associated with the provided bank denom.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def TokenPairByERC20Address(self, request, context):
        """TokenPairByERC20Address defines a gRPC query method that returns the erc20
        module's token pair associated with the provided erc20 contract address.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_QueryServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Params': grpc.unary_unary_rpc_method_handler(
                    servicer.Params,
                    request_deserializer=injective_dot_erc20_dot_v1beta1_dot_query__pb2.QueryParamsRequest.FromString,
                    response_serializer=injective_dot_erc20_dot_v1beta1_dot_query__pb2.QueryParamsResponse.SerializeToString,
            ),
            'AllTokenPairs': grpc.unary_unary_rpc_method_handler(
                    servicer.AllTokenPairs,
                    request_deserializer=injective_dot_erc20_dot_v1beta1_dot_query__pb2.QueryAllTokenPairsRequest.FromString,
                    response_serializer=injective_dot_erc20_dot_v1beta1_dot_query__pb2.QueryAllTokenPairsResponse.SerializeToString,
            ),
            'TokenPairByDenom': grpc.unary_unary_rpc_method_handler(
                    servicer.TokenPairByDenom,
                    request_deserializer=injective_dot_erc20_dot_v1beta1_dot_query__pb2.QueryTokenPairByDenomRequest.FromString,
                    response_serializer=injective_dot_erc20_dot_v1beta1_dot_query__pb2.QueryTokenPairByDenomResponse.SerializeToString,
            ),
            'TokenPairByERC20Address': grpc.unary_unary_rpc_method_handler(
                    servicer.TokenPairByERC20Address,
                    request_deserializer=injective_dot_erc20_dot_v1beta1_dot_query__pb2.QueryTokenPairByERC20AddressRequest.FromString,
                    response_serializer=injective_dot_erc20_dot_v1beta1_dot_query__pb2.QueryTokenPairByERC20AddressResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'injective.erc20.v1beta1.Query', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('injective.erc20.v1beta1.Query', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class Query(object):
    """Query defines the gRPC querier service.
    """

    @staticmethod
    def Params(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/injective.erc20.v1beta1.Query/Params',
            injective_dot_erc20_dot_v1beta1_dot_query__pb2.QueryParamsRequest.SerializeToString,
            injective_dot_erc20_dot_v1beta1_dot_query__pb2.QueryParamsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def AllTokenPairs(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/injective.erc20.v1beta1.Query/AllTokenPairs',
            injective_dot_erc20_dot_v1beta1_dot_query__pb2.QueryAllTokenPairsRequest.SerializeToString,
            injective_dot_erc20_dot_v1beta1_dot_query__pb2.QueryAllTokenPairsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def TokenPairByDenom(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/injective.erc20.v1beta1.Query/TokenPairByDenom',
            injective_dot_erc20_dot_v1beta1_dot_query__pb2.QueryTokenPairByDenomRequest.SerializeToString,
            injective_dot_erc20_dot_v1beta1_dot_query__pb2.QueryTokenPairByDenomResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def TokenPairByERC20Address(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/injective.erc20.v1beta1.Query/TokenPairByERC20Address',
            injective_dot_erc20_dot_v1beta1_dot_query__pb2.QueryTokenPairByERC20AddressRequest.SerializeToString,
            injective_dot_erc20_dot_v1beta1_dot_query__pb2.QueryTokenPairByERC20AddressResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
