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

from . import WorkerBroker_pb2 as WorkerBroker__pb2


class WorkerBrokerStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.ReportStatus = channel.unary_unary(
            '/WorkerBroker/ReportStatus',
            request_serializer=WorkerBroker__pb2.ReportStatusRequest.SerializeToString,
            response_deserializer=WorkerBroker__pb2.Empty.FromString,
        )
        self.ReportProgress = channel.unary_unary(
            '/WorkerBroker/ReportProgress',
            request_serializer=WorkerBroker__pb2.ReportProgressRequest.SerializeToString,
            response_deserializer=WorkerBroker__pb2.Empty.FromString,
        )


class WorkerBrokerServicer(object):
    """Missing associated documentation comment in .proto file."""

    def ReportStatus(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 ReportProgress(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_WorkerBrokerServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'ReportStatus': grpc.unary_unary_rpc_method_handler(
            servicer.ReportStatus,
            request_deserializer=WorkerBroker__pb2.ReportStatusRequest.FromString,
            response_serializer=WorkerBroker__pb2.Empty.SerializeToString,
        ),
        'ReportProgress': grpc.unary_unary_rpc_method_handler(
            servicer.ReportProgress,
            request_deserializer=WorkerBroker__pb2.ReportProgressRequest.FromString,
            response_serializer=WorkerBroker__pb2.Empty.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'WorkerBroker', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))

 # This class is part of an EXPERIMENTAL API.


class WorkerBroker(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def ReportStatus(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, '/WorkerBroker/ReportStatus',
                                             WorkerBroker__pb2.ReportStatusRequest.SerializeToString,
                                             WorkerBroker__pb2.Empty.FromString,
                                             options, channel_credentials,
                                             insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ReportProgress(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, '/WorkerBroker/ReportProgress',
                                             WorkerBroker__pb2.ReportProgressRequest.SerializeToString,
                                             WorkerBroker__pb2.Empty.FromString,
                                             options, channel_credentials,
                                             insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
