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

import typing

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


class AgentApiKeyCreate(UniversalBaseModel):
    """
    Schema for creating a new agent API key.
    """

    name: str
    description: typing.Optional[str] = None
    is_read_only: typing.Optional[bool] = None
    rate_limit_per_minute: typing.Optional[int] = None
    rate_limit_per_hour: typing.Optional[int] = None
    rate_limit_per_day: typing.Optional[int] = None
    auto_renew: typing.Optional[bool] = None
    collection_id: str
    context_cluster_ids: typing.Optional[typing.List[str]] = None
    expires_at: typing.Optional[str] = None

    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
