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

import scripts_of_tribute.protos.basics_pb2 as basics__pb2
import scripts_of_tribute.protos.main_pb2 as main__pb2

GRPC_GENERATED_VERSION = '1.68.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in main_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.RegisterBot = channel.unary_unary(
                '/ScriptsOfTributeGRPC.AIService/RegisterBot',
                request_serializer=main__pb2.Empty.SerializeToString,
                response_deserializer=main__pb2.RegistrationStatus.FromString,
                _registered_method=True)
        self.PregamePrepare = channel.unary_unary(
                '/ScriptsOfTributeGRPC.AIService/PregamePrepare',
                request_serializer=main__pb2.Empty.SerializeToString,
                response_deserializer=main__pb2.Empty.FromString,
                _registered_method=True)
        self.SelectPatron = channel.unary_unary(
                '/ScriptsOfTributeGRPC.AIService/SelectPatron',
                request_serializer=main__pb2.SelectPatronRequest.SerializeToString,
                response_deserializer=main__pb2.PatronIdMessage.FromString,
                _registered_method=True)
        self.Play = channel.unary_unary(
                '/ScriptsOfTributeGRPC.AIService/Play',
                request_serializer=main__pb2.PlayRequest.SerializeToString,
                response_deserializer=basics__pb2.Move.FromString,
                _registered_method=True)
        self.GameEnd = channel.unary_unary(
                '/ScriptsOfTributeGRPC.AIService/GameEnd',
                request_serializer=main__pb2.GameEndRequest.SerializeToString,
                response_deserializer=main__pb2.Empty.FromString,
                _registered_method=True)
        self.CloseServer = channel.unary_unary(
                '/ScriptsOfTributeGRPC.AIService/CloseServer',
                request_serializer=main__pb2.Empty.SerializeToString,
                response_deserializer=main__pb2.Empty.FromString,
                _registered_method=True)


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

    def RegisterBot(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 PregamePrepare(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 SelectPatron(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 Play(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 GameEnd(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 CloseServer(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_AIServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'RegisterBot': grpc.unary_unary_rpc_method_handler(
                    servicer.RegisterBot,
                    request_deserializer=main__pb2.Empty.FromString,
                    response_serializer=main__pb2.RegistrationStatus.SerializeToString,
            ),
            'PregamePrepare': grpc.unary_unary_rpc_method_handler(
                    servicer.PregamePrepare,
                    request_deserializer=main__pb2.Empty.FromString,
                    response_serializer=main__pb2.Empty.SerializeToString,
            ),
            'SelectPatron': grpc.unary_unary_rpc_method_handler(
                    servicer.SelectPatron,
                    request_deserializer=main__pb2.SelectPatronRequest.FromString,
                    response_serializer=main__pb2.PatronIdMessage.SerializeToString,
            ),
            'Play': grpc.unary_unary_rpc_method_handler(
                    servicer.Play,
                    request_deserializer=main__pb2.PlayRequest.FromString,
                    response_serializer=basics__pb2.Move.SerializeToString,
            ),
            'GameEnd': grpc.unary_unary_rpc_method_handler(
                    servicer.GameEnd,
                    request_deserializer=main__pb2.GameEndRequest.FromString,
                    response_serializer=main__pb2.Empty.SerializeToString,
            ),
            'CloseServer': grpc.unary_unary_rpc_method_handler(
                    servicer.CloseServer,
                    request_deserializer=main__pb2.Empty.FromString,
                    response_serializer=main__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'ScriptsOfTributeGRPC.AIService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('ScriptsOfTributeGRPC.AIService', rpc_method_handlers)


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

    @staticmethod
    def RegisterBot(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,
            '/ScriptsOfTributeGRPC.AIService/RegisterBot',
            main__pb2.Empty.SerializeToString,
            main__pb2.RegistrationStatus.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def PregamePrepare(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,
            '/ScriptsOfTributeGRPC.AIService/PregamePrepare',
            main__pb2.Empty.SerializeToString,
            main__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SelectPatron(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,
            '/ScriptsOfTributeGRPC.AIService/SelectPatron',
            main__pb2.SelectPatronRequest.SerializeToString,
            main__pb2.PatronIdMessage.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Play(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,
            '/ScriptsOfTributeGRPC.AIService/Play',
            main__pb2.PlayRequest.SerializeToString,
            basics__pb2.Move.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GameEnd(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,
            '/ScriptsOfTributeGRPC.AIService/GameEnd',
            main__pb2.GameEndRequest.SerializeToString,
            main__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CloseServer(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,
            '/ScriptsOfTributeGRPC.AIService/CloseServer',
            main__pb2.Empty.SerializeToString,
            main__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.ApplyMove = channel.unary_unary(
                '/ScriptsOfTributeGRPC.EngineService/ApplyMove',
                request_serializer=main__pb2.ApplyMoveRequest.SerializeToString,
                response_deserializer=main__pb2.SimulationResult.FromString,
                _registered_method=True)
        self.ReleaseState = channel.unary_unary(
                '/ScriptsOfTributeGRPC.EngineService/ReleaseState',
                request_serializer=main__pb2.StateId.SerializeToString,
                response_deserializer=main__pb2.Empty.FromString,
                _registered_method=True)


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

    def ApplyMove(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 ReleaseState(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_EngineServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ApplyMove': grpc.unary_unary_rpc_method_handler(
                    servicer.ApplyMove,
                    request_deserializer=main__pb2.ApplyMoveRequest.FromString,
                    response_serializer=main__pb2.SimulationResult.SerializeToString,
            ),
            'ReleaseState': grpc.unary_unary_rpc_method_handler(
                    servicer.ReleaseState,
                    request_deserializer=main__pb2.StateId.FromString,
                    response_serializer=main__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'ScriptsOfTributeGRPC.EngineService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('ScriptsOfTributeGRPC.EngineService', rpc_method_handlers)


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

    @staticmethod
    def ApplyMove(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,
            '/ScriptsOfTributeGRPC.EngineService/ApplyMove',
            main__pb2.ApplyMoveRequest.SerializeToString,
            main__pb2.SimulationResult.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ReleaseState(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,
            '/ScriptsOfTributeGRPC.EngineService/ReleaseState',
            main__pb2.StateId.SerializeToString,
            main__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
