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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .rule_list_paginated_response_filters_value import RuleListPaginatedResponseFiltersValue
from .rule_list_response import RuleListResponse


class RuleListPaginatedResponse(UniversalBaseModel):
    """
    Schema for paginated rule list.
    """

    rules: typing.List[RuleListResponse] = pydantic.Field()
    """
    List of rules
    """

    total: int = pydantic.Field()
    """
    Total number of rules
    """

    skip: int = pydantic.Field()
    """
    Number of rules skipped
    """

    limit: int = pydantic.Field()
    """
    Maximum number of rules returned
    """

    filters: typing.Optional[typing.Dict[str, typing.Optional[RuleListPaginatedResponseFiltersValue]]] = pydantic.Field(
        default=None
    )
    """
    Applied filters
    """

    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
