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

from .precondition_base import PreconditionBase
import typing_extensions
import typing
from ...core.serialization import FieldMetadata
from .response_length import ResponseLength
from ...core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class ResponseConfigPrecondition(PreconditionBase):
    use_markdown: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="useMarkdown")] = None
    use_forms: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="useForms")] = None
    use_images: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="useImages")] = None
    is_copilot: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isCopilot")] = None
    response_length: typing_extensions.Annotated[
        typing.Optional[ResponseLength], FieldMetadata(alias="responseLength")
    ] = 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
