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

from diambra.engine import interface_pb2 as diambra_dot_engine_dot_interface__pb2


class EnvServerStub(object):
    """The DIAMBRA service definition.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetError = channel.unary_unary(
                '/interface.EnvServer/GetError',
                request_serializer=diambra_dot_engine_dot_interface__pb2.Empty.SerializeToString,
                response_deserializer=diambra_dot_engine_dot_interface__pb2.ErrorMessage.FromString,
                )
        self.EnvInit = channel.unary_unary(
                '/interface.EnvServer/EnvInit',
                request_serializer=diambra_dot_engine_dot_interface__pb2.EnvSettings.SerializeToString,
                response_deserializer=diambra_dot_engine_dot_interface__pb2.EnvInitResponse.FromString,
                )
        self.Reset = channel.unary_unary(
                '/interface.EnvServer/Reset',
                request_serializer=diambra_dot_engine_dot_interface__pb2.Empty.SerializeToString,
                response_deserializer=diambra_dot_engine_dot_interface__pb2.Observation.FromString,
                )
        self.Step1P = channel.unary_unary(
                '/interface.EnvServer/Step1P',
                request_serializer=diambra_dot_engine_dot_interface__pb2.Actions.SerializeToString,
                response_deserializer=diambra_dot_engine_dot_interface__pb2.Observation.FromString,
                )
        self.Step2P = channel.unary_unary(
                '/interface.EnvServer/Step2P',
                request_serializer=diambra_dot_engine_dot_interface__pb2.Actions.SerializeToString,
                response_deserializer=diambra_dot_engine_dot_interface__pb2.Observation.FromString,
                )
        self.Close = channel.unary_unary(
                '/interface.EnvServer/Close',
                request_serializer=diambra_dot_engine_dot_interface__pb2.Empty.SerializeToString,
                response_deserializer=diambra_dot_engine_dot_interface__pb2.Empty.FromString,
                )
        self.Shutdown = channel.unary_unary(
                '/interface.EnvServer/Shutdown',
                request_serializer=diambra_dot_engine_dot_interface__pb2.Empty.SerializeToString,
                response_deserializer=diambra_dot_engine_dot_interface__pb2.Empty.FromString,
                )


class EnvServerServicer(object):
    """The DIAMBRA service definition.
    """

    def GetError(self, request, context):
        """Receives back environment error message
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def EnvInit(self, request, context):
        """Sends environment settings, receives back environment info and int data vars
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Reset(self, request, context):
        """Call reset method, receives observation (containing also player ID in this case)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Step1P(self, request, context):
        """Call step method (1P), receives observation
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Step2P(self, request, context):
        """Call step method (2P), receives observation
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Close(self, request, context):
        """Call close method, receives observation placeholder
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Shutdown(self, request, context):
        """Shutdown termintes the engine process
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_EnvServerServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetError': grpc.unary_unary_rpc_method_handler(
                    servicer.GetError,
                    request_deserializer=diambra_dot_engine_dot_interface__pb2.Empty.FromString,
                    response_serializer=diambra_dot_engine_dot_interface__pb2.ErrorMessage.SerializeToString,
            ),
            'EnvInit': grpc.unary_unary_rpc_method_handler(
                    servicer.EnvInit,
                    request_deserializer=diambra_dot_engine_dot_interface__pb2.EnvSettings.FromString,
                    response_serializer=diambra_dot_engine_dot_interface__pb2.EnvInitResponse.SerializeToString,
            ),
            'Reset': grpc.unary_unary_rpc_method_handler(
                    servicer.Reset,
                    request_deserializer=diambra_dot_engine_dot_interface__pb2.Empty.FromString,
                    response_serializer=diambra_dot_engine_dot_interface__pb2.Observation.SerializeToString,
            ),
            'Step1P': grpc.unary_unary_rpc_method_handler(
                    servicer.Step1P,
                    request_deserializer=diambra_dot_engine_dot_interface__pb2.Actions.FromString,
                    response_serializer=diambra_dot_engine_dot_interface__pb2.Observation.SerializeToString,
            ),
            'Step2P': grpc.unary_unary_rpc_method_handler(
                    servicer.Step2P,
                    request_deserializer=diambra_dot_engine_dot_interface__pb2.Actions.FromString,
                    response_serializer=diambra_dot_engine_dot_interface__pb2.Observation.SerializeToString,
            ),
            'Close': grpc.unary_unary_rpc_method_handler(
                    servicer.Close,
                    request_deserializer=diambra_dot_engine_dot_interface__pb2.Empty.FromString,
                    response_serializer=diambra_dot_engine_dot_interface__pb2.Empty.SerializeToString,
            ),
            'Shutdown': grpc.unary_unary_rpc_method_handler(
                    servicer.Shutdown,
                    request_deserializer=diambra_dot_engine_dot_interface__pb2.Empty.FromString,
                    response_serializer=diambra_dot_engine_dot_interface__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'interface.EnvServer', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class EnvServer(object):
    """The DIAMBRA service definition.
    """

    @staticmethod
    def GetError(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, '/interface.EnvServer/GetError',
            diambra_dot_engine_dot_interface__pb2.Empty.SerializeToString,
            diambra_dot_engine_dot_interface__pb2.ErrorMessage.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def EnvInit(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, '/interface.EnvServer/EnvInit',
            diambra_dot_engine_dot_interface__pb2.EnvSettings.SerializeToString,
            diambra_dot_engine_dot_interface__pb2.EnvInitResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Reset(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, '/interface.EnvServer/Reset',
            diambra_dot_engine_dot_interface__pb2.Empty.SerializeToString,
            diambra_dot_engine_dot_interface__pb2.Observation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Step1P(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, '/interface.EnvServer/Step1P',
            diambra_dot_engine_dot_interface__pb2.Actions.SerializeToString,
            diambra_dot_engine_dot_interface__pb2.Observation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Step2P(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, '/interface.EnvServer/Step2P',
            diambra_dot_engine_dot_interface__pb2.Actions.SerializeToString,
            diambra_dot_engine_dot_interface__pb2.Observation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Close(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, '/interface.EnvServer/Close',
            diambra_dot_engine_dot_interface__pb2.Empty.SerializeToString,
            diambra_dot_engine_dot_interface__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Shutdown(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, '/interface.EnvServer/Shutdown',
            diambra_dot_engine_dot_interface__pb2.Empty.SerializeToString,
            diambra_dot_engine_dot_interface__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
