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

from __future__ import annotations

from typing import Any
from uuid import UUID

from pydantic import AwareDatetime, BaseModel, Field, conint


class DataType(BaseModel):
    property_1: UUID | None = Field(
        None, description='Unique identifier for the installation.'
    )
    property_2: str | None = Field(None, description='Description of the installation.')
    property_3: AwareDatetime | None = Field(
        None, description='Timestamp when the installation was created.'
    )


class Metadata(BaseModel):
    limit: conint(ge=1, le=100) = Field(
        ..., description='Number of data types returned in this response', examples=[20]
    )
    page: conint(ge=1) = Field(
        ..., description='The page number to retrieve', examples=[2]
    )


class CollectionWrapper(BaseModel):
    """
    Generic response wrapper containing a collection of items and pagination metadata.
    """

    data: list[dict[str, Any]] = Field(
        ..., description='Array of items in the collection.'
    )
    pagination: Metadata = Field(
        ..., description='Pagination metadata for the collection.'
    )


class PaginatedDataTypeList(CollectionWrapper):
    data: list[DataType] | None = Field(
        None, description='Array of items in the collection.'
    )
