# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .api_key_response import ApiKeyResponse


class ApiKeyListResponse(UniversalBaseModel):
    """
    Response schema for listing API keys.
    """

    keys: typing.List[ApiKeyResponse] = pydantic.Field()
    """
    List of API keys
    """

    total: int = pydantic.Field()
    """
    Total number of keys
    """

    page: int = pydantic.Field()
    """
    Current page number
    """

    page_size: int = pydantic.Field()
    """
    Number of items per page
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
