# Generated by sila2.code_generator; sila2.__version__: 0.10.3
from __future__ import annotations

from abc import ABC, abstractmethod
from typing import TYPE_CHECKING

from sila2.server import FeatureImplementationBase, MetadataDict

from .laborchestratorservice_types import (
    GetStatus_Responses,
    LoadLabConfiguration_Responses,
    LoadLabConfigurationFile_Responses,
    LoadProcess_Responses,
    LoadProcessFile_Responses,
    StartProcess_Responses,
    StopProcess_Responses,
)

if TYPE_CHECKING:

    from ...server import Server


class LabOrchestratorServiceBase(FeatureImplementationBase, ABC):
    parent_server: Server

    def __init__(self, parent_server: Server):
        """

        This feature controls the Lab Orchestrator

        """
        super().__init__(parent_server=parent_server)

    @abstractmethod
    def LoadProcess(self, LabProcessName: str, *, metadata: MetadataDict) -> LoadProcess_Responses:
        """
        Load a pythonLab Process


        :param LabProcessName: Name of the Labprocess in the LARA database

        :param metadata: The SiLA Client Metadata attached to the call

        """
        pass

    @abstractmethod
    def LoadProcessFile(self, LabProcessFileName: str, *, metadata: MetadataDict) -> LoadProcessFile_Responses:
        """
        Load a pythonLab Process file


        :param LabProcessFileName: Filenname of the Labprocess

        :param metadata: The SiLA Client Metadata attached to the call

        :return:

            - Name: Unique name given to the process. Can be used to reference this process.


        """
        pass

    @abstractmethod
    def LoadLabConfiguration(
        self, LabConfigurationName: str, *, metadata: MetadataDict
    ) -> LoadLabConfiguration_Responses:
        """
        Load a Lab Configuration from Database


        :param LabConfigurationName: Name of Lab Configuration to be loaded from the (LARA) database

        :param metadata: The SiLA Client Metadata attached to the call

        """
        pass

    @abstractmethod
    def LoadLabConfigurationFile(
        self, LabConfigurationFileName: str, *, metadata: MetadataDict
    ) -> LoadLabConfigurationFile_Responses:
        """
        Load a Lab Configuration from YAML file


        :param LabConfigurationFileName: Filename of Lab Configuration to be loaded - in YAML format.

        :param metadata: The SiLA Client Metadata attached to the call

        """
        pass

    @abstractmethod
    def StartProcess(self, ProcessName: str, *, metadata: MetadataDict) -> StartProcess_Responses:
        """
        Starts a given process


        :param ProcessName: Name of the process to start

        :param metadata: The SiLA Client Metadata attached to the call

        """
        pass

    @abstractmethod
    def StopProcess(self, ProcessName: str, *, metadata: MetadataDict) -> StopProcess_Responses:
        """
        Stops a given process


        :param ProcessName: Name of the process to stop

        :param metadata: The SiLA Client Metadata attached to the call

        """
        pass

    @abstractmethod
    def GetStatus(self, ProcessName: str, *, metadata: MetadataDict) -> GetStatus_Responses:
        """
        Returns the status of the specified process


        :param ProcessName: Name of the process

        :param metadata: The SiLA Client Metadata attached to the call

        :return:

            - ProcessStatus: Status of the process


        """
        pass
