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

import virtualsmartcard.cards.mpc_pb2 as mpc__pb2


class MPCStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetServerInfo = channel.unary_unary(
                '/meesign.MPC/GetServerInfo',
                request_serializer=mpc__pb2.ServerInfoRequest.SerializeToString,
                response_deserializer=mpc__pb2.ServerInfo.FromString,
                )
        self.Register = channel.unary_unary(
                '/meesign.MPC/Register',
                request_serializer=mpc__pb2.RegistrationRequest.SerializeToString,
                response_deserializer=mpc__pb2.Resp.FromString,
                )
        self.Sign = channel.unary_unary(
                '/meesign.MPC/Sign',
                request_serializer=mpc__pb2.SignRequest.SerializeToString,
                response_deserializer=mpc__pb2.Task.FromString,
                )
        self.Group = channel.unary_unary(
                '/meesign.MPC/Group',
                request_serializer=mpc__pb2.GroupRequest.SerializeToString,
                response_deserializer=mpc__pb2.Task.FromString,
                )
        self.GetTask = channel.unary_unary(
                '/meesign.MPC/GetTask',
                request_serializer=mpc__pb2.TaskRequest.SerializeToString,
                response_deserializer=mpc__pb2.Task.FromString,
                )
        self.UpdateTask = channel.unary_unary(
                '/meesign.MPC/UpdateTask',
                request_serializer=mpc__pb2.TaskUpdate.SerializeToString,
                response_deserializer=mpc__pb2.Resp.FromString,
                )
        self.DecideTask = channel.unary_unary(
                '/meesign.MPC/DecideTask',
                request_serializer=mpc__pb2.TaskDecision.SerializeToString,
                response_deserializer=mpc__pb2.Resp.FromString,
                )
        self.AcknowledgeTask = channel.unary_unary(
                '/meesign.MPC/AcknowledgeTask',
                request_serializer=mpc__pb2.TaskAcknowledgement.SerializeToString,
                response_deserializer=mpc__pb2.Resp.FromString,
                )
        self.GetTasks = channel.unary_unary(
                '/meesign.MPC/GetTasks',
                request_serializer=mpc__pb2.TasksRequest.SerializeToString,
                response_deserializer=mpc__pb2.Tasks.FromString,
                )
        self.GetGroups = channel.unary_unary(
                '/meesign.MPC/GetGroups',
                request_serializer=mpc__pb2.GroupsRequest.SerializeToString,
                response_deserializer=mpc__pb2.Groups.FromString,
                )
        self.GetDevices = channel.unary_unary(
                '/meesign.MPC/GetDevices',
                request_serializer=mpc__pb2.DevicesRequest.SerializeToString,
                response_deserializer=mpc__pb2.Devices.FromString,
                )
        self.Log = channel.unary_unary(
                '/meesign.MPC/Log',
                request_serializer=mpc__pb2.LogRequest.SerializeToString,
                response_deserializer=mpc__pb2.Resp.FromString,
                )
        self.SubscribeUpdates = channel.unary_stream(
                '/meesign.MPC/SubscribeUpdates',
                request_serializer=mpc__pb2.SubscribeRequest.SerializeToString,
                response_deserializer=mpc__pb2.Task.FromString,
                )


