Recommendations AI V1beta1 API - Class Google::Cloud::RecommendationEngine::V1beta1::CatalogItem (v0.8.2)

Reference documentation and code samples for the Recommendations AI V1beta1 API class Google::Cloud::RecommendationEngine::V1beta1::CatalogItem.

CatalogItem captures all metadata information of items to be recommended.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#category_hierarchies

def category_hierarchies() -> ::Array<::Google::Cloud::RecommendationEngine::V1beta1::CatalogItem::CategoryHierarchy>
Returns
  • (::Array<::Google::Cloud::RecommendationEngine::V1beta1::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"] }
     ]
    

#category_hierarchies=

def category_hierarchies=(value) -> ::Array<::Google::Cloud::RecommendationEngine::V1beta1::CatalogItem::CategoryHierarchy>
Parameter
  • value (::Array<::Google::Cloud::RecommendationEngine::V1beta1::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"] }
     ]
    
Returns
  • (::Array<::Google::Cloud::RecommendationEngine::V1beta1::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"] }
     ]
    

#description

def description() -> ::String
Returns
  • (::String) — Optional. Catalog item description. UTF-8 encoded string with a length limit of 5 KiB.

#description=

def description=(value) -> ::String
Parameter
  • value (::String) — Optional. Catalog item description. UTF-8 encoded string with a length limit of 5 KiB.
Returns
  • (::String) — Optional. Catalog item description. UTF-8 encoded string with a length limit of 5 KiB.

#id

def id() -> ::String
Returns
  • (::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.

#id=

def id=(value) -> ::String
Parameter
  • value (::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.

Returns
  • (::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.

#item_attributes

def item_attributes() -> ::Google::Cloud::RecommendationEngine::V1beta1::FeatureMap
Returns
  • (::Google::Cloud::RecommendationEngine::V1beta1::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.

#item_attributes=

def item_attributes=(value) -> ::Google::Cloud::RecommendationEngine::V1beta1::FeatureMap
Parameter
  • value (::Google::Cloud::RecommendationEngine::V1beta1::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.
Returns
  • (::Google::Cloud::RecommendationEngine::V1beta1::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.

#item_group_id

def item_group_id() -> ::String
Returns
  • (::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.

#item_group_id=

def item_group_id=(value) -> ::String
Parameter
  • value (::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.

Returns
  • (::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.

#language_code

def language_code() -> ::String
Returns
  • (::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.

#language_code=

def language_code=(value) -> ::String
Parameter
  • value (::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.
Returns
  • (::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.

#product_metadata

def product_metadata() -> ::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem
Returns

#product_metadata=

def product_metadata=(value) -> ::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem
Parameter
Returns

#tags

def tags() -> ::Array<::String>
Returns
  • (::Array<::String>) — 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.

#tags=

def tags=(value) -> ::Array<::String>
Parameter
  • value (::Array<::String>) — 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.

Returns
  • (::Array<::String>) — 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.

#title

def title() -> ::String
Returns
  • (::String) — Required. Catalog item title. UTF-8 encoded string with a length limit of 1 KiB.

#title=

def title=(value) -> ::String
Parameter
  • value (::String) — Required. Catalog item title. UTF-8 encoded string with a length limit of 1 KiB.
Returns
  • (::String) — Required. Catalog item title. UTF-8 encoded string with a length limit of 1 KiB.