# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .caption_style_character_animation_model import CaptionStyleCharacterAnimationModel
from .caption_style_horizontal_placement_model import CaptionStyleHorizontalPlacementModel
from .caption_style_model_text_align import CaptionStyleModelTextAlign
from .caption_style_model_text_blend_mode import CaptionStyleModelTextBlendMode
from .caption_style_model_text_style import CaptionStyleModelTextStyle
from .caption_style_model_text_transform import CaptionStyleModelTextTransform
from .caption_style_model_text_weight import CaptionStyleModelTextWeight
from .caption_style_section_animation_model import CaptionStyleSectionAnimationModel
from .caption_style_template_model import CaptionStyleTemplateModel
from .caption_style_vertical_placement_model import CaptionStyleVerticalPlacementModel
from .caption_style_word_animation_model import CaptionStyleWordAnimationModel
from .studio_text_style_outline_model import StudioTextStyleOutlineModel
from .studio_text_style_shadow_model import StudioTextStyleShadowModel


class CaptionStyleModel(UncheckedBaseModel):
    template: typing.Optional[CaptionStyleTemplateModel] = None
    text_font: typing.Optional[str] = None
    text_scale: typing.Optional[float] = None
    text_color: typing.Optional[str] = None
    text_align: typing.Optional[CaptionStyleModelTextAlign] = None
    text_style: typing.Optional[CaptionStyleModelTextStyle] = None
    text_weight: typing.Optional[CaptionStyleModelTextWeight] = None
    text_transform: typing.Optional[CaptionStyleModelTextTransform] = None
    text_blend_mode: typing.Optional[CaptionStyleModelTextBlendMode] = None
    text_shadow: typing.Optional[StudioTextStyleShadowModel] = None
    text_outline: typing.Optional[StudioTextStyleOutlineModel] = None
    background_enabled: typing.Optional[bool] = None
    background_color: typing.Optional[str] = None
    background_opacity: typing.Optional[float] = None
    word_highlights_enabled: typing.Optional[bool] = None
    word_highlights_color: typing.Optional[str] = None
    word_highlights_background_color: typing.Optional[str] = None
    word_highlights_opacity: typing.Optional[float] = None
    section_animation: typing.Optional[CaptionStyleSectionAnimationModel] = None
    word_animation: typing.Optional[CaptionStyleWordAnimationModel] = None
    character_animation: typing.Optional[CaptionStyleCharacterAnimationModel] = None
    width_pct: typing.Optional[float] = None
    horizontal_placement: typing.Optional[CaptionStyleHorizontalPlacementModel] = None
    vertical_placement: typing.Optional[CaptionStyleVerticalPlacementModel] = None
    auto_break_enabled: typing.Optional[bool] = None
    max_lines_per_section: typing.Optional[int] = None
    max_words_per_line: typing.Optional[int] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
