# Generated by the Protocol Buffers compiler. DO NOT EDIT!
# source: image.proto
# plugin: grpclib.plugin.main
import abc
import typing

import grpclib.const
import grpclib.client
if typing.TYPE_CHECKING:
    import grpclib.server

from . import image_pb2


class ImageBase(abc.ABC):

    @abc.abstractmethod
    async def UploadImage(self, stream: 'grpclib.server.Stream[image_pb2.UploadImageRequest, image_pb2.UploadImageResponse]') -> None:
        pass

    def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
        return {
            '/Image/UploadImage': grpclib.const.Handler(
                self.UploadImage,
                grpclib.const.Cardinality.STREAM_UNARY,
                image_pb2.UploadImageRequest,
                image_pb2.UploadImageResponse,
            ),
        }


class ImageStub:

    def __init__(self, channel: grpclib.client.Channel) -> None:
        self.UploadImage = grpclib.client.StreamUnaryMethod(
            channel,
            '/Image/UploadImage',
            image_pb2.UploadImageRequest,
            image_pb2.UploadImageResponse,
        )
