"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .grouppreferencefilterdetailsdto import (
    GroupPreferenceFilterDetailsDto,
    GroupPreferenceFilterDetailsDtoTypedDict,
)
from novu_py.types import BaseModel
import pydantic
from typing import Any, Dict, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class GroupPreferenceFilterDtoTypedDict(TypedDict):
    filter_: GroupPreferenceFilterDetailsDtoTypedDict
    r"""Filter criteria for workflow IDs and tags"""
    enabled: NotRequired[bool]
    r"""Whether the preference is enabled. Used when condition is not provided."""
    condition: NotRequired[Dict[str, Any]]
    r"""Optional condition using JSON Logic rules"""


class GroupPreferenceFilterDto(BaseModel):
    filter_: Annotated[GroupPreferenceFilterDetailsDto, pydantic.Field(alias="filter")]
    r"""Filter criteria for workflow IDs and tags"""

    enabled: Optional[bool] = None
    r"""Whether the preference is enabled. Used when condition is not provided."""

    condition: Optional[Dict[str, Any]] = None
    r"""Optional condition using JSON Logic rules"""
