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

from zeebe_grpc import gateway_pb2 as zeebe__grpc_dot_gateway__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.ActivateJobs = channel.unary_stream(
                '/gateway_protocol.Gateway/ActivateJobs',
                request_serializer=zeebe__grpc_dot_gateway__pb2.ActivateJobsRequest.SerializeToString,
                response_deserializer=zeebe__grpc_dot_gateway__pb2.ActivateJobsResponse.FromString,
                )
        self.StreamActivatedJobs = channel.unary_stream(
                '/gateway_protocol.Gateway/StreamActivatedJobs',
                request_serializer=zeebe__grpc_dot_gateway__pb2.StreamActivatedJobsRequest.SerializeToString,
                response_deserializer=zeebe__grpc_dot_gateway__pb2.ActivatedJob.FromString,
                )
        self.CancelProcessInstance = channel.unary_unary(
                '/gateway_protocol.Gateway/CancelProcessInstance',
                request_serializer=zeebe__grpc_dot_gateway__pb2.CancelProcessInstanceRequest.SerializeToString,
                response_deserializer=zeebe__grpc_dot_gateway__pb2.CancelProcessInstanceResponse.FromString,
                )
        self.CompleteJob = channel.unary_unary(
                '/gateway_protocol.Gateway/CompleteJob',
                request_serializer=zeebe__grpc_dot_gateway__pb2.CompleteJobRequest.SerializeToString,
                response_deserializer=zeebe__grpc_dot_gateway__pb2.CompleteJobResponse.FromString,
                )
        self.CreateProcessInstance = channel.unary_unary(
                '/gateway_protocol.Gateway/CreateProcessInstance',
                request_serializer=zeebe__grpc_dot_gateway__pb2.CreateProcessInstanceRequest.SerializeToString,
                response_deserializer=zeebe__grpc_dot_gateway__pb2.CreateProcessInstanceResponse.FromString,
                )
        self.CreateProcessInstanceWithResult = channel.unary_unary(
                '/gateway_protocol.Gateway/CreateProcessInstanceWithResult',
                request_serializer=zeebe__grpc_dot_gateway__pb2.CreateProcessInstanceWithResultRequest.SerializeToString,
                response_deserializer=zeebe__grpc_dot_gateway__pb2.CreateProcessInstanceWithResultResponse.FromString,
                )
        self.EvaluateDecision = channel.unary_unary(
                '/gateway_protocol.Gateway/EvaluateDecision',
                request_serializer=zeebe__grpc_dot_gateway__pb2.EvaluateDecisionRequest.SerializeToString,
                response_deserializer=zeebe__grpc_dot_gateway__pb2.EvaluateDecisionResponse.FromString,
                )
        self.DeployProcess = channel.unary_unary(
                '/gateway_protocol.Gateway/DeployProcess',
                request_serializer=zeebe__grpc_dot_gateway__pb2.DeployProcessRequest.SerializeToString,
                response_deserializer=zeebe__grpc_dot_gateway__pb2.DeployProcessResponse.FromString,
                )
        self.DeployResource = channel.unary_unary(
                '/gateway_protocol.Gateway/DeployResource',
                request_serializer=zeebe__grpc_dot_gateway__pb2.DeployResourceRequest.SerializeToString,
                response_deserializer=zeebe__grpc_dot_gateway__pb2.DeployResourceResponse.FromString,
                )
        self.FailJob = channel.unary_unary(
                '/gateway_protocol.Gateway/FailJob',
                request_serializer=zeebe__grpc_dot_gateway__pb2.FailJobRequest.SerializeToString,
                response_deserializer=zeebe__grpc_dot_gateway__pb2.FailJobResponse.FromString,
                )
        self.ThrowError = channel.unary_unary(
                '/gateway_protocol.Gateway/ThrowError',
                request_serializer=zeebe__grpc_dot_gateway__pb2.ThrowErrorRequest.SerializeToString,
                response_deserializer=zeebe__grpc_dot_gateway__pb2.ThrowErrorResponse.FromString,
                )
        self.PublishMessage = channel.unary_unary(
                '/gateway_protocol.Gateway/PublishMessage',
                request_serializer=zeebe__grpc_dot_gateway__pb2.PublishMessageRequest.SerializeToString,
                response_deserializer=zeebe__grpc_dot_gateway__pb2.PublishMessageResponse.FromString,
                )
        self.ResolveIncident = channel.unary_unary(
                '/gateway_protocol.Gateway/ResolveIncident',
                request_serializer=zeebe__grpc_dot_gateway__pb2.ResolveIncidentRequest.SerializeToString,
                response_deserializer=zeebe__grpc_dot_gateway__pb2.ResolveIncidentResponse.FromString,
                )
        self.SetVariables = channel.unary_unary(
                '/gateway_protocol.Gateway/SetVariables',
                request_serializer=zeebe__grpc_dot_gateway__pb2.SetVariablesRequest.SerializeToString,
                response_deserializer=zeebe__grpc_dot_gateway__pb2.SetVariablesResponse.FromString,
                )
        self.Topology = channel.unary_unary(
                '/gateway_protocol.Gateway/Topology',
                request_serializer=zeebe__grpc_dot_gateway__pb2.TopologyRequest.SerializeToString,
                response_deserializer=zeebe__grpc_dot_gateway__pb2.TopologyResponse.FromString,
                )
        self.UpdateJobRetries = channel.unary_unary(
                '/gateway_protocol.Gateway/UpdateJobRetries',
                request_serializer=zeebe__grpc_dot_gateway__pb2.UpdateJobRetriesRequest.SerializeToString,
                response_deserializer=zeebe__grpc_dot_gateway__pb2.UpdateJobRetriesResponse.FromString,
                )
        self.ModifyProcessInstance = channel.unary_unary(
                '/gateway_protocol.Gateway/ModifyProcessInstance',
                request_serializer=zeebe__grpc_dot_gateway__pb2.ModifyProcessInstanceRequest.SerializeToString,
                response_deserializer=zeebe__grpc_dot_gateway__pb2.ModifyProcessInstanceResponse.FromString,
                )
        self.MigrateProcessInstance = channel.unary_unary(
                '/gateway_protocol.Gateway/MigrateProcessInstance',
                request_serializer=zeebe__grpc_dot_gateway__pb2.MigrateProcessInstanceRequest.SerializeToString,
                response_deserializer=zeebe__grpc_dot_gateway__pb2.MigrateProcessInstanceResponse.FromString,
                )
        self.UpdateJobTimeout = channel.unary_unary(
                '/gateway_protocol.Gateway/UpdateJobTimeout',
                request_serializer=zeebe__grpc_dot_gateway__pb2.UpdateJobTimeoutRequest.SerializeToString,
                response_deserializer=zeebe__grpc_dot_gateway__pb2.UpdateJobTimeoutResponse.FromString,
                )
        self.DeleteResource = channel.unary_unary(
                '/gateway_protocol.Gateway/DeleteResource',
                request_serializer=zeebe__grpc_dot_gateway__pb2.DeleteResourceRequest.SerializeToString,
                response_deserializer=zeebe__grpc_dot_gateway__pb2.DeleteResourceResponse.FromString,
                )
        self.BroadcastSignal = channel.unary_unary(
                '/gateway_protocol.Gateway/BroadcastSignal',
                request_serializer=zeebe__grpc_dot_gateway__pb2.BroadcastSignalRequest.SerializeToString,
                response_deserializer=zeebe__grpc_dot_gateway__pb2.BroadcastSignalResponse.FromString,
                )


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

    def ActivateJobs(self, request, context):
        """
        Iterates through all known partitions round-robin and activates up to the requested
        maximum and streams them back to the client as they are activated.

        Errors:
        INVALID_ARGUMENT:
        - type is blank (empty string, null)
        - worker is blank (empty string, null)
        - timeout less than 1
        - maxJobsToActivate is less than 1
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def StreamActivatedJobs(self, request, context):
        """
        Registers client to a job stream that will stream jobs back to the client as
        they become activatable.

        Errors:
        INVALID_ARGUMENT:
        - type is blank (empty string, null)
        - timeout less than 1
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CancelProcessInstance(self, request, context):
        """
        Cancels a running process instance

        Errors:
        NOT_FOUND:
        - no process instance exists with the given key
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CompleteJob(self, request, context):
        """
        Completes a job with the given variables, which allows completing the associated service task.

        Errors:
        NOT_FOUND:
        - no job exists with the given job key. Note that since jobs are removed once completed,
        it could be that this job did exist at some point.

        FAILED_PRECONDITION:
        - the job was marked as failed. In that case, the related incident must be resolved before
        the job can be activated again and completed.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateProcessInstance(self, request, context):
        """
        Creates and starts an instance of the specified process. The process definition to use to
        create the instance can be specified either using its unique key (as returned by
        DeployProcess), or using the BPMN process ID and a version. Pass -1 as the version to use the
        latest deployed version. Note that only processes with none start events can be started through
        this command.

        Errors:
        NOT_FOUND:
        - no process with the given key exists (if processDefinitionKey was given)
        - no process with the given process ID exists (if bpmnProcessId was given but version was -1)
        - no process with the given process ID and version exists (if both bpmnProcessId and version were given)

        FAILED_PRECONDITION:
        - the process definition does not contain a none start event; only processes with none
        start event can be started manually.

        INVALID_ARGUMENT:
        - the given variables argument is not a valid JSON document; it is expected to be a valid
        JSON document where the root node is an object.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateProcessInstanceWithResult(self, request, context):
        """
        Behaves similarly to `rpc CreateProcessInstance`, except that a successful response is received when the process completes successfully.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def EvaluateDecision(self, request, context):
        """
        Evaluates a decision. The decision to evaluate can be specified either by
        using its unique key (as returned by DeployResource), or using the decision
        ID. When using the decision ID, the latest deployed version of the decision
        is used.

        Errors:
        INVALID_ARGUMENT:
        - no decision with the given key exists (if decisionKey was given)
        - no decision with the given decision ID exists (if decisionId was given)
        - both decision ID and decision KEY were provided, or are missing
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeployProcess(self, request, context):
        """
        Deploys one or more processes to Zeebe. Note that this is an atomic call,
        i.e. either all processes are deployed, or none of them are.

        Errors:
        INVALID_ARGUMENT:
        - no resources given.
        - if at least one resource is invalid. A resource is considered invalid if:
        - the resource data is not deserializable (e.g. detected as BPMN, but it's broken XML)
        - the process is invalid (e.g. an event-based gateway has an outgoing sequence flow to a task)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeployResource(self, request, context):
        """
        Deploys one or more resources (e.g. processes or decision models) to Zeebe.
        Note that this is an atomic call, i.e. either all resources are deployed, or none of them are.

        Errors:
        PERMISSION_DENIED:
        - if a deployment to an unauthorized tenant is performed
        INVALID_ARGUMENT:
        - no resources given.
        - if at least one resource is invalid. A resource is considered invalid if:
        - the content is not deserializable (e.g. detected as BPMN, but it's broken XML)
        - the content is invalid (e.g. an event-based gateway has an outgoing sequence flow to a task)
        - if multi-tenancy is enabled, and:
        - a tenant id is not provided
        - a tenant id with an invalid format is provided
        - if multi-tenancy is disabled and a tenant id is provided
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def FailJob(self, request, context):
        """
        Marks the job as failed; if the retries argument is positive, then the job will be immediately
        activatable again, and a worker could try again to process it. If it is zero or negative however,
        an incident will be raised, tagged with the given errorMessage, and the job will not be
        activatable until the incident is resolved.

        Errors:
        NOT_FOUND:
        - no job was found with the given key

        FAILED_PRECONDITION:
        - the job was not activated
        - the job is already in a failed state, i.e. ran out of retries
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ThrowError(self, request, context):
        """
        Reports a business error (i.e. non-technical) that occurs while processing a job. The error is handled in the process by an error catch event. If there is no error catch event with the specified errorCode then an incident will be raised instead.

        Errors:
        NOT_FOUND:
        - no job was found with the given key

        FAILED_PRECONDITION:
        - the job is not in an activated state
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def PublishMessage(self, request, context):
        """
        Publishes a single message. Messages are published to specific partitions computed from their
        correlation keys.

        Errors:
        ALREADY_EXISTS:
        - a message with the same ID was previously published (and is still alive)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ResolveIncident(self, request, context):
        """
        Resolves a given incident. This simply marks the incident as resolved; most likely a call to
        UpdateJobRetries or SetVariables will be necessary to actually resolve the
        problem, following by this call.

        Errors:
        NOT_FOUND:
        - no incident with the given key exists
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetVariables(self, request, context):
        """
        Updates all the variables of a particular scope (e.g. process instance, flow element instance)
        from the given JSON document.

        Errors:
        NOT_FOUND:
        - no element with the given elementInstanceKey exists
        INVALID_ARGUMENT:
        - the given variables document is not a valid JSON document; valid documents are expected to
        be JSON documents where the root node is an object.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Topology(self, request, context):
        """
        Obtains the current topology of the cluster the gateway is part of.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateJobRetries(self, request, context):
        """
        Updates the number of retries a job has left. This is mostly useful for jobs that have run out of
        retries, should the underlying problem be solved.

        Errors:
        NOT_FOUND:
        - no job exists with the given key

        INVALID_ARGUMENT:
        - retries is not greater than 0
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ModifyProcessInstance(self, request, context):
        """
        Modifies the process instance. This is done by activating and/or terminating specific elements of the instance.

        Errors:
        NOT_FOUND:
        - no process instance exists with the given key

        FAILED_PRECONDITION:
        - trying to activate element inside of a multi-instance

        INVALID_ARGUMENT:
        - activating or terminating unknown element
        - ancestor of element for activation doesn't exist
        - scope of variable is unknown
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def MigrateProcessInstance(self, request, context):
        """
        Migrates the process instance to the specified process definition.
        In simple terms, this is handled by updating the active element's process.

        Errors:
        NOT_FOUND:
        - no process instance exists with the given key, or it is not active
        - no process definition exists with the given target definition key
        - no process instance exists with the given key for the tenants the user is authorized to work with.

        FAILED_PRECONDITION:
        - not all active elements in the given process instance are mapped to the elements in the target process definition
        - a mapping instruction changes the type of an element or event
        - a mapping instruction refers to an unsupported element (i.e. some elements will be supported later on)
        - a mapping instruction refers to element in unsupported scenarios.
        (i.e. migration is not supported when process instance or target process elements contains event subscriptions)

        INVALID_ARGUMENT:
        - A `sourceElementId` does not refer to an element in the process instance's process definition
        - A `targetElementId` does not refer to an element in the target process definition
        - A `sourceElementId` is mapped by multiple mapping instructions.
        For example, the engine cannot determine how to migrate a process instance when the instructions are: [A->B, A->C].
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateJobTimeout(self, request, context):
        """
        Updates the deadline of a job using the timeout (in ms) provided. This can be used
        for extending or shortening the job deadline.

        Errors:
        NOT_FOUND:
        - no job exists with the given key

        INVALID_STATE:
        - no deadline exists for the given job key
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteResource(self, request, context):
        """
        Deletes a resource from the state. Once a resource has been deleted it cannot
        be recovered. If the resource needs to be available again, a new deployment
        of the resource is required.

        Deleting a process will cancel any running instances of this process
        definition. New instances of a deleted process are created using
        the lastest version that hasn't been deleted. Creating a new
        process instance is impossible when all versions have been
        deleted.

        Deleting a decision requirement definitions could cause incidents in process
        instances referencing these decisions in a business rule task. A decision
        will be evaluated with the latest version that hasn't been deleted. If all
        versions of a decision have been deleted the evaluation is rejected.

        Errors:
        NOT_FOUND:
        - No resource exists with the given key

        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def BroadcastSignal(self, request, context):
        """
        Broadcasts a signal.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_GatewayServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ActivateJobs': grpc.unary_stream_rpc_method_handler(
                    servicer.ActivateJobs,
                    request_deserializer=zeebe__grpc_dot_gateway__pb2.ActivateJobsRequest.FromString,
                    response_serializer=zeebe__grpc_dot_gateway__pb2.ActivateJobsResponse.SerializeToString,
            ),
            'StreamActivatedJobs': grpc.unary_stream_rpc_method_handler(
                    servicer.StreamActivatedJobs,
                    request_deserializer=zeebe__grpc_dot_gateway__pb2.StreamActivatedJobsRequest.FromString,
                    response_serializer=zeebe__grpc_dot_gateway__pb2.ActivatedJob.SerializeToString,
            ),
            'CancelProcessInstance': grpc.unary_unary_rpc_method_handler(
                    servicer.CancelProcessInstance,
                    request_deserializer=zeebe__grpc_dot_gateway__pb2.CancelProcessInstanceRequest.FromString,
                    response_serializer=zeebe__grpc_dot_gateway__pb2.CancelProcessInstanceResponse.SerializeToString,
            ),
            'CompleteJob': grpc.unary_unary_rpc_method_handler(
                    servicer.CompleteJob,
                    request_deserializer=zeebe__grpc_dot_gateway__pb2.CompleteJobRequest.FromString,
                    response_serializer=zeebe__grpc_dot_gateway__pb2.CompleteJobResponse.SerializeToString,
            ),
            'CreateProcessInstance': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateProcessInstance,
                    request_deserializer=zeebe__grpc_dot_gateway__pb2.CreateProcessInstanceRequest.FromString,
                    response_serializer=zeebe__grpc_dot_gateway__pb2.CreateProcessInstanceResponse.SerializeToString,
            ),
            'CreateProcessInstanceWithResult': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateProcessInstanceWithResult,
                    request_deserializer=zeebe__grpc_dot_gateway__pb2.CreateProcessInstanceWithResultRequest.FromString,
                    response_serializer=zeebe__grpc_dot_gateway__pb2.CreateProcessInstanceWithResultResponse.SerializeToString,
            ),
            'EvaluateDecision': grpc.unary_unary_rpc_method_handler(
                    servicer.EvaluateDecision,
                    request_deserializer=zeebe__grpc_dot_gateway__pb2.EvaluateDecisionRequest.FromString,
                    response_serializer=zeebe__grpc_dot_gateway__pb2.EvaluateDecisionResponse.SerializeToString,
            ),
            'DeployProcess': grpc.unary_unary_rpc_method_handler(
                    servicer.DeployProcess,
                    request_deserializer=zeebe__grpc_dot_gateway__pb2.DeployProcessRequest.FromString,
                    response_serializer=zeebe__grpc_dot_gateway__pb2.DeployProcessResponse.SerializeToString,
            ),
            'DeployResource': grpc.unary_unary_rpc_method_handler(
                    servicer.DeployResource,
                    request_deserializer=zeebe__grpc_dot_gateway__pb2.DeployResourceRequest.FromString,
                    response_serializer=zeebe__grpc_dot_gateway__pb2.DeployResourceResponse.SerializeToString,
            ),
            'FailJob': grpc.unary_unary_rpc_method_handler(
                    servicer.FailJob,
                    request_deserializer=zeebe__grpc_dot_gateway__pb2.FailJobRequest.FromString,
                    response_serializer=zeebe__grpc_dot_gateway__pb2.FailJobResponse.SerializeToString,
            ),
            'ThrowError': grpc.unary_unary_rpc_method_handler(
                    servicer.ThrowError,
                    request_deserializer=zeebe__grpc_dot_gateway__pb2.ThrowErrorRequest.FromString,
                    response_serializer=zeebe__grpc_dot_gateway__pb2.ThrowErrorResponse.SerializeToString,
            ),
            'PublishMessage': grpc.unary_unary_rpc_method_handler(
                    servicer.PublishMessage,
                    request_deserializer=zeebe__grpc_dot_gateway__pb2.PublishMessageRequest.FromString,
                    response_serializer=zeebe__grpc_dot_gateway__pb2.PublishMessageResponse.SerializeToString,
            ),
            'ResolveIncident': grpc.unary_unary_rpc_method_handler(
                    servicer.ResolveIncident,
                    request_deserializer=zeebe__grpc_dot_gateway__pb2.ResolveIncidentRequest.FromString,
                    response_serializer=zeebe__grpc_dot_gateway__pb2.ResolveIncidentResponse.SerializeToString,
            ),
            'SetVariables': grpc.unary_unary_rpc_method_handler(
                    servicer.SetVariables,
                    request_deserializer=zeebe__grpc_dot_gateway__pb2.SetVariablesRequest.FromString,
                    response_serializer=zeebe__grpc_dot_gateway__pb2.SetVariablesResponse.SerializeToString,
            ),
            'Topology': grpc.unary_unary_rpc_method_handler(
                    servicer.Topology,
                    request_deserializer=zeebe__grpc_dot_gateway__pb2.TopologyRequest.FromString,
                    response_serializer=zeebe__grpc_dot_gateway__pb2.TopologyResponse.SerializeToString,
            ),
            'UpdateJobRetries': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateJobRetries,
                    request_deserializer=zeebe__grpc_dot_gateway__pb2.UpdateJobRetriesRequest.FromString,
                    response_serializer=zeebe__grpc_dot_gateway__pb2.UpdateJobRetriesResponse.SerializeToString,
            ),
            'ModifyProcessInstance': grpc.unary_unary_rpc_method_handler(
                    servicer.ModifyProcessInstance,
                    request_deserializer=zeebe__grpc_dot_gateway__pb2.ModifyProcessInstanceRequest.FromString,
                    response_serializer=zeebe__grpc_dot_gateway__pb2.ModifyProcessInstanceResponse.SerializeToString,
            ),
            'MigrateProcessInstance': grpc.unary_unary_rpc_method_handler(
                    servicer.MigrateProcessInstance,
                    request_deserializer=zeebe__grpc_dot_gateway__pb2.MigrateProcessInstanceRequest.FromString,
                    response_serializer=zeebe__grpc_dot_gateway__pb2.MigrateProcessInstanceResponse.SerializeToString,
            ),
            'UpdateJobTimeout': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateJobTimeout,
                    request_deserializer=zeebe__grpc_dot_gateway__pb2.UpdateJobTimeoutRequest.FromString,
                    response_serializer=zeebe__grpc_dot_gateway__pb2.UpdateJobTimeoutResponse.SerializeToString,
            ),
            'DeleteResource': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteResource,
                    request_deserializer=zeebe__grpc_dot_gateway__pb2.DeleteResourceRequest.FromString,
                    response_serializer=zeebe__grpc_dot_gateway__pb2.DeleteResourceResponse.SerializeToString,
            ),
            'BroadcastSignal': grpc.unary_unary_rpc_method_handler(
                    servicer.BroadcastSignal,
                    request_deserializer=zeebe__grpc_dot_gateway__pb2.BroadcastSignalRequest.FromString,
                    response_serializer=zeebe__grpc_dot_gateway__pb2.BroadcastSignalResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'gateway_protocol.Gateway', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def ActivateJobs(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, '/gateway_protocol.Gateway/ActivateJobs',
            zeebe__grpc_dot_gateway__pb2.ActivateJobsRequest.SerializeToString,
            zeebe__grpc_dot_gateway__pb2.ActivateJobsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def StreamActivatedJobs(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, '/gateway_protocol.Gateway/StreamActivatedJobs',
            zeebe__grpc_dot_gateway__pb2.StreamActivatedJobsRequest.SerializeToString,
            zeebe__grpc_dot_gateway__pb2.ActivatedJob.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CancelProcessInstance(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, '/gateway_protocol.Gateway/CancelProcessInstance',
            zeebe__grpc_dot_gateway__pb2.CancelProcessInstanceRequest.SerializeToString,
            zeebe__grpc_dot_gateway__pb2.CancelProcessInstanceResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CompleteJob(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, '/gateway_protocol.Gateway/CompleteJob',
            zeebe__grpc_dot_gateway__pb2.CompleteJobRequest.SerializeToString,
            zeebe__grpc_dot_gateway__pb2.CompleteJobResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreateProcessInstance(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, '/gateway_protocol.Gateway/CreateProcessInstance',
            zeebe__grpc_dot_gateway__pb2.CreateProcessInstanceRequest.SerializeToString,
            zeebe__grpc_dot_gateway__pb2.CreateProcessInstanceResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreateProcessInstanceWithResult(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, '/gateway_protocol.Gateway/CreateProcessInstanceWithResult',
            zeebe__grpc_dot_gateway__pb2.CreateProcessInstanceWithResultRequest.SerializeToString,
            zeebe__grpc_dot_gateway__pb2.CreateProcessInstanceWithResultResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def EvaluateDecision(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, '/gateway_protocol.Gateway/EvaluateDecision',
            zeebe__grpc_dot_gateway__pb2.EvaluateDecisionRequest.SerializeToString,
            zeebe__grpc_dot_gateway__pb2.EvaluateDecisionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeployProcess(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, '/gateway_protocol.Gateway/DeployProcess',
            zeebe__grpc_dot_gateway__pb2.DeployProcessRequest.SerializeToString,
            zeebe__grpc_dot_gateway__pb2.DeployProcessResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeployResource(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, '/gateway_protocol.Gateway/DeployResource',
            zeebe__grpc_dot_gateway__pb2.DeployResourceRequest.SerializeToString,
            zeebe__grpc_dot_gateway__pb2.DeployResourceResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def FailJob(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, '/gateway_protocol.Gateway/FailJob',
            zeebe__grpc_dot_gateway__pb2.FailJobRequest.SerializeToString,
            zeebe__grpc_dot_gateway__pb2.FailJobResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ThrowError(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, '/gateway_protocol.Gateway/ThrowError',
            zeebe__grpc_dot_gateway__pb2.ThrowErrorRequest.SerializeToString,
            zeebe__grpc_dot_gateway__pb2.ThrowErrorResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def PublishMessage(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, '/gateway_protocol.Gateway/PublishMessage',
            zeebe__grpc_dot_gateway__pb2.PublishMessageRequest.SerializeToString,
            zeebe__grpc_dot_gateway__pb2.PublishMessageResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ResolveIncident(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, '/gateway_protocol.Gateway/ResolveIncident',
            zeebe__grpc_dot_gateway__pb2.ResolveIncidentRequest.SerializeToString,
            zeebe__grpc_dot_gateway__pb2.ResolveIncidentResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetVariables(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, '/gateway_protocol.Gateway/SetVariables',
            zeebe__grpc_dot_gateway__pb2.SetVariablesRequest.SerializeToString,
            zeebe__grpc_dot_gateway__pb2.SetVariablesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Topology(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, '/gateway_protocol.Gateway/Topology',
            zeebe__grpc_dot_gateway__pb2.TopologyRequest.SerializeToString,
            zeebe__grpc_dot_gateway__pb2.TopologyResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateJobRetries(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, '/gateway_protocol.Gateway/UpdateJobRetries',
            zeebe__grpc_dot_gateway__pb2.UpdateJobRetriesRequest.SerializeToString,
            zeebe__grpc_dot_gateway__pb2.UpdateJobRetriesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ModifyProcessInstance(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, '/gateway_protocol.Gateway/ModifyProcessInstance',
            zeebe__grpc_dot_gateway__pb2.ModifyProcessInstanceRequest.SerializeToString,
            zeebe__grpc_dot_gateway__pb2.ModifyProcessInstanceResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def MigrateProcessInstance(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, '/gateway_protocol.Gateway/MigrateProcessInstance',
            zeebe__grpc_dot_gateway__pb2.MigrateProcessInstanceRequest.SerializeToString,
            zeebe__grpc_dot_gateway__pb2.MigrateProcessInstanceResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateJobTimeout(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, '/gateway_protocol.Gateway/UpdateJobTimeout',
            zeebe__grpc_dot_gateway__pb2.UpdateJobTimeoutRequest.SerializeToString,
            zeebe__grpc_dot_gateway__pb2.UpdateJobTimeoutResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteResource(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, '/gateway_protocol.Gateway/DeleteResource',
            zeebe__grpc_dot_gateway__pb2.DeleteResourceRequest.SerializeToString,
            zeebe__grpc_dot_gateway__pb2.DeleteResourceResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def BroadcastSignal(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, '/gateway_protocol.Gateway/BroadcastSignal',
            zeebe__grpc_dot_gateway__pb2.BroadcastSignalRequest.SerializeToString,
            zeebe__grpc_dot_gateway__pb2.BroadcastSignalResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
