# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List

from ..._models import BaseModel
from ..users.subscription import Subscription

__all__ = ["BulkOperationResponse", "Failed"]


class Failed(BaseModel):
    """Details of a failed bulk operation item"""

    external_id: str
    """The external ID that failed"""

    reason: str
    """Human-readable error reason"""


class BulkOperationResponse(BaseModel):
    """Response for bulk operations showing successful and failed items"""

    failed: List[Failed]
    """Failed operations with error details"""

    successful: List[Subscription]
    """Successfully processed subscriptions"""
