# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

import frameserver_pb2 as frameserver__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetFrameAtTime = channel.unary_unary(
            "/frameserver.FrameServer/GetFrameAtTime",
            request_serializer=frameserver__pb2.FrameRequest.SerializeToString,
            response_deserializer=frameserver__pb2.FrameResponse.FromString,
        )
        self.RendererStatus = channel.unary_unary(
            "/frameserver.FrameServer/RendererStatus",
            request_serializer=frameserver__pb2.RendererStatusRequest.SerializeToString,
            response_deserializer=frameserver__pb2.RendererStatusResponse.FromString,
        )
        self.UpdateSceneLocation = channel.unary_unary(
            "/frameserver.FrameServer/UpdateSceneLocation",
            request_serializer=frameserver__pb2.SceneLocationRequest.SerializeToString,
            response_deserializer=frameserver__pb2.SceneLocationResponse.FromString,
        )


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

    def GetFrameAtTime(self, request, context):
        """Updates the scene to the specified animation offset and returns a
        serialization of the frame at that time.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def RendererStatus(self, request, context):
        """Used to signal to the renderer that manim is running."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def UpdateSceneLocation(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_FrameServerServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "GetFrameAtTime": grpc.unary_unary_rpc_method_handler(
            servicer.GetFrameAtTime,
            request_deserializer=frameserver__pb2.FrameRequest.FromString,
            response_serializer=frameserver__pb2.FrameResponse.SerializeToString,
        ),
        "RendererStatus": grpc.unary_unary_rpc_method_handler(
            servicer.RendererStatus,
            request_deserializer=frameserver__pb2.RendererStatusRequest.FromString,
            response_serializer=frameserver__pb2.RendererStatusResponse.SerializeToString,
        ),
        "UpdateSceneLocation": grpc.unary_unary_rpc_method_handler(
            servicer.UpdateSceneLocation,
            request_deserializer=frameserver__pb2.SceneLocationRequest.FromString,
            response_serializer=frameserver__pb2.SceneLocationResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "frameserver.FrameServer", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetFrameAtTime(
        request,
        target,
        options=(),
        channel_credentials=None,
        call_credentials=None,
        compression=None,
        wait_for_ready=None,
        timeout=None,
        metadata=None,
    ):
        return grpc.experimental.unary_unary(
            request,
            target,
            "/frameserver.FrameServer/GetFrameAtTime",
            frameserver__pb2.FrameRequest.SerializeToString,
            frameserver__pb2.FrameResponse.FromString,
            options,
            channel_credentials,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def RendererStatus(
        request,
        target,
        options=(),
        channel_credentials=None,
        call_credentials=None,
        compression=None,
        wait_for_ready=None,
        timeout=None,
        metadata=None,
    ):
        return grpc.experimental.unary_unary(
            request,
            target,
            "/frameserver.FrameServer/RendererStatus",
            frameserver__pb2.RendererStatusRequest.SerializeToString,
            frameserver__pb2.RendererStatusResponse.FromString,
            options,
            channel_credentials,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def UpdateSceneLocation(
        request,
        target,
        options=(),
        channel_credentials=None,
        call_credentials=None,
        compression=None,
        wait_for_ready=None,
        timeout=None,
        metadata=None,
    ):
        return grpc.experimental.unary_unary(
            request,
            target,
            "/frameserver.FrameServer/UpdateSceneLocation",
            frameserver__pb2.SceneLocationRequest.SerializeToString,
            frameserver__pb2.SceneLocationResponse.FromString,
            options,
            channel_credentials,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
