# 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 | None = 1
    name: str | None = None
    tag: str | None = None


class Pets(RootModel[list[Pet] | None]):
    root: list[Pet] | None = None


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


class Users(RootModel[list[User] | None]):
    root: list[User] | None = None


class Id(RootModel[str | None]):
    root: str | None = None


class Rules(RootModel[list[str] | None]):
    root: list[str] | None = None


class Error(BaseModel):
    code: int | None = None
    message: str | None = None


class Api(BaseModel):
    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(RootModel[list[Api] | None]):
    root: list[Api] | None = None


class Event(BaseModel):
    name: str | None = None


class Result(BaseModel):
    event: Event | None = None
