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

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

import hiku.protobuf.query_pb2
import google.protobuf.empty_pb2
import google.protobuf.timestamp_pb2
import featureflags_protobuf.graph_pb2
import featureflags_protobuf.service_pb2


class FeatureFlagsBase(abc.ABC):

    @abc.abstractmethod
    async def exchange(self, stream: 'grpclib.server.Stream[featureflags_protobuf.service_pb2.ExchangeRequest, featureflags_protobuf.service_pb2.ExchangeReply]') -> None:
        pass

    @abc.abstractmethod
    async def Exchange(self, stream: 'grpclib.server.Stream[featureflags_protobuf.service_pb2.ExchangeRequest, featureflags_protobuf.service_pb2.ExchangeReply]') -> None:
        pass

    @abc.abstractmethod
    async def store_stats(self, stream: 'grpclib.server.Stream[featureflags_protobuf.service_pb2.StoreStatsTask, google.protobuf.empty_pb2.Empty]') -> None:
        pass

    @abc.abstractmethod
    async def StoreStats(self, stream: 'grpclib.server.Stream[featureflags_protobuf.service_pb2.StoreStatsTask, google.protobuf.empty_pb2.Empty]') -> None:
        pass

    def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
        return {
            '/featureflags_protobuf.service.FeatureFlags/exchange': grpclib.const.Handler(
                self.exchange,
                grpclib.const.Cardinality.UNARY_UNARY,
                featureflags_protobuf.service_pb2.ExchangeRequest,
                featureflags_protobuf.service_pb2.ExchangeReply,
            ),
            '/featureflags_protobuf.service.FeatureFlags/Exchange': grpclib.const.Handler(
                self.Exchange,
                grpclib.const.Cardinality.UNARY_UNARY,
                featureflags_protobuf.service_pb2.ExchangeRequest,
                featureflags_protobuf.service_pb2.ExchangeReply,
            ),
            '/featureflags_protobuf.service.FeatureFlags/store_stats': grpclib.const.Handler(
                self.store_stats,
                grpclib.const.Cardinality.UNARY_UNARY,
                featureflags_protobuf.service_pb2.StoreStatsTask,
                google.protobuf.empty_pb2.Empty,
            ),
            '/featureflags_protobuf.service.FeatureFlags/StoreStats': grpclib.const.Handler(
                self.StoreStats,
                grpclib.const.Cardinality.UNARY_UNARY,
                featureflags_protobuf.service_pb2.StoreStatsTask,
                google.protobuf.empty_pb2.Empty,
            ),
        }


class FeatureFlagsStub:

    def __init__(self, channel: grpclib.client.Channel) -> None:
        self.exchange = grpclib.client.UnaryUnaryMethod(
            channel,
            '/featureflags_protobuf.service.FeatureFlags/exchange',
            featureflags_protobuf.service_pb2.ExchangeRequest,
            featureflags_protobuf.service_pb2.ExchangeReply,
        )
        self.Exchange = grpclib.client.UnaryUnaryMethod(
            channel,
            '/featureflags_protobuf.service.FeatureFlags/Exchange',
            featureflags_protobuf.service_pb2.ExchangeRequest,
            featureflags_protobuf.service_pb2.ExchangeReply,
        )
        self.store_stats = grpclib.client.UnaryUnaryMethod(
            channel,
            '/featureflags_protobuf.service.FeatureFlags/store_stats',
            featureflags_protobuf.service_pb2.StoreStatsTask,
            google.protobuf.empty_pb2.Empty,
        )
        self.StoreStats = grpclib.client.UnaryUnaryMethod(
            channel,
            '/featureflags_protobuf.service.FeatureFlags/StoreStats',
            featureflags_protobuf.service_pb2.StoreStatsTask,
            google.protobuf.empty_pb2.Empty,
        )
