# 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


class DubbingRegenerateResponse(UncheckedBaseModel):
    """
    The accepted re-dub: what it covers and what it cost.
    """

    regenerated_segment_ids: typing.List[str] = pydantic.Field()
    """
    The segments this re-dub re-synthesizes: those with edits to apply.
    """

    regenerated_seconds: float = pydantic.Field()
    """
    Seconds of audio this re-dub covers -- the edited regions only, never the whole target. `charged_seconds` is the part of it that was billed.
    """

    charged_seconds: float = pydantic.Field()
    """
    Seconds actually billed, after the free-regeneration allowance. Zero when the re-dub cost nothing -- the allowance covered all of it, or the project's included generation did.
    """

    free_regeneration_seconds_remaining: float = pydantic.Field()
    """
    Free-regeneration seconds left for this language target after this re-dub. The allowance is the source's own duration.
    """

    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
