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

    Attributes:
        name: Product name
        description: Product description
        short_description: Product short description
        type: Product type (simple, variable, etc.)
        regular_price: Product price as string
        sku: Stock Keeping Unit identifier
        stock_quantity: Available inventory count
        status: Product status (publish, draft, private)
        manage_stock: Whether to manage stock
        categories: List of category names
        images: List of image URLs
    """

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

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

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

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

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

    sku: typing.Optional[str] = pydantic.Field(default=None)
    """
    Stock Keeping Unit identifier
    """

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

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

    manage_stock: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Whether to manage stock
    """

    categories: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = pydantic.Field(
        default=None
    )
    """
    List of categories
    """

    images: typing.Optional[typing.List[typing.Dict[str, str]]] = pydantic.Field(default=None)
    """
    List of images
    """

    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
