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

import typing_extensions
import typing_extensions
import typing
from ..types.catalog_custom_attribute_definition_type import CatalogCustomAttributeDefinitionType


class CatalogCustomAttributeValueParams(typing_extensions.TypedDict):
    """
    An instance of a custom attribute. Custom attributes can be defined and
    added to `ITEM` and `ITEM_VARIATION` type catalog objects.
    [Read more about custom attributes](https://developer.squareup.com/docs/catalog-api/add-custom-attributes).
    """

    name: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The name of the custom attribute.
    """

    string_value: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The string value of the custom attribute.  Populated if `type` = `STRING`.
    """

    custom_attribute_definition_id: typing_extensions.NotRequired[str]
    """
    The id of the [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) this value belongs to.
    """

    type: typing_extensions.NotRequired[CatalogCustomAttributeDefinitionType]
    """
    A copy of type from the associated `CatalogCustomAttributeDefinition`.
    See [CatalogCustomAttributeDefinitionType](#type-catalogcustomattributedefinitiontype) for possible values
    """

    number_value: typing_extensions.NotRequired[typing.Optional[str]]
    """
    Populated if `type` = `NUMBER`. Contains a string
    representation of a decimal number, using a `.` as the decimal separator.
    """

    boolean_value: typing_extensions.NotRequired[typing.Optional[bool]]
    """
    A `true` or `false` value. Populated if `type` = `BOOLEAN`.
    """

    selection_uid_values: typing_extensions.NotRequired[typing.Optional[typing.Sequence[str]]]
    """
    One or more choices from `allowed_selections`. Populated if `type` = `SELECTION`.
    """

    key: typing_extensions.NotRequired[str]
    """
    If the associated `CatalogCustomAttributeDefinition` object is defined by another application, this key is prefixed by the defining application ID.
    For example, if the CatalogCustomAttributeDefinition has a key attribute of "cocoa_brand" and the defining application ID is "abcd1234", this key is "abcd1234:cocoa_brand"
    when the application making the request is different from the application defining the custom attribute definition. Otherwise, the key is simply "cocoa_brand".
    """
