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

from __future__ import annotations

from enum import StrEnum

from pydantic import BaseModel, Field, RootModel, conbytes


class Foo(BaseModel):
    label: str


class Kind(StrEnum):
    A = 'A'
    B = 'B'
    C = 'C'


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


class Node(BaseModel):
    label: str
    children: list[Node]


class Interop(BaseModel):
    intField: int
    longField: int
    stringField: str
    boolField: bool
    floatField: float
    doubleField: float
    bytesField: bytes
    nullField: None
    arrayField: list[float]
    mapField: dict[str, Foo]
    unionField: bool | float | list[bytes]
    enumField: Kind
    fixedField: MD5
    recordField: Node


Node.model_rebuild()
