Class CustomAttribute (1.21.2)

CustomAttribute(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A custom attribute that is not explicitly modeled in Product.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

Attributes

Name Description
text MutableSequence[str]
The textual values of this custom attribute. For example, ["yellow", "green"] when the key is "color". Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
numbers MutableSequence[float]
The numerical values of this custom attribute. For example, [2.3, 15.4] when the key is "lengths_cm". Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
searchable bool
This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level attribute configuration, see `Configuration modes
indexable bool
This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level attribute configuration, see `Configuration modes