Class CatalogItem.Builder (0.53.0)

public static final class CatalogItem.Builder extends GeneratedMessageV3.Builder<CatalogItem.Builder> implements CatalogItemOrBuilder

CatalogItem captures all metadata information of items to be recommended.

Protobuf type google.cloud.recommendationengine.v1beta1.CatalogItem

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllCategoryHierarchies(Iterable<? extends CatalogItem.CategoryHierarchy> values)

public CatalogItem.Builder addAllCategoryHierarchies(Iterable<? extends CatalogItem.CategoryHierarchy> values)

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 &amp; Accessories", "Shoes"]},
    { "categories": ["Sports &amp; Fitness", "Athletic Clothing", "Shoes"] }
  ]

repeated .google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy category_hierarchies = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
values Iterable<? extends com.google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy>
Returns
Type Description
CatalogItem.Builder

addAllTags(Iterable<String> values)

public CatalogItem.Builder addAllTags(Iterable<String> values)

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.

repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The tags to add.

Returns
Type Description
CatalogItem.Builder

This builder for chaining.

addCategoryHierarchies(CatalogItem.CategoryHierarchy value)

public CatalogItem.Builder addCategoryHierarchies(CatalogItem.CategoryHierarchy value)

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 &amp; Accessories", "Shoes"]},
    { "categories": ["Sports &amp; Fitness", "Athletic Clothing", "Shoes"] }
  ]

repeated .google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy category_hierarchies = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value CatalogItem.CategoryHierarchy
Returns
Type Description
CatalogItem.Builder

addCategoryHierarchies(CatalogItem.CategoryHierarchy.Builder builderForValue)

public CatalogItem.Builder addCategoryHierarchies(CatalogItem.CategoryHierarchy.Builder builderForValue)

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 &amp; Accessories", "Shoes"]},
    { "categories": ["Sports &amp; Fitness", "Athletic Clothing", "Shoes"] }
  ]

repeated .google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy category_hierarchies = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue CatalogItem.CategoryHierarchy.Builder
Returns
Type Description
CatalogItem.Builder

addCategoryHierarchies(int index, CatalogItem.CategoryHierarchy value)

public CatalogItem.Builder addCategoryHierarchies(int index, CatalogItem.CategoryHierarchy value)

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 &amp; Accessories", "Shoes"]},
    { "categories": ["Sports &amp; Fitness", "Athletic Clothing", "Shoes"] }
  ]

repeated .google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy category_hierarchies = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
value CatalogItem.CategoryHierarchy
Returns
Type Description
CatalogItem.Builder

addCategoryHierarchies(int index, CatalogItem.CategoryHierarchy.Builder builderForValue)

public CatalogItem.Builder addCategoryHierarchies(int index, CatalogItem.CategoryHierarchy.Builder builderForValue)

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 &amp; Accessories", "Shoes"]},
    { "categories": ["Sports &amp; Fitness", "Athletic Clothing", "Shoes"] }
  ]

repeated .google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy category_hierarchies = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
builderForValue CatalogItem.CategoryHierarchy.Builder
Returns
Type Description
CatalogItem.Builder

addCategoryHierarchiesBuilder()

public CatalogItem.CategoryHierarchy.Builder addCategoryHierarchiesBuilder()

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 &amp; Accessories", "Shoes"]},
    { "categories": ["Sports &amp; Fitness", "Athletic Clothing", "Shoes"] }
  ]

repeated .google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy category_hierarchies = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CatalogItem.CategoryHierarchy.Builder

addCategoryHierarchiesBuilder(int index)

public CatalogItem.CategoryHierarchy.Builder addCategoryHierarchiesBuilder(int index)

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 &amp; Accessories", "Shoes"]},
    { "categories": ["Sports &amp; Fitness", "Athletic Clothing", "Shoes"] }
  ]

repeated .google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy category_hierarchies = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
CatalogItem.CategoryHierarchy.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CatalogItem.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CatalogItem.Builder
Overrides

addTags(String value)

public CatalogItem.Builder addTags(String value)

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.

repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The tags to add.

Returns
Type Description
CatalogItem.Builder

This builder for chaining.

addTagsBytes(ByteString value)

public CatalogItem.Builder addTagsBytes(ByteString value)

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.

repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the tags to add.

Returns
Type Description
CatalogItem.Builder

This builder for chaining.

build()

public CatalogItem build()
Returns
Type Description
CatalogItem

buildPartial()

public CatalogItem buildPartial()
Returns
Type Description
CatalogItem

clear()

public CatalogItem.Builder clear()
Returns
Type Description
CatalogItem.Builder
Overrides

clearCategoryHierarchies()

