# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

import treelab.grpc.messages.service_pb2 as service__pb2


class TreeLabApiServiceStub(object):
    # missing associated documentation comment in .proto file
    pass

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

        Args:
          channel: A grpc.Channel.
        """
        self.CreateWorkspace = channel.unary_unary(
            '/co.treelab.api.TreeLabApiService/CreateWorkspace',
            request_serializer=service__pb2.CreateWorkspaceInput.SerializeToString,
            response_deserializer=service__pb2.WorkspaceId.FromString,
        )
        self.AddCore = channel.unary_unary(
            '/co.treelab.api.TreeLabApiService/AddCore',
            request_serializer=service__pb2.AddCoreInput.SerializeToString,
            response_deserializer=service__pb2.CoreId.FromString,
        )
        self.UpdateCore = channel.unary_unary(
            '/co.treelab.api.TreeLabApiService/UpdateCore',
            request_serializer=service__pb2.UpdateCoreInput.SerializeToString,
            response_deserializer=service__pb2.CoreId.FromString,
        )
        self.RemoveCore = channel.unary_unary(
            '/co.treelab.api.TreeLabApiService/RemoveCore',
            request_serializer=service__pb2.RemoveCoreInput.SerializeToString,
            response_deserializer=service__pb2.CoreId.FromString,
        )
        self.AddTable = channel.unary_unary(
            '/co.treelab.api.TreeLabApiService/AddTable',
            request_serializer=service__pb2.AddTableInput.SerializeToString,
            response_deserializer=service__pb2.TableId.FromString,
        )
        self.AddColumn = channel.unary_unary(
            '/co.treelab.api.TreeLabApiService/AddColumn',
            request_serializer=service__pb2.AddColumnInput.SerializeToString,
            response_deserializer=service__pb2.ColumnId.FromString,
        )
        self.AddRow = channel.unary_unary(
            '/co.treelab.api.TreeLabApiService/AddRow',
            request_serializer=service__pb2.AddRowInput.SerializeToString,
            response_deserializer=service__pb2.RowId.FromString,
        )
        self.UpdateCell = channel.unary_unary(
            '/co.treelab.api.TreeLabApiService/UpdateCell',
            request_serializer=service__pb2.UpdateCellInput.SerializeToString,
            response_deserializer=service__pb2.TableId.FromString,
        )
        self.AddView = channel.unary_unary(
            '/co.treelab.api.TreeLabApiService/AddView',
            request_serializer=service__pb2.AddViewInput.SerializeToString,
            response_deserializer=service__pb2.ViewId.FromString,
        )
        self.SubscribeToWorkspace = channel.unary_stream(
            '/co.treelab.api.TreeLabApiService/SubscribeToWorkspace',
            request_serializer=service__pb2.WorkspaceSubscriptionInput.SerializeToString,
            response_deserializer=service__pb2.EventPayload.FromString,
        )
        self.GetAllWorkspaces = channel.unary_unary(
            '/co.treelab.api.TreeLabApiService/GetAllWorkspaces',
            request_serializer=service__pb2.EmptyInput.SerializeToString,
            response_deserializer=service__pb2.WorkspaceMetaProjection.FromString,
        )
        self.GetWorkspace = channel.unary_unary(
            '/co.treelab.api.TreeLabApiService/GetWorkspace',
            request_serializer=service__pb2.WorkspaceId.SerializeToString,
            response_deserializer=service__pb2.WorkspaceProjection.FromString,
        )
        self.GetTable = channel.unary_unary(
            '/co.treelab.api.TreeLabApiService/GetTable',
            request_serializer=service__pb2.GetTableInput.SerializeToString,
            response_deserializer=service__pb2.TableProjection.FromString,
        )


class TreeLabApiServiceServicer(object):
    # missing associated documentation comment in .proto file
    pass

    def CreateWorkspace(self, request, context):
        # missing associated documentation comment in .proto file
        pass
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddCore(self, request, context):
        # missing associated documentation comment in .proto file
        pass
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateCore(self, request, context):
        # missing associated documentation comment in .proto file
        pass
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RemoveCore(self, request, context):
        # missing associated documentation comment in .proto file
        pass
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddTable(self, request, context):
        # missing associated documentation comment in .proto file
        pass
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddColumn(self, request, context):
        # missing associated documentation comment in .proto file
        pass
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddRow(self, request, context):
        # missing associated documentation comment in .proto file
        pass
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateCell(self, request, context):
        # missing associated documentation comment in .proto file
        pass
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddView(self, request, context):
        # missing associated documentation comment in .proto file
        pass
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SubscribeToWorkspace(self, request, context):
        # missing associated documentation comment in .proto file
        pass
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetAllWorkspaces(self, request, context):
        # missing associated documentation comment in .proto file
        pass
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetWorkspace(self, request, context):
        # missing associated documentation comment in .proto file
        pass
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetTable(self, request, context):
        # missing associated documentation comment in .proto file
        pass
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_TreeLabApiServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'CreateWorkspace': grpc.unary_unary_rpc_method_handler(
            servicer.CreateWorkspace,
            request_deserializer=service__pb2.CreateWorkspaceInput.FromString,
            response_serializer=service__pb2.WorkspaceId.SerializeToString,
        ),
        'AddCore': grpc.unary_unary_rpc_method_handler(
            servicer.AddCore,
            request_deserializer=service__pb2.AddCoreInput.FromString,
            response_serializer=service__pb2.CoreId.SerializeToString,
        ),
        'UpdateCore': grpc.unary_unary_rpc_method_handler(
            servicer.UpdateCore,
            request_deserializer=service__pb2.UpdateCoreInput.FromString,
            response_serializer=service__pb2.CoreId.SerializeToString,
        ),
        'RemoveCore': grpc.unary_unary_rpc_method_handler(
            servicer.RemoveCore,
            request_deserializer=service__pb2.RemoveCoreInput.FromString,
            response_serializer=service__pb2.CoreId.SerializeToString,
        ),
        'AddTable': grpc.unary_unary_rpc_method_handler(
            servicer.AddTable,
            request_deserializer=service__pb2.AddTableInput.FromString,
            response_serializer=service__pb2.TableId.SerializeToString,
        ),
        'AddColumn': grpc.unary_unary_rpc_method_handler(
            servicer.AddColumn,
            request_deserializer=service__pb2.AddColumnInput.FromString,
            response_serializer=service__pb2.ColumnId.SerializeToString,
        ),
        'AddRow': grpc.unary_unary_rpc_method_handler(
            servicer.AddRow,
            request_deserializer=service__pb2.AddRowInput.FromString,
            response_serializer=service__pb2.RowId.SerializeToString,
        ),
        'UpdateCell': grpc.unary_unary_rpc_method_handler(
            servicer.UpdateCell,
            request_deserializer=service__pb2.UpdateCellInput.FromString,
            response_serializer=service__pb2.TableId.SerializeToString,
        ),
        'AddView': grpc.unary_unary_rpc_method_handler(
            servicer.AddView,
            request_deserializer=service__pb2.AddViewInput.FromString,
            response_serializer=service__pb2.ViewId.SerializeToString,
        ),
        'SubscribeToWorkspace': grpc.unary_stream_rpc_method_handler(
            servicer.SubscribeToWorkspace,
            request_deserializer=service__pb2.WorkspaceSubscriptionInput.FromString,
            response_serializer=service__pb2.EventPayload.SerializeToString,
        ),
        'GetAllWorkspaces': grpc.unary_unary_rpc_method_handler(
            servicer.GetAllWorkspaces,
            request_deserializer=service__pb2.EmptyInput.FromString,
            response_serializer=service__pb2.WorkspaceMetaProjection.SerializeToString,
        ),
        'GetWorkspace': grpc.unary_unary_rpc_method_handler(
            servicer.GetWorkspace,
            request_deserializer=service__pb2.WorkspaceId.FromString,
            response_serializer=service__pb2.WorkspaceProjection.SerializeToString,
        ),
        'GetTable': grpc.unary_unary_rpc_method_handler(
            servicer.GetTable,
            request_deserializer=service__pb2.GetTableInput.FromString,
            response_serializer=service__pb2.TableProjection.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'co.treelab.api.TreeLabApiService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
