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 grpc
import grpc.aio
import sys
import threads_pb2
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 ThreadsServicer(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def GetThread(
        self,
        request: threads_pb2.GetThreadReq,
        context: CouchersContext,
        session: orm.Session,
    ) -> typing.Union[threads_pb2.GetThreadRes, collections.abc.Awaitable[threads_pb2.GetThreadRes]]:
        """The same API is used regardless of level. All posts are using the same id namespace.

        Get non-deleted posts belonging to a thread, sorted in reverse time order.
        """

    @abc.abstractmethod
    def PostReply(
        self,
        request: threads_pb2.PostReplyReq,
        context: CouchersContext,
        session: orm.Session,
    ) -> typing.Union[threads_pb2.PostReplyRes, collections.abc.Awaitable[threads_pb2.PostReplyRes]]:
        """Post a new comment on a thread. The post can not be changed or deleted after posting.
        Throws NOT_FOUND if thread_id corresponds to a nesting level 3 reply, since no futher nesting is allowed.
        """

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