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

from kaskada.api.v1alpha import table_pb2 as kaskada_dot_api_dot_v1alpha_dot_table__pb2


class TableServiceStub(object):
    """A service for managing Tables.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.ListTables = channel.unary_unary(
                '/kaskada.api.v1alpha.TableService/ListTables',
                request_serializer=kaskada_dot_api_dot_v1alpha_dot_table__pb2.ListTablesRequest.SerializeToString,
                response_deserializer=kaskada_dot_api_dot_v1alpha_dot_table__pb2.ListTablesResponse.FromString,
                )
        self.GetTable = channel.unary_unary(
                '/kaskada.api.v1alpha.TableService/GetTable',
                request_serializer=kaskada_dot_api_dot_v1alpha_dot_table__pb2.GetTableRequest.SerializeToString,
                response_deserializer=kaskada_dot_api_dot_v1alpha_dot_table__pb2.GetTableResponse.FromString,
                )
        self.CreateTable = channel.unary_unary(
                '/kaskada.api.v1alpha.TableService/CreateTable',
                request_serializer=kaskada_dot_api_dot_v1alpha_dot_table__pb2.CreateTableRequest.SerializeToString,
                response_deserializer=kaskada_dot_api_dot_v1alpha_dot_table__pb2.CreateTableResponse.FromString,
                )
        self.DeleteTable = channel.unary_unary(
                '/kaskada.api.v1alpha.TableService/DeleteTable',
                request_serializer=kaskada_dot_api_dot_v1alpha_dot_table__pb2.DeleteTableRequest.SerializeToString,
                response_deserializer=kaskada_dot_api_dot_v1alpha_dot_table__pb2.DeleteTableResponse.FromString,
                )
        self.LoadData = channel.unary_unary(
                '/kaskada.api.v1alpha.TableService/LoadData',
                request_serializer=kaskada_dot_api_dot_v1alpha_dot_table__pb2.LoadDataRequest.SerializeToString,
                response_deserializer=kaskada_dot_api_dot_v1alpha_dot_table__pb2.LoadDataResponse.FromString,
                )


class TableServiceServicer(object):
    """A service for managing Tables.
    """

    def ListTables(self, request, context):
        """Lists tables.

        The response includes all Tables defined for the Kaskada account.
        If a search string is provided, only Tables matching the search
        string are returned.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetTable(self, request, context):
        """Gets a table.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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

    def DeleteTable(self, request, context):
        """Deletes a table and any events loaded into it.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def LoadData(self, request, context):
        """Loads a staged file into a table
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_TableServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ListTables': grpc.unary_unary_rpc_method_handler(
                    servicer.ListTables,
                    request_deserializer=kaskada_dot_api_dot_v1alpha_dot_table__pb2.ListTablesRequest.FromString,
                    response_serializer=kaskada_dot_api_dot_v1alpha_dot_table__pb2.ListTablesResponse.SerializeToString,
            ),
            'GetTable': grpc.unary_unary_rpc_method_handler(
                    servicer.GetTable,
                    request_deserializer=kaskada_dot_api_dot_v1alpha_dot_table__pb2.GetTableRequest.FromString,
                    response_serializer=kaskada_dot_api_dot_v1alpha_dot_table__pb2.GetTableResponse.SerializeToString,
            ),
            'CreateTable': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateTable,
                    request_deserializer=kaskada_dot_api_dot_v1alpha_dot_table__pb2.CreateTableRequest.FromString,
                    response_serializer=kaskada_dot_api_dot_v1alpha_dot_table__pb2.CreateTableResponse.SerializeToString,
            ),
            'DeleteTable': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteTable,
                    request_deserializer=kaskada_dot_api_dot_v1alpha_dot_table__pb2.DeleteTableRequest.FromString,
                    response_serializer=kaskada_dot_api_dot_v1alpha_dot_table__pb2.DeleteTableResponse.SerializeToString,
            ),
            'LoadData': grpc.unary_unary_rpc_method_handler(
                    servicer.LoadData,
                    request_deserializer=kaskada_dot_api_dot_v1alpha_dot_table__pb2.LoadDataRequest.FromString,
                    response_serializer=kaskada_dot_api_dot_v1alpha_dot_table__pb2.LoadDataResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'kaskada.api.v1alpha.TableService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class TableService(object):
    """A service for managing Tables.
    """

    @staticmethod
    def ListTables(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, '/kaskada.api.v1alpha.TableService/ListTables',
            kaskada_dot_api_dot_v1alpha_dot_table__pb2.ListTablesRequest.SerializeToString,
            kaskada_dot_api_dot_v1alpha_dot_table__pb2.ListTablesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetTable(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, '/kaskada.api.v1alpha.TableService/GetTable',
            kaskada_dot_api_dot_v1alpha_dot_table__pb2.GetTableRequest.SerializeToString,
            kaskada_dot_api_dot_v1alpha_dot_table__pb2.GetTableResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreateTable(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, '/kaskada.api.v1alpha.TableService/CreateTable',
            kaskada_dot_api_dot_v1alpha_dot_table__pb2.CreateTableRequest.SerializeToString,
            kaskada_dot_api_dot_v1alpha_dot_table__pb2.CreateTableResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteTable(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, '/kaskada.api.v1alpha.TableService/DeleteTable',
            kaskada_dot_api_dot_v1alpha_dot_table__pb2.DeleteTableRequest.SerializeToString,
            kaskada_dot_api_dot_v1alpha_dot_table__pb2.DeleteTableResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def LoadData(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, '/kaskada.api.v1alpha.TableService/LoadData',
            kaskada_dot_api_dot_v1alpha_dot_table__pb2.LoadDataRequest.SerializeToString,
            kaskada_dot_api_dot_v1alpha_dot_table__pb2.LoadDataResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
