# generated by datamodel-codegen:
#   filename:  additional_properties_value_constraints_annotated.json

from __future__ import annotations

from typing import Annotated, Any

from pydantic import ConfigDict, Field, constr
from pydantic.dataclasses import dataclass
from typing_extensions import TypeAliasType

NestedMapAdditionalProperty = TypeAliasType(
    "NestedMapAdditionalProperty", Annotated[int, Field(ge=1, le=9)]
)


TitledMapAdditionalProperty = TypeAliasType(
    "TitledMapAdditionalProperty", Annotated[int, Field(ge=1, le=9)]
)


TitledMap = TypeAliasType(
    "TitledMap",
    Annotated[dict[str, TitledMapAdditionalProperty], Field(title='TitledMap')],
)


TitledRefMapAdditionalProperty = TypeAliasType(
    "TitledRefMapAdditionalProperty", Annotated[int, Field(ge=1, le=9)]
)


LocalTitleRefMapAdditionalProperty = TypeAliasType(
    "LocalTitleRefMapAdditionalProperty",
    Annotated[int, Field(ge=1, le=9, title='LocalValue')],
)


NamedMapAdditionalProperty = TypeAliasType(
    "NamedMapAdditionalProperty", Annotated[int, Field(ge=1, le=9)]
)


NullableValueMapAdditionalProperty = TypeAliasType(
    "NullableValueMapAdditionalProperty", Annotated[int | None, Field(ge=1, le=9)]
)


ClosedArrayValueMapAdditionalProperty = TypeAliasType(
    "ClosedArrayValueMapAdditionalProperty", Annotated[list[Any], Field(max_length=0)]
)


AllOfValueMap = TypeAliasType("AllOfValueMap", Annotated[int, Field(ge=1, le=9)])


TitledAllOfValueMap = TypeAliasType(
    "TitledAllOfValueMap", Annotated[int, Field(ge=1, le=9, title='TitledPositiveInt')]
)


NullableAllOfValueMap = TypeAliasType(
    "NullableAllOfValueMap", Annotated[int | None, Field(ge=1, le=9)]
)


UnionValueMap = TypeAliasType("UnionValueMap", Annotated[int, Field(ge=1, le=9)])


UnionValueMap1 = TypeAliasType(
    "UnionValueMap1", Annotated[str, Field(max_length=4, min_length=2)]
)


ObjectValueMapAdditionalProperty = TypeAliasType(
    "ObjectValueMapAdditionalProperty", Annotated[dict[str, str], Field(min_length=1)]
)


@dataclass(config=ConfigDict(extra='forbid'))
class ModeledValueMap:
    value: Annotated[int, Field(ge=1)]


NamedValue = TypeAliasType(
    "NamedValue", Annotated[int, Field(ge=1, le=9, title='NamedValue')]
)


@dataclass
class ModeledIrrelevantConstraintMap:
    value: str


PositiveInt = TypeAliasType("PositiveInt", Annotated[int, Field(ge=1)])


TitledPositiveInt = TypeAliasType(
    "TitledPositiveInt", Annotated[int, Field(ge=1, title='TitledPositiveInt')]
)


LocalValue = TypeAliasType("LocalValue", Annotated[str, Field(title='LocalValue')])


RootMapAdditionalProperty = TypeAliasType(
    "RootMapAdditionalProperty", Annotated[int, Field(ge=1, le=9)]
)


RootMap = TypeAliasType(
    "RootMap",
    Annotated[dict[str, RootMapAdditionalProperty], Field(max_length=2, min_length=1)],
)


@dataclass(config=ConfigDict(extra='allow'))
class Payload:
    existingLocalValue: LocalValue
    nestedMap: dict[str, NestedMapAdditionalProperty]
    titledMap: Annotated[TitledMap, Field(title='TitledMap')]
    titledRefMap: dict[str, TitledRefMapAdditionalProperty]
    localTitleRefMap: dict[str, LocalTitleRefMapAdditionalProperty]
    namedMap: dict[constr(pattern=r'^[a-z]+$'), NamedMapAdditionalProperty]
    rootMap: RootMap
    nullableValueMap: dict[str, NullableValueMapAdditionalProperty]
    closedArrayValueMap: dict[str, ClosedArrayValueMapAdditionalProperty]
    allOfValueMap: dict[str, AllOfValueMap]
    titledAllOfValueMap: dict[str, TitledAllOfValueMap]
    nullableAllOfValueMap: dict[str, NullableAllOfValueMap]
    unionValueMap: dict[str, UnionValueMap | UnionValueMap1]
    objectValueMap: dict[str, ObjectValueMapAdditionalProperty]
    modeledValueMap: dict[str, ModeledValueMap]
    titledValueMap: dict[str, NamedValue]
    modeledIrrelevantConstraintMap: dict[str, ModeledIrrelevantConstraintMap]
    arrayIrrelevantConstraintMap: dict[str, list[int]]
    heterogeneousValueMap: dict[str, int | str]
    booleanIrrelevantConstraintMap: dict[str, bool]
