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

from . import qcalibrate_pb2 as qcalibrate__pb2


class QCalibrateStub(object):
    """The qcalibrate remote service definition.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.AddExperiment = channel.unary_unary(
                '/qcalibrateremote._grpc.QCalibrate/AddExperiment',
                request_serializer=qcalibrate__pb2.AddExperimentRequest.SerializeToString,
                response_deserializer=qcalibrate__pb2.AddExperimentResult.FromString,
                )
        self.Run = channel.stream_stream(
                '/qcalibrateremote._grpc.QCalibrate/Run',
                request_serializer=qcalibrate__pb2.Request.SerializeToString,
                response_deserializer=qcalibrate__pb2.Response.FromString,
                )


class QCalibrateServicer(object):
    """The qcalibrate remote service definition.
    """

    def AddExperiment(self, request, context):
        """runs optimization session
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Run(self, request_iterator, context):
        """runs optimization session
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_QCalibrateServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'AddExperiment': grpc.unary_unary_rpc_method_handler(
                    servicer.AddExperiment,
                    request_deserializer=qcalibrate__pb2.AddExperimentRequest.FromString,
                    response_serializer=qcalibrate__pb2.AddExperimentResult.SerializeToString,
            ),
            'Run': grpc.stream_stream_rpc_method_handler(
                    servicer.Run,
                    request_deserializer=qcalibrate__pb2.Request.FromString,
                    response_serializer=qcalibrate__pb2.Response.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'qcalibrateremote._grpc.QCalibrate', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class QCalibrate(object):
    """The qcalibrate remote service definition.
    """

    @staticmethod
    def AddExperiment(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, '/qcalibrateremote._grpc.QCalibrate/AddExperiment',
            qcalibrate__pb2.AddExperimentRequest.SerializeToString,
            qcalibrate__pb2.AddExperimentResult.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Run(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(request_iterator, target, '/qcalibrateremote._grpc.QCalibrate/Run',
            qcalibrate__pb2.Request.SerializeToString,
            qcalibrate__pb2.Response.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
