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

import grpc

from proto import messages_pb2 as messages__pb2

GRPC_GENERATED_VERSION = '1.71.2'
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 messages_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 WorkerBridgeStub(object):
    """=============================================================================
    gRPC Service Definitions
    =============================================================================

    Bidirectional streaming service for worker communication.
    Workers connect and maintain a persistent stream for action dispatch/results.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Attach = channel.stream_stream(
                '/waymark.messages.WorkerBridge/Attach',
                request_serializer=messages__pb2.Envelope.SerializeToString,
                response_deserializer=messages__pb2.Envelope.FromString,
                _registered_method=True)


class WorkerBridgeServicer(object):
    """=============================================================================
    gRPC Service Definitions
    =============================================================================

    Bidirectional streaming service for worker communication.
    Workers connect and maintain a persistent stream for action dispatch/results.
    """

    def Attach(self, request_iterator, 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_WorkerBridgeServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Attach': grpc.stream_stream_rpc_method_handler(
                    servicer.Attach,
                    request_deserializer=messages__pb2.Envelope.FromString,
                    response_serializer=messages__pb2.Envelope.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'waymark.messages.WorkerBridge', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('waymark.messages.WorkerBridge', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class WorkerBridge(object):
    """=============================================================================
    gRPC Service Definitions
    =============================================================================

    Bidirectional streaming service for worker communication.
    Workers connect and maintain a persistent stream for action dispatch/results.
    """

    @staticmethod
    def Attach(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,
            '/waymark.messages.WorkerBridge/Attach',
            messages__pb2.Envelope.SerializeToString,
            messages__pb2.Envelope.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)


class WorkflowServiceStub(object):
    """Workflow management service for client operations.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.RegisterWorkflow = channel.unary_unary(
                '/waymark.messages.WorkflowService/RegisterWorkflow',
                request_serializer=messages__pb2.RegisterWorkflowRequest.SerializeToString,
                response_deserializer=messages__pb2.RegisterWorkflowResponse.FromString,
                _registered_method=True)
        self.RegisterWorkflowBatch = channel.unary_unary(
                '/waymark.messages.WorkflowService/RegisterWorkflowBatch',
                request_serializer=messages__pb2.RegisterWorkflowBatchRequest.SerializeToString,
                response_deserializer=messages__pb2.RegisterWorkflowBatchResponse.FromString,
                _registered_method=True)
        self.WaitForInstance = channel.unary_unary(
                '/waymark.messages.WorkflowService/WaitForInstance',
                request_serializer=messages__pb2.WaitForInstanceRequest.SerializeToString,
                response_deserializer=messages__pb2.WaitForInstanceResponse.FromString,
                _registered_method=True)
        self.ExecuteWorkflow = channel.stream_stream(
                '/waymark.messages.WorkflowService/ExecuteWorkflow',
                request_serializer=messages__pb2.WorkflowStreamRequest.SerializeToString,
                response_deserializer=messages__pb2.WorkflowStreamResponse.FromString,
                _registered_method=True)
        self.RegisterSchedule = channel.unary_unary(
                '/waymark.messages.WorkflowService/RegisterSchedule',
                request_serializer=messages__pb2.RegisterScheduleRequest.SerializeToString,
                response_deserializer=messages__pb2.RegisterScheduleResponse.FromString,
                _registered_method=True)
        self.UpdateScheduleStatus = channel.unary_unary(
                '/waymark.messages.WorkflowService/UpdateScheduleStatus',
                request_serializer=messages__pb2.UpdateScheduleStatusRequest.SerializeToString,
                response_deserializer=messages__pb2.UpdateScheduleStatusResponse.FromString,
                _registered_method=True)
        self.DeleteSchedule = channel.unary_unary(
                '/waymark.messages.WorkflowService/DeleteSchedule',
                request_serializer=messages__pb2.DeleteScheduleRequest.SerializeToString,
                response_deserializer=messages__pb2.DeleteScheduleResponse.FromString,
                _registered_method=True)
        self.ListSchedules = channel.unary_unary(
                '/waymark.messages.WorkflowService/ListSchedules',
                request_serializer=messages__pb2.ListSchedulesRequest.SerializeToString,
                response_deserializer=messages__pb2.ListSchedulesResponse.FromString,
                _registered_method=True)


