"""
This type stub file was generated by pyright.
"""

import temporalio.bridge.proto.workflow_activation
import temporalio.bridge.proto.workflow_completion
import temporalio.workflow
from typing import Type
from .._workflow_instance import WorkflowInstance, WorkflowInstanceDetails, WorkflowRunner
from ._restrictions import SandboxRestrictions

"""Runner for workflow sandbox.

.. warning::
    This API for this module is considered unstable and may change in future.
"""
_fake_info = ...
class SandboxedWorkflowRunner(WorkflowRunner):
    """Runner for workflows in a sandbox."""
    def __init__(self, *, restrictions: SandboxRestrictions = ..., runner_class: Type[WorkflowRunner] = ...) -> None:
        """Create the sandboxed workflow runner.

        Args:
            restrictions: Set of restrictions to apply to this sandbox.
            runner_class: The class for underlying runner the sandbox will
                instantiate and  use to run workflows. Note, this class is
                re-imported and instantiated for *each* workflow run.
        """
        ...
    
    def prepare_workflow(self, defn: temporalio.workflow._Definition) -> None:
        """Implements :py:meth:`WorkflowRunner.prepare_workflow`."""
        ...
    
    def create_instance(self, det: WorkflowInstanceDetails) -> WorkflowInstance:
        """Implements :py:meth:`WorkflowRunner.create_instance`."""
        ...
    


class _Instance(WorkflowInstance):
    def __init__(self, instance_details: WorkflowInstanceDetails, runner_class: Type[WorkflowRunner], restrictions: SandboxRestrictions) -> None:
        ...
    
    def activate(self, act: temporalio.bridge.proto.workflow_activation.WorkflowActivation) -> temporalio.bridge.proto.workflow_completion.WorkflowActivationCompletion:
        ...
    


