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

import mjrpc.mujoco_pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.MjModel_from_xml_path = channel.unary_unary(
                '/mjrpc.mujoco/MjModel_from_xml_path',
                request_serializer=mujoco__pb2.String.SerializeToString,
                response_deserializer=mujoco__pb2.Id.FromString,
                )
        self.MjData = channel.unary_unary(
                '/mjrpc.mujoco/MjData',
                request_serializer=mujoco__pb2.Id.SerializeToString,
                response_deserializer=mujoco__pb2.Id.FromString,
                )
        self.mj_step = channel.unary_unary(
                '/mjrpc.mujoco/mj_step',
                request_serializer=mujoco__pb2.mj_step_msg.SerializeToString,
                response_deserializer=mujoco__pb2.ErrorCode.FromString,
                )


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

    def MjModel_from_xml_path(self, request, context):
        """
        MjModel_from_xml_path: loads an MJCF from a path and returns its model id
        @param : MJCF path (string)
        @return: ModelId (Id)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def MjData(self, request, context):
        """
        MjData: initializes the data from a loaded model, returning the data id
        @param : ModelId (Id)
        @return: DataId (Id)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def mj_step(self, request, context):
        """
        mj_step: executes a full mj_step from a ModelId and DataId
        @param : ModelId (Id), DataId (Id)
        @return: ErrorCode (ErrorCode) | 0 : no error, x : error code
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_mujocoServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'MjModel_from_xml_path': grpc.unary_unary_rpc_method_handler(
                    servicer.MjModel_from_xml_path,
                    request_deserializer=mujoco__pb2.String.FromString,
                    response_serializer=mujoco__pb2.Id.SerializeToString,
            ),
            'MjData': grpc.unary_unary_rpc_method_handler(
                    servicer.MjData,
                    request_deserializer=mujoco__pb2.Id.FromString,
                    response_serializer=mujoco__pb2.Id.SerializeToString,
            ),
            'mj_step': grpc.unary_unary_rpc_method_handler(
                    servicer.mj_step,
                    request_deserializer=mujoco__pb2.mj_step_msg.FromString,
                    response_serializer=mujoco__pb2.ErrorCode.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'mjrpc.mujoco', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def MjModel_from_xml_path(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, '/mjrpc.mujoco/MjModel_from_xml_path',
            mujoco__pb2.String.SerializeToString,
            mujoco__pb2.Id.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def MjData(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, '/mjrpc.mujoco/MjData',
            mujoco__pb2.Id.SerializeToString,
            mujoco__pb2.Id.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def mj_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, '/mjrpc.mujoco/mj_step',
            mujoco__pb2.mj_step_msg.SerializeToString,
            mujoco__pb2.ErrorCode.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
