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

from __future__ import annotations

from pydantic import BaseModel, ConfigDict, Field, RootModel


class MySchema1(BaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    AddressLine1: str
    AddressLine2: str | None = None
    City: str | None = None
    State: str | None = None
    ZipCode: str


class MySchema2(BaseModel):
    model_config = ConfigDict(
        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):
    model_config = ConfigDict(
        extra='allow',
    )
    AddressLine1: str
    AddressLine2: str | None = None
    City: str | None = None


class MySchema(RootModel[MySchema1 | MySchema2 | MySchema3]):
    root: MySchema1 | MySchema2 | MySchema3 = Field(..., title='My schema')
