"""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


V3ServicesRoutingRulesExpressionBranchOp = 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",
]


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


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


class V3ServicesRoutingRulesExpressionBranchTypedDict(TypedDict):
    lhs: str
    rhs: V3ServicesRoutingRulesExpressionBranchRHSTypedDict
    op: NotRequired[V3ServicesRoutingRulesExpressionBranchOp]


class V3ServicesRoutingRulesExpressionBranch(BaseModel):
    lhs: str

    rhs: V3ServicesRoutingRulesExpressionBranchRHS

    op: Optional[V3ServicesRoutingRulesExpressionBranchOp] = None
