Source code for kappa_sdk.user_tasks.services

from ..field import Field
from ..well import Well
from ..unit_converter import UnitConverter
from ..rest_api import RestAPI
from ..user_task import UserTask
from typing import Protocol, runtime_checkable
from .context import Context
from .event_publisher import EventPublisher
from .data_command_service import DataCommandService
from .scheduler import Scheduler
from .log import Log
from .parameters import Parameters
from .data_query_service import DataQueryService
from ..enumerator import DataEnumerator
from .redefinition import Redefinition
from typing import Optional


[docs] @runtime_checkable class Services(Protocol): """User task services. Accessed as a built-in user task variable named `services`, this class provides access to a number of built-in user task services and object. .. note:: Should not be instantiated directly. """ @property def rest_api(self) -> RestAPI: """ Gets the REST API instance. """ @property def unit_converter(self) -> UnitConverter: """ Gets a configured unit converter. """ @property def context(self) -> Context: """ Gets the context of this user task. """ @property def redefinition(self) -> Optional[Redefinition]: """ Gets the redefine setting of this user task. """ @property def field(self) -> Field: """ Gets the field this user task belongs to. """ @property def well(self) -> Well: """ Gets the well this user task belongs to. """ @property def event_publisher(self) -> EventPublisher: """ Gets the event publisher associated with this user task. """ @property def data_enumerator(self) -> DataEnumerator: """ Gets the data enumerator service. """ @property def data_command_service(self) -> DataCommandService: """ Gets the data command service. """ @property def log(self) -> Log: """ Gets the logger for this user task. """ @property def scheduler(self) -> Scheduler: """ Gets the scheduler service for this user task. """ @property def parameters(self) -> Parameters: """ Gets the input and output parameters container. """ @property def data_query_service(self) -> DataQueryService: """ Gets the data query service. """ @property def user_task(self) -> UserTask: """ Gets the executing user task object. """