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

from typing import Awaitable, Callable, Optional, TypeVar, Union, overload
from nexusrpc import InputT, OutputT
from ._operation_context import WorkflowRunOperationContext
from ._token import WorkflowHandle

ServiceHandlerT = TypeVar("ServiceHandlerT")
@overload
def workflow_run_operation(start: Callable[[ServiceHandlerT, WorkflowRunOperationContext, InputT], Awaitable[WorkflowHandle[OutputT]],]) -> Callable[[ServiceHandlerT, WorkflowRunOperationContext, InputT], Awaitable[WorkflowHandle[OutputT]],]:
    ...

@overload
def workflow_run_operation(*, name: Optional[str] = ...) -> Callable[[Callable[[ServiceHandlerT, WorkflowRunOperationContext, InputT], Awaitable[WorkflowHandle[OutputT]],]], Callable[[ServiceHandlerT, WorkflowRunOperationContext, InputT], Awaitable[WorkflowHandle[OutputT]],],]:
    ...

def workflow_run_operation(start: Optional[Callable[[ServiceHandlerT, WorkflowRunOperationContext, InputT], Awaitable[WorkflowHandle[OutputT]],]] = ..., *, name: Optional[str] = ...) -> Union[Callable[[ServiceHandlerT, WorkflowRunOperationContext, InputT], Awaitable[WorkflowHandle[OutputT]],], Callable[[Callable[[ServiceHandlerT, WorkflowRunOperationContext, InputT], Awaitable[WorkflowHandle[OutputT]],]], Callable[[ServiceHandlerT, WorkflowRunOperationContext, InputT], Awaitable[WorkflowHandle[OutputT]],],],]:
    """Decorator marking a method as the start method for a workflow-backed operation."""
    ...

