# 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 ShopifyProduct(UniversalBaseModel):
    """
    Simplified Shopify product data.

    Single-variant products are supported directly with price/sku/stock fields.
    For multi-variant products, use the implementation's API directly.

    Attributes:
        title: Product name
        description: Product description (plain text or HTML)
        vendor: Brand or vendor name
        category: Product category/type
        price: Product price as string (e.g., '29.99')
        sku: Stock Keeping Unit identifier
        stock: Available inventory count
        status: Product status (active, draft, archived)
    """

    title: str = pydantic.Field()
    """
    Product name
    """

    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    Product description
    """

    vendor: str = pydantic.Field()
    """
    Brand or vendor name
    """

    category: str = pydantic.Field()
    """
    Product category/type
    """

    price: str = pydantic.Field()
    """
    Product price (e.g., '29.99')
    """

    sku: str = pydantic.Field()
    """
    Stock Keeping Unit identifier
    """

    stock: typing.Optional[int] = pydantic.Field(default=None)
    """
    Available inventory count
    """

    status: typing.Optional[str] = pydantic.Field(default=None)
    """
    Product status (active, draft, archived)
    """

    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
