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

from __future__ import annotations
from .v3_services_taggingrules_expressionbranch import (
    V3ServicesTaggingRulesExpressionBranch,
    V3ServicesTaggingRulesExpressionBranchTypedDict,
)
from .v3_services_taggingrules_tagsobject import (
    V3ServicesTaggingRulesTagsObject,
    V3ServicesTaggingRulesTagsObjectTypedDict,
)
from squadcast_sdk.types import BaseModel
from typing import List, Optional
from typing_extensions import NotRequired, TypedDict


class V3ServicesTaggingRulesTaggingRuleResponseTypedDict(TypedDict):
    expression: NotRequired[str]
    tags: NotRequired[V3ServicesTaggingRulesTagsObjectTypedDict]
    r"""The 'tags' field cannot be empty unless the 'expression' or 'basic_expression' explicitly uses 'addTag' or 'addTags' functions."""
    is_basic: NotRequired[bool]
    basic_expression: NotRequired[List[V3ServicesTaggingRulesExpressionBranchTypedDict]]


class V3ServicesTaggingRulesTaggingRuleResponse(BaseModel):
    expression: Optional[str] = None

    tags: Optional[V3ServicesTaggingRulesTagsObject] = None
    r"""The 'tags' field cannot be empty unless the 'expression' or 'basic_expression' explicitly uses 'addTag' or 'addTags' functions."""

    is_basic: Optional[bool] = None

    basic_expression: Optional[List[V3ServicesTaggingRulesExpressionBranch]] = None
