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

from __future__ import annotations
from squadcast_sdk.types import BaseModel
from typing import Literal, Optional, Union
from typing_extensions import NotRequired, TypeAliasType, TypedDict


V3ServicesTaggingRulesExpressionBranchOp = Literal[
    "is",
    "is_not",
    "matches",
    "not_contains",
    "gt",
    "lt",
    "gt_eq",
    "lt_eq",
    "call",
    "field_is",
    "field_is_not",
    "field_gt",
    "field_lt",
    "field_gt_eq",
    "field_lt_eq",
]


V3ServicesTaggingRulesExpressionBranchRHSTypedDict = TypeAliasType(
    "V3ServicesTaggingRulesExpressionBranchRHSTypedDict", Union[str, bool, int, float]
)


V3ServicesTaggingRulesExpressionBranchRHS = TypeAliasType(
    "V3ServicesTaggingRulesExpressionBranchRHS", Union[str, bool, int, float]
)


class V3ServicesTaggingRulesExpressionBranchTypedDict(TypedDict):
    lhs: str
    rhs: V3ServicesTaggingRulesExpressionBranchRHSTypedDict
    op: NotRequired[V3ServicesTaggingRulesExpressionBranchOp]


class V3ServicesTaggingRulesExpressionBranch(BaseModel):
    lhs: str

    rhs: V3ServicesTaggingRulesExpressionBranchRHS

    op: Optional[V3ServicesTaggingRulesExpressionBranchOp] = None
