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

from __future__ import annotations

from enum import Enum
from typing import Any, Dict, List, Optional, Union

from pydantic import BaseModel, conint


class BaseRef(BaseModel):
    id: Optional[int] = None


class StatusEnum(Enum):
    active = 'active'
    inactive = 'inactive'


class SingleAllofPrimitive(BaseModel):
    pass


class AllofNestedAnyof(BaseModel):
    pass


class AllofConstraintOnly(BaseModel):
    pass


class AllofMaxConstraints(BaseModel):
    pass


class AllofUniqueItems(BaseModel):
    pass


class ObjectWithoutAdditional(BaseModel):
    nested: Optional[str] = None


class MultipleAdditionalProps(BaseModel):
    pass


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


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


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


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


class ProjectedEdgeCases(BaseModel):
    single_allof_primitive: Optional[SingleAllofPrimitive] = None
    single_allof_ref: Optional[BaseRef] = None
    allof_with_enum: Optional[StatusEnum] = None
    allof_nested_anyof: Optional[AllofNestedAnyof] = None
    allof_constraint_only: Optional[AllofConstraintOnly] = None
    allof_max_constraints: Optional[AllofMaxConstraints] = None
    allof_unique_items: Optional[AllofUniqueItems] = None
    object_without_additional: Optional[ObjectWithoutAdditional] = None
    object_only_type: Optional[Dict[str, Any]] = None
    multiple_additional_props: Optional[MultipleAdditionalProps] = None
    depth_limit_test: Optional[DepthLimitTest] = None
    cycle_detection: Optional[BaseRef] = None
    type_list_field: Optional[Union[str, int]] = None
    allof_multiple_refs_only: Optional[BaseRef] = None


class EdgeCases(ProjectedEdgeCases):
    extra: Optional[str] = None
    single_allof_primitive: str
    single_allof_ref: BaseRef
    allof_with_enum: StatusEnum
    allof_nested_anyof: Union[str, int]
    allof_constraint_only: Any
    allof_max_constraints: conint(le=50)
    allof_unique_items: List[str]
    object_without_additional: Dict[str, Any]
    object_only_type: Dict[str, Any]
    multiple_additional_props: Dict[str, BaseRef]
    depth_limit_test: Dict[str, Any]
    cycle_detection: BaseRef
    type_list_field: Union[str, int]
    allof_multiple_refs_only: BaseRef
