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

from __future__ import annotations

from typing import Optional, Union

from pydantic import BaseModel


class External(BaseModel):
    name: Optional[str] = None


class Config(BaseModel):
    value: Optional[int] = None


class TopLevelMultiType1(BaseModel):
    enabled: Optional[bool] = None


class TopLevelMultiType(BaseModel):
    __root__: Union[TopLevelMultiType1, bool]


class Model(BaseModel):
    external: Optional[Union[External, bool]] = None
    config: Optional[Union[Optional[Config], str]] = None
    top_level_ref: Optional[TopLevelMultiType] = None
