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

from ..core.unchecked_base_model import UncheckedBaseModel
import typing
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class CatalogCustomAttributeDefinitionNumberConfig(UncheckedBaseModel):
    precision: typing.Optional[int] = pydantic.Field(default=None)
    """
    An integer between 0 and 5 that represents the maximum number of
    positions allowed after the decimal in number custom attribute values
    For example:
    
    - if the precision is 0, the quantity can be 1, 2, 3, etc.
    - if the precision is 1, the quantity can be 0.1, 0.2, etc.
    - if the precision is 2, the quantity can be 0.01, 0.12, etc.
    
    Default: 5
    """

    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
