# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from . import groups_pb2 as groups__pb2


class GroupsStub(object):
    """Missing associated documentation comment in .proto file."""

    def __init__(self, channel):
        """Constructor.

        Args:
            channel: A grpc.Channel.
        """
        self.GetGroup = channel.unary_unary(
                '/org.couchers.api.groups.Groups/GetGroup',
                request_serializer=groups__pb2.GetGroupReq.SerializeToString,
                response_deserializer=groups__pb2.Group.FromString,
                )
        self.ListAdmins = channel.unary_unary(
                '/org.couchers.api.groups.Groups/ListAdmins',
                request_serializer=groups__pb2.ListAdminsReq.SerializeToString,
                response_deserializer=groups__pb2.ListAdminsRes.FromString,
                )
        self.ListMembers = channel.unary_unary(
                '/org.couchers.api.groups.Groups/ListMembers',
                request_serializer=groups__pb2.ListMembersReq.SerializeToString,
                response_deserializer=groups__pb2.ListMembersRes.FromString,
                )
        self.ListPlaces = channel.unary_unary(
                '/org.couchers.api.groups.Groups/ListPlaces',
                request_serializer=groups__pb2.ListPlacesReq.SerializeToString,
                response_deserializer=groups__pb2.ListPlacesRes.FromString,
                )
        self.ListGuides = channel.unary_unary(
                '/org.couchers.api.groups.Groups/ListGuides',
                request_serializer=groups__pb2.ListGuidesReq.SerializeToString,
                response_deserializer=groups__pb2.ListGuidesRes.FromString,
                )
        self.ListEvents = channel.unary_unary(
                '/org.couchers.api.groups.Groups/ListEvents',
                request_serializer=groups__pb2.ListEventsReq.SerializeToString,
                response_deserializer=groups__pb2.ListEventsRes.FromString,
                )
        self.ListDiscussions = channel.unary_unary(
                '/org.couchers.api.groups.Groups/ListDiscussions',
                request_serializer=groups__pb2.ListDiscussionsReq.SerializeToString,
                response_deserializer=groups__pb2.ListDiscussionsRes.FromString,
                )
        self.JoinGroup = channel.unary_unary(
                '/org.couchers.api.groups.Groups/JoinGroup',
                request_serializer=groups__pb2.JoinGroupReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.LeaveGroup = channel.unary_unary(
                '/org.couchers.api.groups.Groups/LeaveGroup',
                request_serializer=groups__pb2.LeaveGroupReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.ListUserGroups = channel.unary_unary(
                '/org.couchers.api.groups.Groups/ListUserGroups',
                request_serializer=groups__pb2.ListUserGroupsReq.SerializeToString,
                response_deserializer=groups__pb2.ListUserGroupsRes.FromString,
                )


class GroupsServicer(object):
    """Missing associated documentation comment in .proto file."""

    def GetGroup(self, request, context):
        """Get info about a group
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListAdmins(self, request, context):
        """Gets a paginated list of group admins
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListMembers(self, request, context):
        """Gets a paginated list of group members, including admins
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListPlaces(self, request, context):
        """Returns a paginated list of places associated with a group
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListGuides(self, request, context):
        """Returns a paginated list of guides associated with a group
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListEvents(self, request, context):
        """Returns a paginated events of guides associated with a group
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListDiscussions(self, request, context):
        """Returns a paginated list of discussions associated with a group
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def JoinGroup(self, request, context):
        """Join a group

        Raises: FAILED_PRECONDITION if the user is already part of the group
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def LeaveGroup(self, request, context):
        """Leave a group

        Raises: FAILED_PRECONDITION if the user is not part of the group
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListUserGroups(self, request, context):
        """Gets a list of groups a member belongs to
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_GroupsServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetGroup': grpc.unary_unary_rpc_method_handler(
                    servicer.GetGroup,
                    request_deserializer=groups__pb2.GetGroupReq.FromString,
                    response_serializer=groups__pb2.Group.SerializeToString,
            ),
            'ListAdmins': grpc.unary_unary_rpc_method_handler(
                    servicer.ListAdmins,
                    request_deserializer=groups__pb2.ListAdminsReq.FromString,
                    response_serializer=groups__pb2.ListAdminsRes.SerializeToString,
            ),
            'ListMembers': grpc.unary_unary_rpc_method_handler(
                    servicer.ListMembers,
                    request_deserializer=groups__pb2.ListMembersReq.FromString,
                    response_serializer=groups__pb2.ListMembersRes.SerializeToString,
            ),
            'ListPlaces': grpc.unary_unary_rpc_method_handler(
                    servicer.ListPlaces,
                    request_deserializer=groups__pb2.ListPlacesReq.FromString,
                    response_serializer=groups__pb2.ListPlacesRes.SerializeToString,
            ),
            'ListGuides': grpc.unary_unary_rpc_method_handler(
                    servicer.ListGuides,
                    request_deserializer=groups__pb2.ListGuidesReq.FromString,
                    response_serializer=groups__pb2.ListGuidesRes.SerializeToString,
            ),
            'ListEvents': grpc.unary_unary_rpc_method_handler(
                    servicer.ListEvents,
                    request_deserializer=groups__pb2.ListEventsReq.FromString,
                    response_serializer=groups__pb2.ListEventsRes.SerializeToString,
            ),
            'ListDiscussions': grpc.unary_unary_rpc_method_handler(
                    servicer.ListDiscussions,
                    request_deserializer=groups__pb2.ListDiscussionsReq.FromString,
                    response_serializer=groups__pb2.ListDiscussionsRes.SerializeToString,
            ),
            'JoinGroup': grpc.unary_unary_rpc_method_handler(
                    servicer.JoinGroup,
                    request_deserializer=groups__pb2.JoinGroupReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'LeaveGroup': grpc.unary_unary_rpc_method_handler(
                    servicer.LeaveGroup,
                    request_deserializer=groups__pb2.LeaveGroupReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'ListUserGroups': grpc.unary_unary_rpc_method_handler(
                    servicer.ListUserGroups,
                    request_deserializer=groups__pb2.ListUserGroupsReq.FromString,
                    response_serializer=groups__pb2.ListUserGroupsRes.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'org.couchers.api.groups.Groups', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Groups(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def GetGroup(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/org.couchers.api.groups.Groups/GetGroup',
            groups__pb2.GetGroupReq.SerializeToString,
            groups__pb2.Group.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListAdmins(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/org.couchers.api.groups.Groups/ListAdmins',
            groups__pb2.ListAdminsReq.SerializeToString,
            groups__pb2.ListAdminsRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListMembers(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/org.couchers.api.groups.Groups/ListMembers',
            groups__pb2.ListMembersReq.SerializeToString,
            groups__pb2.ListMembersRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListPlaces(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/org.couchers.api.groups.Groups/ListPlaces',
            groups__pb2.ListPlacesReq.SerializeToString,
            groups__pb2.ListPlacesRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListGuides(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/org.couchers.api.groups.Groups/ListGuides',
            groups__pb2.ListGuidesReq.SerializeToString,
            groups__pb2.ListGuidesRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListEvents(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/org.couchers.api.groups.Groups/ListEvents',
            groups__pb2.ListEventsReq.SerializeToString,
            groups__pb2.ListEventsRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListDiscussions(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/org.couchers.api.groups.Groups/ListDiscussions',
            groups__pb2.ListDiscussionsReq.SerializeToString,
            groups__pb2.ListDiscussionsRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def JoinGroup(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/org.couchers.api.groups.Groups/JoinGroup',
            groups__pb2.JoinGroupReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def LeaveGroup(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/org.couchers.api.groups.Groups/LeaveGroup',
            groups__pb2.LeaveGroupReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListUserGroups(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/org.couchers.api.groups.Groups/ListUserGroups',
            groups__pb2.ListUserGroupsReq.SerializeToString,
            groups__pb2.ListUserGroupsRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
