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

from . import nexum_pb2 as nexum__pb2

GRPC_GENERATED_VERSION = '1.78.1'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + ' but the generated code in nexum_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.RegisterWorkflow = channel.unary_unary(
                '/nexum.NexumService/RegisterWorkflow',
                request_serializer=nexum__pb2.WorkflowIR.SerializeToString,
                response_deserializer=nexum__pb2.AckResponse.FromString,
                _registered_method=True)
        self.StartExecution = channel.unary_unary(
                '/nexum.NexumService/StartExecution',
                request_serializer=nexum__pb2.StartRequest.SerializeToString,
                response_deserializer=nexum__pb2.StartResponse.FromString,
                _registered_method=True)
        self.PollTask = channel.unary_unary(
                '/nexum.NexumService/PollTask',
                request_serializer=nexum__pb2.PollRequest.SerializeToString,
                response_deserializer=nexum__pb2.PollResponse.FromString,
                _registered_method=True)
        self.CompleteTask = channel.unary_unary(
                '/nexum.NexumService/CompleteTask',
                request_serializer=nexum__pb2.CompleteRequest.SerializeToString,
                response_deserializer=nexum__pb2.AckResponse.FromString,
                _registered_method=True)
        self.FailTask = channel.unary_unary(
                '/nexum.NexumService/FailTask',
                request_serializer=nexum__pb2.FailRequest.SerializeToString,
                response_deserializer=nexum__pb2.AckResponse.FromString,
                _registered_method=True)
        self.GetStatus = channel.unary_unary(
                '/nexum.NexumService/GetStatus',
                request_serializer=nexum__pb2.StatusRequest.SerializeToString,
                response_deserializer=nexum__pb2.StatusResponse.FromString,
                _registered_method=True)
        self.ListExecutions = channel.unary_unary(
                '/nexum.NexumService/ListExecutions',
                request_serializer=nexum__pb2.ListRequest.SerializeToString,
                response_deserializer=nexum__pb2.ListResponse.FromString,
                _registered_method=True)
        self.CancelExecution = channel.unary_unary(
                '/nexum.NexumService/CancelExecution',
                request_serializer=nexum__pb2.CancelRequest.SerializeToString,
                response_deserializer=nexum__pb2.AckResponse.FromString,
                _registered_method=True)
        self.ListWorkflowVersions = channel.unary_unary(
                '/nexum.NexumService/ListWorkflowVersions',
                request_serializer=nexum__pb2.ListVersionsRequest.SerializeToString,
                response_deserializer=nexum__pb2.ListVersionsResponse.FromString,
                _registered_method=True)
        self.ApproveTask = channel.unary_unary(
                '/nexum.NexumService/ApproveTask',
                request_serializer=nexum__pb2.ApproveRequest.SerializeToString,
                response_deserializer=nexum__pb2.AckResponse.FromString,
                _registered_method=True)
        self.RejectTask = channel.unary_unary(
                '/nexum.NexumService/RejectTask',
                request_serializer=nexum__pb2.RejectRequest.SerializeToString,
                response_deserializer=nexum__pb2.AckResponse.FromString,
                _registered_method=True)
        self.GetPendingApprovals = channel.unary_unary(
                '/nexum.NexumService/GetPendingApprovals',
                request_serializer=nexum__pb2.EmptyRequest.SerializeToString,
                response_deserializer=nexum__pb2.PendingApprovalsResponse.FromString,
                _registered_method=True)


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

    def RegisterWorkflow(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 StartExecution(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 PollTask(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 CompleteTask(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 FailTask(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 GetStatus(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 ListExecutions(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 CancelExecution(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 ListWorkflowVersions(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 ApproveTask(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 RejectTask(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 GetPendingApprovals(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_NexumServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'RegisterWorkflow': grpc.unary_unary_rpc_method_handler(
                    servicer.RegisterWorkflow,
                    request_deserializer=nexum__pb2.WorkflowIR.FromString,
                    response_serializer=nexum__pb2.AckResponse.SerializeToString,
            ),
            'StartExecution': grpc.unary_unary_rpc_method_handler(
                    servicer.StartExecution,
                    request_deserializer=nexum__pb2.StartRequest.FromString,
                    response_serializer=nexum__pb2.StartResponse.SerializeToString,
            ),
            'PollTask': grpc.unary_unary_rpc_method_handler(
                    servicer.PollTask,
                    request_deserializer=nexum__pb2.PollRequest.FromString,
                    response_serializer=nexum__pb2.PollResponse.SerializeToString,
            ),
            'CompleteTask': grpc.unary_unary_rpc_method_handler(
                    servicer.CompleteTask,
                    request_deserializer=nexum__pb2.CompleteRequest.FromString,
                    response_serializer=nexum__pb2.AckResponse.SerializeToString,
            ),
            'FailTask': grpc.unary_unary_rpc_method_handler(
                    servicer.FailTask,
                    request_deserializer=nexum__pb2.FailRequest.FromString,
                    response_serializer=nexum__pb2.AckResponse.SerializeToString,
            ),
            'GetStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.GetStatus,
                    request_deserializer=nexum__pb2.StatusRequest.FromString,
                    response_serializer=nexum__pb2.StatusResponse.SerializeToString,
            ),
            'ListExecutions': grpc.unary_unary_rpc_method_handler(
                    servicer.ListExecutions,
                    request_deserializer=nexum__pb2.ListRequest.FromString,
                    response_serializer=nexum__pb2.ListResponse.SerializeToString,
            ),
            'CancelExecution': grpc.unary_unary_rpc_method_handler(
                    servicer.CancelExecution,
                    request_deserializer=nexum__pb2.CancelRequest.FromString,
                    response_serializer=nexum__pb2.AckResponse.SerializeToString,
            ),
            'ListWorkflowVersions': grpc.unary_unary_rpc_method_handler(
                    servicer.ListWorkflowVersions,
                    request_deserializer=nexum__pb2.ListVersionsRequest.FromString,
                    response_serializer=nexum__pb2.ListVersionsResponse.SerializeToString,
            ),
            'ApproveTask': grpc.unary_unary_rpc_method_handler(
                    servicer.ApproveTask,
                    request_deserializer=nexum__pb2.ApproveRequest.FromString,
                    response_serializer=nexum__pb2.AckResponse.SerializeToString,
            ),
            'RejectTask': grpc.unary_unary_rpc_method_handler(
                    servicer.RejectTask,
                    request_deserializer=nexum__pb2.RejectRequest.FromString,
                    response_serializer=nexum__pb2.AckResponse.SerializeToString,
            ),
            'GetPendingApprovals': grpc.unary_unary_rpc_method_handler(
                    servicer.GetPendingApprovals,
                    request_deserializer=nexum__pb2.EmptyRequest.FromString,
                    response_serializer=nexum__pb2.PendingApprovalsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'nexum.NexumService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('nexum.NexumService', rpc_method_handlers)


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

    @staticmethod
    def RegisterWorkflow(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,
            '/nexum.NexumService/RegisterWorkflow',
            nexum__pb2.WorkflowIR.SerializeToString,
            nexum__pb2.AckResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def StartExecution(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,
            '/nexum.NexumService/StartExecution',
            nexum__pb2.StartRequest.SerializeToString,
            nexum__pb2.StartResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def PollTask(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,
            '/nexum.NexumService/PollTask',
            nexum__pb2.PollRequest.SerializeToString,
            nexum__pb2.PollResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CompleteTask(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,
            '/nexum.NexumService/CompleteTask',
            nexum__pb2.CompleteRequest.SerializeToString,
            nexum__pb2.AckResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def FailTask(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,
            '/nexum.NexumService/FailTask',
            nexum__pb2.FailRequest.SerializeToString,
            nexum__pb2.AckResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetStatus(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,
            '/nexum.NexumService/GetStatus',
            nexum__pb2.StatusRequest.SerializeToString,
            nexum__pb2.StatusResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListExecutions(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,
            '/nexum.NexumService/ListExecutions',
            nexum__pb2.ListRequest.SerializeToString,
            nexum__pb2.ListResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CancelExecution(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,
            '/nexum.NexumService/CancelExecution',
            nexum__pb2.CancelRequest.SerializeToString,
            nexum__pb2.AckResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListWorkflowVersions(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,
            '/nexum.NexumService/ListWorkflowVersions',
            nexum__pb2.ListVersionsRequest.SerializeToString,
            nexum__pb2.ListVersionsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ApproveTask(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,
            '/nexum.NexumService/ApproveTask',
            nexum__pb2.ApproveRequest.SerializeToString,
            nexum__pb2.AckResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RejectTask(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,
            '/nexum.NexumService/RejectTask',
            nexum__pb2.RejectRequest.SerializeToString,
            nexum__pb2.AckResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetPendingApprovals(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,
            '/nexum.NexumService/GetPendingApprovals',
            nexum__pb2.EmptyRequest.SerializeToString,
            nexum__pb2.PendingApprovalsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
