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

from ..core.pydantic_utilities import UniversalBaseModel
import typing
from .audit_event_data import AuditEventData
import typing_extensions
from ..core.serialization import FieldMetadata
import pydantic
from .request_action_type import RequestActionType
from .audit_event_audit_resource_type import AuditEventAuditResourceType
from .audit_event_http_info import AuditEventHttpInfo
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class V1AuditResponseEventRequest(UniversalBaseModel):
    """
    Contains fields for defining Request Properties.
    """

    data: typing.Optional[AuditEventData] = None
    api_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="apiName")] = pydantic.Field(
        default=None
    )
    """
    API name.
    """

    workspace_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="workspaceID")] = (
        pydantic.Field(default=None)
    )
    """
    The workspaceID (if any) of the request.
    """

    vault_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="vaultID")] = pydantic.Field(
        default=None
    )
    """
    The vaultID (if any) of the request.
    """

    tags: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Tags associated with the event. To provide better search capabilities. Like login.
    """

    timestamp: typing.Optional[str] = pydantic.Field(default=None)
    """
    time when this request is generated, use extention method to set it.
    """

    action_type: typing_extensions.Annotated[typing.Optional[RequestActionType], FieldMetadata(alias="actionType")] = (
        None
    )
    resource_type: typing_extensions.Annotated[
        typing.Optional[AuditEventAuditResourceType], FieldMetadata(alias="resourceType")
    ] = None
    http_info: typing_extensions.Annotated[typing.Optional[AuditEventHttpInfo], FieldMetadata(alias="httpInfo")] = 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
