Class CatalogItem (0.8.1)

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

CatalogItem captures all metadata information of items to be recommended.

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

Attributes

NameDescription
id str
Required. Catalog item identifier. UTF-8 encoded string with a length limit of 128 bytes. This id must be unique among all catalog items within the same catalog. It should also be used when logging user events in order for the user events to be joined with the Catalog.
category_hierarchies Sequence[google.cloud.recommendationengine_v1beta1.types.CatalogItem.CategoryHierarchy]
Required. Catalog item categories. This field is repeated for supporting one catalog item belonging to several parallel category hierarchies. For example, if a shoes product belongs to both ["Shoes & Accessories" -> "Shoes"] and ["Sports & Fitness" -> "Athletic Clothing" -> "Shoes"], it could be represented as: :: "categoryHierarchies": [ { "categories": ["Shoes & Accessories", "Shoes"]}, { "categories": ["Sports & Fitness", "Athletic Clothing", "Shoes"] } ]
title str
Required. Catalog item title. UTF-8 encoded string with a length limit of 1 KiB.
description str
Optional. Catalog item description. UTF-8 encoded string with a length limit of 5 KiB.
item_attributes google.cloud.recommendationengine_v1beta1.types.FeatureMap
Optional. Highly encouraged. Extra catalog item attributes to be included in the recommendation model. For example, for retail products, this could include the store name, vendor, style, color, etc. These are very strong signals for recommendation model, thus we highly recommend providing the item attributes here.
language_code str
Optional. Language of the title/description/item_attributes. Use language tags defined by BCP 47. https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Our supported language codes include 'en', 'es', 'fr', 'de', 'ar', 'fa', 'zh', 'ja', 'ko', 'sv', 'ro', 'nl'. For other languages, contact your Google account manager.
tags Sequence[str]
Optional. Filtering tags associated with the catalog item. Each tag should be a UTF-8 encoded string with a length limit of 1 KiB. This tag can be used for filtering recommendation results by passing the tag as part of the predict request filter.
item_group_id str
Optional. Variant group identifier for prediction results. UTF-8 encoded string with a length limit of 128 bytes. This field must be enabled before it can be used. `Learn more `__.
product_metadata google.cloud.recommendationengine_v1beta1.types.ProductCatalogItem
Optional. Metadata specific to retail products. This field is a member of `oneof`_ ``recommendation_type``.

Inheritance

builtins.object > proto.message.Message > CatalogItem

Classes

CategoryHierarchy

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

Category represents catalog item category hierarchy.