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

from __future__ import annotations
from ..core.unchecked_base_model import UncheckedBaseModel
from .catalog_category import CatalogCategory
from .catalog_object_category import CatalogObjectCategory
import typing
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.pydantic_utilities import update_forward_refs


class CatalogItemOption(UncheckedBaseModel):
    """
    A group of variations for a `CatalogItem`.
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    The item option's display name for the seller. Must be unique across
    all item options. This is a searchable attribute for use in applicable query filters.
    """

    display_name: typing.Optional[str] = pydantic.Field(default=None)
    """
    The item option's display name for the customer. This is a searchable attribute for use in applicable query filters.
    """

    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    The item option's human-readable description. Displayed in the Square
    Point of Sale app for the seller and in the Online Store or on receipts for
    the buyer. This is a searchable attribute for use in applicable query filters.
    """

    show_colors: typing.Optional[bool] = pydantic.Field(default=None)
    """
    If true, display colors for entries in `values` when present.
    """

    values: typing.Optional[typing.List["CatalogObject"]] = pydantic.Field(default=None)
    """
    A list of CatalogObjects containing the
    `CatalogItemOptionValue`s for this item.
    """

    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


from .catalog_item import CatalogItem  # noqa: E402
from .catalog_modifier_list import CatalogModifierList  # noqa: E402
from .catalog_object_item import CatalogObjectItem  # noqa: E402
from .catalog_object_item_option import CatalogObjectItemOption  # noqa: E402
from .catalog_object_modifier_list import CatalogObjectModifierList  # noqa: E402
from .catalog_object_subscription_plan import CatalogObjectSubscriptionPlan  # noqa: E402
from .catalog_subscription_plan import CatalogSubscriptionPlan  # noqa: E402
from .catalog_object import CatalogObject  # noqa: E402

update_forward_refs(CatalogItemOption)
