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

from aissemble_machine_learning_inference.generated.inference.grpc import inference_api_pb2 as aissemble__machine__learning__inference_dot_generated_dot_inference_dot_grpc_dot_inference__api__pb2


class InferenceServiceStub(object):
    """Defines an inference analytic service
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Analyze = channel.unary_unary(
                '/InferenceService/Analyze',
                request_serializer=aissemble__machine__learning__inference_dot_generated_dot_inference_dot_grpc_dot_inference__api__pb2.InferenceRequest.SerializeToString,
                response_deserializer=aissemble__machine__learning__inference_dot_generated_dot_inference_dot_grpc_dot_inference__api__pb2.InferenceResponse.FromString,
                )
        self.AnalyzeBatch = channel.unary_unary(
                '/InferenceService/AnalyzeBatch',
                request_serializer=aissemble__machine__learning__inference_dot_generated_dot_inference_dot_grpc_dot_inference__api__pb2.BatchInferenceRequest.SerializeToString,
                response_deserializer=aissemble__machine__learning__inference_dot_generated_dot_inference_dot_grpc_dot_inference__api__pb2.BatchInferenceResponse.FromString,
                )


class InferenceServiceServicer(object):
    """Defines an inference analytic service
    """

    def Analyze(self, request, context):
        """Perform the relevant inference anayltic against a single input data record
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AnalyzeBatch(self, request, context):
        """Perform the relevant inference analytic against multiple input data records
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_InferenceServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Analyze': grpc.unary_unary_rpc_method_handler(
                    servicer.Analyze,
                    request_deserializer=aissemble__machine__learning__inference_dot_generated_dot_inference_dot_grpc_dot_inference__api__pb2.InferenceRequest.FromString,
                    response_serializer=aissemble__machine__learning__inference_dot_generated_dot_inference_dot_grpc_dot_inference__api__pb2.InferenceResponse.SerializeToString,
            ),
            'AnalyzeBatch': grpc.unary_unary_rpc_method_handler(
                    servicer.AnalyzeBatch,
                    request_deserializer=aissemble__machine__learning__inference_dot_generated_dot_inference_dot_grpc_dot_inference__api__pb2.BatchInferenceRequest.FromString,
                    response_serializer=aissemble__machine__learning__inference_dot_generated_dot_inference_dot_grpc_dot_inference__api__pb2.BatchInferenceResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'InferenceService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class InferenceService(object):
    """Defines an inference analytic service
    """

    @staticmethod
    def Analyze(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, '/InferenceService/Analyze',
            aissemble__machine__learning__inference_dot_generated_dot_inference_dot_grpc_dot_inference__api__pb2.InferenceRequest.SerializeToString,
            aissemble__machine__learning__inference_dot_generated_dot_inference_dot_grpc_dot_inference__api__pb2.InferenceResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AnalyzeBatch(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, '/InferenceService/AnalyzeBatch',
            aissemble__machine__learning__inference_dot_generated_dot_inference_dot_grpc_dot_inference__api__pb2.BatchInferenceRequest.SerializeToString,
            aissemble__machine__learning__inference_dot_generated_dot_inference_dot_grpc_dot_inference__api__pb2.BatchInferenceResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
