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

from ..core.pydantic_utilities import UniversalBaseModel
import typing
from .configurable_transformation_names import ConfigurableTransformationNames
import pydantic
from .configured_transformation_item_component import ConfiguredTransformationItemComponent
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class ConfiguredTransformationItem(UniversalBaseModel):
    """
    Configured transformations for pipelines.

    Similar to ConfigurableTransformation but includes a few
    more fields that are useful to the platform.
    """

    id: typing.Optional[str] = None
    configurable_transformation_type: ConfigurableTransformationNames = pydantic.Field()
    """
    Name for the type of transformation this is (e.g. SIMPLE_NODE_PARSER). Can also be an enum instance of llama_index.ingestion.transformations.ConfigurableTransformations. This will be converted to ConfigurableTransformationNames.
    """

    component: ConfiguredTransformationItemComponent = pydantic.Field()
    """
    Component that implements the transformation
    """

    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
