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

import datetime as dt
import typing

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


class CreateKeyV1Response(UniversalBaseModel):
    """
    API key created
    """

    api_key_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The unique identifier of the API key
    """

    key: typing.Optional[str] = pydantic.Field(default=None)
    """
    The API key
    """

    comment: typing.Optional[str] = pydantic.Field(default=None)
    """
    A comment for the API key
    """

    scopes: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    The scopes for the API key
    """

    tags: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    The tags for the API key
    """

    expiration_date: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    The expiration date of the API key
    """

    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
