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

import datetime as dt
import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .config_stream import ConfigStream
from .source_stream import SourceStream
from .target_stream import TargetStream


class CreateStreamRequestPayload(UniversalBaseModel):
    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    The name of the stream.
    """

    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    The description of the stream.
    """

    initial_delay: typing.Optional[int] = pydantic.Field(default=None)
    """
    The initial delay in seconds before starting the stream creation process.
    """

    timeout_in_mins: typing.Optional[int] = pydantic.Field(default=None)
    """
    The maximum duration in minutes for the stream creation process before timing out.
    """

    voices: typing.List[int] = pydantic.Field()
    """
    List of voice identifiers to be used in the stream.
    """

    dictionaries: typing.List[int] = pydantic.Field()
    """
    List of dictionary identifiers to be used in the stream.
    """

    config: ConfigStream = pydantic.Field()
    """
    The shared configuration for the streaming pipeline.
    """

    source_stream: SourceStream = pydantic.Field()
    """
    The source stream configuration details.
    """

    target_streams: typing.List[TargetStream] = pydantic.Field()
    """
    List of target stream configurations.
    """

    start_time: typing.Optional[dt.datetime] = None
    end_time: typing.Optional[dt.datetime] = None
    timezone: typing.Optional[str] = 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
