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

from __future__ import annotations

from typing import Dict, List, Optional

from pydantic import BaseModel, Extra, Field


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

    id: int
    name: str
    tag: Optional[str] = None


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

    __root__: List[Pet]


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

    id: int
    name: str
    tag: Optional[str] = None


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

    __root__: List[User]


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

    __root__: str


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

    __root__: List[str]


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

    code: int
    message: str


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

    name: Optional[str] = None


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

    event: Optional[Event] = None


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

    foo: Optional[str] = None
    bar: Optional[int] = None


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

    broken: Optional[Dict[str, List[Broken]]] = None


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

    task_id: Optional[str] = Field(None, title='task id')
    tags: Dict[str, List[str]] = Field(
        ..., title='Dict of tags, each containing a list of file names'
    )


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

    broken: Optional[Dict[str, Broken]] = None
    failing: Optional[Dict[str, str]] = {}
