from sqlalchemy import orm
from couchers.context import CouchersContext
"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""

import abc
import collections.abc
import google.protobuf.empty_pb2
import grpc
import grpc.aio
import references_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
class ReferencesServicer(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def ListReferences(
        self,
        request: references_pb2.ListReferencesReq,
        context: CouchersContext,
        session: orm.Session,
    ) -> typing.Union[references_pb2.ListReferencesRes, collections.abc.Awaitable[references_pb2.ListReferencesRes]]:
        """Returns a paginated list of references satisfying some filtering criterion"""

    @abc.abstractmethod
    def WriteFriendReference(
        self,
        request: references_pb2.WriteFriendReferenceReq,
        context: CouchersContext,
        session: orm.Session,
    ) -> typing.Union[references_pb2.Reference, collections.abc.Awaitable[references_pb2.Reference]]:
        """Write a reference for your friend. Raises INVALID_ARGUMENT if you
        try to write for yourself, or NOT_FOUND if the user doesn't exist.
        Raises FAILED_PRECONDITION if you try to write a reference for someone you already wrote a friend reference for.
        """

    @abc.abstractmethod
    def WriteHostRequestReference(
        self,
        request: references_pb2.WriteHostRequestReferenceReq,
        context: CouchersContext,
        session: orm.Session,
    ) -> typing.Union[references_pb2.Reference, collections.abc.Awaitable[references_pb2.Reference]]:
        """Write a reference for someone after having hosted/surfed with them. Raises NOT_FOUND if the request doesn't
        exist.
        """

    @abc.abstractmethod
    def HostRequestIndicateDidntMeetup(
        self,
        request: references_pb2.HostRequestIndicateDidntMeetupReq,
        context: CouchersContext,
        session: orm.Session,
    ) -> typing.Union[google.protobuf.empty_pb2.Empty, collections.abc.Awaitable[google.protobuf.empty_pb2.Empty]]:
        """Indicate that the user didn't meet up"""

    @abc.abstractmethod
    def AvailableWriteReferences(
        self,
        request: references_pb2.AvailableWriteReferencesReq,
        context: CouchersContext,
        session: orm.Session,
    ) -> typing.Union[references_pb2.AvailableWriteReferencesRes, collections.abc.Awaitable[references_pb2.AvailableWriteReferencesRes]]:
        """Return the reference types that is, at the moment, possible to write about a user."""

    @abc.abstractmethod
    def ListPendingReferencesToWrite(
        self,
        request: google.protobuf.empty_pb2.Empty,
        context: CouchersContext,
        session: orm.Session,
    ) -> typing.Union[references_pb2.ListPendingReferencesToWriteRes, collections.abc.Awaitable[references_pb2.ListPendingReferencesToWriteRes]]:
        """Returns a list of references that you should write about others, e.g. after surfing or hosting"""

    @abc.abstractmethod
    def GetHostRequestReferenceStatus(
        self,
        request: references_pb2.GetHostRequestReferenceStatusReq,
        context: CouchersContext,
        session: orm.Session,
    ) -> typing.Union[references_pb2.GetHostRequestReferenceStatusRes, collections.abc.Awaitable[references_pb2.GetHostRequestReferenceStatusRes]]:
        """Returns status for whether the current user can write a host-request reference for the given request id"""

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