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

from ..core.pydantic_utilities import UniversalBaseModel
import pydantic
import typing
from .configurable_transformation_names import ConfigurableTransformationNames
from .transformation_category_names import TransformationCategoryNames
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class ConfigurableTransformationDefinition(UniversalBaseModel):
    """
    Schema for a transformation definition.
    """

    label: str = pydantic.Field()
    """
    The label field will be used to display the name of the component in the UI
    """

    json_schema: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field()
    """
    The json_schema field can be used by clients to determine how to construct the component
    """

    configurable_transformation_type: ConfigurableTransformationNames = pydantic.Field()
    """
    The name field will act as the unique identifier of TransformationDefinition objects
    """

    transformation_category: TransformationCategoryNames = pydantic.Field()
    """
    The transformation_category field will be used to group transformations in the UI
    """

    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
