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

from __future__ import annotations

from typing import List, Optional

from pydantic import AnyUrl, BaseModel, Field


class Pet(BaseModel):
    id: Optional[int] = 1
    name: Optional[str] = None
    tag: Optional[str] = None


class Pets(BaseModel):
    __root__: Optional[List[Pet]] = None


class User(BaseModel):
    id: Optional[int] = None
    name: Optional[str] = None
    tag: Optional[str] = None


class Users(BaseModel):
    __root__: Optional[List[User]] = None


class Id(BaseModel):
    __root__: Optional[str] = None


class Rules(BaseModel):
    __root__: Optional[List[str]] = None


class Error(BaseModel):
    code: Optional[int] = None
    message: Optional[str] = None


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


class Apis(BaseModel):
    __root__: Optional[List[Api]] = None


class Event(BaseModel):
    name: Optional[str] = None


class Result(BaseModel):
    event: Optional[Event] = None
