Class CatalogItem.Builder (0.26.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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy>
Returns
TypeDescription
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
NameDescription
valuesIterable<String>

The tags to add.

Returns
TypeDescription
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
NameDescription
valueCatalogItem.CategoryHierarchy
Returns
TypeDescription
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
NameDescription
builderForValueCatalogItem.CategoryHierarchy.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueCatalogItem.CategoryHierarchy
Returns
TypeDescription
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
NameDescription
indexint
builderForValueCatalogItem.CategoryHierarchy.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
CatalogItem.CategoryHierarchy.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CatalogItem.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The tags to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the tags to add.

Returns
TypeDescription
CatalogItem.Builder

This builder for chaining.

build()

public CatalogItem build()
Returns
TypeDescription
CatalogItem

buildPartial()

public CatalogItem buildPartial()
Returns
TypeDescription
CatalogItem

clear()

public CatalogItem.Builder clear()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
CatalogItem.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public CatalogItem.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
CatalogItem.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public CatalogItem.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
CatalogItem.Builder

clearRecommendationType()

public CatalogItem.Builder clearRecommendationType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
CatalogItem.Builder

This builder for chaining.

clone()

public CatalogItem.Builder clone()
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<? extends com.google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchyOrBuilder>

getDefaultInstanceForType()

public CatalogItem getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ProductCatalogItemOrBuilder

getRecommendationTypeCase()

public CatalogItem.RecommendationTypeCase getRecommendationTypeCase()
Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the productMetadata field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CatalogItem other)

public CatalogItem.Builder mergeFrom(CatalogItem other)
Parameter
NameDescription
otherCatalogItem
Returns
TypeDescription
CatalogItem.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CatalogItem.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CatalogItem.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public CatalogItem.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueFeatureMap
Returns
TypeDescription
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
NameDescription
valueProductCatalogItem
Returns
TypeDescription
CatalogItem.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CatalogItem.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
valueCatalogItem.CategoryHierarchy
Returns
TypeDescription
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
NameDescription
indexint
builderForValueCatalogItem.CategoryHierarchy.Builder
Returns
TypeDescription
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
NameDescription
valueString

The description to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
CatalogItem.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public CatalogItem.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The id to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for id to set.

Returns
TypeDescription
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
NameDescription
valueFeatureMap
Returns
TypeDescription
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
NameDescription
builderForValueFeatureMap.Builder
Returns
TypeDescription
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
NameDescription
valueString

The itemGroupId to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for itemGroupId to set.

Returns
TypeDescription
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
NameDescription
valueString

The languageCode to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for languageCode to set.

Returns
TypeDescription
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
NameDescription
valueProductCatalogItem
Returns
TypeDescription
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
NameDescription
builderForValueProductCatalogItem.Builder
Returns
TypeDescription
CatalogItem.Builder

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

public CatalogItem.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The tags to set.

Returns
TypeDescription
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
NameDescription
valueString

The title to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for title to set.

Returns
TypeDescription
CatalogItem.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final CatalogItem.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
CatalogItem.Builder
Overrides