# 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.ibc.lightclients.wasm.v1 import tx_pb2 as ibc_dot_lightclients_dot_wasm_dot_v1_dot_tx__pb2


class MsgStub(object):
    """Msg defines the ibc/08-wasm Msg service.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.StoreCode = channel.unary_unary(
                '/ibc.lightclients.wasm.v1.Msg/StoreCode',
                request_serializer=ibc_dot_lightclients_dot_wasm_dot_v1_dot_tx__pb2.MsgStoreCode.SerializeToString,
                response_deserializer=ibc_dot_lightclients_dot_wasm_dot_v1_dot_tx__pb2.MsgStoreCodeResponse.FromString,
                _registered_method=True)
        self.RemoveChecksum = channel.unary_unary(
                '/ibc.lightclients.wasm.v1.Msg/RemoveChecksum',
                request_serializer=ibc_dot_lightclients_dot_wasm_dot_v1_dot_tx__pb2.MsgRemoveChecksum.SerializeToString,
                response_deserializer=ibc_dot_lightclients_dot_wasm_dot_v1_dot_tx__pb2.MsgRemoveChecksumResponse.FromString,
                _registered_method=True)
        self.MigrateContract = channel.unary_unary(
                '/ibc.lightclients.wasm.v1.Msg/MigrateContract',
                request_serializer=ibc_dot_lightclients_dot_wasm_dot_v1_dot_tx__pb2.MsgMigrateContract.SerializeToString,
                response_deserializer=ibc_dot_lightclients_dot_wasm_dot_v1_dot_tx__pb2.MsgMigrateContractResponse.FromString,
                _registered_method=True)


class MsgServicer(object):
    """Msg defines the ibc/08-wasm Msg service.
    """

    def StoreCode(self, request, context):
        """StoreCode defines a rpc handler method for MsgStoreCode.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RemoveChecksum(self, request, context):
        """RemoveChecksum defines a rpc handler method for MsgRemoveChecksum.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def MigrateContract(self, request, context):
        """MigrateContract defines a rpc handler method for MsgMigrateContract.
        """
        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 = {
            'StoreCode': grpc.unary_unary_rpc_method_handler(
                    servicer.StoreCode,
                    request_deserializer=ibc_dot_lightclients_dot_wasm_dot_v1_dot_tx__pb2.MsgStoreCode.FromString,
                    response_serializer=ibc_dot_lightclients_dot_wasm_dot_v1_dot_tx__pb2.MsgStoreCodeResponse.SerializeToString,
            ),
            'RemoveChecksum': grpc.unary_unary_rpc_method_handler(
                    servicer.RemoveChecksum,
                    request_deserializer=ibc_dot_lightclients_dot_wasm_dot_v1_dot_tx__pb2.MsgRemoveChecksum.FromString,
                    response_serializer=ibc_dot_lightclients_dot_wasm_dot_v1_dot_tx__pb2.MsgRemoveChecksumResponse.SerializeToString,
            ),
            'MigrateContract': grpc.unary_unary_rpc_method_handler(
                    servicer.MigrateContract,
                    request_deserializer=ibc_dot_lightclients_dot_wasm_dot_v1_dot_tx__pb2.MsgMigrateContract.FromString,
                    response_serializer=ibc_dot_lightclients_dot_wasm_dot_v1_dot_tx__pb2.MsgMigrateContractResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'ibc.lightclients.wasm.v1.Msg', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('ibc.lightclients.wasm.v1.Msg', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class Msg(object):
    """Msg defines the ibc/08-wasm Msg service.
    """

    @staticmethod
    def StoreCode(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,
            '/ibc.lightclients.wasm.v1.Msg/StoreCode',
            ibc_dot_lightclients_dot_wasm_dot_v1_dot_tx__pb2.MsgStoreCode.SerializeToString,
            ibc_dot_lightclients_dot_wasm_dot_v1_dot_tx__pb2.MsgStoreCodeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RemoveChecksum(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,
            '/ibc.lightclients.wasm.v1.Msg/RemoveChecksum',
            ibc_dot_lightclients_dot_wasm_dot_v1_dot_tx__pb2.MsgRemoveChecksum.SerializeToString,
            ibc_dot_lightclients_dot_wasm_dot_v1_dot_tx__pb2.MsgRemoveChecksumResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def MigrateContract(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,
            '/ibc.lightclients.wasm.v1.Msg/MigrateContract',
            ibc_dot_lightclients_dot_wasm_dot_v1_dot_tx__pb2.MsgMigrateContract.SerializeToString,
            ibc_dot_lightclients_dot_wasm_dot_v1_dot_tx__pb2.MsgMigrateContractResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