public CatalogItem.Builder clearCategoryHierarchies()

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 &amp; Accessories", "Shoes"]},
    { "categories": ["Sports &amp; Fitness", "Athletic Clothing", "Shoes"] }
  ]

repeated .google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy category_hierarchies = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CatalogItem.Builder

clearDescription()

public CatalogItem.Builder clearDescription()

Optional. Catalog item description. UTF-8 encoded string with a length limit of 5 KiB.

string description = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CatalogItem.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public CatalogItem.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
CatalogItem.Builder
Overrides

clearId()

public CatalogItem.Builder clearId()

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 id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CatalogItem.Builder

This builder for chaining.

clearItemAttributes()

public CatalogItem.Builder clearItemAttributes()

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.

.google.cloud.recommendationengine.v1beta1.FeatureMap item_attributes = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CatalogItem.Builder

clearItemGroupId()

public CatalogItem.Builder clearItemGroupId()

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 item_group_id = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CatalogItem.Builder

This builder for chaining.

clearLanguageCode()

public CatalogItem.Builder clearLanguageCode()

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 language_code = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CatalogItem.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public CatalogItem.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
CatalogItem.Builder
Overrides

clearProductMetadata()

public CatalogItem.Builder clearProductMetadata()

Optional. Metadata specific to retail products.

.google.cloud.recommendationengine.v1beta1.ProductCatalogItem product_metadata = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CatalogItem.Builder

clearRecommendationType()

public CatalogItem.Builder clearRecommendationType()
Returns
Type Description
CatalogItem.Builder

clearTags()

public CatalogItem.Builder clearTags()

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.

repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CatalogItem.Builder

This builder for chaining.

clearTitle()

public CatalogItem.Builder clearTitle()

Required. Catalog item title. UTF-8 encoded string with a length limit of 1 KiB.

string title = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CatalogItem.Builder

This builder for chaining.

clone()

public CatalogItem.Builder clone()
Returns
Type Description
CatalogItem.Builder
Overrides

getCategoryHierarchies(int index)

public CatalogItem.CategoryHierarchy getCategoryHierarchies(int index)

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 &amp; Accessories", "Shoes"]},
    { "categories": ["Sports &amp; Fitness", "Athletic Clothing", "Shoes"] }
  ]

repeated .google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy category_hierarchies = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
CatalogItem.CategoryHierarchy

getCategoryHierarchiesBuilder(int index)

public CatalogItem.CategoryHierarchy.Builder getCategoryHierarchiesBuilder(int index)

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 &amp; Accessories", "Shoes"]},
    { "categories": ["Sports &amp; Fitness", "Athletic Clothing", "Shoes"] }
  ]

repeated .google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy category_hierarchies = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
CatalogItem.CategoryHierarchy.Builder

getCategoryHierarchiesBuilderList()

public List<CatalogItem.CategoryHierarchy.Builder> getCategoryHierarchiesBuilderList()

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 &amp; Accessories", "Shoes"]},
    { "categories": ["Sports &amp; Fitness", "Athletic Clothing", "Shoes"] }
  ]

repeated .google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy category_hierarchies = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<Builder>

getCategoryHierarchiesCount()

public int getCategoryHierarchiesCount()

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 &amp; Accessories", "Shoes"]},
    { "categories": ["Sports &amp; Fitness", "Athletic Clothing", "Shoes"] }
  ]

repeated .google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy category_hierarchies = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

getCategoryHierarchiesList()

public List<CatalogItem.CategoryHierarchy> getCategoryHierarchiesList()

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 &amp; Accessories", "Shoes"]},
    { "categories": ["Sports &amp; Fitness", "Athletic Clothing", "Shoes"] }
  ]

repeated .google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy category_hierarchies = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<CategoryHierarchy>

getCategoryHierarchiesOrBuilder(int index)

public CatalogItem.CategoryHierarchyOrBuilder getCategoryHierarchiesOrBuilder(int index)

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 &amp; Accessories", "Shoes"]},
    { "categories": ["Sports &amp; Fitness", "Athletic Clothing", "Shoes"] }
  ]

repeated .google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy category_hierarchies = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
CatalogItem.CategoryHierarchyOrBuilder

getCategoryHierarchiesOrBuilderList()

public List<? extends CatalogItem.CategoryHierarchyOrBuilder> getCategoryHierarchiesOrBuilderList()

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 &amp; Accessories", "Shoes"]},
    { "categories": ["Sports &amp; Fitness", "Athletic Clothing", "Shoes"] }
  ]

repeated .google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy category_hierarchies = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<? extends com.google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchyOrBuilder>

getDefaultInstanceForType()

public CatalogItem getDefaultInstanceForType()
Returns
Type Description
CatalogItem

getDescription()

public String getDescription()

Optional. Catalog item description. UTF-8 encoded string with a length limit of 5 KiB.

