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

from . import communities_pb2 as communities__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetCommunity = channel.unary_unary(
                '/org.couchers.api.communities.Communities/GetCommunity',
                request_serializer=communities__pb2.GetCommunityReq.SerializeToString,
                response_deserializer=communities__pb2.Community.FromString,
                )
        self.ListCommunities = channel.unary_unary(
                '/org.couchers.api.communities.Communities/ListCommunities',
                request_serializer=communities__pb2.ListCommunitiesReq.SerializeToString,
                response_deserializer=communities__pb2.ListCommunitiesRes.FromString,
                )
        self.ListGroups = channel.unary_unary(
                '/org.couchers.api.communities.Communities/ListGroups',
                request_serializer=communities__pb2.ListGroupsReq.SerializeToString,
                response_deserializer=communities__pb2.ListGroupsRes.FromString,
                )
        self.ListAdmins = channel.unary_unary(
                '/org.couchers.api.communities.Communities/ListAdmins',
                request_serializer=communities__pb2.ListAdminsReq.SerializeToString,
                response_deserializer=communities__pb2.ListAdminsRes.FromString,
                )
        self.ListMembers = channel.unary_unary(
                '/org.couchers.api.communities.Communities/ListMembers',
                request_serializer=communities__pb2.ListMembersReq.SerializeToString,
                response_deserializer=communities__pb2.ListMembersRes.FromString,
                )
        self.ListNearbyUsers = channel.unary_unary(
                '/org.couchers.api.communities.Communities/ListNearbyUsers',
                request_serializer=communities__pb2.ListNearbyUsersReq.SerializeToString,
                response_deserializer=communities__pb2.ListNearbyUsersRes.FromString,
                )
        self.ListPlaces = channel.unary_unary(
                '/org.couchers.api.communities.Communities/ListPlaces',
                request_serializer=communities__pb2.ListPlacesReq.SerializeToString,
                response_deserializer=communities__pb2.ListPlacesRes.FromString,
                )
        self.ListGuides = channel.unary_unary(
                '/org.couchers.api.communities.Communities/ListGuides',
                request_serializer=communities__pb2.ListGuidesReq.SerializeToString,
                response_deserializer=communities__pb2.ListGuidesRes.FromString,
                )
        self.ListEvents = channel.unary_unary(
                '/org.couchers.api.communities.Communities/ListEvents',
                request_serializer=communities__pb2.ListEventsReq.SerializeToString,
                response_deserializer=communities__pb2.ListEventsRes.FromString,
                )
        self.ListDiscussions = channel.unary_unary(
                '/org.couchers.api.communities.Communities/ListDiscussions',
                request_serializer=communities__pb2.ListDiscussionsReq.SerializeToString,
                response_deserializer=communities__pb2.ListDiscussionsRes.FromString,
                )
        self.JoinCommunity = channel.unary_unary(
                '/org.couchers.api.communities.Communities/JoinCommunity',
                request_serializer=communities__pb2.JoinCommunityReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.LeaveCommunity = channel.unary_unary(
                '/org.couchers.api.communities.Communities/LeaveCommunity',
                request_serializer=communities__pb2.LeaveCommunityReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.ListUserCommunities = channel.unary_unary(
                '/org.couchers.api.communities.Communities/ListUserCommunities',
                request_serializer=communities__pb2.ListUserCommunitiesReq.SerializeToString,
                response_deserializer=communities__pb2.ListUserCommunitiesRes.FromString,
                )


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

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

    def ListCommunities(self, request, context):
        """Gets a paginated list of sub-communities associated with a community
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListGroups(self, request, context):
        """Gets a paginated list of groups associated with a community
        """
        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 community admins only
        """
        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 community members, including admins
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListNearbyUsers(self, request, context):
        """Gets a paginated list of users who live within the polygon of the community
        """
        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 community
        """
        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 community
        """
        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 community
        """
        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 community
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def JoinCommunity(self, request, context):
        """Join a community you're not a part of

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

    def LeaveCommunity(self, request, context):
        """Leave a community that you're not inside.
        You cannot leave a community that you live inside.

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

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


def add_CommunitiesServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetCommunity': grpc.unary_unary_rpc_method_handler(
                    servicer.GetCommunity,
                    request_deserializer=communities__pb2.GetCommunityReq.FromString,
                    response_serializer=communities__pb2.Community.SerializeToString,
            ),
            'ListCommunities': grpc.unary_unary_rpc_method_handler(
                    servicer.ListCommunities,
                    request_deserializer=communities__pb2.ListCommunitiesReq.FromString,
                    response_serializer=communities__pb2.ListCommunitiesRes.SerializeToString,
            ),
            'ListGroups': grpc.unary_unary_rpc_method_handler(
                    servicer.ListGroups,
                    request_deserializer=communities__pb2.ListGroupsReq.FromString,
                    response_serializer=communities__pb2.ListGroupsRes.SerializeToString,
            ),
            'ListAdmins': grpc.unary_unary_rpc_method_handler(
                    servicer.ListAdmins,
                    request_deserializer=communities__pb2.ListAdminsReq.FromString,
                    response_serializer=communities__pb2.ListAdminsRes.SerializeToString,
            ),
            'ListMembers': grpc.unary_unary_rpc_method_handler(
                    servicer.ListMembers,
                    request_deserializer=communities__pb2.ListMembersReq.FromString,
                    response_serializer=communities__pb2.ListMembersRes.SerializeToString,
            ),
            'ListNearbyUsers': grpc.unary_unary_rpc_method_handler(
                    servicer.ListNearbyUsers,
                    request_deserializer=communities__pb2.ListNearbyUsersReq.FromString,
                    response_serializer=communities__pb2.ListNearbyUsersRes.SerializeToString,
            ),
            'ListPlaces': grpc.unary_unary_rpc_method_handler(
                    servicer.ListPlaces,
                    request_deserializer=communities__pb2.ListPlacesReq.FromString,
                    response_serializer=communities__pb2.ListPlacesRes.SerializeToString,
            ),
            'ListGuides': grpc.unary_unary_rpc_method_handler(
                    servicer.ListGuides,
                    request_deserializer=communities__pb2.ListGuidesReq.FromString,
                    response_serializer=communities__pb2.ListGuidesRes.SerializeToString,
            ),
            'ListEvents': grpc.unary_unary_rpc_method_handler(
                    servicer.ListEvents,
                    request_deserializer=communities__pb2.ListEventsReq.FromString,
                    response_serializer=communities__pb2.ListEventsRes.SerializeToString,
            ),
            'ListDiscussions': grpc.unary_unary_rpc_method_handler(
                    servicer.ListDiscussions,
                    request_deserializer=communities__pb2.ListDiscussionsReq.FromString,
                    response_serializer=communities__pb2.ListDiscussionsRes.SerializeToString,
            ),
            'JoinCommunity': grpc.unary_unary_rpc_method_handler(
                    servicer.JoinCommunity,
                    request_deserializer=communities__pb2.JoinCommunityReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'LeaveCommunity': grpc.unary_unary_rpc_method_handler(
                    servicer.LeaveCommunity,
                    request_deserializer=communities__pb2.LeaveCommunityReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'ListUserCommunities': grpc.unary_unary_rpc_method_handler(
                    servicer.ListUserCommunities,
                    request_deserializer=communities__pb2.ListUserCommunitiesReq.FromString,
                    response_serializer=communities__pb2.ListUserCommunitiesRes.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'org.couchers.api.communities.Communities', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetCommunity(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.communities.Communities/GetCommunity',
            communities__pb2.GetCommunityReq.SerializeToString,
            communities__pb2.Community.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListCommunities(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.communities.Communities/ListCommunities',
            communities__pb2.ListCommunitiesReq.SerializeToString,
            communities__pb2.ListCommunitiesRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListGroups(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.communities.Communities/ListGroups',
            communities__pb2.ListGroupsReq.SerializeToString,
            communities__pb2.ListGroupsRes.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.communities.Communities/ListAdmins',
            communities__pb2.ListAdminsReq.SerializeToString,
            communities__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.communities.Communities/ListMembers',
            communities__pb2.ListMembersReq.SerializeToString,
            communities__pb2.ListMembersRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListNearbyUsers(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.communities.Communities/ListNearbyUsers',
            communities__pb2.ListNearbyUsersReq.SerializeToString,
            communities__pb2.ListNearbyUsersRes.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.communities.Communities/ListPlaces',
            communities__pb2.ListPlacesReq.SerializeToString,
            communities__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.communities.Communities/ListGuides',
            communities__pb2.ListGuidesReq.SerializeToString,
            communities__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.communities.Communities/ListEvents',
            communities__pb2.ListEventsReq.SerializeToString,
            communities__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.communities.Communities/ListDiscussions',
            communities__pb2.ListDiscussionsReq.SerializeToString,
            communities__pb2.ListDiscussionsRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def JoinCommunity(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.communities.Communities/JoinCommunity',
            communities__pb2.JoinCommunityReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def LeaveCommunity(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.communities.Communities/LeaveCommunity',
            communities__pb2.LeaveCommunityReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListUserCommunities(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.communities.Communities/ListUserCommunities',
            communities__pb2.ListUserCommunitiesReq.SerializeToString,
            communities__pb2.ListUserCommunitiesRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
