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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .languages import Languages
from .stream_type import StreamType


class TargetStream(UniversalBaseModel):
    languages: typing.List[Languages]
    url: str
    type: StreamType
    passphrase: typing.Optional[str] = None
    streamid: typing.Optional[str] = None
    pids: typing.Optional[typing.List[typing.Optional[int]]] = None
    transcode_video: typing.Optional[bool] = None
    embed_subtitles: typing.Optional[bool] = None
    audio_codec: typing.Optional[str] = None
    audio_bitrate: typing.Optional[str] = None
    audio_channel_layout: typing.Optional[str] = None
    latency: typing.Optional[int] = None
    constant_bitrate: typing.Optional[bool] = None
    relay_output: typing.Optional[bool] = 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
