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

from __future__ import annotations
from .v3_services_routingrules_createorupdateroutingrulesrequest import (
    V3ServicesRoutingRulesCreateOrUpdateRoutingRulesRequest,
    V3ServicesRoutingRulesCreateOrUpdateRoutingRulesRequestTypedDict,
)
from .v3_services_routingrules_routingruleresponse import (
    V3ServicesRoutingRulesRoutingRuleResponse,
    V3ServicesRoutingRulesRoutingRuleResponseTypedDict,
)
import pydantic
from squadcast_sdk.types import BaseModel
from squadcast_sdk.utils import FieldMetadata, PathParamMetadata, RequestMetadata
from typing import List
from typing_extensions import Annotated, TypedDict


class RoutingRulesCreateOrUpdateRoutingRulesRequestTypedDict(TypedDict):
    service_id: str
    v3_services_routing_rules_create_or_update_routing_rules_request: (
        V3ServicesRoutingRulesCreateOrUpdateRoutingRulesRequestTypedDict
    )


class RoutingRulesCreateOrUpdateRoutingRulesRequest(BaseModel):
    service_id: Annotated[
        str,
        pydantic.Field(alias="serviceID"),
        FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
    ]

    v3_services_routing_rules_create_or_update_routing_rules_request: Annotated[
        V3ServicesRoutingRulesCreateOrUpdateRoutingRulesRequest,
        FieldMetadata(request=RequestMetadata(media_type="application/json")),
    ]


class RoutingRulesCreateOrUpdateRoutingRulesDataTypedDict(TypedDict):
    rules: List[V3ServicesRoutingRulesRoutingRuleResponseTypedDict]


class RoutingRulesCreateOrUpdateRoutingRulesData(BaseModel):
    rules: List[V3ServicesRoutingRulesRoutingRuleResponse]


class RoutingRulesCreateOrUpdateRoutingRulesResponseTypedDict(TypedDict):
    r"""The request has succeeded and a new resource has been created as a result."""

    data: RoutingRulesCreateOrUpdateRoutingRulesDataTypedDict


class RoutingRulesCreateOrUpdateRoutingRulesResponse(BaseModel):
    r"""The request has succeeded and a new resource has been created as a result."""

    data: RoutingRulesCreateOrUpdateRoutingRulesData
