from pydantic import BaseModel
class StackComponent(BaseModel, ABC):
"""Abstract class for all components of a ZenML stack."""
def is_provisioned(self) -> bool:
"""If the component provisioned resources to run."""
def is_running(self) -> bool:
"""If the component is running."""
def provision(self) -> None:
"""Provisions resources to run the component."""
def deprovision(self) -> None:
"""Deprovisions all resources of the component."""
def resume(self) -> None:
"""Resumes the provisioned resources of the component."""
def suspend(self) -> None:
"""Suspends the provisioned resources of the component."""