# generated by datamodel-codegen:
#   filename:  allof_with_required_inherited_coverage.yaml
#   timestamp: 2019-07-26T00:00:00+00:00

from __future__ import annotations

from typing import Any

from pydantic import BaseModel, RootModel, conint


class ConstraintOnlyBase(BaseModel):
    field_with_constraints: Any | None = None


class MultipleField(BaseModel):
    pass


class MultipleOfBase(BaseModel):
    multiple_field: MultipleField | None = None


class SimpleString(RootModel[str]):
    root: str


class NestedAnyOfWithRef(BaseModel):
    nested_anyof: SimpleString | int | None = None


class L4(BaseModel):
    l5: str | None = None


class L3(BaseModel):
    l4: L4 | None = None


class L2(BaseModel):
    l3: L3 | None = None


class L1(BaseModel):
    l2: L2 | None = None


class DeepArrayItem(BaseModel):
    l1: L1 | None = None


class DeepNestedArray(BaseModel):
    deep_array: list[DeepArrayItem] | None = None


class OneOfBase(BaseModel):
    oneof_field: str | int | None = None


class SingleOneOf(BaseModel):
    single_oneof: str | None = None


class L31(BaseModel):
    l4: str | None = None


class L21(BaseModel):
    l3: L31 | None = None


class L11(BaseModel):
    l2: L21 | None = None


class DeepDict(BaseModel):
    l1: L11 | None = None


class AdditionalPropsDeep(BaseModel):
    deep_dict: dict[str, DeepDict] | None = None


class ObjectAllof(BaseModel):
    a: str | None = None
    b: int | None = None


class ObjectOnlyAllOf(BaseModel):
    object_allof: ObjectAllof | None = None


class LargeUnion(BaseModel):
    large_union: str | int | bool | float | list[str] | dict[str, Any] | None = None


class BaseWithNoProperties(BaseModel):
    pass


class BaseWithBooleanProperty(BaseModel):
    bool_prop: bool | None = None


class ChildOfNoProps(BaseWithNoProperties):
    extra: str | None = None
    some_field: Any


class NestedAllOfRef(BaseModel):
    nested_allof_ref: SimpleString | None = None


class NestedIndirect1(BaseModel):
    pass


class NestedIndirect2(NestedIndirect1):
    pass


class NestedIndirect(RootModel[NestedIndirect2]):
    root: NestedIndirect2


class NestedAllOfWithoutDirectRef(BaseModel):
    nested_indirect: NestedIndirect | None = None


class EnumField(BaseModel):
    pass


class EnumInAllOf(BaseModel):
    enum_field: EnumField | None = None


class RefWithPrimitiveBase(BaseModel):
    ref_and_primitive: SimpleString | None = None


class EdgeCasesCoverage(
    ConstraintOnlyBase,
    MultipleOfBase,
    RefWithPrimitiveBase,
    NestedAnyOfWithRef,
    DeepNestedArray,
    OneOfBase,
    SingleOneOf,
    AdditionalPropsDeep,
    ObjectOnlyAllOf,
    LargeUnion,
    NestedAllOfRef,
    NestedAllOfWithoutDirectRef,
    EnumInAllOf,
):
    local_field: str | None = None
    field_with_constraints: Any
    multiple_field: conint(multiple_of=5)
    ref_and_primitive: SimpleString
    nested_anyof: SimpleString | int
    deep_array: list[dict[str, Any]]
    oneof_field: str | int
    single_oneof: str
    deep_dict: dict[str, dict[str, Any]]
    object_allof: dict[str, Any]
    large_union: Any
    nested_allof_ref: SimpleString
    nested_indirect: Any
    enum_field: Any
