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

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

import google.protobuf.timestamp_pb2
from . import acquisition_pb2


class AcquisitionServiceBase(abc.ABC):

    @abc.abstractmethod
    async def start(self, stream: 'grpclib.server.Stream[minknow.rpc.acquisition_pb2.StartRequest, minknow.rpc.acquisition_pb2.StartResponse]') -> None:
        pass

    @abc.abstractmethod
    async def stop(self, stream: 'grpclib.server.Stream[minknow.rpc.acquisition_pb2.StopRequest, minknow.rpc.acquisition_pb2.StopResponse]') -> None:
        pass

    @abc.abstractmethod
    async def watch_for_status_change(self, stream: 'grpclib.server.Stream[minknow.rpc.acquisition_pb2.WatchForStatusChangeRequest, minknow.rpc.acquisition_pb2.WatchForStatusChangeResponse]') -> None:
        pass

    @abc.abstractmethod
    async def watch_current_acquisition_run(self, stream: 'grpclib.server.Stream[minknow.rpc.acquisition_pb2.WatchCurrentAcquisitionRunRequest, minknow.rpc.acquisition_pb2.AcquisitionRunInfo]') -> None:
        pass

    @abc.abstractmethod
    async def current_status(self, stream: 'grpclib.server.Stream[minknow.rpc.acquisition_pb2.CurrentStatusRequest, minknow.rpc.acquisition_pb2.CurrentStatusResponse]') -> None:
        pass

    @abc.abstractmethod
    async def get_progress(self, stream: 'grpclib.server.Stream[minknow.rpc.acquisition_pb2.GetProgressRequest, minknow.rpc.acquisition_pb2.GetProgressResponse]') -> None:
        pass

    @abc.abstractmethod
    async def get_acquisition_info(self, stream: 'grpclib.server.Stream[minknow.rpc.acquisition_pb2.GetAcquisitionRunInfoRequest, minknow.rpc.acquisition_pb2.AcquisitionRunInfo]') -> None:
        pass

    @abc.abstractmethod
    async def list_acquisition_runs(self, stream: 'grpclib.server.Stream[minknow.rpc.acquisition_pb2.ListAcquisitionRunsRequest, minknow.rpc.acquisition_pb2.ListAcquisitionRunsResponse]') -> None:
        pass

    @abc.abstractmethod
    async def get_current_acquisition_run(self, stream: 'grpclib.server.Stream[minknow.rpc.acquisition_pb2.GetCurrentAcquisitionRunRequest, minknow.rpc.acquisition_pb2.AcquisitionRunInfo]') -> None:
        pass

    def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
        return {
            '/ont.rpc.acquisition.AcquisitionService/start': grpclib.const.Handler(
                self.start,
                grpclib.const.Cardinality.UNARY_UNARY,
                minknow.rpc.acquisition_pb2.StartRequest,
                minknow.rpc.acquisition_pb2.StartResponse,
            ),
            '/ont.rpc.acquisition.AcquisitionService/stop': grpclib.const.Handler(
                self.stop,
                grpclib.const.Cardinality.UNARY_UNARY,
                minknow.rpc.acquisition_pb2.StopRequest,
                minknow.rpc.acquisition_pb2.StopResponse,
            ),
            '/ont.rpc.acquisition.AcquisitionService/watch_for_status_change': grpclib.const.Handler(
                self.watch_for_status_change,
                grpclib.const.Cardinality.STREAM_STREAM,
                minknow.rpc.acquisition_pb2.WatchForStatusChangeRequest,
                minknow.rpc.acquisition_pb2.WatchForStatusChangeResponse,
            ),
            '/ont.rpc.acquisition.AcquisitionService/watch_current_acquisition_run': grpclib.const.Handler(
                self.watch_current_acquisition_run,
                grpclib.const.Cardinality.UNARY_STREAM,
                minknow.rpc.acquisition_pb2.WatchCurrentAcquisitionRunRequest,
                minknow.rpc.acquisition_pb2.AcquisitionRunInfo,
            ),
            '/ont.rpc.acquisition.AcquisitionService/current_status': grpclib.const.Handler(
                self.current_status,
                grpclib.const.Cardinality.UNARY_UNARY,
                minknow.rpc.acquisition_pb2.CurrentStatusRequest,
                minknow.rpc.acquisition_pb2.CurrentStatusResponse,
            ),
            '/ont.rpc.acquisition.AcquisitionService/get_progress': grpclib.const.Handler(
                self.get_progress,
                grpclib.const.Cardinality.UNARY_UNARY,
                minknow.rpc.acquisition_pb2.GetProgressRequest,
                minknow.rpc.acquisition_pb2.GetProgressResponse,
            ),
            '/ont.rpc.acquisition.AcquisitionService/get_acquisition_info': grpclib.const.Handler(
                self.get_acquisition_info,
                grpclib.const.Cardinality.UNARY_UNARY,
                minknow.rpc.acquisition_pb2.GetAcquisitionRunInfoRequest,
                minknow.rpc.acquisition_pb2.AcquisitionRunInfo,
            ),
            '/ont.rpc.acquisition.AcquisitionService/list_acquisition_runs': grpclib.const.Handler(
                self.list_acquisition_runs,
                grpclib.const.Cardinality.UNARY_UNARY,
                minknow.rpc.acquisition_pb2.ListAcquisitionRunsRequest,
                minknow.rpc.acquisition_pb2.ListAcquisitionRunsResponse,
            ),
            '/ont.rpc.acquisition.AcquisitionService/get_current_acquisition_run': grpclib.const.Handler(
                self.get_current_acquisition_run,
                grpclib.const.Cardinality.UNARY_UNARY,
                minknow.rpc.acquisition_pb2.GetCurrentAcquisitionRunRequest,
                minknow.rpc.acquisition_pb2.AcquisitionRunInfo,
            ),
        }


