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
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > CatalogItem.BuilderImplements
CatalogItemOrBuilderStatic 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 & Accessories", "Shoes"]},
{ "categories": ["Sports & 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 & Accessories", "Shoes"]},
{ "categories": ["Sports & 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 & Accessories", "Shoes"]},
{ "categories": ["Sports & 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 & Accessories", "Shoes"]},
{ "categories": ["Sports & 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 & Accessories", "Shoes"]},
{ "categories": ["Sports & 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 & Accessories", "Shoes"]},
{ "categories": ["Sports & 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 & Accessories", "Shoes"]},
{ "categories": ["Sports & 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 |
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 |
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 & Accessories", "Shoes"]},
{ "categories": ["Sports & 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 |
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 |
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 |
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 & Accessories", "Shoes"]},
{ "categories": ["Sports & 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 & Accessories", "Shoes"]},
{ "categories": ["Sports & 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 & Accessories", "Shoes"]},
{ "categories": ["Sports & 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 & Accessories", "Shoes"]},
{ "categories": ["Sports & 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 & Accessories", "Shoes"]},
{ "categories": ["Sports & 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 & Accessories", "Shoes"]},
{ "categories": ["Sports & 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 & Accessories", "Shoes"]},
{ "categories": ["Sports & 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 |
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 or