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

from . import EddytorGRPC_pb2 as EddytorGRPC__pb2

GRPC_GENERATED_VERSION = '1.78.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + ' but the generated code in EddytorGRPC_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


class EddytorGRPCStub(object):
    """EddytorGRPC service definition, handling data streaming and table operations.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.StreamData = channel.unary_stream(
                '/Eddytor_grpc.EddytorGRPC/StreamData',
                request_serializer=EddytorGRPC__pb2.QueryMessage.SerializeToString,
                response_deserializer=EddytorGRPC__pb2.ArrowRecordBatch.FromString,
                _registered_method=True)
        self.InsertIntoTable = channel.unary_unary(
                '/Eddytor_grpc.EddytorGRPC/InsertIntoTable',
                request_serializer=EddytorGRPC__pb2.TableRecordBatch.SerializeToString,
                response_deserializer=EddytorGRPC__pb2.Empty.FromString,
                _registered_method=True)
        self.MergeTable = channel.unary_unary(
                '/Eddytor_grpc.EddytorGRPC/MergeTable',
                request_serializer=EddytorGRPC__pb2.MergeRpcRequest.SerializeToString,
                response_deserializer=EddytorGRPC__pb2.Empty.FromString,
                _registered_method=True)
        self.DeleteFromTable = channel.unary_unary(
                '/Eddytor_grpc.EddytorGRPC/DeleteFromTable',
                request_serializer=EddytorGRPC__pb2.TableRecordBatch.SerializeToString,
                response_deserializer=EddytorGRPC__pb2.Empty.FromString,
                _registered_method=True)
        self.AddColumnToTable = channel.unary_unary(
                '/Eddytor_grpc.EddytorGRPC/AddColumnToTable',
                request_serializer=EddytorGRPC__pb2.AddColumnRpcRequest.SerializeToString,
                response_deserializer=EddytorGRPC__pb2.Empty.FromString,
                _registered_method=True)
        self.CreateTable = channel.unary_unary(
                '/Eddytor_grpc.EddytorGRPC/CreateTable',
                request_serializer=EddytorGRPC__pb2.CreateTableRpcRequest.SerializeToString,
                response_deserializer=EddytorGRPC__pb2.CreateTableResponse.FromString,
                _registered_method=True)


class EddytorGRPCServicer(object):
    """EddytorGRPC service definition, handling data streaming and table operations.
    """

    def StreamData(self, request, context):
        """Streams Arrow record batches from the specified table
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def InsertIntoTable(self, request, context):
        """Inserts a batch of records into the specified table
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def MergeTable(self, request, context):
        """Merges records in the specified table
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteFromTable(self, request, context):
        """Deletes records from the specified table
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddColumnToTable(self, request, context):
        """Adds a new column to the specified 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 new table according to the provided schema
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_EddytorGRPCServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'StreamData': grpc.unary_stream_rpc_method_handler(
                    servicer.StreamData,
                    request_deserializer=EddytorGRPC__pb2.QueryMessage.FromString,
                    response_serializer=EddytorGRPC__pb2.ArrowRecordBatch.SerializeToString,
            ),
            'InsertIntoTable': grpc.unary_unary_rpc_method_handler(
                    servicer.InsertIntoTable,
                    request_deserializer=EddytorGRPC__pb2.TableRecordBatch.FromString,
                    response_serializer=EddytorGRPC__pb2.Empty.SerializeToString,
            ),
            'MergeTable': grpc.unary_unary_rpc_method_handler(
                    servicer.MergeTable,
                    request_deserializer=EddytorGRPC__pb2.MergeRpcRequest.FromString,
                    response_serializer=EddytorGRPC__pb2.Empty.SerializeToString,
            ),
            'DeleteFromTable': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteFromTable,
                    request_deserializer=EddytorGRPC__pb2.TableRecordBatch.FromString,
                    response_serializer=EddytorGRPC__pb2.Empty.SerializeToString,
            ),
            'AddColumnToTable': grpc.unary_unary_rpc_method_handler(
                    servicer.AddColumnToTable,
                    request_deserializer=EddytorGRPC__pb2.AddColumnRpcRequest.FromString,
                    response_serializer=EddytorGRPC__pb2.Empty.SerializeToString,
            ),
            'CreateTable': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateTable,
                    request_deserializer=EddytorGRPC__pb2.CreateTableRpcRequest.FromString,
                    response_serializer=EddytorGRPC__pb2.CreateTableResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'Eddytor_grpc.EddytorGRPC', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('Eddytor_grpc.EddytorGRPC', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class EddytorGRPC(object):
    """EddytorGRPC service definition, handling data streaming and table operations.
    """

    @staticmethod
    def StreamData(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_stream(
            request,
            target,
            '/Eddytor_grpc.EddytorGRPC/StreamData',
            EddytorGRPC__pb2.QueryMessage.SerializeToString,
            EddytorGRPC__pb2.ArrowRecordBatch.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def InsertIntoTable(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,
            '/Eddytor_grpc.EddytorGRPC/InsertIntoTable',
            EddytorGRPC__pb2.TableRecordBatch.SerializeToString,
            EddytorGRPC__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def MergeTable(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,
            '/Eddytor_grpc.EddytorGRPC/MergeTable',
            EddytorGRPC__pb2.MergeRpcRequest.SerializeToString,
            EddytorGRPC__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteFromTable(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,
            '/Eddytor_grpc.EddytorGRPC/DeleteFromTable',
            EddytorGRPC__pb2.TableRecordBatch.SerializeToString,
            EddytorGRPC__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def AddColumnToTable(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,
            '/Eddytor_grpc.EddytorGRPC/AddColumnToTable',
            EddytorGRPC__pb2.AddColumnRpcRequest.SerializeToString,
            EddytorGRPC__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @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,
            '/Eddytor_grpc.EddytorGRPC/CreateTable',
            EddytorGRPC__pb2.CreateTableRpcRequest.SerializeToString,
            EddytorGRPC__pb2.CreateTableResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
