"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
*
Flag evaluation API

This proto forms the basis of a flag-evaluation API.
It supports single and bulk evaluation RPCs, and flags of various types, as well as establishing a stream for getting notifications about changes in a flag definition.
It supports the inclusion of a "context" with each evaluation, which may contain arbitrary attributes relevant to flag evaluation.
"""

import abc
import collections.abc
import grpc
import grpc.aio
import openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2
import sys
import typing

if sys.version_info >= (3, 13):
    import typing as typing_extensions
else:
    import typing_extensions

_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]
    ...

GRPC_GENERATED_VERSION: str
GRPC_VERSION: str
_ServiceResolveAllType = typing_extensions.TypeVar(
    '_ServiceResolveAllType',
    grpc.UnaryUnaryMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveAllRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveAllResponse,
    ],
    grpc.aio.UnaryUnaryMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveAllRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveAllResponse,
    ],
    default=grpc.UnaryUnaryMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveAllRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveAllResponse,
    ],
)

_ServiceResolveBooleanType = typing_extensions.TypeVar(
    '_ServiceResolveBooleanType',
    grpc.UnaryUnaryMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveBooleanRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveBooleanResponse,
    ],
    grpc.aio.UnaryUnaryMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveBooleanRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveBooleanResponse,
    ],
    default=grpc.UnaryUnaryMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveBooleanRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveBooleanResponse,
    ],
)

_ServiceResolveStringType = typing_extensions.TypeVar(
    '_ServiceResolveStringType',
    grpc.UnaryUnaryMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveStringRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveStringResponse,
    ],
    grpc.aio.UnaryUnaryMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveStringRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveStringResponse,
    ],
    default=grpc.UnaryUnaryMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveStringRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveStringResponse,
    ],
)

_ServiceResolveFloatType = typing_extensions.TypeVar(
    '_ServiceResolveFloatType',
    grpc.UnaryUnaryMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveFloatRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveFloatResponse,
    ],
    grpc.aio.UnaryUnaryMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveFloatRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveFloatResponse,
    ],
    default=grpc.UnaryUnaryMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveFloatRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveFloatResponse,
    ],
)

_ServiceResolveIntType = typing_extensions.TypeVar(
    '_ServiceResolveIntType',
    grpc.UnaryUnaryMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveIntRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveIntResponse,
    ],
    grpc.aio.UnaryUnaryMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveIntRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveIntResponse,
    ],
    default=grpc.UnaryUnaryMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveIntRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveIntResponse,
    ],
)

_ServiceResolveObjectType = typing_extensions.TypeVar(
    '_ServiceResolveObjectType',
    grpc.UnaryUnaryMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveObjectRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveObjectResponse,
    ],
    grpc.aio.UnaryUnaryMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveObjectRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveObjectResponse,
    ],
    default=grpc.UnaryUnaryMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveObjectRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveObjectResponse,
    ],
)

_ServiceEventStreamType = typing_extensions.TypeVar(
    '_ServiceEventStreamType',
    grpc.UnaryStreamMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.EventStreamRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.EventStreamResponse,
    ],
    grpc.aio.UnaryStreamMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.EventStreamRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.EventStreamResponse,
    ],
    default=grpc.UnaryStreamMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.EventStreamRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.EventStreamResponse,
    ],
)

class ServiceStub(typing.Generic[_ServiceResolveAllType, _ServiceResolveBooleanType, _ServiceResolveStringType, _ServiceResolveFloatType, _ServiceResolveIntType, _ServiceResolveObjectType, _ServiceEventStreamType]):
    """Service defines the exposed rpcs of flagd"""

    @typing.overload
    def __init__(self: ServiceStub[
        grpc.UnaryUnaryMultiCallable[
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveAllRequest,
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveAllResponse,
        ],
        grpc.UnaryUnaryMultiCallable[
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveBooleanRequest,
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveBooleanResponse,
        ],
        grpc.UnaryUnaryMultiCallable[
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveStringRequest,
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveStringResponse,
        ],
        grpc.UnaryUnaryMultiCallable[
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveFloatRequest,
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveFloatResponse,
        ],
        grpc.UnaryUnaryMultiCallable[
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveIntRequest,
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveIntResponse,
        ],
        grpc.UnaryUnaryMultiCallable[
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveObjectRequest,
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveObjectResponse,
        ],
        grpc.UnaryStreamMultiCallable[
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.EventStreamRequest,
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.EventStreamResponse,
        ],
    ], channel: grpc.Channel) -> None: ...

    @typing.overload
    def __init__(self: ServiceStub[
        grpc.aio.UnaryUnaryMultiCallable[
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveAllRequest,
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveAllResponse,
        ],
        grpc.aio.UnaryUnaryMultiCallable[
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveBooleanRequest,
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveBooleanResponse,
        ],
        grpc.aio.UnaryUnaryMultiCallable[
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveStringRequest,
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveStringResponse,
        ],
        grpc.aio.UnaryUnaryMultiCallable[
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveFloatRequest,
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveFloatResponse,
        ],
        grpc.aio.UnaryUnaryMultiCallable[
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveIntRequest,
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveIntResponse,
        ],
        grpc.aio.UnaryUnaryMultiCallable[
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveObjectRequest,
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveObjectResponse,
        ],
        grpc.aio.UnaryStreamMultiCallable[
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.EventStreamRequest,
            openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.EventStreamResponse,
        ],
    ], channel: grpc.aio.Channel) -> None: ...

    ResolveAll: _ServiceResolveAllType

    ResolveBoolean: _ServiceResolveBooleanType

    ResolveString: _ServiceResolveStringType

    ResolveFloat: _ServiceResolveFloatType

    ResolveInt: _ServiceResolveIntType

    ResolveObject: _ServiceResolveObjectType

    EventStream: _ServiceEventStreamType

ServiceAsyncStub: typing_extensions.TypeAlias = ServiceStub[
    grpc.aio.UnaryUnaryMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveAllRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveAllResponse,
    ],
    grpc.aio.UnaryUnaryMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveBooleanRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveBooleanResponse,
    ],
    grpc.aio.UnaryUnaryMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveStringRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveStringResponse,
    ],
    grpc.aio.UnaryUnaryMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveFloatRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveFloatResponse,
    ],
    grpc.aio.UnaryUnaryMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveIntRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveIntResponse,
    ],
    grpc.aio.UnaryUnaryMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveObjectRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveObjectResponse,
    ],
    grpc.aio.UnaryStreamMultiCallable[
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.EventStreamRequest,
        openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.EventStreamResponse,
    ],
]

class ServiceServicer(metaclass=abc.ABCMeta):
    """Service defines the exposed rpcs of flagd"""

    @abc.abstractmethod
    def ResolveAll(
        self,
        request: openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveAllRequest,
        context: _ServicerContext,
    ) -> typing.Union[openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveAllResponse, collections.abc.Awaitable[openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveAllResponse]]: ...

    @abc.abstractmethod
    def ResolveBoolean(
        self,
        request: openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveBooleanRequest,
        context: _ServicerContext,
    ) -> typing.Union[openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveBooleanResponse, collections.abc.Awaitable[openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveBooleanResponse]]: ...

    @abc.abstractmethod
    def ResolveString(
        self,
        request: openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveStringRequest,
        context: _ServicerContext,
    ) -> typing.Union[openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveStringResponse, collections.abc.Awaitable[openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveStringResponse]]: ...

    @abc.abstractmethod
    def ResolveFloat(
        self,
        request: openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveFloatRequest,
        context: _ServicerContext,
    ) -> typing.Union[openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveFloatResponse, collections.abc.Awaitable[openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveFloatResponse]]: ...

    @abc.abstractmethod
    def ResolveInt(
        self,
        request: openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveIntRequest,
        context: _ServicerContext,
    ) -> typing.Union[openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveIntResponse, collections.abc.Awaitable[openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveIntResponse]]: ...

    @abc.abstractmethod
    def ResolveObject(
        self,
        request: openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveObjectRequest,
        context: _ServicerContext,
    ) -> typing.Union[openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveObjectResponse, collections.abc.Awaitable[openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.ResolveObjectResponse]]: ...

    @abc.abstractmethod
    def EventStream(
        self,
        request: openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.EventStreamRequest,
        context: _ServicerContext,
    ) -> typing.Union[collections.abc.Iterator[openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.EventStreamResponse], collections.abc.AsyncIterator[openfeature.schemas.protobuf.flagd.evaluation.v1.evaluation_pb2.EventStreamResponse]]: ...

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