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

from worker.v1 import worker_pb2 as worker_dot_v1_dot_worker__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Handle = channel.unary_unary(
                '/servicebridge.worker.v1.WorkerHandler/Handle',
                request_serializer=worker_dot_v1_dot_worker__pb2.HandleRequest.SerializeToString,
                response_deserializer=worker_dot_v1_dot_worker__pb2.HandleResponse.FromString,
                _registered_method=True)
        self.Deliver = channel.unary_unary(
                '/servicebridge.worker.v1.WorkerHandler/Deliver',
                request_serializer=worker_dot_v1_dot_worker__pb2.DeliverRequest.SerializeToString,
                response_deserializer=worker_dot_v1_dot_worker__pb2.DeliverResponse.FromString,
                _registered_method=True)


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

    def Handle(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 Deliver(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_WorkerHandlerServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Handle': grpc.unary_unary_rpc_method_handler(
                    servicer.Handle,
                    request_deserializer=worker_dot_v1_dot_worker__pb2.HandleRequest.FromString,
                    response_serializer=worker_dot_v1_dot_worker__pb2.HandleResponse.SerializeToString,
            ),
            'Deliver': grpc.unary_unary_rpc_method_handler(
                    servicer.Deliver,
                    request_deserializer=worker_dot_v1_dot_worker__pb2.DeliverRequest.FromString,
                    response_serializer=worker_dot_v1_dot_worker__pb2.DeliverResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'servicebridge.worker.v1.WorkerHandler', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('servicebridge.worker.v1.WorkerHandler', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class WorkerHandler(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def Handle(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,
            '/servicebridge.worker.v1.WorkerHandler/Handle',
            worker_dot_v1_dot_worker__pb2.HandleRequest.SerializeToString,
            worker_dot_v1_dot_worker__pb2.HandleResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Deliver(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,
            '/servicebridge.worker.v1.WorkerHandler/Deliver',
            worker_dot_v1_dot_worker__pb2.DeliverRequest.SerializeToString,
            worker_dot_v1_dot_worker__pb2.DeliverResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
