# 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
from .contributor import Contributor
from .direct_publishing_read_response_model_display_mode import DirectPublishingReadResponseModelDisplayMode
from .direct_publishing_read_response_model_genre_item import DirectPublishingReadResponseModelGenreItem
from .direct_publishing_read_response_model_payout_type import DirectPublishingReadResponseModelPayoutType
from .direct_publishing_read_response_model_target_audience import DirectPublishingReadResponseModelTargetAudience
from .preview_audio_db_model import PreviewAudioDbModel
from .read_legal_terms import ReadLegalTerms
from .read_metadata_chapter_db_model import ReadMetadataChapterDbModel
from .review_response_model import ReviewResponseModel
from .sample_config_db_model import SampleConfigDbModel


class DirectPublishingReadResponseModel(UncheckedBaseModel):
    read_id: str
    created_at_unix: int
    updated_at_unix: int
    word_count: int
    char_count: int
    chapters: typing.List[ReadMetadataChapterDbModel]
    title: typing.Optional[str] = None
    author: typing.Optional[str] = None
    description: typing.Optional[str] = None
    article_image_url: typing.Optional[str] = None
    language: typing.Optional[str] = None
    locale: typing.Optional[str] = None
    display_mode: typing.Optional[DirectPublishingReadResponseModelDisplayMode] = None
    genre: typing.Optional[typing.List[DirectPublishingReadResponseModelGenreItem]] = None
    fiction: typing.Optional[str] = None
    content_type: typing.Optional[str] = None
    original_file_type: typing.Optional[str] = None
    target_audience: typing.Optional[DirectPublishingReadResponseModelTargetAudience] = None
    mature_content: typing.Optional[bool] = None
    safesearch_adult: typing.Optional[bool] = None
    origin: typing.Optional[str] = None
    publication_date: typing.Optional[str] = None
    isbn: typing.Optional[str] = None
    ean: typing.Optional[str] = None
    legal_terms: typing.Optional[ReadLegalTerms] = None
    content_guidelines_terms: typing.Optional[ReadLegalTerms] = None
    last_updated_from_project_unix: typing.Optional[int] = None
    publishing_project_id: typing.Optional[str] = None
    publishing_state: typing.Optional[str] = None
    publisher_profile_id: typing.Optional[str] = None
    quality_score: typing.Optional[int] = None
    publisher: typing.Optional[str] = None
    copyright: typing.Optional[str] = None
    subtitle: typing.Optional[str] = None
    distribution_territories: typing.Optional[typing.List[str]] = None
    edition: typing.Optional[str] = None
    contributors: typing.Optional[typing.List[Contributor]] = None
    payout_type: typing.Optional[DirectPublishingReadResponseModelPayoutType] = None
    list_price: typing.Optional[float] = None
    currency: typing.Optional[typing.Literal["usd"]] = None
    original_audio_project_export_id: typing.Optional[str] = None
    original_audio_document_id: typing.Optional[str] = None
    series_id: typing.Optional[str] = None
    volume: typing.Optional[int] = None
    published_at_unix: typing.Optional[int] = None
    read_slug: typing.Optional[str] = None
    preview_audio_object: typing.Optional[PreviewAudioDbModel] = None
    sample_config: typing.Optional[SampleConfigDbModel] = None
    review: typing.Optional[ReviewResponseModel] = None
    voice_id: typing.Optional[str] = None
    can_use_assistant: typing.Optional[bool] = None
    is_voice_changer_on: 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
