# generated by datamodel-codegen:
#   filename:  discriminator_in_array_underscore.yaml
#   timestamp: 2023-07-27T00:00:00+00:00

from __future__ import annotations

from enum import Enum
from typing import Annotated, Literal

from pydantic import BaseModel, Field


class AttrType(Enum):
    string_val = 'string_val'


class StringAttr(BaseModel):
    attr_type: Literal['string_val']
    value: str


class AttrType1(Enum):
    number_val = 'number_val'


class NumberAttr(BaseModel):
    attr_type: Literal['number_val']
    value: float


class Container(BaseModel):
    attributes: list[
        Annotated[StringAttr | NumberAttr, Field(discriminator='attr_type')]
    ]
