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

from ..core.pydantic_utilities import UniversalBaseModel
import typing
from .audit_event_context import AuditEventContext
from .v_1_audit_response_event_request import V1AuditResponseEventRequest
from .v_1_audit_event_response import V1AuditEventResponse
import typing_extensions
from ..core.serialization import FieldMetadata
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class V1AuditResponseEvent(UniversalBaseModel):
    """
    Audit event details.
    """

    context: typing.Optional[AuditEventContext] = None
    request: typing.Optional[V1AuditResponseEventRequest] = None
    response: typing.Optional[V1AuditEventResponse] = None
    parent_account_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="parentAccountID")] = (
        pydantic.Field(default=None)
    )
    """
    Parent account ID of the account that made the request, if any.
    """

    account_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountID")] = pydantic.Field(
        default=None
    )
    """
    ID of the account that made the request.
    """

    resource_i_ds: typing_extensions.Annotated[
        typing.Optional[typing.List[str]], FieldMetadata(alias="resourceIDs")
    ] = pydantic.Field(default=None)
    """
    IDs for resources involved in the event. Presented in `{resourceType}/{resourceID}` format. For example, `VAULT/cd1d815aa09b4cbfbb803bd20349f202`.
    """

    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
