Reference documentation and code samples for the Google Cloud Recommendation Engine V1beta1 Client class CatalogItem.
CatalogItem captures all metadata information of items to be recommended.
Generated from protobuf message google.cloud.recommendationengine.v1beta1.CatalogItem
Namespace
Google \ Cloud \ RecommendationEngine \ V1beta1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ id
string
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
array< 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
string
Required. Catalog item title. UTF-8 encoded string with a length limit of 1 KiB.
↳ description
string
Optional. Catalog item description. UTF-8 encoded string with a length limit of 5 KiB.
↳ item_attributes
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
string
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
array
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
string
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
getId
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.
string
setId
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.
var
string
$this
getCategoryHierarchies
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"] } ]
setCategoryHierarchies
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"] } ]
$this
getTitle
Required. Catalog item title. UTF-8 encoded string with a length limit of 1 KiB.
string
setTitle
Required. Catalog item title. UTF-8 encoded string with a length limit of 1 KiB.
var
string
$this
getDescription
Optional. Catalog item description. UTF-8 encoded string with a length limit of 5 KiB.
string
setDescription
Optional. Catalog item description. UTF-8 encoded string with a length limit of 5 KiB.
var
string
$this
getItemAttributes
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.
hasItemAttributes
clearItemAttributes
setItemAttributes
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.
$this
getLanguageCode
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.
string
setLanguageCode
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.
var
string
$this
getTags
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.
setTags
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.
var
string[]
$this
getItemGroupId
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 .
string
setItemGroupId
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 .
var
string
$this
getProductMetadata
Optional. Metadata specific to retail products.
hasProductMetadata
setProductMetadata
Optional. Metadata specific to retail products.
$this
getRecommendationType
string