"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
*
DEPRECATED; use flagd.sync.v1
Flag definition sync API

This proto defines a simple API to synchronize a feature flag definition.
It supports establishing a stream for getting notifications about changes in a flag definition.
"""

import abc
import collections.abc
import grpc
import grpc.aio
import openfeature.schemas.protobuf.sync.v1.sync_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[misc, type-arg]
    ...

class FlagSyncServiceStub:
    """FlagService implements a server streaming to provide realtime flag configurations"""

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    SyncFlags: grpc.UnaryStreamMultiCallable[
        openfeature.schemas.protobuf.sync.v1.sync_service_pb2.SyncFlagsRequest,
        openfeature.schemas.protobuf.sync.v1.sync_service_pb2.SyncFlagsResponse,
    ]

    FetchAllFlags: grpc.UnaryUnaryMultiCallable[
        openfeature.schemas.protobuf.sync.v1.sync_service_pb2.FetchAllFlagsRequest,
        openfeature.schemas.protobuf.sync.v1.sync_service_pb2.FetchAllFlagsResponse,
    ]

class FlagSyncServiceAsyncStub:
    """FlagService implements a server streaming to provide realtime flag configurations"""

    SyncFlags: grpc.aio.UnaryStreamMultiCallable[
        openfeature.schemas.protobuf.sync.v1.sync_service_pb2.SyncFlagsRequest,
        openfeature.schemas.protobuf.sync.v1.sync_service_pb2.SyncFlagsResponse,
    ]

    FetchAllFlags: grpc.aio.UnaryUnaryMultiCallable[
        openfeature.schemas.protobuf.sync.v1.sync_service_pb2.FetchAllFlagsRequest,
        openfeature.schemas.protobuf.sync.v1.sync_service_pb2.FetchAllFlagsResponse,
    ]

class FlagSyncServiceServicer(metaclass=abc.ABCMeta):
    """FlagService implements a server streaming to provide realtime flag configurations"""

    @abc.abstractmethod
    def SyncFlags(
        self,
        request: openfeature.schemas.protobuf.sync.v1.sync_service_pb2.SyncFlagsRequest,
        context: _ServicerContext,
    ) -> typing.Union[collections.abc.Iterator[openfeature.schemas.protobuf.sync.v1.sync_service_pb2.SyncFlagsResponse], collections.abc.AsyncIterator[openfeature.schemas.protobuf.sync.v1.sync_service_pb2.SyncFlagsResponse]]: ...

    @abc.abstractmethod
    def FetchAllFlags(
        self,
        request: openfeature.schemas.protobuf.sync.v1.sync_service_pb2.FetchAllFlagsRequest,
        context: _ServicerContext,
    ) -> typing.Union[openfeature.schemas.protobuf.sync.v1.sync_service_pb2.FetchAllFlagsResponse, collections.abc.Awaitable[openfeature.schemas.protobuf.sync.v1.sync_service_pb2.FetchAllFlagsResponse]]: ...

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