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

from __future__ import annotations
import pydantic
from squadcast_sdk.types import BaseModel
from typing import Any, List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class EntityTypedDict(TypedDict):
    pass


class Entity(BaseModel):
    pass


class V3WorkflowsCreateWorkflowFilterTypedDict(TypedDict):
    type: NotRequired[str]
    key: NotRequired[str]
    value: NotRequired[Any]
    fields: NotRequired[V3WorkflowsCreateWorkflowFilterTypedDict]
    children: NotRequired[List[V3WorkflowsCreateWorkflowFilterTypedDict]]
    label: NotRequired[str]
    entity: NotRequired[EntityTypedDict]
    filter_type: NotRequired[str]


class V3WorkflowsCreateWorkflowFilter(BaseModel):
    type: Optional[str] = None

    key: Optional[str] = None

    value: Optional[Any] = None

    fields: Optional[V3WorkflowsCreateWorkflowFilter] = None

    children: Optional[List[V3WorkflowsCreateWorkflowFilter]] = None

    label: Optional[str] = None

    entity: Optional[Entity] = None

    filter_type: Annotated[Optional[str], pydantic.Field(alias="filterType")] = None
