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

from . import conversations_pb2 as conversations__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.ListGroupChats = channel.unary_unary(
                '/org.couchers.api.conversations.Conversations/ListGroupChats',
                request_serializer=conversations__pb2.ListGroupChatsReq.SerializeToString,
                response_deserializer=conversations__pb2.ListGroupChatsRes.FromString,
                )
        self.GetGroupChat = channel.unary_unary(
                '/org.couchers.api.conversations.Conversations/GetGroupChat',
                request_serializer=conversations__pb2.GetGroupChatReq.SerializeToString,
                response_deserializer=conversations__pb2.GroupChat.FromString,
                )
        self.GetDirectMessage = channel.unary_unary(
                '/org.couchers.api.conversations.Conversations/GetDirectMessage',
                request_serializer=conversations__pb2.GetDirectMessageReq.SerializeToString,
                response_deserializer=conversations__pb2.GroupChat.FromString,
                )
        self.GetUpdates = channel.unary_unary(
                '/org.couchers.api.conversations.Conversations/GetUpdates',
                request_serializer=conversations__pb2.GetUpdatesReq.SerializeToString,
                response_deserializer=conversations__pb2.GetUpdatesRes.FromString,
                )
        self.GetGroupChatMessages = channel.unary_unary(
                '/org.couchers.api.conversations.Conversations/GetGroupChatMessages',
                request_serializer=conversations__pb2.GetGroupChatMessagesReq.SerializeToString,
                response_deserializer=conversations__pb2.GetGroupChatMessagesRes.FromString,
                )
        self.MarkLastSeenGroupChat = channel.unary_unary(
                '/org.couchers.api.conversations.Conversations/MarkLastSeenGroupChat',
                request_serializer=conversations__pb2.MarkLastSeenGroupChatReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.MuteGroupChat = channel.unary_unary(
                '/org.couchers.api.conversations.Conversations/MuteGroupChat',
                request_serializer=conversations__pb2.MuteGroupChatReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.CreateGroupChat = channel.unary_unary(
                '/org.couchers.api.conversations.Conversations/CreateGroupChat',
                request_serializer=conversations__pb2.CreateGroupChatReq.SerializeToString,
                response_deserializer=conversations__pb2.GroupChat.FromString,
                )
        self.EditGroupChat = channel.unary_unary(
                '/org.couchers.api.conversations.Conversations/EditGroupChat',
                request_serializer=conversations__pb2.EditGroupChatReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.InviteToGroupChat = channel.unary_unary(
                '/org.couchers.api.conversations.Conversations/InviteToGroupChat',
                request_serializer=conversations__pb2.InviteToGroupChatReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.MakeGroupChatAdmin = channel.unary_unary(
                '/org.couchers.api.conversations.Conversations/MakeGroupChatAdmin',
                request_serializer=conversations__pb2.MakeGroupChatAdminReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.RemoveGroupChatUser = channel.unary_unary(
                '/org.couchers.api.conversations.Conversations/RemoveGroupChatUser',
                request_serializer=conversations__pb2.RemoveGroupChatUserReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.RemoveGroupChatAdmin = channel.unary_unary(
                '/org.couchers.api.conversations.Conversations/RemoveGroupChatAdmin',
                request_serializer=conversations__pb2.RemoveGroupChatAdminReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.SendMessage = channel.unary_unary(
                '/org.couchers.api.conversations.Conversations/SendMessage',
                request_serializer=conversations__pb2.SendMessageReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.LeaveGroupChat = channel.unary_unary(
                '/org.couchers.api.conversations.Conversations/LeaveGroupChat',
                request_serializer=conversations__pb2.LeaveGroupChatReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.SearchMessages = channel.unary_unary(
                '/org.couchers.api.conversations.Conversations/SearchMessages',
                request_serializer=conversations__pb2.SearchMessagesReq.SerializeToString,
                response_deserializer=conversations__pb2.SearchMessagesRes.FromString,
                )


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

    def ListGroupChats(self, request, context):
        """Retrieves list of group chats (ordered by last message), paginated
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetGroupChat(self, request, context):
        """Retrieves group chat info by id
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetDirectMessage(self, request, context):
        """Retrieves group chat info for the unique (if any) direct message with a
        given user

        Raises: NOT_FOUND if there is no such direct message thread
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetUpdates(self, request, context):
        """Returns all new messages (aka updates) since a given message id
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetGroupChatMessages(self, request, context):
        """Retrieves messages in group chat, paginated
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def MarkLastSeenGroupChat(self, request, context):
        """Marks the last message that has been seen in this group chat
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def MuteGroupChat(self, request, context):
        """Mutes or unmutes a group chat
        when muted, you don't get notifications from that group chat
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateGroupChat(self, request, context):
        """Creates a new group chat
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def EditGroupChat(self, request, context):
        """Modifies group chat
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def InviteToGroupChat(self, request, context):
        """Invite a person to a chat
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def MakeGroupChatAdmin(self, request, context):
        """Make a user an admin of a group chat
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RemoveGroupChatUser(self, request, context):
        """Remove a user in a group chat.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RemoveGroupChatAdmin(self, request, context):
        """Remove a user from admin in group chat. TODO: Only original creator can do this
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SendMessage(self, request, context):
        """Send a message to a group chat
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def LeaveGroupChat(self, request, context):
        """Leave a group chat
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SearchMessages(self, request, context):
        """Search messages by string
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ConversationsServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ListGroupChats': grpc.unary_unary_rpc_method_handler(
                    servicer.ListGroupChats,
                    request_deserializer=conversations__pb2.ListGroupChatsReq.FromString,
                    response_serializer=conversations__pb2.ListGroupChatsRes.SerializeToString,
            ),
            'GetGroupChat': grpc.unary_unary_rpc_method_handler(
                    servicer.GetGroupChat,
                    request_deserializer=conversations__pb2.GetGroupChatReq.FromString,
                    response_serializer=conversations__pb2.GroupChat.SerializeToString,
            ),
            'GetDirectMessage': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDirectMessage,
                    request_deserializer=conversations__pb2.GetDirectMessageReq.FromString,
                    response_serializer=conversations__pb2.GroupChat.SerializeToString,
            ),
            'GetUpdates': grpc.unary_unary_rpc_method_handler(
                    servicer.GetUpdates,
                    request_deserializer=conversations__pb2.GetUpdatesReq.FromString,
                    response_serializer=conversations__pb2.GetUpdatesRes.SerializeToString,
            ),
            'GetGroupChatMessages': grpc.unary_unary_rpc_method_handler(
                    servicer.GetGroupChatMessages,
                    request_deserializer=conversations__pb2.GetGroupChatMessagesReq.FromString,
                    response_serializer=conversations__pb2.GetGroupChatMessagesRes.SerializeToString,
            ),
            'MarkLastSeenGroupChat': grpc.unary_unary_rpc_method_handler(
                    servicer.MarkLastSeenGroupChat,
                    request_deserializer=conversations__pb2.MarkLastSeenGroupChatReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'MuteGroupChat': grpc.unary_unary_rpc_method_handler(
                    servicer.MuteGroupChat,
                    request_deserializer=conversations__pb2.MuteGroupChatReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'CreateGroupChat': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateGroupChat,
                    request_deserializer=conversations__pb2.CreateGroupChatReq.FromString,
                    response_serializer=conversations__pb2.GroupChat.SerializeToString,
            ),
            'EditGroupChat': grpc.unary_unary_rpc_method_handler(
                    servicer.EditGroupChat,
                    request_deserializer=conversations__pb2.EditGroupChatReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'InviteToGroupChat': grpc.unary_unary_rpc_method_handler(
                    servicer.InviteToGroupChat,
                    request_deserializer=conversations__pb2.InviteToGroupChatReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'MakeGroupChatAdmin': grpc.unary_unary_rpc_method_handler(
                    servicer.MakeGroupChatAdmin,
                    request_deserializer=conversations__pb2.MakeGroupChatAdminReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'RemoveGroupChatUser': grpc.unary_unary_rpc_method_handler(
                    servicer.RemoveGroupChatUser,
                    request_deserializer=conversations__pb2.RemoveGroupChatUserReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'RemoveGroupChatAdmin': grpc.unary_unary_rpc_method_handler(
                    servicer.RemoveGroupChatAdmin,
                    request_deserializer=conversations__pb2.RemoveGroupChatAdminReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'SendMessage': grpc.unary_unary_rpc_method_handler(
                    servicer.SendMessage,
                    request_deserializer=conversations__pb2.SendMessageReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'LeaveGroupChat': grpc.unary_unary_rpc_method_handler(
                    servicer.LeaveGroupChat,
                    request_deserializer=conversations__pb2.LeaveGroupChatReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'SearchMessages': grpc.unary_unary_rpc_method_handler(
                    servicer.SearchMessages,
                    request_deserializer=conversations__pb2.SearchMessagesReq.FromString,
                    response_serializer=conversations__pb2.SearchMessagesRes.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'org.couchers.api.conversations.Conversations', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def ListGroupChats(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.conversations.Conversations/ListGroupChats',
            conversations__pb2.ListGroupChatsReq.SerializeToString,
            conversations__pb2.ListGroupChatsRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetGroupChat(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.conversations.Conversations/GetGroupChat',
            conversations__pb2.GetGroupChatReq.SerializeToString,
            conversations__pb2.GroupChat.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetDirectMessage(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.conversations.Conversations/GetDirectMessage',
            conversations__pb2.GetDirectMessageReq.SerializeToString,
            conversations__pb2.GroupChat.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetUpdates(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.conversations.Conversations/GetUpdates',
            conversations__pb2.GetUpdatesReq.SerializeToString,
            conversations__pb2.GetUpdatesRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetGroupChatMessages(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.conversations.Conversations/GetGroupChatMessages',
            conversations__pb2.GetGroupChatMessagesReq.SerializeToString,
            conversations__pb2.GetGroupChatMessagesRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def MarkLastSeenGroupChat(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.conversations.Conversations/MarkLastSeenGroupChat',
            conversations__pb2.MarkLastSeenGroupChatReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def MuteGroupChat(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.conversations.Conversations/MuteGroupChat',
            conversations__pb2.MuteGroupChatReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreateGroupChat(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.conversations.Conversations/CreateGroupChat',
            conversations__pb2.CreateGroupChatReq.SerializeToString,
            conversations__pb2.GroupChat.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def EditGroupChat(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.conversations.Conversations/EditGroupChat',
            conversations__pb2.EditGroupChatReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def InviteToGroupChat(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.conversations.Conversations/InviteToGroupChat',
            conversations__pb2.InviteToGroupChatReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def MakeGroupChatAdmin(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.conversations.Conversations/MakeGroupChatAdmin',
            conversations__pb2.MakeGroupChatAdminReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RemoveGroupChatUser(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.conversations.Conversations/RemoveGroupChatUser',
            conversations__pb2.RemoveGroupChatUserReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RemoveGroupChatAdmin(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.conversations.Conversations/RemoveGroupChatAdmin',
            conversations__pb2.RemoveGroupChatAdminReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SendMessage(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.conversations.Conversations/SendMessage',
            conversations__pb2.SendMessageReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def LeaveGroupChat(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.conversations.Conversations/LeaveGroupChat',
            conversations__pb2.LeaveGroupChatReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SearchMessages(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.conversations.Conversations/SearchMessages',
            conversations__pb2.SearchMessagesReq.SerializeToString,
            conversations__pb2.SearchMessagesRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
