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

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

from . import acquisition_pb2
from . import device_pb2
from . import protocol_pb2
from . import instance_pb2


class InstanceServiceBase(abc.ABC):

    @abc.abstractmethod
    async def get_version_info(self, stream: 'grpclib.server.Stream[minknow.rpc.instance_pb2.GetVersionInfoRequest, minknow.rpc.instance_pb2.GetVersionInfoResponse]') -> None:
        pass

    @abc.abstractmethod
    async def get_output_directories(self, stream: 'grpclib.server.Stream[minknow.rpc.instance_pb2.GetOutputDirectoriesRequest, minknow.rpc.instance_pb2.OutputDirectories]') -> None:
        pass

    @abc.abstractmethod
    async def get_default_output_directories(self, stream: 'grpclib.server.Stream[minknow.rpc.instance_pb2.GetDefaultOutputDirectoriesRequest, minknow.rpc.instance_pb2.OutputDirectories]') -> None:
        pass

    @abc.abstractmethod
    async def set_output_directory(self, stream: 'grpclib.server.Stream[minknow.rpc.instance_pb2.SetOutputDirectoryRequest, minknow.rpc.instance_pb2.SetOutputDirectoryResponse]') -> None:
        pass

    @abc.abstractmethod
    async def set_reads_directory(self, stream: 'grpclib.server.Stream[minknow.rpc.instance_pb2.SetReadsDirectoryRequest, minknow.rpc.instance_pb2.SetReadsDirectoryResponse]') -> None:
        pass

    @abc.abstractmethod
    async def get_disk_space_info(self, stream: 'grpclib.server.Stream[minknow.rpc.instance_pb2.GetDiskSpaceInfoRequest, minknow.rpc.instance_pb2.GetDiskSpaceInfoResponse]') -> None:
        pass

    @abc.abstractmethod
    async def get_machine_id(self, stream: 'grpclib.server.Stream[minknow.rpc.instance_pb2.GetMachineIdRequest, minknow.rpc.instance_pb2.GetMachineIdResponse]') -> None:
        pass

    @abc.abstractmethod
    async def get_host_type(self, stream: 'grpclib.server.Stream[minknow.rpc.instance_pb2.GetHostTypeRequest, minknow.rpc.instance_pb2.GetHostTypeResponse]') -> None:
        pass

    @abc.abstractmethod
    async def stream_instance_activity(self, stream: 'grpclib.server.Stream[minknow.rpc.instance_pb2.StreamInstanceActivityRequest, minknow.rpc.instance_pb2.StreamInstanceActivityResponse]') -> None:
        pass

    def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
        return {
            '/ont.rpc.instance.InstanceService/get_version_info': grpclib.const.Handler(
                self.get_version_info,
                grpclib.const.Cardinality.UNARY_UNARY,
                minknow.rpc.instance_pb2.GetVersionInfoRequest,
                minknow.rpc.instance_pb2.GetVersionInfoResponse,
            ),
            '/ont.rpc.instance.InstanceService/get_output_directories': grpclib.const.Handler(
                self.get_output_directories,
                grpclib.const.Cardinality.UNARY_UNARY,
                minknow.rpc.instance_pb2.GetOutputDirectoriesRequest,
                minknow.rpc.instance_pb2.OutputDirectories,
            ),
            '/ont.rpc.instance.InstanceService/get_default_output_directories': grpclib.const.Handler(
                self.get_default_output_directories,
                grpclib.const.Cardinality.UNARY_UNARY,
                minknow.rpc.instance_pb2.GetDefaultOutputDirectoriesRequest,
                minknow.rpc.instance_pb2.OutputDirectories,
            ),
            '/ont.rpc.instance.InstanceService/set_output_directory': grpclib.const.Handler(
                self.set_output_directory,
                grpclib.const.Cardinality.UNARY_UNARY,
                minknow.rpc.instance_pb2.SetOutputDirectoryRequest,
                minknow.rpc.instance_pb2.SetOutputDirectoryResponse,
            ),
            '/ont.rpc.instance.InstanceService/set_reads_directory': grpclib.const.Handler(
                self.set_reads_directory,
                grpclib.const.Cardinality.UNARY_UNARY,
                minknow.rpc.instance_pb2.SetReadsDirectoryRequest,
                minknow.rpc.instance_pb2.SetReadsDirectoryResponse,
            ),
            '/ont.rpc.instance.InstanceService/get_disk_space_info': grpclib.const.Handler(
                self.get_disk_space_info,
                grpclib.const.Cardinality.UNARY_UNARY,
                minknow.rpc.instance_pb2.GetDiskSpaceInfoRequest,
                minknow.rpc.instance_pb2.GetDiskSpaceInfoResponse,
            ),
            '/ont.rpc.instance.InstanceService/get_machine_id': grpclib.const.Handler(
                self.get_machine_id,
                grpclib.const.Cardinality.UNARY_UNARY,
                minknow.rpc.instance_pb2.GetMachineIdRequest,
                minknow.rpc.instance_pb2.GetMachineIdResponse,
            ),
            '/ont.rpc.instance.InstanceService/get_host_type': grpclib.const.Handler(
                self.get_host_type,
                grpclib.const.Cardinality.UNARY_UNARY,
                minknow.rpc.instance_pb2.GetHostTypeRequest,
                minknow.rpc.instance_pb2.GetHostTypeResponse,
            ),
            '/ont.rpc.instance.InstanceService/stream_instance_activity': grpclib.const.Handler(
                self.stream_instance_activity,
                grpclib.const.Cardinality.UNARY_STREAM,
                minknow.rpc.instance_pb2.StreamInstanceActivityRequest,
                minknow.rpc.instance_pb2.StreamInstanceActivityResponse,
            ),
        }


