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

from __future__ import annotations
from .failedworkflowdto import FailedWorkflowDto, FailedWorkflowDtoTypedDict
from .resourcetypeenum import ResourceTypeEnum
from .skippedworkflowdto import SkippedWorkflowDto, SkippedWorkflowDtoTypedDict
from .syncedworkflowdto import SyncedWorkflowDto, SyncedWorkflowDtoTypedDict
from novu_py.types import BaseModel
import pydantic
from typing import List
from typing_extensions import Annotated, TypedDict


class SyncResultDtoTypedDict(TypedDict):
    resource_type: ResourceTypeEnum
    r"""Type of the layout"""
    successful: List[SyncedWorkflowDtoTypedDict]
    r"""Successfully synced resources"""
    failed: List[FailedWorkflowDtoTypedDict]
    r"""Failed resource syncs"""
    skipped: List[SkippedWorkflowDtoTypedDict]
    r"""Skipped resources"""
    total_processed: float
    r"""Total number of resources processed"""


class SyncResultDto(BaseModel):
    resource_type: Annotated[ResourceTypeEnum, pydantic.Field(alias="resourceType")]
    r"""Type of the layout"""

    successful: List[SyncedWorkflowDto]
    r"""Successfully synced resources"""

    failed: List[FailedWorkflowDto]
    r"""Failed resource syncs"""

    skipped: List[SkippedWorkflowDto]
    r"""Skipped resources"""

    total_processed: Annotated[float, pydantic.Field(alias="totalProcessed")]
    r"""Total number of resources processed"""


try:
    SyncResultDto.model_rebuild()
except NameError:
    pass