string description = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. Catalog item description. UTF-8 encoded string with a length limit of 5 KiB.

string description = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getId()

public String 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 id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The id.

getIdBytes()

public ByteString getIdBytes()

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 id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for id.

getItemAttributes()

public FeatureMap 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.

.google.cloud.recommendationengine.v1beta1.FeatureMap item_attributes = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
FeatureMap

The itemAttributes.

getItemAttributesBuilder()

public FeatureMap.Builder getItemAttributesBuilder()

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.

.google.cloud.recommendationengine.v1beta1.FeatureMap item_attributes = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
FeatureMap.Builder

getItemAttributesOrBuilder()

public FeatureMapOrBuilder getItemAttributesOrBuilder()

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.

.google.cloud.recommendationengine.v1beta1.FeatureMap item_attributes = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
FeatureMapOrBuilder

getItemGroupId()

public String 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 item_group_id = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The itemGroupId.

getItemGroupIdBytes()

public ByteString getItemGroupIdBytes()

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 item_group_id = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for itemGroupId.

getLanguageCode()

public String 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 language_code = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The languageCode.

getLanguageCodeBytes()

public ByteString getLanguageCodeBytes()

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 language_code = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for languageCode.

getProductMetadata()

public ProductCatalogItem getProductMetadata()

Optional. Metadata specific to retail products.

.google.cloud.recommendationengine.v1beta1.ProductCatalogItem product_metadata = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProductCatalogItem

The productMetadata.

getProductMetadataBuilder()

public ProductCatalogItem.Builder getProductMetadataBuilder()

Optional. Metadata specific to retail products.

.google.cloud.recommendationengine.v1beta1.ProductCatalogItem product_metadata = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProductCatalogItem.Builder

getProductMetadataOrBuilder()

public ProductCatalogItemOrBuilder getProductMetadataOrBuilder()

Optional. Metadata specific to retail products.

.google.cloud.recommendationengine.v1beta1.ProductCatalogItem product_metadata = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProductCatalogItemOrBuilder

getRecommendationTypeCase()

public CatalogItem.RecommendationTypeCase getRecommendationTypeCase()
Returns
Type Description
CatalogItem.RecommendationTypeCase

getTags(int index)

public String getTags(int index)

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.

repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The tags at the given index.

getTagsBytes(int index)

public ByteString getTagsBytes(int index)

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.

repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the tags at the given index.

getTagsCount()

public int getTagsCount()

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.

repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of tags.

getTagsList()

public ProtocolStringList getTagsList()

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.

repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the tags.

getTitle()

public String getTitle()

Required. Catalog item title. UTF-8 encoded string with a length limit of 1 KiB.

string title = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The title.

getTitleBytes()

public ByteString getTitleBytes()

Required. Catalog item title. UTF-8 encoded string with a length limit of 1 KiB.

string title = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for title.

hasItemAttributes()

public boolean hasItemAttributes()

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.

.google.cloud.recommendationengine.v1beta1.FeatureMap item_attributes = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the itemAttributes field is set.

hasProductMetadata()

public boolean hasProductMetadata()

Optional. Metadata specific to retail products.

.google.cloud.recommendationengine.v1beta1.ProductCatalogItem product_metadata = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the productMetadata field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CatalogItem other)

public CatalogItem.Builder mergeFrom(CatalogItem other)
Parameter
Name Description
other CatalogItem
Returns
Type Description
CatalogItem.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CatalogItem.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CatalogItem.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public CatalogItem.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
CatalogItem.Builder
Overrides

mergeItemAttributes(FeatureMap value)

public CatalogItem.Builder mergeItemAttributes(FeatureMap value)

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.

.google.cloud.recommendationengine.v1beta1.FeatureMap item_attributes = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value FeatureMap
Returns
Type Description
CatalogItem.Builder

mergeProductMetadata(ProductCatalogItem value)

public CatalogItem.Builder mergeProductMetadata(ProductCatalogItem value)

Optional. Metadata specific to retail products.

.google.cloud.recommendationengine.v1beta1.ProductCatalogItem product_metadata = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ProductCatalogItem
Returns
Type Description
CatalogItem.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CatalogItem.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CatalogItem.Builder
Overrides

removeCategoryHierarchies(int index)

public CatalogItem.Builder removeCategoryHierarchies(int index)

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 &amp; Accessories", "Shoes"]},
    { "categories": ["Sports &amp; Fitness", "Athletic Clothing", "Shoes"] }
  ]

repeated .google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy category_hierarchies = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
CatalogItem.Builder

setCategoryHierarchies(int index, CatalogItem.CategoryHierarchy value)