class WorkflowServiceServicer(object):
    """Workflow management service for client operations.
    """

    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 RegisterWorkflowBatch(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 WaitForInstance(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 ExecuteWorkflow(self, request_iterator, 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 RegisterSchedule(self, request, context):
        """Schedule management
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateScheduleStatus(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 DeleteSchedule(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 ListSchedules(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_WorkflowServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'RegisterWorkflow': grpc.unary_unary_rpc_method_handler(
                    servicer.RegisterWorkflow,
                    request_deserializer=messages__pb2.RegisterWorkflowRequest.FromString,
                    response_serializer=messages__pb2.RegisterWorkflowResponse.SerializeToString,
            ),
            'RegisterWorkflowBatch': grpc.unary_unary_rpc_method_handler(
                    servicer.RegisterWorkflowBatch,
                    request_deserializer=messages__pb2.RegisterWorkflowBatchRequest.FromString,
                    response_serializer=messages__pb2.RegisterWorkflowBatchResponse.SerializeToString,
            ),
            'WaitForInstance': grpc.unary_unary_rpc_method_handler(
                    servicer.WaitForInstance,
                    request_deserializer=messages__pb2.WaitForInstanceRequest.FromString,
                    response_serializer=messages__pb2.WaitForInstanceResponse.SerializeToString,
            ),
            'ExecuteWorkflow': grpc.stream_stream_rpc_method_handler(
                    servicer.ExecuteWorkflow,
                    request_deserializer=messages__pb2.WorkflowStreamRequest.FromString,
                    response_serializer=messages__pb2.WorkflowStreamResponse.SerializeToString,
            ),
            'RegisterSchedule': grpc.unary_unary_rpc_method_handler(
                    servicer.RegisterSchedule,
                    request_deserializer=messages__pb2.RegisterScheduleRequest.FromString,
                    response_serializer=messages__pb2.RegisterScheduleResponse.SerializeToString,
            ),
            'UpdateScheduleStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateScheduleStatus,
                    request_deserializer=messages__pb2.UpdateScheduleStatusRequest.FromString,
                    response_serializer=messages__pb2.UpdateScheduleStatusResponse.SerializeToString,
            ),
            'DeleteSchedule': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteSchedule,
                    request_deserializer=messages__pb2.DeleteScheduleRequest.FromString,
                    response_serializer=messages__pb2.DeleteScheduleResponse.SerializeToString,
            ),
            'ListSchedules': grpc.unary_unary_rpc_method_handler(
                    servicer.ListSchedules,
                    request_deserializer=messages__pb2.ListSchedulesRequest.FromString,
                    response_serializer=messages__pb2.ListSchedulesResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'waymark.messages.WorkflowService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('waymark.messages.WorkflowService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class WorkflowService(object):
    """Workflow management service for client operations.
    """

    @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,
            '/waymark.messages.WorkflowService/RegisterWorkflow',
            messages__pb2.RegisterWorkflowRequest.SerializeToString,
            messages__pb2.RegisterWorkflowResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RegisterWorkflowBatch(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,
            '/waymark.messages.WorkflowService/RegisterWorkflowBatch',
            messages__pb2.RegisterWorkflowBatchRequest.SerializeToString,
            messages__pb2.RegisterWorkflowBatchResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def WaitForInstance(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,
            '/waymark.messages.WorkflowService/WaitForInstance',
            messages__pb2.WaitForInstanceRequest.SerializeToString,
            messages__pb2.WaitForInstanceResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ExecuteWorkflow(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,
            '/waymark.messages.WorkflowService/ExecuteWorkflow',
            messages__pb2.WorkflowStreamRequest.SerializeToString,
            messages__pb2.WorkflowStreamResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RegisterSchedule(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,
            '/waymark.messages.WorkflowService/RegisterSchedule',
            messages__pb2.RegisterScheduleRequest.SerializeToString,
            messages__pb2.RegisterScheduleResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UpdateScheduleStatus(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,
            '/waymark.messages.WorkflowService/UpdateScheduleStatus',
            messages__pb2.UpdateScheduleStatusRequest.SerializeToString,
            messages__pb2.UpdateScheduleStatusResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteSchedule(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,
            '/waymark.messages.WorkflowService/DeleteSchedule',
            messages__pb2.DeleteScheduleRequest.SerializeToString,
            messages__pb2.DeleteScheduleResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListSchedules(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,
            '/waymark.messages.WorkflowService/ListSchedules',
            messages__pb2.ListSchedulesRequest.SerializeToString,
            messages__pb2.ListSchedulesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
