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

from __future__ import annotations

from pydantic import BaseModel, Extra, Field


class MySchema1(BaseModel):
    class Config:
        extra = Extra.allow

    AddressLine1: str
    AddressLine2: str | None = None
    City: str | None = None
    State: str | None = None
    ZipCode: str


class MySchema2(BaseModel):
    class Config:
        extra = Extra.allow

    AddressLine1: str
    AddressLine2: str | None = None
    City: str | None = None
    County: str | None = None
    PostCode: str


class US(BaseModel):
    County: str | None = None
    PostCode: str


class MySchema3(US):
    class Config:
        extra = Extra.allow

    AddressLine1: str
    AddressLine2: str | None = None
    City: str | None = None


class MySchema(BaseModel):
    class Config:
        extra = Extra.allow

    __root__: MySchema1 | MySchema2 | MySchema3 = Field(..., title='My schema')
