# generated by datamodel-codegen:
#   filename:  https://example.com/refs.yaml
#   timestamp: 2019-07-26T00:00:00+00:00

from __future__ import annotations

from pydantic import AnyUrl, BaseModel, Field, conint


class Problem(BaseModel):
    detail: str | None = Field(
        None,
        description='A human readable explanation specific to this occurrence of the\nproblem. You MUST NOT expose internal information, personal\ndata or implementation details through this field.\n',
        examples=['Request took too long to complete.'],
    )
    instance: AnyUrl | None = Field(
        None,
        description='An absolute URI that identifies the specific occurrence of the problem.\nIt may or may not yield further information if dereferenced.\n',
    )
    status: conint(ge=100, lt=600) | None = Field(
        None,
        description='The HTTP status code generated by the origin server for this occurrence\nof the problem.\n',
        examples=[503],
    )
    title: str | None = Field(
        None,
        description='A short, summary of the problem type. Written in english and readable\nfor engineers (usually not suited for non technical stakeholders and\nnot localized); example: Service Unavailable\n',
    )
    type: AnyUrl | None = Field(
        'about:blank',
        description='An absolute URI that identifies the problem type.  When dereferenced,\nit SHOULD provide human-readable documentation for the problem type\n(e.g., using HTML).\n',
        examples=['https://tools.ietf.org/html/rfc7231#section-6.6.4'],
    )
