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 typing


GRPC_GENERATED_VERSION: str
GRPC_VERSION: str

class GroupsStub:
    def __init__(self, channel: grpc.Channel) -> None: ...
    GetGroup: grpc.UnaryUnaryMultiCallable[groups_pb2.GetGroupReq, groups_pb2.Group]
    """Get info about a group"""
    ListAdmins: grpc.UnaryUnaryMultiCallable[groups_pb2.ListAdminsReq, groups_pb2.ListAdminsRes]
    """Gets a paginated list of group admins"""
    ListMembers: grpc.UnaryUnaryMultiCallable[groups_pb2.ListMembersReq, groups_pb2.ListMembersRes]
    """Gets a paginated list of group members, including admins"""
    ListPlaces: grpc.UnaryUnaryMultiCallable[groups_pb2.ListPlacesReq, groups_pb2.ListPlacesRes]
    """Returns a paginated list of places associated with a group"""
    ListGuides: grpc.UnaryUnaryMultiCallable[groups_pb2.ListGuidesReq, groups_pb2.ListGuidesRes]
    """Returns a paginated list of guides associated with a group"""
    ListEvents: grpc.UnaryUnaryMultiCallable[groups_pb2.ListEventsReq, groups_pb2.ListEventsRes]
    """Returns a paginated events of guides associated with a group"""
    ListDiscussions: grpc.UnaryUnaryMultiCallable[groups_pb2.ListDiscussionsReq, groups_pb2.ListDiscussionsRes]
    """Returns a paginated list of discussions associated with a group"""
    JoinGroup: grpc.UnaryUnaryMultiCallable[groups_pb2.JoinGroupReq, google.protobuf.empty_pb2.Empty]
    """Join a group

    Raises: FAILED_PRECONDITION if the user is already part of the group
    """
    LeaveGroup: grpc.UnaryUnaryMultiCallable[groups_pb2.LeaveGroupReq, google.protobuf.empty_pb2.Empty]
    """Leave a group

    Raises: FAILED_PRECONDITION if the user is not part of the group
    """
    ListUserGroups: grpc.UnaryUnaryMultiCallable[groups_pb2.ListUserGroupsReq, groups_pb2.ListUserGroupsRes]
    """Gets a list of groups a member belongs to"""

class GroupsServicer(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def GetGroup(
        self,
        request: groups_pb2.GetGroupReq,
        context: CouchersContext,
        session: orm.Session,
    ) -> groups_pb2.Group:
        """Get info about a group"""

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

    @abc.abstractmethod
    def ListMembers(
        self,
        request: groups_pb2.ListMembersReq,
        context: CouchersContext,
        session: orm.Session,
    ) -> 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,
    ) -> 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,
    ) -> 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,
    ) -> 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,
    ) -> 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,
    ) -> 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,
    ) -> 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,
    ) -> groups_pb2.ListUserGroupsRes:
        """Gets a list of groups a member belongs to"""

def add_GroupsServicer_to_server(servicer: GroupsServicer, server: grpc.Server) -> None: ...
