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

from __future__ import annotations

from typing import Annotated, ClassVar, Literal, Optional, Union

from msgspec import Meta, Struct


class Type1(Struct, tag_field='type_', tag='a'):
    type_: ClassVar[Annotated[Literal['a'], Meta(title='Type ')]] = 'a'


class Type2(Struct, tag_field='type_', tag='b'):
    type_: ClassVar[Annotated[Literal['b'], Meta(title='Type ')]] = 'b'
    ref_type: Optional[Annotated[Type1, Meta(description='A referenced type.')]] = None


class Type4(Struct, tag_field='type_', tag='d'):
    type_: ClassVar[Annotated[Literal['d'], Meta(title='Type ')]] = 'd'


class Type5(Struct, tag_field='type_', tag='e'):
    type_: ClassVar[Annotated[Literal['e'], Meta(title='Type ')]] = 'e'


class Type3(Struct, tag_field='type_', tag='c'):
    type_: ClassVar[Annotated[Literal['c'], Meta(title='Type ')]] = 'c'


class Response(Struct):
    inner: Annotated[Union[Type1, Type2, Type3, Type4, Type5], Meta(title='Inner')]
