# 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 neodynamics.interface.proto_pb2 as proto__pb2

GRPC_GENERATED_VERSION = '1.71.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 proto_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 EnvironmentServiceStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.Init = channel.unary_unary(
                '/neodynamics.EnvironmentService/Init',
                request_serializer=proto__pb2.InitRequest.SerializeToString,
                response_deserializer=proto__pb2.SpacesResponse.FromString,
                _registered_method=True)
        self.Reset = channel.unary_unary(
                '/neodynamics.EnvironmentService/Reset',
                request_serializer=proto__pb2.ResetRequest.SerializeToString,
                response_deserializer=proto__pb2.ResetResponse.FromString,
                _registered_method=True)
        self.Step = channel.unary_unary(
                '/neodynamics.EnvironmentService/Step',
                request_serializer=proto__pb2.StepRequest.SerializeToString,
                response_deserializer=proto__pb2.StepResponse.FromString,
                _registered_method=True)
        self.Render = channel.unary_unary(
                '/neodynamics.EnvironmentService/Render',
                request_serializer=proto__pb2.Empty.SerializeToString,
                response_deserializer=proto__pb2.RenderResponse.FromString,
                _registered_method=True)
        self.Close = channel.unary_unary(
                '/neodynamics.EnvironmentService/Close',
                request_serializer=proto__pb2.Empty.SerializeToString,
                response_deserializer=proto__pb2.Empty.FromString,
                _registered_method=True)


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

    def Init(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 Reset(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 Step(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 Render(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 Close(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_EnvironmentServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Init': grpc.unary_unary_rpc_method_handler(
                    servicer.Init,
                    request_deserializer=proto__pb2.InitRequest.FromString,
                    response_serializer=proto__pb2.SpacesResponse.SerializeToString,
            ),
            'Reset': grpc.unary_unary_rpc_method_handler(
                    servicer.Reset,
                    request_deserializer=proto__pb2.ResetRequest.FromString,
                    response_serializer=proto__pb2.ResetResponse.SerializeToString,
            ),
            'Step': grpc.unary_unary_rpc_method_handler(
                    servicer.Step,
                    request_deserializer=proto__pb2.StepRequest.FromString,
                    response_serializer=proto__pb2.StepResponse.SerializeToString,
            ),
            'Render': grpc.unary_unary_rpc_method_handler(
                    servicer.Render,
                    request_deserializer=proto__pb2.Empty.FromString,
                    response_serializer=proto__pb2.RenderResponse.SerializeToString,
            ),
            'Close': grpc.unary_unary_rpc_method_handler(
                    servicer.Close,
                    request_deserializer=proto__pb2.Empty.FromString,
                    response_serializer=proto__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'neodynamics.EnvironmentService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('neodynamics.EnvironmentService', rpc_method_handlers)


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

    @staticmethod
    def Init(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,
            '/neodynamics.EnvironmentService/Init',
            proto__pb2.InitRequest.SerializeToString,
            proto__pb2.SpacesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @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,
            '/neodynamics.EnvironmentService/Reset',
            proto__pb2.ResetRequest.SerializeToString,
            proto__pb2.ResetResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Step(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,
            '/neodynamics.EnvironmentService/Step',
            proto__pb2.StepRequest.SerializeToString,
            proto__pb2.StepResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Render(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,
            '/neodynamics.EnvironmentService/Render',
            proto__pb2.Empty.SerializeToString,
            proto__pb2.RenderResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @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,
            '/neodynamics.EnvironmentService/Close',
            proto__pb2.Empty.SerializeToString,
            proto__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetSpaces = channel.unary_unary(
                '/neodynamics.AgentService/GetSpaces',
                request_serializer=proto__pb2.Empty.SerializeToString,
                response_deserializer=proto__pb2.SpacesResponse.FromString,
                _registered_method=True)
        self.GetAction = channel.unary_unary(
                '/neodynamics.AgentService/GetAction',
                request_serializer=proto__pb2.ObservationRequest.SerializeToString,
                response_deserializer=proto__pb2.ActionResponse.FromString,
                _registered_method=True)


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

    def GetSpaces(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 GetAction(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_AgentServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetSpaces': grpc.unary_unary_rpc_method_handler(
                    servicer.GetSpaces,
                    request_deserializer=proto__pb2.Empty.FromString,
                    response_serializer=proto__pb2.SpacesResponse.SerializeToString,
            ),
            'GetAction': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAction,
                    request_deserializer=proto__pb2.ObservationRequest.FromString,
                    response_serializer=proto__pb2.ActionResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'neodynamics.AgentService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('neodynamics.AgentService', rpc_method_handlers)


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

    @staticmethod
    def GetSpaces(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,
            '/neodynamics.AgentService/GetSpaces',
            proto__pb2.Empty.SerializeToString,
            proto__pb2.SpacesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetAction(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,
            '/neodynamics.AgentService/GetAction',
            proto__pb2.ObservationRequest.SerializeToString,
            proto__pb2.ActionResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
