"""Schema for News items."""

from typing import Literal

from msgspec import Struct

from slices_clientlib_aiis.util.msgspec import AwareDatetime


class News(Struct, rename="camel"):
    """News Item."""

    id: str
    created: AwareDatetime
    enabled: bool
    type: Literal["WARNING", "INFO", "CRITICAL"]
    title: str
    text: str
    tags: list[str]
    not_before: AwareDatetime | None
    not_after: AwareDatetime | None
