# Generated by the Protocol Buffers compiler. DO NOT EDIT!
# source: hub.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
import hub_pb2


class HubBase(abc.ABC):

    @abc.abstractmethod
    async def Collect(self, stream: 'grpclib.server.Stream[hub_pb2.CollectRequest, hub_pb2.CollectResponse]') -> None:
        pass

    @abc.abstractmethod
    async def PullManifest(self, stream: 'grpclib.server.Stream[hub_pb2.PullManifestRequest, hub_pb2.PullManifestResponse]') -> None:
        pass

    @abc.abstractmethod
    async def RunCodeCollectors(self, stream: 'grpclib.server.Stream[hub_pb2.RunCodeCollectorsRequest, hub_pb2.RunCodeCollectorsResponse]') -> None:
        pass

    @abc.abstractmethod
    async def CurrentVersion(self, stream: 'grpclib.server.Stream[hub_pb2.CurrentVersionRequest, hub_pb2.CurrentVersionResponse]') -> None:
        pass

    @abc.abstractmethod
    async def CheckComponentStatus(self, stream: 'grpclib.server.Stream[hub_pb2.CheckComponentStatusRequest, hub_pb2.CheckComponentStatusResponse]') -> None:
        pass

    @abc.abstractmethod
    async def CollectPolicy(self, stream: 'grpclib.server.Stream[hub_pb2.CollectPolicyRequest, hub_pb2.CollectPolicyResponse]') -> None:
        pass

    def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
        return {
            '/hubapi.Hub/Collect': grpclib.const.Handler(
                self.Collect,
                grpclib.const.Cardinality.UNARY_UNARY,
                hub_pb2.CollectRequest,
                hub_pb2.CollectResponse,
            ),
            '/hubapi.Hub/PullManifest': grpclib.const.Handler(
                self.PullManifest,
                grpclib.const.Cardinality.UNARY_STREAM,
                hub_pb2.PullManifestRequest,
                hub_pb2.PullManifestResponse,
            ),
            '/hubapi.Hub/RunCodeCollectors': grpclib.const.Handler(
                self.RunCodeCollectors,
                grpclib.const.Cardinality.UNARY_UNARY,
                hub_pb2.RunCodeCollectorsRequest,
                hub_pb2.RunCodeCollectorsResponse,
            ),
            '/hubapi.Hub/CurrentVersion': grpclib.const.Handler(
                self.CurrentVersion,
                grpclib.const.Cardinality.UNARY_UNARY,
                hub_pb2.CurrentVersionRequest,
                hub_pb2.CurrentVersionResponse,
            ),
            '/hubapi.Hub/CheckComponentStatus': grpclib.const.Handler(
                self.CheckComponentStatus,
                grpclib.const.Cardinality.UNARY_UNARY,
                hub_pb2.CheckComponentStatusRequest,
                hub_pb2.CheckComponentStatusResponse,
            ),
            '/hubapi.Hub/CollectPolicy': grpclib.const.Handler(
                self.CollectPolicy,
                grpclib.const.Cardinality.UNARY_UNARY,
                hub_pb2.CollectPolicyRequest,
                hub_pb2.CollectPolicyResponse,
            ),
        }


class HubStub:

    def __init__(self, channel: grpclib.client.Channel) -> None:
        self.Collect = grpclib.client.UnaryUnaryMethod(
            channel,
            '/hubapi.Hub/Collect',
            hub_pb2.CollectRequest,
            hub_pb2.CollectResponse,
        )
        self.PullManifest = grpclib.client.UnaryStreamMethod(
            channel,
            '/hubapi.Hub/PullManifest',
            hub_pb2.PullManifestRequest,
            hub_pb2.PullManifestResponse,
        )
        self.RunCodeCollectors = grpclib.client.UnaryUnaryMethod(
            channel,
            '/hubapi.Hub/RunCodeCollectors',
            hub_pb2.RunCodeCollectorsRequest,
            hub_pb2.RunCodeCollectorsResponse,
        )
        self.CurrentVersion = grpclib.client.UnaryUnaryMethod(
            channel,
            '/hubapi.Hub/CurrentVersion',
            hub_pb2.CurrentVersionRequest,
            hub_pb2.CurrentVersionResponse,
        )
        self.CheckComponentStatus = grpclib.client.UnaryUnaryMethod(
            channel,
            '/hubapi.Hub/CheckComponentStatus',
            hub_pb2.CheckComponentStatusRequest,
            hub_pb2.CheckComponentStatusResponse,
        )
        self.CollectPolicy = grpclib.client.UnaryUnaryMethod(
            channel,
            '/hubapi.Hub/CollectPolicy',
            hub_pb2.CollectPolicyRequest,
            hub_pb2.CollectPolicyResponse,
        )
