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

from . import platform_pb2 as platform__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Start = channel.unary_stream(
                '/mpf.vpe.MpfHardwareService/Start',
                request_serializer=platform__pb2.MachineState.SerializeToString,
                response_deserializer=platform__pb2.Commands.FromString,
                )
        self.GetMachineDescription = channel.unary_unary(
                '/mpf.vpe.MpfHardwareService/GetMachineDescription',
                request_serializer=platform__pb2.EmptyRequest.SerializeToString,
                response_deserializer=platform__pb2.MachineDescription.FromString,
                )
        self.SendSwitchChanges = channel.stream_unary(
                '/mpf.vpe.MpfHardwareService/SendSwitchChanges',
                request_serializer=platform__pb2.SwitchChanges.SerializeToString,
                response_deserializer=platform__pb2.EmptyResponse.FromString,
                )
        self.Quit = channel.unary_unary(
                '/mpf.vpe.MpfHardwareService/Quit',
                request_serializer=platform__pb2.QuitRequest.SerializeToString,
                response_deserializer=platform__pb2.EmptyResponse.FromString,
                )


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

    def Start(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 GetMachineDescription(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 SendSwitchChanges(self, request_iterator, 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 Quit(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 METHOD_NAME(servicer, server):
    rpc_method_handlers = {
            'Start': grpc.unary_stream_rpc_method_handler(
                    servicer.Start,
                    request_deserializer=platform__pb2.MachineState.FromString,
                    response_serializer=platform__pb2.Commands.SerializeToString,
            ),
            'GetMachineDescription': grpc.unary_unary_rpc_method_handler(
                    servicer.GetMachineDescription,
                    request_deserializer=platform__pb2.EmptyRequest.FromString,
                    response_serializer=platform__pb2.MachineDescription.SerializeToString,
            ),
            'SendSwitchChanges': grpc.stream_unary_rpc_method_handler(
                    servicer.SendSwitchChanges,
                    request_deserializer=platform__pb2.SwitchChanges.FromString,
                    response_serializer=platform__pb2.EmptyResponse.SerializeToString,
            ),
            'Quit': grpc.unary_unary_rpc_method_handler(
                    servicer.Quit,
                    request_deserializer=platform__pb2.QuitRequest.FromString,
                    response_serializer=platform__pb2.EmptyResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'mpf.vpe.MpfHardwareService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def Start(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, '/mpf.vpe.MpfHardwareService/Start',
            platform__pb2.MachineState.SerializeToString,
            platform__pb2.Commands.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetMachineDescription(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, '/mpf.vpe.MpfHardwareService/GetMachineDescription',
            platform__pb2.EmptyRequest.SerializeToString,
            platform__pb2.MachineDescription.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SendSwitchChanges(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_unary(request_iterator, target, '/mpf.vpe.MpfHardwareService/SendSwitchChanges',
            platform__pb2.SwitchChanges.SerializeToString,
            platform__pb2.EmptyResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Quit(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, '/mpf.vpe.MpfHardwareService/Quit',
            platform__pb2.QuitRequest.SerializeToString,
            platform__pb2.EmptyResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)