# 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, Dict, List, Optional, Union

from pydantic import BaseModel, conint


class ConstraintOnlyBase(BaseModel):
    field_with_constraints: Optional[Any] = None


class MultipleField(BaseModel):
    pass


class MultipleOfBase(BaseModel):
    multiple_field: Optional[MultipleField] = None


class SimpleString(BaseModel):
    __root__: str


class NestedAnyOfWithRef(BaseModel):
    nested_anyof: Optional[Union[SimpleString, int]] = None


class L4(BaseModel):
    l5: Optional[str] = None


class L3(BaseModel):
    l4: Optional[L4] = None


class L2(BaseModel):
    l3: Optional[L3] = None


class L1(BaseModel):
    l2: Optional[L2] = None


class DeepArrayItem(BaseModel):
    l1: Optional[L1] = None


class DeepNestedArray(BaseModel):
    deep_array: Optional[List[DeepArrayItem]] = None


class OneOfBase(BaseModel):
    oneof_field: Optional[Union[str, int]] = None


class SingleOneOf(BaseModel):
    single_oneof: Optional[str] = None


class L31(BaseModel):
    l4: Optional[str] = None


class L21(BaseModel):
    l3: Optional[L31] = None


class L11(BaseModel):
    l2: Optional[L21] = None


class DeepDict(BaseModel):
    l1: Optional[L11] = None


class AdditionalPropsDeep(BaseModel):
    deep_dict: Optional[Dict[str, DeepDict]] = None


class ObjectAllof(BaseModel):
    a: Optional[str] = None
    b: Optional[int] = None


class ObjectOnlyAllOf(BaseModel):
    object_allof: Optional[ObjectAllof] = None


class LargeUnion(BaseModel):
    large_union: Optional[Union[str, int, bool, float, List[str], Dict[str, Any]]] = (
        None
    )


class BaseWithNoProperties(BaseModel):
    pass


class BaseWithBooleanProperty(BaseModel):
    bool_prop: Optional[bool] = None


class ChildOfNoProps(BaseWithNoProperties):
    extra: Optional[str] = None
    some_field: Any


class NestedAllOfRef(BaseModel):
    nested_allof_ref: Optional[SimpleString] = None


class NestedIndirect1(BaseModel):
    pass


class NestedIndirect2(NestedIndirect1):
    pass


class NestedIndirect(BaseModel):
    __root__: NestedIndirect2


class NestedAllOfWithoutDirectRef(BaseModel):
    nested_indirect: Optional[NestedIndirect] = None


class EnumField(BaseModel):
    pass


class EnumInAllOf(BaseModel):
    enum_field: Optional[EnumField] = None


class RefWithPrimitiveBase(BaseModel):
    ref_and_primitive: Optional[SimpleString] = None


class EdgeCasesCoverage(
    ConstraintOnlyBase,
    MultipleOfBase,
    RefWithPrimitiveBase,
    NestedAnyOfWithRef,
    DeepNestedArray,
    OneOfBase,
    SingleOneOf,
    AdditionalPropsDeep,
    ObjectOnlyAllOf,
    LargeUnion,
    NestedAllOfRef,
    NestedAllOfWithoutDirectRef,
    EnumInAllOf,
):
    local_field: Optional[str] = None
    field_with_constraints: Any
    multiple_field: conint(multiple_of=5)
    ref_and_primitive: SimpleString
    nested_anyof: Union[SimpleString, int]
    deep_array: List[Dict[str, Any]]
    oneof_field: Union[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
