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

import typing

import pydantic
from ..core.unchecked_base_model import UncheckedBaseModel
from .filters_event_type import FiltersEventType
from .filters_resource_type import FiltersResourceType


class Filters(UncheckedBaseModel):
    """
    Audit logs search filter parameters
    """

    event_type: typing.Optional[FiltersEventType] = pydantic.Field(default=None)
    """
    Filter by event type
    """

    from_date: typing.Optional[str] = pydantic.Field(default=None)
    """
    Start date for search, Format: ISO8601 extended [YYYY-MM-DD]
    """

    ip_address: typing.Optional[str] = pydantic.Field(default=None)
    """
    Filter by IP address. This supports both IPv4 (1.1.1.1) and IPv6 (2001:db8:3333:4444:5555:6666:7777:8888)
    """

    project_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Filter by Project ID (UUID)
    """

    resource_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Filter by Resource ID (UUID)
    """

    resource_type: typing.Optional[FiltersResourceType] = pydantic.Field(default=None)
    """
    Filter by resource type
    """

    to_date: typing.Optional[str] = pydantic.Field(default=None)
    """
    End date for search, Format: ISO8601 extended [YYYY-MM-DD]
    """

    user_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Filter by User ID (UUID)
    """

    workspace_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Filter by Workspace ID (UUID)
    """

    model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)
