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

from __future__ import annotations

from typing import Any

from pydantic import BaseModel, Extra, Field, constr


class Debug(BaseModel):
    file_line: str | None = None
    debug: Any | None = None
    backtrace: list[str] | 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: str | None = None
    version: constr(regex=r'(\d+)\.(\d+)') | None = None
    trace: str | None = None
    oem: str | None = None
    deprecated: bool | None = None
    warning: list[WarningItem] | None = None


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

    message: str
    data: dict[str, Any] | None = None
    code: int
    service: str
    internal_code: str | None = None
    debug:  Debug | None = None
    meta: Meta = Field(..., title='meta_list-2.1')
