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

from __future__ import annotations
from .v3_services_deduplicationrules_creatededuplicationrulesrequest import (
    V3ServicesDeduplicationRulesCreateDeduplicationRulesRequest,
    V3ServicesDeduplicationRulesCreateDeduplicationRulesRequestTypedDict,
)
from .v3_services_deduplicationrules_deduplicationruleresponse import (
    V3ServicesDeduplicationRulesDeduplicationRuleResponse,
    V3ServicesDeduplicationRulesDeduplicationRuleResponseTypedDict,
)
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 DeduplicationRulesCreateOrUpdateDeduplicationRulesRequestTypedDict(TypedDict):
    service_id: str
    v3_services_deduplication_rules_create_deduplication_rules_request: (
        V3ServicesDeduplicationRulesCreateDeduplicationRulesRequestTypedDict
    )


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

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


class DeduplicationRulesCreateOrUpdateDeduplicationRulesDataTypedDict(TypedDict):
    rules: List[V3ServicesDeduplicationRulesDeduplicationRuleResponseTypedDict]


class DeduplicationRulesCreateOrUpdateDeduplicationRulesData(BaseModel):
    rules: List[V3ServicesDeduplicationRulesDeduplicationRuleResponse]


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

    data: DeduplicationRulesCreateOrUpdateDeduplicationRulesDataTypedDict


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

    data: DeduplicationRulesCreateOrUpdateDeduplicationRulesData
