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

from __future__ import annotations

from typing import Optional, Union

from pydantic import BaseModel


class Foo(BaseModel):
    bar: int
    baz: int
    qux: Optional[int] = None


class Foo1(BaseModel):
    bar: int
    baz: Optional[int] = None
    qux: int


class Model(BaseModel):
    foo: Union[Foo, Foo1]
