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

from enum import StrEnum

from pydantic import BaseModel, Field, RootModel, conbytes


class UnionRecord(BaseModel):
    value: str


class UnionEnum(StrEnum):
    A = 'A'
    B = 'B'


class UnionFixed(RootModel[conbytes(min_length=8, max_length=8)]):
    root: conbytes(min_length=8, max_length=8) = Field(..., title='UnionFixed')


class Model(
    RootModel[
        str
        | int
        | UnionRecord
        | UnionEnum
        | UnionFixed
        | list[bytes]
        | dict[str, int]
        | None
    ]
):
    root: (
        str
        | int
        | UnionRecord
        | UnionEnum
        | UnionFixed
        | list[bytes]
        | dict[str, int]
        | None
    ) = Field(..., title='Model')
