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

from . import picture_pb2 as picture__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Upload = channel.unary_unary(
                '/batchx.cdn.PictureService/Upload',
                request_serializer=picture__pb2.UploadRequest.SerializeToString,
                response_deserializer=picture__pb2.UploadResponse.FromString,
                )
        self.CompleteUpload = channel.unary_unary(
                '/batchx.cdn.PictureService/CompleteUpload',
                request_serializer=picture__pb2.CompleteUploadRequest.SerializeToString,
                response_deserializer=picture__pb2.CompleteUploadResponse.FromString,
                )
        self.CropPicture = channel.unary_unary(
                '/batchx.cdn.PictureService/CropPicture',
                request_serializer=picture__pb2.CropPictureRequest.SerializeToString,
                response_deserializer=picture__pb2.CropPictureResponse.FromString,
                )


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

    def Upload(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 CompleteUpload(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 CropPicture(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_PictureServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Upload': grpc.unary_unary_rpc_method_handler(
                    servicer.Upload,
                    request_deserializer=picture__pb2.UploadRequest.FromString,
                    response_serializer=picture__pb2.UploadResponse.SerializeToString,
            ),
            'CompleteUpload': grpc.unary_unary_rpc_method_handler(
                    servicer.CompleteUpload,
                    request_deserializer=picture__pb2.CompleteUploadRequest.FromString,
                    response_serializer=picture__pb2.CompleteUploadResponse.SerializeToString,
            ),
            'CropPicture': grpc.unary_unary_rpc_method_handler(
                    servicer.CropPicture,
                    request_deserializer=picture__pb2.CropPictureRequest.FromString,
                    response_serializer=picture__pb2.CropPictureResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'batchx.cdn.PictureService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def Upload(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, '/batchx.cdn.PictureService/Upload',
            picture__pb2.UploadRequest.SerializeToString,
            picture__pb2.UploadResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CompleteUpload(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, '/batchx.cdn.PictureService/CompleteUpload',
            picture__pb2.CompleteUploadRequest.SerializeToString,
            picture__pb2.CompleteUploadResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CropPicture(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, '/batchx.cdn.PictureService/CropPicture',
            picture__pb2.CropPictureRequest.SerializeToString,
            picture__pb2.CropPictureResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
