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 groups_pb2
import grpc
import grpc.aio
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 GroupsServicer(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def GetGroup(
        self,
        request: groups_pb2.GetGroupReq,
        context: CouchersContext,
        session: orm.Session,
    ) -> typing.Union[groups_pb2.Group, collections.abc.Awaitable[groups_pb2.Group]]:
        """Get info about a group"""

    @abc.abstractmethod
    def ListAdmins(
        self,
        request: groups_pb2.ListAdminsReq,
        context: CouchersContext,
        session: orm.Session,
    ) -> typing.Union[groups_pb2.ListAdminsRes, collections.abc.Awaitable[groups_pb2.ListAdminsRes]]:
        """Gets a paginated list of group admins"""

    @abc.abstractmethod
    def ListMembers(
        self,
        request: groups_pb2.ListMembersReq,
        context: CouchersContext,
        session: orm.Session,
    ) -> typing.Union[groups_pb2.ListMembersRes, collections.abc.Awaitable[groups_pb2.ListMembersRes]]:
        """Gets a paginated list of group members, including admins"""

    @abc.abstractmethod
    def ListPlaces(
        self,
        request: groups_pb2.ListPlacesReq,
        context: CouchersContext,
        session: orm.Session,
    ) -> typing.Union[groups_pb2.ListPlacesRes, collections.abc.Awaitable[groups_pb2.ListPlacesRes]]:
        """Returns a paginated list of places associated with a group"""

    @abc.abstractmethod
    def ListGuides(
        self,
        request: groups_pb2.ListGuidesReq,
        context: CouchersContext,
        session: orm.Session,
    ) -> typing.Union[groups_pb2.ListGuidesRes, collections.abc.Awaitable[groups_pb2.ListGuidesRes]]:
        """Returns a paginated list of guides associated with a group"""

    @abc.abstractmethod
    def ListEvents(
        self,
        request: groups_pb2.ListEventsReq,
        context: CouchersContext,
        session: orm.Session,
    ) -> typing.Union[groups_pb2.ListEventsRes, collections.abc.Awaitable[groups_pb2.ListEventsRes]]:
        """Returns a paginated events of guides associated with a group"""

    @abc.abstractmethod
    def ListDiscussions(
        self,
        request: groups_pb2.ListDiscussionsReq,
        context: CouchersContext,
        session: orm.Session,
    ) -> typing.Union[groups_pb2.ListDiscussionsRes, collections.abc.Awaitable[groups_pb2.ListDiscussionsRes]]:
        """Returns a paginated list of discussions associated with a group"""

    @abc.abstractmethod
    def JoinGroup(
        self,
        request: groups_pb2.JoinGroupReq,
        context: CouchersContext,
        session: orm.Session,
    ) -> typing.Union[google.protobuf.empty_pb2.Empty, collections.abc.Awaitable[google.protobuf.empty_pb2.Empty]]:
        """Join a group

        Raises: FAILED_PRECONDITION if the user is already part of the group
        """

    @abc.abstractmethod
    def LeaveGroup(
        self,
        request: groups_pb2.LeaveGroupReq,
        context: CouchersContext,
        session: orm.Session,
    ) -> typing.Union[google.protobuf.empty_pb2.Empty, collections.abc.Awaitable[google.protobuf.empty_pb2.Empty]]:
        """Leave a group

        Raises: FAILED_PRECONDITION if the user is not part of the group
        """

    @abc.abstractmethod
    def ListUserGroups(
        self,
        request: groups_pb2.ListUserGroupsReq,
        context: CouchersContext,
        session: orm.Session,
    ) -> typing.Union[groups_pb2.ListUserGroupsRes, collections.abc.Awaitable[groups_pb2.ListUserGroupsRes]]:
        """Gets a list of groups a member belongs to"""

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