class InstanceServiceStub:

    def __init__(self, channel: grpclib.client.Channel) -> None:
        self.get_version_info = grpclib.client.UnaryUnaryMethod(
            channel,
            '/ont.rpc.instance.InstanceService/get_version_info',
            minknow.rpc.instance_pb2.GetVersionInfoRequest,
            minknow.rpc.instance_pb2.GetVersionInfoResponse,
        )
        self.get_output_directories = grpclib.client.UnaryUnaryMethod(
            channel,
            '/ont.rpc.instance.InstanceService/get_output_directories',
            minknow.rpc.instance_pb2.GetOutputDirectoriesRequest,
            minknow.rpc.instance_pb2.OutputDirectories,
        )
        self.get_default_output_directories = grpclib.client.UnaryUnaryMethod(
            channel,
            '/ont.rpc.instance.InstanceService/get_default_output_directories',
            minknow.rpc.instance_pb2.GetDefaultOutputDirectoriesRequest,
            minknow.rpc.instance_pb2.OutputDirectories,
        )
        self.set_output_directory = grpclib.client.UnaryUnaryMethod(
            channel,
            '/ont.rpc.instance.InstanceService/set_output_directory',
            minknow.rpc.instance_pb2.SetOutputDirectoryRequest,
            minknow.rpc.instance_pb2.SetOutputDirectoryResponse,
        )
        self.set_reads_directory = grpclib.client.UnaryUnaryMethod(
            channel,
            '/ont.rpc.instance.InstanceService/set_reads_directory',
            minknow.rpc.instance_pb2.SetReadsDirectoryRequest,
            minknow.rpc.instance_pb2.SetReadsDirectoryResponse,
        )
        self.get_disk_space_info = grpclib.client.UnaryUnaryMethod(
            channel,
            '/ont.rpc.instance.InstanceService/get_disk_space_info',
            minknow.rpc.instance_pb2.GetDiskSpaceInfoRequest,
            minknow.rpc.instance_pb2.GetDiskSpaceInfoResponse,
        )
        self.get_machine_id = grpclib.client.UnaryUnaryMethod(
            channel,
            '/ont.rpc.instance.InstanceService/get_machine_id',
            minknow.rpc.instance_pb2.GetMachineIdRequest,
            minknow.rpc.instance_pb2.GetMachineIdResponse,
        )
        self.get_host_type = grpclib.client.UnaryUnaryMethod(
            channel,
            '/ont.rpc.instance.InstanceService/get_host_type',
            minknow.rpc.instance_pb2.GetHostTypeRequest,
            minknow.rpc.instance_pb2.GetHostTypeResponse,
        )
        self.stream_instance_activity = grpclib.client.UnaryStreamMethod(
            channel,
            '/ont.rpc.instance.InstanceService/stream_instance_activity',
            minknow.rpc.instance_pb2.StreamInstanceActivityRequest,
            minknow.rpc.instance_pb2.StreamInstanceActivityResponse,
        )
