"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
Copyright 2022 Lekko Technologies, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import abc
import collections.abc
import grpc
import grpc.aio
import lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2
import typing

_T = typing.TypeVar('_T')

class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta):
    ...

class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext):  # type: ignore
    ...

class DistributionServiceStub:
    """Initial implementation of a config distribution service. Clients should begin by
    calling the register RPC which returns a session key, which is used in all other RPCs.
    """

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    GetRepositoryVersion: grpc.UnaryUnaryMultiCallable[
        lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.GetRepositoryVersionRequest,
        lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.GetRepositoryVersionResponse,
    ]
    """Returns the latest commit sha of the repository. The client is expected to poll this
    rpc to become aware of updates.
    """
    GetRepositoryContents: grpc.UnaryUnaryMultiCallable[
        lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.GetRepositoryContentsRequest,
        lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.GetRepositoryContentsResponse,
    ]
    """Returns the entire state of the repository, including all feature flags."""
    SendFlagEvaluationMetrics: grpc.UnaryUnaryMultiCallable[
        lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.SendFlagEvaluationMetricsRequest,
        lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.SendFlagEvaluationMetricsResponse,
    ]
    """Sends metrics to the backend related to flag evaluation. This rpc can be used
    to batch metrics to lekko servers.
    """
    RegisterClient: grpc.UnaryUnaryMultiCallable[
        lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.RegisterClientRequest,
        lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.RegisterClientResponse,
    ]
    """Registers a client and returns a session key."""
    DeregisterClient: grpc.UnaryUnaryMultiCallable[
        lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.DeregisterClientRequest,
        lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.DeregisterClientResponse,
    ]
    """Deregisters a client using a session key."""
    GetDeveloperAccessToken: grpc.UnaryUnaryMultiCallable[
        lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.GetDeveloperAccessTokenRequest,
        lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.GetDeveloperAccessTokenResponse,
    ]
    """Returns a github access token that provides access to the contents of
    some of Lekko's private repositories
    """

class DistributionServiceAsyncStub:
    """Initial implementation of a config distribution service. Clients should begin by
    calling the register RPC which returns a session key, which is used in all other RPCs.
    """

    GetRepositoryVersion: grpc.aio.UnaryUnaryMultiCallable[
        lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.GetRepositoryVersionRequest,
        lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.GetRepositoryVersionResponse,
    ]
    """Returns the latest commit sha of the repository. The client is expected to poll this
    rpc to become aware of updates.
    """
    GetRepositoryContents: grpc.aio.UnaryUnaryMultiCallable[
        lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.GetRepositoryContentsRequest,
        lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.GetRepositoryContentsResponse,
    ]
    """Returns the entire state of the repository, including all feature flags."""
    SendFlagEvaluationMetrics: grpc.aio.UnaryUnaryMultiCallable[
        lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.SendFlagEvaluationMetricsRequest,
        lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.SendFlagEvaluationMetricsResponse,
    ]
    """Sends metrics to the backend related to flag evaluation. This rpc can be used
    to batch metrics to lekko servers.
    """
    RegisterClient: grpc.aio.UnaryUnaryMultiCallable[
        lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.RegisterClientRequest,
        lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.RegisterClientResponse,
    ]
    """Registers a client and returns a session key."""
    DeregisterClient: grpc.aio.UnaryUnaryMultiCallable[
        lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.DeregisterClientRequest,
        lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.DeregisterClientResponse,
    ]
    """Deregisters a client using a session key."""
    GetDeveloperAccessToken: grpc.aio.UnaryUnaryMultiCallable[
        lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.GetDeveloperAccessTokenRequest,
        lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.GetDeveloperAccessTokenResponse,
    ]
    """Returns a github access token that provides access to the contents of
    some of Lekko's private repositories
    """

class DistributionServiceServicer(metaclass=abc.ABCMeta):
    """Initial implementation of a config distribution service. Clients should begin by
    calling the register RPC which returns a session key, which is used in all other RPCs.
    """

    @abc.abstractmethod
    def GetRepositoryVersion(
        self,
        request: lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.GetRepositoryVersionRequest,
        context: _ServicerContext,
    ) -> typing.Union[lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.GetRepositoryVersionResponse, collections.abc.Awaitable[lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.GetRepositoryVersionResponse]]:
        """Returns the latest commit sha of the repository. The client is expected to poll this
        rpc to become aware of updates.
        """
    @abc.abstractmethod
    def GetRepositoryContents(
        self,
        request: lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.GetRepositoryContentsRequest,
        context: _ServicerContext,
    ) -> typing.Union[lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.GetRepositoryContentsResponse, collections.abc.Awaitable[lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.GetRepositoryContentsResponse]]:
        """Returns the entire state of the repository, including all feature flags."""
    @abc.abstractmethod
    def SendFlagEvaluationMetrics(
        self,
        request: lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.SendFlagEvaluationMetricsRequest,
        context: _ServicerContext,
    ) -> typing.Union[lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.SendFlagEvaluationMetricsResponse, collections.abc.Awaitable[lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.SendFlagEvaluationMetricsResponse]]:
        """Sends metrics to the backend related to flag evaluation. This rpc can be used
        to batch metrics to lekko servers.
        """
    @abc.abstractmethod
    def RegisterClient(
        self,
        request: lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.RegisterClientRequest,
        context: _ServicerContext,
    ) -> typing.Union[lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.RegisterClientResponse, collections.abc.Awaitable[lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.RegisterClientResponse]]:
        """Registers a client and returns a session key."""
    @abc.abstractmethod
    def DeregisterClient(
        self,
        request: lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.DeregisterClientRequest,
        context: _ServicerContext,
    ) -> typing.Union[lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.DeregisterClientResponse, collections.abc.Awaitable[lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.DeregisterClientResponse]]:
        """Deregisters a client using a session key."""
    @abc.abstractmethod
    def GetDeveloperAccessToken(
        self,
        request: lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.GetDeveloperAccessTokenRequest,
        context: _ServicerContext,
    ) -> typing.Union[lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.GetDeveloperAccessTokenResponse, collections.abc.Awaitable[lekko_client.gen.lekko.backend.v1beta1.distribution_service_pb2.GetDeveloperAccessTokenResponse]]:
        """Returns a github access token that provides access to the contents of
        some of Lekko's private repositories
        """

def add_DistributionServiceServicer_to_server(servicer: DistributionServiceServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ...
