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

import chatroom_pb2 as chatroom__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateChatroom = channel.unary_unary(
                '/chatroom.ChatroomService/CreateChatroom',
                request_serializer=chatroom__pb2.CreateChatroomRequest.SerializeToString,
                response_deserializer=chatroom__pb2.CreateChatroomResponse.FromString,
                )
        self.GetChatroomsByUser = channel.unary_unary(
                '/chatroom.ChatroomService/GetChatroomsByUser',
                request_serializer=chatroom__pb2.GetChatroomsByUserRequest.SerializeToString,
                response_deserializer=chatroom__pb2.GetChatroomsByUserResponse.FromString,
                )
        self.DeleteChatroom = channel.unary_unary(
                '/chatroom.ChatroomService/DeleteChatroom',
                request_serializer=chatroom__pb2.DeleteChatroomRequest.SerializeToString,
                response_deserializer=chatroom__pb2.DeleteChatroomResponse.FromString,
                )
        self.LeaveChatroom = channel.unary_unary(
                '/chatroom.ChatroomService/LeaveChatroom',
                request_serializer=chatroom__pb2.LeaveChatroomRequest.SerializeToString,
                response_deserializer=chatroom__pb2.LeaveChatroomResponse.FromString,
                )


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

    def CreateChatroom(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetChatroomsByUser(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteChatroom(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def LeaveChatroom(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ChatroomServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateChatroom': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateChatroom,
                    request_deserializer=chatroom__pb2.CreateChatroomRequest.FromString,
                    response_serializer=chatroom__pb2.CreateChatroomResponse.SerializeToString,
            ),
            'GetChatroomsByUser': grpc.unary_unary_rpc_method_handler(
                    servicer.GetChatroomsByUser,
                    request_deserializer=chatroom__pb2.GetChatroomsByUserRequest.FromString,
                    response_serializer=chatroom__pb2.GetChatroomsByUserResponse.SerializeToString,
            ),
            'DeleteChatroom': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteChatroom,
                    request_deserializer=chatroom__pb2.DeleteChatroomRequest.FromString,
                    response_serializer=chatroom__pb2.DeleteChatroomResponse.SerializeToString,
            ),
            'LeaveChatroom': grpc.unary_unary_rpc_method_handler(
                    servicer.LeaveChatroom,
                    request_deserializer=chatroom__pb2.LeaveChatroomRequest.FromString,
                    response_serializer=chatroom__pb2.LeaveChatroomResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'chatroom.ChatroomService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def CreateChatroom(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, '/chatroom.ChatroomService/CreateChatroom',
            chatroom__pb2.CreateChatroomRequest.SerializeToString,
            chatroom__pb2.CreateChatroomResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetChatroomsByUser(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, '/chatroom.ChatroomService/GetChatroomsByUser',
            chatroom__pb2.GetChatroomsByUserRequest.SerializeToString,
            chatroom__pb2.GetChatroomsByUserResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteChatroom(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, '/chatroom.ChatroomService/DeleteChatroom',
            chatroom__pb2.DeleteChatroomRequest.SerializeToString,
            chatroom__pb2.DeleteChatroomResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def LeaveChatroom(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, '/chatroom.ChatroomService/LeaveChatroom',
            chatroom__pb2.LeaveChatroomRequest.SerializeToString,
            chatroom__pb2.LeaveChatroomResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
