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

from ..core.pydantic_utilities import UniversalBaseModel
import typing
import datetime as dt
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class ApiKeyRequestResponseData(UniversalBaseModel):
    """
    The returned resource
    """

    api_key_id: str
    ended_at: typing.Optional[dt.datetime] = None
    environment_id: typing.Optional[str] = None
    id: str
    method: str
    req_body: typing.Optional[str] = None
    request_type: typing.Optional[str] = None
    resource_id: typing.Optional[int] = None
    resource_id_string: typing.Optional[str] = None
    resource_name: typing.Optional[str] = None
    resource_type: typing.Optional[str] = None
    resp_body: typing.Optional[str] = None
    resp_code: typing.Optional[int] = None
    secondary_resource: typing.Optional[str] = None
    started_at: dt.datetime
    url: str
    user_agent: typing.Optional[str] = None
    user_id: typing.Optional[str] = None
    user_name: 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
