|
| 1 | +# This file was auto-generated by Fern from our API Definition. |
| 2 | + |
| 3 | +from __future__ import annotations |
| 4 | +from ...core.unchecked_base_model import UncheckedBaseModel |
| 5 | +import typing |
| 6 | +from ...types.podcast_conversation_mode_data import PodcastConversationModeData |
| 7 | +from ...core.pydantic_utilities import IS_PYDANTIC_V2 |
| 8 | +import pydantic |
| 9 | +from ...types.podcast_bulletin_mode_data import PodcastBulletinModeData |
| 10 | +import typing_extensions |
| 11 | +from ...core.unchecked_base_model import UnionMetadata |
| 12 | + |
| 13 | + |
| 14 | +class BodyCreatePodcastV1ProjectsPodcastCreatePostMode_Conversation(UncheckedBaseModel): |
| 15 | + """ |
| 16 | + The type of podcast to generate |
| 17 | + """ |
| 18 | + |
| 19 | + type: typing.Literal["conversation"] = "conversation" |
| 20 | + conversation: PodcastConversationModeData |
| 21 | + |
| 22 | + if IS_PYDANTIC_V2: |
| 23 | + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 |
| 24 | + else: |
| 25 | + |
| 26 | + class Config: |
| 27 | + frozen = True |
| 28 | + smart_union = True |
| 29 | + extra = pydantic.Extra.allow |
| 30 | + |
| 31 | + |
| 32 | +class BodyCreatePodcastV1ProjectsPodcastCreatePostMode_Bulletin(UncheckedBaseModel): |
| 33 | + """ |
| 34 | + The type of podcast to generate |
| 35 | + """ |
| 36 | + |
| 37 | + type: typing.Literal["bulletin"] = "bulletin" |
| 38 | + bulletin: PodcastBulletinModeData |
| 39 | + |
| 40 | + if IS_PYDANTIC_V2: |
| 41 | + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 |
| 42 | + else: |
| 43 | + |
| 44 | + class Config: |
| 45 | + frozen = True |
| 46 | + smart_union = True |
| 47 | + extra = pydantic.Extra.allow |
| 48 | + |
| 49 | + |
| 50 | +BodyCreatePodcastV1ProjectsPodcastCreatePostMode = typing_extensions.Annotated[ |
| 51 | + typing.Union[ |
| 52 | + BodyCreatePodcastV1ProjectsPodcastCreatePostMode_Conversation, |
| 53 | + BodyCreatePodcastV1ProjectsPodcastCreatePostMode_Bulletin, |
| 54 | + ], |
| 55 | + UnionMetadata(discriminant="type"), |
| 56 | +] |
0 commit comments