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

import typing

import pydantic

from ...core.pydantic_utilities import UniversalBaseModel
from .batch_audio_source import BatchAudioSource
from .batch_file_content_type import BatchFileContentType
from .batch_file_metadata import BatchFileMetadata


class BatchFileUploadRequest(UniversalBaseModel):
    """
    Upload a manifest of audio URLs for standard mode batch processing.
    Use either `json_items` (JSON array) or `jsonl` (newline-delimited), not both.
    Maximum 500 audio sources per manifest.
    """

    content_type: BatchFileContentType = pydantic.Field()
    """
    Format of your manifest data
    """

    json_items: typing.Optional[typing.List[BatchAudioSource]] = pydantic.Field(default=None)
    """
    **For JSON format.** Array of audio sources to transcribe (max 500).
    """

    jsonl: typing.Optional[str] = pydantic.Field(default=None)
    """
    **For JSONL format.** One audio source per line as JSON, separated by newlines (max 500 lines).
    
    Example: `{"audio_url": "https://..."}\n{"audio_url": "https://..."}`
    """

    metadata: typing.Optional[BatchFileMetadata] = pydantic.Field(default=None)
    """
    Optional title and description for this manifest
    """

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