"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .ratelimitresponse import RatelimitResponse, RatelimitResponseTypedDict
import pydantic
from typing import Any, Dict, List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
from unkey.py.types import BaseModel


class V2IdentitiesGetIdentityResponseDataTypedDict(TypedDict):
    external_id: str
    r"""The external identifier for this identity in your system. This is the ID you provided during identity creation."""
    meta: NotRequired[Dict[str, Any]]
    r"""Custom metadata associated with this identity. This can include any JSON-serializable data you stored with the identity during creation or updates."""
    ratelimits: NotRequired[List[RatelimitResponseTypedDict]]
    r"""Rate limits associated with this identity. These limits are shared across all API keys linked to this identity, providing consistent rate limiting regardless of which key is used."""


class V2IdentitiesGetIdentityResponseData(BaseModel):
    external_id: Annotated[str, pydantic.Field(alias="externalId")]
    r"""The external identifier for this identity in your system. This is the ID you provided during identity creation."""

    meta: Optional[Dict[str, Any]] = None
    r"""Custom metadata associated with this identity. This can include any JSON-serializable data you stored with the identity during creation or updates."""

    ratelimits: Optional[List[RatelimitResponse]] = None
    r"""Rate limits associated with this identity. These limits are shared across all API keys linked to this identity, providing consistent rate limiting regardless of which key is used."""
