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

import datetime as dt
import typing

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


class CatalogPricesBulkCreateRequestPricesItem(UniversalBaseModel):
    catalog_entry_id: str
    price: float
    unit_price: typing.Optional[float] = None
    price_type: typing.Optional[CatalogPricesBulkCreateRequestPricesItemPriceType] = pydantic.Field(default=None)
    """
    Price type: company (default), location_group, or location
    """

    ottimate_location_id: typing.Optional[int] = None
    ottimate_group_id: typing.Optional[int] = None
    start_date: dt.datetime
    end_date: typing.Optional[dt.datetime] = None
    reference_id: typing.Optional[str] = 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
