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

from __future__ import annotations

import typing

from .composable_filter import ComposableFilter  # noqa: E402
from .leaf_filter import LeafFilter


class Filter_Leaf(LeafFilter):
    type: typing.Literal["leaf"] = "leaf"

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True
        populate_by_name = True


class Filter_Nested(ComposableFilter):
    type: typing.Literal["nested"] = "nested"

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True
        populate_by_name = True


Filter = typing.Union[Filter_Leaf, Filter_Nested]

Filter_Nested.update_forward_refs(ComposableFilter=ComposableFilter, Filter=Filter)