class AcquisitionServiceStub:

    def __init__(self, channel: grpclib.client.Channel) -> None:
        self.start = grpclib.client.UnaryUnaryMethod(
            channel,
            '/ont.rpc.acquisition.AcquisitionService/start',
            minknow.rpc.acquisition_pb2.StartRequest,
            minknow.rpc.acquisition_pb2.StartResponse,
        )
        self.stop = grpclib.client.UnaryUnaryMethod(
            channel,
            '/ont.rpc.acquisition.AcquisitionService/stop',
            minknow.rpc.acquisition_pb2.StopRequest,
            minknow.rpc.acquisition_pb2.StopResponse,
        )
        self.watch_for_status_change = grpclib.client.StreamStreamMethod(
            channel,
            '/ont.rpc.acquisition.AcquisitionService/watch_for_status_change',
            minknow.rpc.acquisition_pb2.WatchForStatusChangeRequest,
            minknow.rpc.acquisition_pb2.WatchForStatusChangeResponse,
        )
        self.watch_current_acquisition_run = grpclib.client.UnaryStreamMethod(
            channel,
            '/ont.rpc.acquisition.AcquisitionService/watch_current_acquisition_run',
            minknow.rpc.acquisition_pb2.WatchCurrentAcquisitionRunRequest,
            minknow.rpc.acquisition_pb2.AcquisitionRunInfo,
        )
        self.current_status = grpclib.client.UnaryUnaryMethod(
            channel,
            '/ont.rpc.acquisition.AcquisitionService/current_status',
            minknow.rpc.acquisition_pb2.CurrentStatusRequest,
            minknow.rpc.acquisition_pb2.CurrentStatusResponse,
        )
        self.get_progress = grpclib.client.UnaryUnaryMethod(
            channel,
            '/ont.rpc.acquisition.AcquisitionService/get_progress',
            minknow.rpc.acquisition_pb2.GetProgressRequest,
            minknow.rpc.acquisition_pb2.GetProgressResponse,
        )
        self.get_acquisition_info = grpclib.client.UnaryUnaryMethod(
            channel,
            '/ont.rpc.acquisition.AcquisitionService/get_acquisition_info',
            minknow.rpc.acquisition_pb2.GetAcquisitionRunInfoRequest,
            minknow.rpc.acquisition_pb2.AcquisitionRunInfo,
        )
        self.list_acquisition_runs = grpclib.client.UnaryUnaryMethod(
            channel,
            '/ont.rpc.acquisition.AcquisitionService/list_acquisition_runs',
            minknow.rpc.acquisition_pb2.ListAcquisitionRunsRequest,
            minknow.rpc.acquisition_pb2.ListAcquisitionRunsResponse,
        )
        self.get_current_acquisition_run = grpclib.client.UnaryUnaryMethod(
            channel,
            '/ont.rpc.acquisition.AcquisitionService/get_current_acquisition_run',
            minknow.rpc.acquisition_pb2.GetCurrentAcquisitionRunRequest,
            minknow.rpc.acquisition_pb2.AcquisitionRunInfo,
        )
