# 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 ChangeLogRequest(UniversalBaseModel):
    """
    Schema for requesting change logs with pagination and filtering.
    """

    skip: typing.Optional[int] = pydantic.Field(default=None)
    """
    Number of records to skip
    """

    take: typing.Optional[int] = pydantic.Field(default=None)
    """
    Number of records to return (max 100)
    """

    start_date: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Filter logs from this date
    """

    end_date: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Filter logs until this date
    """

    resource_type: typing.Optional[str] = pydantic.Field(default=None)
    """
    Filter by resource type (e.g., 'organization_user', 'assistant', 'rule', 'document')
    """

    action: typing.Optional[str] = pydantic.Field(default=None)
    """
    Filter by action (e.g., 'created', 'updated', 'deleted', 'added', 'removed')
    """

    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
