from dataclasses import dataclass, field

from lisa.globalfit.framework.msg.base import MessageBase


@dataclass
class WorkflowSpec(MessageBase):
    resource: str
    labels: list[str] = field(default_factory=list)
    parameters: dict[str, str] = field(default_factory=dict)


@dataclass
class WorkflowBackendDetails:
    url: str


@dataclass
class WorkflowResult(MessageBase):
    name: str
    status: str
    opts: WorkflowBackendDetails
    labels: list[str] = field(default_factory=list)
