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

from . import talaria_pb2 as talaria__pb2


class IngressStub(object):
    """---------------------------------------------------------------------------
    Ingress Service
    ---------------------------------------------------------------------------
    Ingress represents a Talaria ingress frontend.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Ingest = channel.unary_unary(
                '/talaria.Ingress/Ingest',
                request_serializer=talaria__pb2.IngestRequest.SerializeToString,
                response_deserializer=talaria__pb2.IngestResponse.FromString,
                )


class IngressServicer(object):
    """---------------------------------------------------------------------------
    Ingress Service
    ---------------------------------------------------------------------------
    Ingress represents a Talaria ingress frontend.
    """

    def Ingest(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_IngressServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Ingest': grpc.unary_unary_rpc_method_handler(
                    servicer.Ingest,
                    request_deserializer=talaria__pb2.IngestRequest.FromString,
                    response_serializer=talaria__pb2.IngestResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'talaria.Ingress', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Ingress(object):
    """---------------------------------------------------------------------------
    Ingress Service
    ---------------------------------------------------------------------------
    Ingress represents a Talaria ingress frontend.
    """

    @staticmethod
    def Ingest(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, '/talaria.Ingress/Ingest',
            talaria__pb2.IngestRequest.SerializeToString,
            talaria__pb2.IngestResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)


class QueryStub(object):
    """---------------------------------------------------------------------------
    Query Service
    ---------------------------------------------------------------------------

    Ingress represents a Talaria ingress frontend.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Describe = channel.unary_unary(
                '/talaria.Query/Describe',
                request_serializer=talaria__pb2.DescribeRequest.SerializeToString,
                response_deserializer=talaria__pb2.DescribeResponse.FromString,
                )
        self.GetSplits = channel.unary_unary(
                '/talaria.Query/GetSplits',
                request_serializer=talaria__pb2.GetSplitsRequest.SerializeToString,
                response_deserializer=talaria__pb2.GetSplitsResponse.FromString,
                )
        self.GetRows = channel.unary_unary(
                '/talaria.Query/GetRows',
                request_serializer=talaria__pb2.GetRowsRequest.SerializeToString,
                response_deserializer=talaria__pb2.GetRowsResponse.FromString,
                )


class QueryServicer(object):
    """---------------------------------------------------------------------------
    Query Service
    ---------------------------------------------------------------------------

    Ingress represents a Talaria ingress frontend.
    """

    def Describe(self, request, context):
        """Describe returns the list of schema/table combinations and the metadata
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetSplits(self, request, context):
        """GetSplits returns the list of splits for a particular table/filter combination
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetRows(self, request, context):
        """GetRows returns the rows for a particular split
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_QueryServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Describe': grpc.unary_unary_rpc_method_handler(
                    servicer.Describe,
                    request_deserializer=talaria__pb2.DescribeRequest.FromString,
                    response_serializer=talaria__pb2.DescribeResponse.SerializeToString,
            ),
            'GetSplits': grpc.unary_unary_rpc_method_handler(
                    servicer.GetSplits,
                    request_deserializer=talaria__pb2.GetSplitsRequest.FromString,
                    response_serializer=talaria__pb2.GetSplitsResponse.SerializeToString,
            ),
            'GetRows': grpc.unary_unary_rpc_method_handler(
                    servicer.GetRows,
                    request_deserializer=talaria__pb2.GetRowsRequest.FromString,
                    response_serializer=talaria__pb2.GetRowsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'talaria.Query', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Query(object):
    """---------------------------------------------------------------------------
    Query Service
    ---------------------------------------------------------------------------

    Ingress represents a Talaria ingress frontend.
    """

    @staticmethod
    def Describe(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, '/talaria.Query/Describe',
            talaria__pb2.DescribeRequest.SerializeToString,
            talaria__pb2.DescribeResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetSplits(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, '/talaria.Query/GetSplits',
            talaria__pb2.GetSplitsRequest.SerializeToString,
            talaria__pb2.GetSplitsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetRows(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, '/talaria.Query/GetRows',
            talaria__pb2.GetRowsRequest.SerializeToString,
            talaria__pb2.GetRowsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
