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

from __future__ import annotations

from pydantic import AnyUrl, BaseModel, Extra, Field


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

    id: int
    name: str
    tag: str | None = None


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

    __root__: list[Pet]


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

    id: int
    name: str
    tag: str | None = None


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

    __root__: list[User]


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

    __root__: str


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

    __root__: list[str]


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

    code: int
    message: str


class Api(BaseModel):
    class Config:
        extra = Extra.allow

    apiKey: str | None = Field(
        None, description='To be used as a dataset parameter value'
    )
    apiVersionNumber: str | None = Field(
        None, description='To be used as a version parameter value'
    )
    apiUrl: AnyUrl | None = Field(
        None, description="The URL describing the dataset's fields"
    )
    apiDocumentationUrl: AnyUrl | None = Field(
        None, description='A URL to the API console for each API'
    )


class Apis(BaseModel):
    class Config:
        extra = Extra.allow

    __root__: list[Api]


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

    name: str | None = None


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

    event: Event | None = None
