# generated by datamodel-codegen:
#   filename:  <stdin>
#   timestamp: 2023-02-17T08:31:48+00:00

from __future__ import annotations

from enum import Enum
from typing import Any
from typing import Literal

from pydantic import BaseModel, Extra, Field, conint


class WappstoVersion(Enum):
    V2_0 = "2.0"
    V2_1 = "2.1"


class ChildItem(BaseModel):
    type: str | None = None
    version: WappstoVersion | None = None


class WarningItem(BaseModel):
    message: str | None = None
    data: dict[str, Any] | None = None
    code: int | None = None


class Meta(BaseModel):
    class Config:
        extra = Extra.forbid

    type:  Literal['idlist']
    version: WappstoVersion | None = None

    trace: str | None = None
    oem: str | None = None
    deprecated: bool | None = None
    warning: list[WarningItem] | None = None


class Idlist(BaseModel):
    class Config:
        extra = Extra.forbid

    id: list[str]
    more: bool
    limit: conint(ge=1, multiple_of=1)
    count: conint(ge=0, multiple_of=1)
    data: dict[str, Any] | None = None
    child: list[ChildItem]
    meta: Meta = Field(..., title='meta_list-2.1')
