Class CatalogItem (0.42.0)

public final class CatalogItem extends GeneratedMessageV3 implements CatalogItemOrBuilder

CatalogItem captures all metadata information of items to be recommended.

Protobuf type google.cloud.recommendationengine.v1beta1.CatalogItem

Static Fields

CATEGORY_HIERARCHIES_FIELD_NUMBER

public static final int CATEGORY_HIERARCHIES_FIELD_NUMBER
Field Value
TypeDescription
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

ID_FIELD_NUMBER

public static final int ID_FIELD_NUMBER
Field Value
TypeDescription
int

ITEM_ATTRIBUTES_FIELD_NUMBER

public static final int ITEM_ATTRIBUTES_FIELD_NUMBER
Field Value
TypeDescription
int

ITEM_GROUP_ID_FIELD_NUMBER

public static final int ITEM_GROUP_ID_FIELD_NUMBER
Field Value
TypeDescription
int

LANGUAGE_CODE_FIELD_NUMBER

public static final int LANGUAGE_CODE_FIELD_NUMBER
Field Value
TypeDescription
int

PRODUCT_METADATA_FIELD_NUMBER

public static final int PRODUCT_METADATA_FIELD_NUMBER
Field Value
TypeDescription
int

TAGS_FIELD_NUMBER

public static final int TAGS_FIELD_NUMBER
Field Value
TypeDescription
int

TITLE_FIELD_NUMBER

public static final int TITLE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static CatalogItem getDefaultInstance()
Returns
TypeDescription
CatalogItem

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static CatalogItem.Builder newBuilder()
Returns
TypeDescription
CatalogItem.Builder

newBuilder(CatalogItem prototype)

public static CatalogItem.Builder newBuilder(CatalogItem prototype)
Parameter
NameDescription
prototypeCatalogItem
Returns
TypeDescription
CatalogItem.Builder

parseDelimitedFrom(InputStream input)

public static CatalogItem parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
CatalogItem
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CatalogItem parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CatalogItem
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static CatalogItem parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
CatalogItem
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static CatalogItem parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CatalogItem
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static CatalogItem parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
CatalogItem
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static CatalogItem parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CatalogItem
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static CatalogItem parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
CatalogItem
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static CatalogItem parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CatalogItem
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static CatalogItem parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
CatalogItem
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CatalogItem parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CatalogItem
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static CatalogItem parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
CatalogItem
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static CatalogItem parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CatalogItem
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<CatalogItem> parser()
Returns
TypeDescription
Parser<CatalogItem>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
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

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.