# Generated by sila2.code_generator; sila2.__version__: 0.10.3
# -----
# This class does not do anything useful at runtime. Its only purpose is to provide type annotations.
# Since sphinx does not support .pyi files (yet?), this is a .py file.
# -----

from __future__ import annotations

from typing import TYPE_CHECKING

if TYPE_CHECKING:

    from typing import Iterable, Optional

    from cancelcontroller_types import CancelAll_Responses, CancelCommand_Responses
    from sila2.client import ClientMetadataInstance

    from .cancelcontroller_types import UUID


class CancelControllerClient:
    """
    This feature offers commands to cancel/terminate Commands. Cancellation is the act of stopping the running Command execution(s),
    irrevocably. The SiLA Server SHOULD be able to be in a state where any further
    commands can be issued after a cancellation.
    """

    def CancelCommand(
        self, CommandExecutionUUID: UUID, *, metadata: Optional[Iterable[ClientMetadataInstance]] = None
    ) -> CancelCommand_Responses:
        """
          Cancel a specified currently running Observable Command or cancel all currently running Observable Commands .
        For any canceled Observable Command the SiLA Server MUST update the Command Execution Status to "Command Finished
        with Error".
        The SiLA Server MUST throw a descriptive error message indicating cancellation as the reason for the Command
        execution not being able to finish successfully for any canceled Command.
        """
        ...

    def CancelAll(self, *, metadata: Optional[Iterable[ClientMetadataInstance]] = None) -> CancelAll_Responses:
        """
          Cancels all currently running Observable and Unobservable Commands running on this SiLA Server.
        The SiLA Server MUST throw an Execution Error indicating 'cancellation' as the reason for the
        Command not being able to finish successfully.
        """
        ...