class MPCServicer(object):
    """Missing associated documentation comment in .proto file."""

    def GetServerInfo(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Register(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Sign(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Group(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetTask(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateTask(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DecideTask(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AcknowledgeTask(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetTasks(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetGroups(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetDevices(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Log(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SubscribeUpdates(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_MPCServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetServerInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.GetServerInfo,
                    request_deserializer=mpc__pb2.ServerInfoRequest.FromString,
                    response_serializer=mpc__pb2.ServerInfo.SerializeToString,
            ),
            'Register': grpc.unary_unary_rpc_method_handler(
                    servicer.Register,
                    request_deserializer=mpc__pb2.RegistrationRequest.FromString,
                    response_serializer=mpc__pb2.Resp.SerializeToString,
            ),
            'Sign': grpc.unary_unary_rpc_method_handler(
                    servicer.Sign,
                    request_deserializer=mpc__pb2.SignRequest.FromString,
                    response_serializer=mpc__pb2.Task.SerializeToString,
            ),
            'Group': grpc.unary_unary_rpc_method_handler(
                    servicer.Group,
                    request_deserializer=mpc__pb2.GroupRequest.FromString,
                    response_serializer=mpc__pb2.Task.SerializeToString,
            ),
            'GetTask': grpc.unary_unary_rpc_method_handler(
                    servicer.GetTask,
                    request_deserializer=mpc__pb2.TaskRequest.FromString,
                    response_serializer=mpc__pb2.Task.SerializeToString,
            ),
            'UpdateTask': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateTask,
                    request_deserializer=mpc__pb2.TaskUpdate.FromString,
                    response_serializer=mpc__pb2.Resp.SerializeToString,
            ),
            'DecideTask': grpc.unary_unary_rpc_method_handler(
                    servicer.DecideTask,
                    request_deserializer=mpc__pb2.TaskDecision.FromString,
                    response_serializer=mpc__pb2.Resp.SerializeToString,
            ),
            'AcknowledgeTask': grpc.unary_unary_rpc_method_handler(
                    servicer.AcknowledgeTask,
                    request_deserializer=mpc__pb2.TaskAcknowledgement.FromString,
                    response_serializer=mpc__pb2.Resp.SerializeToString,
            ),
            'GetTasks': grpc.unary_unary_rpc_method_handler(
                    servicer.GetTasks,
                    request_deserializer=mpc__pb2.TasksRequest.FromString,
                    response_serializer=mpc__pb2.Tasks.SerializeToString,
            ),
            'GetGroups': grpc.unary_unary_rpc_method_handler(
                    servicer.GetGroups,
                    request_deserializer=mpc__pb2.GroupsRequest.FromString,
                    response_serializer=mpc__pb2.Groups.SerializeToString,
            ),
            'GetDevices': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDevices,
                    request_deserializer=mpc__pb2.DevicesRequest.FromString,
                    response_serializer=mpc__pb2.Devices.SerializeToString,
            ),
            'Log': grpc.unary_unary_rpc_method_handler(
                    servicer.Log,
                    request_deserializer=mpc__pb2.LogRequest.FromString,
                    response_serializer=mpc__pb2.Resp.SerializeToString,
            ),
            'SubscribeUpdates': grpc.unary_stream_rpc_method_handler(
                    servicer.SubscribeUpdates,
                    request_deserializer=mpc__pb2.SubscribeRequest.FromString,
                    response_serializer=mpc__pb2.Task.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'meesign.MPC', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class MPC(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def GetServerInfo(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, '/meesign.MPC/GetServerInfo',
            mpc__pb2.ServerInfoRequest.SerializeToString,
            mpc__pb2.ServerInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Register(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, '/meesign.MPC/Register',
            mpc__pb2.RegistrationRequest.SerializeToString,
            mpc__pb2.Resp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Sign(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, '/meesign.MPC/Sign',
            mpc__pb2.SignRequest.SerializeToString,
            mpc__pb2.Task.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Group(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, '/meesign.MPC/Group',
            mpc__pb2.GroupRequest.SerializeToString,
            mpc__pb2.Task.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetTask(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, '/meesign.MPC/GetTask',
            mpc__pb2.TaskRequest.SerializeToString,
            mpc__pb2.Task.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateTask(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, '/meesign.MPC/UpdateTask',
            mpc__pb2.TaskUpdate.SerializeToString,
            mpc__pb2.Resp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DecideTask(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, '/meesign.MPC/DecideTask',
            mpc__pb2.TaskDecision.SerializeToString,
            mpc__pb2.Resp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AcknowledgeTask(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, '/meesign.MPC/AcknowledgeTask',
            mpc__pb2.TaskAcknowledgement.SerializeToString,
            mpc__pb2.Resp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetTasks(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, '/meesign.MPC/GetTasks',
            mpc__pb2.TasksRequest.SerializeToString,
            mpc__pb2.Tasks.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetGroups(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, '/meesign.MPC/GetGroups',
            mpc__pb2.GroupsRequest.SerializeToString,
            mpc__pb2.Groups.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetDevices(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, '/meesign.MPC/GetDevices',
            mpc__pb2.DevicesRequest.SerializeToString,
            mpc__pb2.Devices.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Log(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, '/meesign.MPC/Log',
            mpc__pb2.LogRequest.SerializeToString,
            mpc__pb2.Resp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SubscribeUpdates(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_stream(request, target, '/meesign.MPC/SubscribeUpdates',
            mpc__pb2.SubscribeRequest.SerializeToString,
            mpc__pb2.Task.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
