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

from v4_proto.dydxprotocol.prices import tx_pb2 as dydxprotocol_dot_prices_dot_tx__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.UpdateMarketPrices = channel.unary_unary(
                '/dydxprotocol.prices.Msg/UpdateMarketPrices',
                request_serializer=dydxprotocol_dot_prices_dot_tx__pb2.MsgUpdateMarketPrices.SerializeToString,
                response_deserializer=dydxprotocol_dot_prices_dot_tx__pb2.MsgUpdateMarketPricesResponse.FromString,
                )
        self.CreateOracleMarket = channel.unary_unary(
                '/dydxprotocol.prices.Msg/CreateOracleMarket',
                request_serializer=dydxprotocol_dot_prices_dot_tx__pb2.MsgCreateOracleMarket.SerializeToString,
                response_deserializer=dydxprotocol_dot_prices_dot_tx__pb2.MsgCreateOracleMarketResponse.FromString,
                )
        self.UpdateMarketParam = channel.unary_unary(
                '/dydxprotocol.prices.Msg/UpdateMarketParam',
                request_serializer=dydxprotocol_dot_prices_dot_tx__pb2.MsgUpdateMarketParam.SerializeToString,
                response_deserializer=dydxprotocol_dot_prices_dot_tx__pb2.MsgUpdateMarketParamResponse.FromString,
                )


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

    def UpdateMarketPrices(self, request, context):
        """UpdateMarketPrices updates the oracle price of a market relative to
        quoteCurrency.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateOracleMarket(self, request, context):
        """CreateOracleMarket creates a new oracle market.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateMarketParam(self, request, context):
        """UpdateMarketParams allows governance to update the parameters of an
        oracle market.
        """
        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 = {
            'UpdateMarketPrices': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateMarketPrices,
                    request_deserializer=dydxprotocol_dot_prices_dot_tx__pb2.MsgUpdateMarketPrices.FromString,
                    response_serializer=dydxprotocol_dot_prices_dot_tx__pb2.MsgUpdateMarketPricesResponse.SerializeToString,
            ),
            'CreateOracleMarket': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateOracleMarket,
                    request_deserializer=dydxprotocol_dot_prices_dot_tx__pb2.MsgCreateOracleMarket.FromString,
                    response_serializer=dydxprotocol_dot_prices_dot_tx__pb2.MsgCreateOracleMarketResponse.SerializeToString,
            ),
            'UpdateMarketParam': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateMarketParam,
                    request_deserializer=dydxprotocol_dot_prices_dot_tx__pb2.MsgUpdateMarketParam.FromString,
                    response_serializer=dydxprotocol_dot_prices_dot_tx__pb2.MsgUpdateMarketParamResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'dydxprotocol.prices.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 UpdateMarketPrices(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, '/dydxprotocol.prices.Msg/UpdateMarketPrices',
            dydxprotocol_dot_prices_dot_tx__pb2.MsgUpdateMarketPrices.SerializeToString,
            dydxprotocol_dot_prices_dot_tx__pb2.MsgUpdateMarketPricesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreateOracleMarket(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, '/dydxprotocol.prices.Msg/CreateOracleMarket',
            dydxprotocol_dot_prices_dot_tx__pb2.MsgCreateOracleMarket.SerializeToString,
            dydxprotocol_dot_prices_dot_tx__pb2.MsgCreateOracleMarketResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateMarketParam(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, '/dydxprotocol.prices.Msg/UpdateMarketParam',
            dydxprotocol_dot_prices_dot_tx__pb2.MsgUpdateMarketParam.SerializeToString,
            dydxprotocol_dot_prices_dot_tx__pb2.MsgUpdateMarketParamResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
