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

from netboxlabs.diode.sdk.diode.v1 import ingester_pb2 as diode_dot_v1_dot_ingester__pb2


class IngesterServiceStub(object):
    """Ingestion API

    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Ingest = channel.unary_unary(
                '/diode.v1.IngesterService/Ingest',
                request_serializer=diode_dot_v1_dot_ingester__pb2.IngestRequest.SerializeToString,
                response_deserializer=diode_dot_v1_dot_ingester__pb2.IngestResponse.FromString,
                )


class IngesterServiceServicer(object):
    """Ingestion API

    """

    def Ingest(self, request, context):
        """Ingests data into the system
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_IngesterServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Ingest': grpc.unary_unary_rpc_method_handler(
                    servicer.Ingest,
                    request_deserializer=diode_dot_v1_dot_ingester__pb2.IngestRequest.FromString,
                    response_serializer=diode_dot_v1_dot_ingester__pb2.IngestResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'diode.v1.IngesterService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class IngesterService(object):
    """Ingestion API

    """

    @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, '/diode.v1.IngesterService/Ingest',
            diode_dot_v1_dot_ingester__pb2.IngestRequest.SerializeToString,
            diode_dot_v1_dot_ingester__pb2.IngestResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
