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

from ...core.pydantic_utilities import UniversalBaseModel
import typing
import pydantic
from .token_generation_invoice_options import TokenGenerationInvoiceOptions
from .token_generation_pages_options import TokenGenerationPagesOptions
from .token_generation_style_options import TokenGenerationStyleOptions
from .token_generation_vendor_options import TokenGenerationVendorOptions
from .token_generation_entity_options import TokenGenerationEntityOptions
from ...core.pydantic_utilities import IS_PYDANTIC_V2


class TokenGenerationOptions(UniversalBaseModel):
    expires_in: typing.Optional[str] = pydantic.Field(alias="expiresIn", default=None)
    """
    Expressed in seconds or a string describing a time span. The default is 1h.
    """

    invoice: typing.Optional[TokenGenerationInvoiceOptions] = None
    pages: typing.Optional[TokenGenerationPagesOptions] = None
    style: typing.Optional[TokenGenerationStyleOptions] = None
    vendors: typing.Optional[TokenGenerationVendorOptions] = None
    entity: typing.Optional[TokenGenerationEntityOptions] = 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
