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

import typing

import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ...types.catalog_bulk_error_item import CatalogBulkErrorItem
from ...types.catalog_bulk_skipped_item import CatalogBulkSkippedItem
from ...types.catalog_price_item import CatalogPriceItem


class PostCatalogPricesBulkResponse(UniversalBaseModel):
    """
    Response for bulk price creation. Prices with existing reference_ids are silently skipped.
    """

    created_count: int = pydantic.Field()
    """
    Number of prices created
    """

    skipped_count: int = pydantic.Field()
    """
    Number of prices skipped (duplicate reference_ids)
    """

    error_count: int = pydantic.Field()
    """
    Number of failures
    """

    created: typing.Optional[typing.List[CatalogPriceItem]] = None
    skipped: typing.Optional[typing.List[CatalogBulkSkippedItem]] = pydantic.Field(default=None)
    """
    Prices that were skipped due to existing reference_ids
    """

    errors: typing.Optional[typing.List[CatalogBulkErrorItem]] = None

    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
