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

from __future__ import (
    annotations,
)

from pydantic import (
    AnyUrl,
    BaseModel,
    Field,
    RootModel,
)


class Pet(BaseModel):
    id: int
    name: str
    tag: str | None


class Pets(
    RootModel[list[Pet]]
):
    root: list[Pet]


class User(BaseModel):
    id: int
    name: str
    tag: str | None


class Users(
    RootModel[list[User]]
):
    root: list[User]


class Id(RootModel[str]):
    root: str


class Rules(
    RootModel[list[str]]
):
    root: list[str]


class Error(BaseModel):
    code: int
    message: str


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


class Apis(
    RootModel[list[Api]]
):
    root: list[Api]


class Event(BaseModel):
    name: str | None


class Result(BaseModel):
    event: Event | None
