# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class ReportChunkBatchResponse(UniversalBaseModel):
    url: typing.Optional[str] = pydantic.Field(default=None)
    """
    The URL for accessing your asset. The platform returns this field only when all chunks are reported and the upload is complete. If absent, continue uploading and reporting the remaining chunks.
    """

    asset_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The unique identifier of this asset.
    """

    processed_chunks: typing.Optional[int] = pydantic.Field(default=None)
    """
    The number of chunks accepted from this specific request. This equals the number of chunks in your `completed_chunks` array minus any duplicates.
    """

    duplicate_chunks: typing.Optional[int] = pydantic.Field(default=None)
    """
    The number of chunks in this request that were already reported. Duplicates are ignored and don't affect your upload.
    """

    total_completed: typing.Optional[int] = pydantic.Field(default=None)
    """
    The cumulative count of all unique chunks successfully reported across all requests. When this equals `total_chunks`, the upload is complete.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
