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

from cosmpy.protos.cosmwasm.wasm.v1beta1 import (
    tx_pb2 as cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2,
)


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.StoreCode = channel.unary_unary(
            "/cosmwasm.wasm.v1beta1.Msg/StoreCode",
            request_serializer=cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgStoreCode.SerializeToString,
            response_deserializer=cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgStoreCodeResponse.FromString,
        )
        self.InstantiateContract = channel.unary_unary(
            "/cosmwasm.wasm.v1beta1.Msg/InstantiateContract",
            request_serializer=cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgInstantiateContract.SerializeToString,
            response_deserializer=cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgInstantiateContractResponse.FromString,
        )
        self.ExecuteContract = channel.unary_unary(
            "/cosmwasm.wasm.v1beta1.Msg/ExecuteContract",
            request_serializer=cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgExecuteContract.SerializeToString,
            response_deserializer=cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgExecuteContractResponse.FromString,
        )
        self.MigrateContract = channel.unary_unary(
            "/cosmwasm.wasm.v1beta1.Msg/MigrateContract",
            request_serializer=cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgMigrateContract.SerializeToString,
            response_deserializer=cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgMigrateContractResponse.FromString,
        )
        self.UpdateAdmin = channel.unary_unary(
            "/cosmwasm.wasm.v1beta1.Msg/UpdateAdmin",
            request_serializer=cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgUpdateAdmin.SerializeToString,
            response_deserializer=cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgUpdateAdminResponse.FromString,
        )
        self.ClearAdmin = channel.unary_unary(
            "/cosmwasm.wasm.v1beta1.Msg/ClearAdmin",
            request_serializer=cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgClearAdmin.SerializeToString,
            response_deserializer=cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgClearAdminResponse.FromString,
        )


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

    def StoreCode(self, request, context):
        """StoreCode to submit Wasm code to the system"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def InstantiateContract(self, request, context):
        """Instantiate creates a new smart contract instance for the given code id."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def ExecuteContract(self, request, context):
        """Execute submits the given message data to a smart contract"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def MigrateContract(self, request, context):
        """Migrate runs a code upgrade/ downgrade for a smart contract"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def UpdateAdmin(self, request, context):
        """UpdateAdmin sets a new   admin for a smart contract"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def ClearAdmin(self, request, context):
        """ClearAdmin removes any admin stored for a smart contract"""
        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=cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgStoreCode.FromString,
            response_serializer=cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgStoreCodeResponse.SerializeToString,
        ),
        "InstantiateContract": grpc.unary_unary_rpc_method_handler(
            servicer.InstantiateContract,
            request_deserializer=cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgInstantiateContract.FromString,
            response_serializer=cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgInstantiateContractResponse.SerializeToString,
        ),
        "ExecuteContract": grpc.unary_unary_rpc_method_handler(
            servicer.ExecuteContract,
            request_deserializer=cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgExecuteContract.FromString,
            response_serializer=cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgExecuteContractResponse.SerializeToString,
        ),
        "MigrateContract": grpc.unary_unary_rpc_method_handler(
            servicer.MigrateContract,
            request_deserializer=cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgMigrateContract.FromString,
            response_serializer=cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgMigrateContractResponse.SerializeToString,
        ),
        "UpdateAdmin": grpc.unary_unary_rpc_method_handler(
            servicer.UpdateAdmin,
            request_deserializer=cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgUpdateAdmin.FromString,
            response_serializer=cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgUpdateAdminResponse.SerializeToString,
        ),
        "ClearAdmin": grpc.unary_unary_rpc_method_handler(
            servicer.ClearAdmin,
            request_deserializer=cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgClearAdmin.FromString,
            response_serializer=cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgClearAdminResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "cosmwasm.wasm.v1beta1.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 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,
            "/cosmwasm.wasm.v1beta1.Msg/StoreCode",
            cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgStoreCode.SerializeToString,
            cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgStoreCodeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def InstantiateContract(
        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,
            "/cosmwasm.wasm.v1beta1.Msg/InstantiateContract",
            cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgInstantiateContract.SerializeToString,
            cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgInstantiateContractResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def ExecuteContract(
        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,
            "/cosmwasm.wasm.v1beta1.Msg/ExecuteContract",
            cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgExecuteContract.SerializeToString,
            cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgExecuteContractResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @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,
            "/cosmwasm.wasm.v1beta1.Msg/MigrateContract",
            cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgMigrateContract.SerializeToString,
            cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgMigrateContractResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def UpdateAdmin(
        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,
            "/cosmwasm.wasm.v1beta1.Msg/UpdateAdmin",
            cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgUpdateAdmin.SerializeToString,
            cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgUpdateAdminResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def ClearAdmin(
        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,
            "/cosmwasm.wasm.v1beta1.Msg/ClearAdmin",
            cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgClearAdmin.SerializeToString,
            cosmwasm_dot_wasm_dot_v1beta1_dot_tx__pb2.MsgClearAdminResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
