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

from pytest_zeebe.engine.engine_control_grpc import \
    pytest_zeebe_engine_control_pb2 as pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.StartEngine = channel.unary_unary(
                '/engine_protocol.EngineControl/StartEngine',
                request_serializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.StartEngineRequest.SerializeToString,
                response_deserializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.StartEngineResponse.FromString,
                )
        self.StopEngine = channel.unary_unary(
                '/engine_protocol.EngineControl/StopEngine',
                request_serializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.StopEngineRequest.SerializeToString,
                response_deserializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.StopEngineResponse.FromString,
                )
        self.ResetEngine = channel.unary_unary(
                '/engine_protocol.EngineControl/ResetEngine',
                request_serializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.ResetEngineRequest.SerializeToString,
                response_deserializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.ResetEngineResponse.FromString,
                )
        self.IncreaseTime = channel.unary_unary(
                '/engine_protocol.EngineControl/IncreaseTime',
                request_serializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.IncreaseTimeRequest.SerializeToString,
                response_deserializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.IncreaseTimeResponse.FromString,
                )
        self.WaitForIdleState = channel.unary_unary(
                '/engine_protocol.EngineControl/WaitForIdleState',
                request_serializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.WaitForIdleStateRequest.SerializeToString,
                response_deserializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.WaitForIdleStateResponse.FromString,
                )
        self.WaitForBusyState = channel.unary_unary(
                '/engine_protocol.EngineControl/WaitForBusyState',
                request_serializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.WaitForBusyStateRequest.SerializeToString,
                response_deserializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.WaitForBusyStateResponse.FromString,
                )
        self.GetRecords = channel.unary_stream(
                '/engine_protocol.EngineControl/GetRecords',
                request_serializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.GetRecordsRequest.SerializeToString,
                response_deserializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.RecordResponse.FromString,
                )


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

    def StartEngine(self, request, context):
        """
        Starts the in-memory engine.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def StopEngine(self, request, context):
        """
        Stops the in-memory engine.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ResetEngine(self, request, context):
        """
        Resets the in-memory engine. This is done by recreating the engine entirely.
        The engine should be reset before executing the next test. This prevents
        the tests from influencing each other.
        Using this while running tests concurrently will still cause issues. This is
        because the first test will be using the engine, whilst the second test will
        reset it. Therefore, the data from the first test will get lost.

        After resetting the engine still needs to be started.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def IncreaseTime(self, request, context):
        """
        Increases the engine time by a specific duration. Increasing the time could
        be useful for when triggering timers with a date somewhere in the future.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def WaitForIdleState(self, request, context):
        """
        Waits for the engine to have reached an idle state. Idle state is a state in
        which the process engine makes no progress and is waiting for new commands
        or events to trigger.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def WaitForBusyState(self, request, context):
        """
        Waits a given timeout for the engine to have reached a busy state.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetRecords(self, request, context):
        """
        Get all records from the in-memory engine. These records will be returned
        in a JSON format. Client-side these should be mapped to Records.

        For an easy way to serialize this JSON back to a Record please refer to:
        https://github.com/camunda/zeebe/tree/main/protocol-jackson
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_EngineControlServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'StartEngine': grpc.unary_unary_rpc_method_handler(
                    servicer.StartEngine,
                    request_deserializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.StartEngineRequest.FromString,
                    response_serializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.StartEngineResponse.SerializeToString,
            ),
            'StopEngine': grpc.unary_unary_rpc_method_handler(
                    servicer.StopEngine,
                    request_deserializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.StopEngineRequest.FromString,
                    response_serializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.StopEngineResponse.SerializeToString,
            ),
            'ResetEngine': grpc.unary_unary_rpc_method_handler(
                    servicer.ResetEngine,
                    request_deserializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.ResetEngineRequest.FromString,
                    response_serializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.ResetEngineResponse.SerializeToString,
            ),
            'IncreaseTime': grpc.unary_unary_rpc_method_handler(
                    servicer.IncreaseTime,
                    request_deserializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.IncreaseTimeRequest.FromString,
                    response_serializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.IncreaseTimeResponse.SerializeToString,
            ),
            'WaitForIdleState': grpc.unary_unary_rpc_method_handler(
                    servicer.WaitForIdleState,
                    request_deserializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.WaitForIdleStateRequest.FromString,
                    response_serializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.WaitForIdleStateResponse.SerializeToString,
            ),
            'WaitForBusyState': grpc.unary_unary_rpc_method_handler(
                    servicer.WaitForBusyState,
                    request_deserializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.WaitForBusyStateRequest.FromString,
                    response_serializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.WaitForBusyStateResponse.SerializeToString,
            ),
            'GetRecords': grpc.unary_stream_rpc_method_handler(
                    servicer.GetRecords,
                    request_deserializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.GetRecordsRequest.FromString,
                    response_serializer=pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.RecordResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'engine_protocol.EngineControl', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def StartEngine(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, '/engine_protocol.EngineControl/StartEngine',
            pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.StartEngineRequest.SerializeToString,
            pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.StartEngineResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def StopEngine(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, '/engine_protocol.EngineControl/StopEngine',
            pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.StopEngineRequest.SerializeToString,
            pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.StopEngineResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ResetEngine(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, '/engine_protocol.EngineControl/ResetEngine',
            pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.ResetEngineRequest.SerializeToString,
            pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.ResetEngineResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def IncreaseTime(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, '/engine_protocol.EngineControl/IncreaseTime',
            pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.IncreaseTimeRequest.SerializeToString,
            pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.IncreaseTimeResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def WaitForIdleState(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, '/engine_protocol.EngineControl/WaitForIdleState',
            pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.WaitForIdleStateRequest.SerializeToString,
            pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.WaitForIdleStateResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def WaitForBusyState(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, '/engine_protocol.EngineControl/WaitForBusyState',
            pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.WaitForBusyStateRequest.SerializeToString,
            pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.WaitForBusyStateResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetRecords(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_stream(request, target, '/engine_protocol.EngineControl/GetRecords',
            pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.GetRecordsRequest.SerializeToString,
            pytest__zeebe_dot_engine_dot_engine__control__grpc_dot_pytest__zeebe__engine__control__pb2.RecordResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
