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

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .file_content import FileContent


class PagelinkSetting(UniversalBaseModel):
    color: typing.Optional[str] = pydantic.Field(default=None)
    """
    An HTML color code in format #RRGGBB
    """

    custom_css_url: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="customCssUrl"),
        pydantic.Field(
            alias="customCssUrl", description="Complete URL to a custom CSS file to be loaded with the page"
        ),
    ] = None
    language: typing.Optional[str] = pydantic.Field(default=None)
    """
    Two-letter code following ISO 639-1
    """

    page_logo: typing_extensions.Annotated[
        typing.Optional[FileContent],
        FieldMetadata(alias="pageLogo"),
        pydantic.Field(alias="pageLogo", description="Object containing logo file to upload/ use in page"),
    ] = None
    redirect_after_approve: typing_extensions.Annotated[
        typing.Optional[bool],
        FieldMetadata(alias="redirectAfterApprove"),
        pydantic.Field(
            alias="redirectAfterApprove",
            description="Flag indicating if the capability for redirection in the page will be activated",
        ),
    ] = None
    redirect_after_approve_url: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="redirectAfterApproveUrl"),
        pydantic.Field(
            alias="redirectAfterApproveUrl",
            description="Complete URL where the page will be redirected after completion",
        ),
    ] = 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
