# 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
from ..core.serialization import FieldMetadata
from ..core.unchecked_base_model import UncheckedBaseModel
from .edit_schema_generation_mapping_match import EditSchemaGenerationMappingMatch


class EditSchemaGenerationMappingResult(UncheckedBaseModel):
    """
    Mapping information between an input schema and the detected form fields.
    """

    matches: typing.List[EditSchemaGenerationMappingMatch] = pydantic.Field()
    """
    Fields from the input schema that were successfully mapped to detected form fields.
    """

    unmatched_input_paths: typing_extensions.Annotated[typing.List[str], FieldMetadata(alias="unmatchedInputPaths")] = (
        pydantic.Field(alias="unmatchedInputPaths")
    )
    """
    Input schema field paths that could not be matched to the form.
    """

    unused_form_field_keys: typing_extensions.Annotated[
        typing.List[str], FieldMetadata(alias="unusedFormFieldKeys")
    ] = pydantic.Field(alias="unusedFormFieldKeys")
    """
    Detected form field keys that were not used by the input schema mapping.
    """

    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
