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

from . import camera_pb2 as camera__pb2
from . import common_pb2 as common__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.SetCameraMetadata = channel.unary_unary(
                '/mobot.Camera/SetCameraMetadata',
                request_serializer=camera__pb2.CameraMetadata.SerializeToString,
                response_deserializer=common__pb2.Success.FromString,
                )
        self.NewCameraData = channel.unary_unary(
                '/mobot.Camera/NewCameraData',
                request_serializer=camera__pb2.CompressedImage.SerializeToString,
                response_deserializer=common__pb2.Success.FromString,
                )


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

    def SetCameraMetadata(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 NewCameraData(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_CameraServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SetCameraMetadata': grpc.unary_unary_rpc_method_handler(
                    servicer.SetCameraMetadata,
                    request_deserializer=camera__pb2.CameraMetadata.FromString,
                    response_serializer=common__pb2.Success.SerializeToString,
            ),
            'NewCameraData': grpc.unary_unary_rpc_method_handler(
                    servicer.NewCameraData,
                    request_deserializer=camera__pb2.CompressedImage.FromString,
                    response_serializer=common__pb2.Success.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'mobot.Camera', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def SetCameraMetadata(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, '/mobot.Camera/SetCameraMetadata',
            camera__pb2.CameraMetadata.SerializeToString,
            common__pb2.Success.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def NewCameraData(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, '/mobot.Camera/NewCameraData',
            camera__pb2.CompressedImage.SerializeToString,
            common__pb2.Success.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)