# generated by datamodel-codegen:
#   filename:  markdown-asset.json
#   timestamp: 2025-11-18T03:35:10+00:00

from __future__ import annotations

from enum import Enum
from typing import Annotated

from adcp.types.base import AdCPBaseModel
from pydantic import ConfigDict, Field


class MarkdownFlavor(Enum):
    commonmark = 'commonmark'
    gfm = 'gfm'


class MarkdownAsset(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    allow_raw_html: Annotated[
        bool | None,
        Field(
            description='Whether raw HTML blocks are allowed in the markdown. False recommended for security.'
        ),
    ] = False
    content: Annotated[
        str,
        Field(
            description='Markdown content following CommonMark spec with optional GitHub Flavored Markdown extensions'
        ),
    ]
    language: Annotated[str | None, Field(description="Language code (e.g., 'en', 'es', 'fr')")] = (
        None
    )
    markdown_flavor: Annotated[
        MarkdownFlavor | None,
        Field(
            description='Markdown flavor used. CommonMark for strict compatibility, GFM for tables/task lists/strikethrough.'
        ),
    ] = MarkdownFlavor.commonmark
