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


class MsgStub(object):
    """Msg defines the Msg service."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreatePool = channel.unary_unary(
            '/nibiru.dex.v1.Msg/CreatePool',
            request_serializer=dex_dot_v1_dot_tx__pb2.MsgCreatePool.SerializeToString,
            response_deserializer=dex_dot_v1_dot_tx__pb2.MsgCreatePoolResponse.FromString,
        )
        self.JoinPool = channel.unary_unary(
            '/nibiru.dex.v1.Msg/JoinPool',
            request_serializer=dex_dot_v1_dot_tx__pb2.MsgJoinPool.SerializeToString,
            response_deserializer=dex_dot_v1_dot_tx__pb2.MsgJoinPoolResponse.FromString,
        )
        self.ExitPool = channel.unary_unary(
            '/nibiru.dex.v1.Msg/ExitPool',
            request_serializer=dex_dot_v1_dot_tx__pb2.MsgExitPool.SerializeToString,
            response_deserializer=dex_dot_v1_dot_tx__pb2.MsgExitPoolResponse.FromString,
        )
        self.SwapAssets = channel.unary_unary(
            '/nibiru.dex.v1.Msg/SwapAssets',
            request_serializer=dex_dot_v1_dot_tx__pb2.MsgSwapAssets.SerializeToString,
            response_deserializer=dex_dot_v1_dot_tx__pb2.MsgSwapAssetsResponse.FromString,
        )


class MsgServicer(object):
    """Msg defines the Msg service."""

    def CreatePool(self, request, context):
        """Used to create a pool."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def JoinPool(self, request, context):
        """Join a pool as a liquidity provider."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ExitPool(self, request, context):
        """Exit a pool position by returning LP shares"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SwapAssets(self, request, context):
        """Swap assets in a pool"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_MsgServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'CreatePool': grpc.unary_unary_rpc_method_handler(
            servicer.CreatePool,
            request_deserializer=dex_dot_v1_dot_tx__pb2.MsgCreatePool.FromString,
            response_serializer=dex_dot_v1_dot_tx__pb2.MsgCreatePoolResponse.SerializeToString,
        ),
        'JoinPool': grpc.unary_unary_rpc_method_handler(
            servicer.JoinPool,
            request_deserializer=dex_dot_v1_dot_tx__pb2.MsgJoinPool.FromString,
            response_serializer=dex_dot_v1_dot_tx__pb2.MsgJoinPoolResponse.SerializeToString,
        ),
        'ExitPool': grpc.unary_unary_rpc_method_handler(
            servicer.ExitPool,
            request_deserializer=dex_dot_v1_dot_tx__pb2.MsgExitPool.FromString,
            response_serializer=dex_dot_v1_dot_tx__pb2.MsgExitPoolResponse.SerializeToString,
        ),
        'SwapAssets': grpc.unary_unary_rpc_method_handler(
            servicer.SwapAssets,
            request_deserializer=dex_dot_v1_dot_tx__pb2.MsgSwapAssets.FromString,
            response_serializer=dex_dot_v1_dot_tx__pb2.MsgSwapAssetsResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler('nibiru.dex.v1.Msg', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def CreatePool(
        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,
            '/nibiru.dex.v1.Msg/CreatePool',
            dex_dot_v1_dot_tx__pb2.MsgCreatePool.SerializeToString,
            dex_dot_v1_dot_tx__pb2.MsgCreatePoolResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def JoinPool(
        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,
            '/nibiru.dex.v1.Msg/JoinPool',
            dex_dot_v1_dot_tx__pb2.MsgJoinPool.SerializeToString,
            dex_dot_v1_dot_tx__pb2.MsgJoinPoolResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def ExitPool(
        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,
            '/nibiru.dex.v1.Msg/ExitPool',
            dex_dot_v1_dot_tx__pb2.MsgExitPool.SerializeToString,
            dex_dot_v1_dot_tx__pb2.MsgExitPoolResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def SwapAssets(
        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,
            '/nibiru.dex.v1.Msg/SwapAssets',
            dex_dot_v1_dot_tx__pb2.MsgSwapAssets.SerializeToString,
            dex_dot_v1_dot_tx__pb2.MsgSwapAssetsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