public CatalogItem.Builder setCategoryHierarchies(int index, CatalogItem.CategoryHierarchy value)

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 &amp; Accessories", "Shoes"]},
    { "categories": ["Sports &amp; Fitness", "Athletic Clothing", "Shoes"] }
  ]

repeated .google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy category_hierarchies = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
value CatalogItem.CategoryHierarchy
Returns
Type Description
CatalogItem.Builder

setCategoryHierarchies(int index, CatalogItem.CategoryHierarchy.Builder builderForValue)

public CatalogItem.Builder setCategoryHierarchies(int index, CatalogItem.CategoryHierarchy.Builder builderForValue)

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 &amp; Accessories", "Shoes"]},
    { "categories": ["Sports &amp; Fitness", "Athletic Clothing", "Shoes"] }
  ]

repeated .google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy category_hierarchies = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
builderForValue CatalogItem.CategoryHierarchy.Builder
Returns
Type Description
CatalogItem.Builder

setDescription(String value)

public CatalogItem.Builder setDescription(String value)

Optional. Catalog item description. UTF-8 encoded string with a length limit of 5 KiB.

string description = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The description to set.

Returns
Type Description
CatalogItem.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public CatalogItem.Builder setDescriptionBytes(ByteString value)

Optional. Catalog item description. UTF-8 encoded string with a length limit of 5 KiB.

string description = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
CatalogItem.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public CatalogItem.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CatalogItem.Builder
Overrides

setId(String value)

public CatalogItem.Builder setId(String value)

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 id = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The id to set.

Returns
Type Description
CatalogItem.Builder

This builder for chaining.

setIdBytes(ByteString value)

public CatalogItem.Builder setIdBytes(ByteString value)

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 id = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for id to set.

Returns
Type Description
CatalogItem.Builder

This builder for chaining.

setItemAttributes(FeatureMap value)

public CatalogItem.Builder setItemAttributes(FeatureMap value)

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.

.google.cloud.recommendationengine.v1beta1.FeatureMap item_attributes = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value FeatureMap
Returns
Type Description
CatalogItem.Builder

setItemAttributes(FeatureMap.Builder builderForValue)

public CatalogItem.Builder setItemAttributes(FeatureMap.Builder builderForValue)

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.

.google.cloud.recommendationengine.v1beta1.FeatureMap item_attributes = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue FeatureMap.Builder
Returns
Type Description
CatalogItem.Builder

setItemGroupId(String value)

public CatalogItem.Builder setItemGroupId(String value)

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 item_group_id = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The itemGroupId to set.

Returns
Type Description
CatalogItem.Builder

This builder for chaining.

setItemGroupIdBytes(ByteString value)

public CatalogItem.Builder setItemGroupIdBytes(ByteString value)

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 item_group_id = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for itemGroupId to set.

Returns
Type Description
CatalogItem.Builder

This builder for chaining.

setLanguageCode(String value)

public CatalogItem.Builder setLanguageCode(String value)

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 language_code = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The languageCode to set.

Returns
Type Description
CatalogItem.Builder

This builder for chaining.

setLanguageCodeBytes(ByteString value)

public CatalogItem.Builder setLanguageCodeBytes(ByteString value)

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 language_code = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for languageCode to set.

Returns
Type Description
CatalogItem.Builder

This builder for chaining.

setProductMetadata(ProductCatalogItem value)

public CatalogItem.Builder setProductMetadata(ProductCatalogItem value)

Optional. Metadata specific to retail products.

.google.cloud.recommendationengine.v1beta1.ProductCatalogItem product_metadata = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ProductCatalogItem
Returns
Type Description
CatalogItem.Builder

setProductMetadata(ProductCatalogItem.Builder builderForValue)

public CatalogItem.Builder setProductMetadata(ProductCatalogItem.Builder builderForValue)

Optional. Metadata specific to retail products.

.google.cloud.recommendationengine.v1beta1.ProductCatalogItem product_metadata = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue ProductCatalogItem.Builder
Returns
Type Description
CatalogItem.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public CatalogItem.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
CatalogItem.Builder
Overrides

setTags(int index, String value)

public CatalogItem.Builder setTags(int index, String value)

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.

repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The tags to set.

Returns
Type Description
CatalogItem.Builder

This builder for chaining.

setTitle(String value)

public CatalogItem.Builder setTitle(String value)

Required. Catalog item title. UTF-8 encoded string with a length limit of 1 KiB.

string title = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The title to set.

Returns
Type Description
CatalogItem.Builder

This builder for chaining.

setTitleBytes(ByteString value)

public CatalogItem.Builder setTitleBytes(ByteString value)

Required. Catalog item title. UTF-8 encoded string with a length limit of 1 KiB.

string title = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for title to set.

Returns
Type Description
CatalogItem.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final CatalogItem.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CatalogItem.Builder
Overrides