- 2.55.0 (latest)
- 2.54.0
- 2.53.0
- 2.51.0
- 2.50.0
- 2.49.0
- 2.48.0
- 2.47.0
- 2.46.0
- 2.45.0
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.39.0
- 2.38.0
- 2.37.0
- 2.36.0
- 2.35.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.0
- 2.29.0
- 2.26.0
- 2.25.0
- 2.24.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.1
- 2.4.0
- 2.3.0
- 2.2.3
- 2.1.0
- 2.0.19
public interface ProductOrBuilder extends MessageOrBuilder
Implements
MessageOrBuilderMethods
containsAttributes(String key)
public abstract boolean containsAttributes(String key)
Highly encouraged. Extra product attributes to be included. For example,
for 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 attributes here.
Features that can take on one of a limited number of possible values. Two
types of features can be set are:
Textual features. some examples would be the brand/maker of a product, or
country of a customer. Numerical features. Some examples would be the
height/weight of a product, or age of a customer.
For example: { "vendor": {"text": ["vendor123", "vendor456"]},
"lengths_cm": {"numbers":[2.3, 15.4]}, "heights_cm": {"numbers":[8.1, 6.4]}
}
.
This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
error is returned:
- Max entries count: 200.
- The key must be a UTF-8 encoded string with a length limit of 128 characters.
- For indexable attribute, the key must match the pattern:
a-zA-Z0-9*
. For example,key0LikeThis
orKEY_1_LIKE_THIS
. - For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a non-empty UTF-8 encoded string with a length limit of 256 characters.
- For number attributes, at most 400 values are allowed.
map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 12;
Parameter | |
---|---|
Name | Description |
key | String |
Returns | |
---|---|
Type | Description |
boolean |
getAttributes()
public abstract Map<String,CustomAttribute> getAttributes()
Use #getAttributesMap() instead.
Returns | |
---|---|
Type | Description |
Map<String,CustomAttribute> |
getAttributesCount()
public abstract int getAttributesCount()
Highly encouraged. Extra product attributes to be included. For example,
for 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 attributes here.
Features that can take on one of a limited number of possible values. Two
types of features can be set are:
Textual features. some examples would be the brand/maker of a product, or
country of a customer. Numerical features. Some examples would be the
height/weight of a product, or age of a customer.
For example: { "vendor": {"text": ["vendor123", "vendor456"]},
"lengths_cm": {"numbers":[2.3, 15.4]}, "heights_cm": {"numbers":[8.1, 6.4]}
}
.
This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
error is returned:
- Max entries count: 200.
- The key must be a UTF-8 encoded string with a length limit of 128 characters.
- For indexable attribute, the key must match the pattern:
a-zA-Z0-9*
. For example,key0LikeThis
orKEY_1_LIKE_THIS
. - For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a non-empty UTF-8 encoded string with a length limit of 256 characters.
- For number attributes, at most 400 values are allowed.
map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 12;
Returns | |
---|---|
Type | Description |
int |
getAttributesMap()
public abstract Map<String,CustomAttribute> getAttributesMap()
Highly encouraged. Extra product attributes to be included. For example,
for 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 attributes here.
Features that can take on one of a limited number of possible values. Two
types of features can be set are:
Textual features. some examples would be the brand/maker of a product, or
country of a customer. Numerical features. Some examples would be the
height/weight of a product, or age of a customer.
For example: { "vendor": {"text": ["vendor123", "vendor456"]},
"lengths_cm": {"numbers":[2.3, 15.4]}, "heights_cm": {"numbers":[8.1, 6.4]}
}
.
This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
error is returned:
- Max entries count: 200.
- The key must be a UTF-8 encoded string with a length limit of 128 characters.
- For indexable attribute, the key must match the pattern:
a-zA-Z0-9*
. For example,key0LikeThis
orKEY_1_LIKE_THIS
. - For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a non-empty UTF-8 encoded string with a length limit of 256 characters.
- For number attributes, at most 400 values are allowed.
map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 12;
Returns | |
---|---|
Type | Description |
Map<String,CustomAttribute> |
getAttributesOrDefault(String key, CustomAttribute defaultValue)
public abstract CustomAttribute getAttributesOrDefault(String key, CustomAttribute defaultValue)
Highly encouraged. Extra product attributes to be included. For example,
for 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 attributes here.
Features that can take on one of a limited number of possible values. Two
types of features can be set are:
Textual features. some examples would be the brand/maker of a product, or
country of a customer. Numerical features. Some examples would be the
height/weight of a product, or age of a customer.
For example: { "vendor": {"text": ["vendor123", "vendor456"]},
"lengths_cm": {"numbers":[2.3, 15.4]}, "heights_cm": {"numbers":[8.1, 6.4]}
}
.
This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
error is returned:
- Max entries count: 200.
- The key must be a UTF-8 encoded string with a length limit of 128 characters.
- For indexable attribute, the key must match the pattern:
a-zA-Z0-9*
. For example,key0LikeThis
orKEY_1_LIKE_THIS
. - For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a non-empty UTF-8 encoded string with a length limit of 256 characters.
- For number attributes, at most 400 values are allowed.
map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 12;
Parameters | |
---|---|
Name | Description |
key | String |
defaultValue | CustomAttribute |
Returns | |
---|---|
Type | Description |
CustomAttribute |
getAttributesOrThrow(String key)
public abstract CustomAttribute getAttributesOrThrow(String key)
Highly encouraged. Extra product attributes to be included. For example,
for 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 attributes here.
Features that can take on one of a limited number of possible values. Two
types of features can be set are:
Textual features. some examples would be the brand/maker of a product, or
country of a customer. Numerical features. Some examples would be the
height/weight of a product, or age of a customer.
For example: { "vendor": {"text": ["vendor123", "vendor456"]},
"lengths_cm": {"numbers":[2.3, 15.4]}, "heights_cm": {"numbers":[8.1, 6.4]}
}
.
This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
error is returned:
- Max entries count: 200.
- The key must be a UTF-8 encoded string with a length limit of 128 characters.
- For indexable attribute, the key must match the pattern:
a-zA-Z0-9*
. For example,key0LikeThis
orKEY_1_LIKE_THIS
. - For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a non-empty UTF-8 encoded string with a length limit of 256 characters.
- For number attributes, at most 400 values are allowed.
map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 12;
Parameter | |
---|---|
Name | Description |
key | String |
Returns | |
---|---|
Type | Description |
CustomAttribute |
getAudience()
public abstract Audience getAudience()
The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product.
.google.cloud.retail.v2.Audience audience = 24;
Returns | |
---|---|
Type | Description |
Audience | The audience. |
getAudienceOrBuilder()
public abstract AudienceOrBuilder getAudienceOrBuilder()
The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product.
.google.cloud.retail.v2.Audience audience = 24;
Returns | |
---|---|
Type | Description |
AudienceOrBuilder |
getAvailability()
public abstract Product.Availability getAvailability()
The online availability of the Product. Default to Availability.IN_STOCK. Corresponding properties: Google Merchant Center property availability. Schema.org property Offer.availability.
.google.cloud.retail.v2.Product.Availability availability = 19;
Returns | |
---|---|
Type | Description |
Product.Availability | The availability. |
getAvailabilityValue()
public abstract int getAvailabilityValue()
The online availability of the Product. Default to Availability.IN_STOCK. Corresponding properties: Google Merchant Center property availability. Schema.org property Offer.availability.
.google.cloud.retail.v2.Product.Availability availability = 19;
Returns | |
---|---|
Type | Description |
int | The enum numeric value on the wire for availability. |
getAvailableQuantity()
public abstract Int32Value getAvailableQuantity()
The available quantity of the item.
.google.protobuf.Int32Value available_quantity = 20;
Returns | |
---|---|
Type | Description |
Int32Value | The availableQuantity. |
getAvailableQuantityOrBuilder()
public abstract Int32ValueOrBuilder getAvailableQuantityOrBuilder()
The available quantity of the item.
.google.protobuf.Int32Value available_quantity = 20;
Returns | |
---|---|
Type | Description |
Int32ValueOrBuilder |
getAvailableTime()
public abstract Timestamp getAvailableTime()
The timestamp when this Product becomes available for SearchService.Search. Note that this is only applicable to Type.PRIMARY and Type.COLLECTION, and ignored for Type.VARIANT.
.google.protobuf.Timestamp available_time = 18;
Returns | |
---|---|
Type | Description |
Timestamp | The availableTime. |
getAvailableTimeOrBuilder()
public abstract TimestampOrBuilder getAvailableTimeOrBuilder()
The timestamp when this Product becomes available for SearchService.Search. Note that this is only applicable to Type.PRIMARY and Type.COLLECTION, and ignored for Type.VARIANT.
.google.protobuf.Timestamp available_time = 18;
Returns | |
---|---|
Type | Description |
TimestampOrBuilder |
getBrands(int index)
public abstract String getBrands(int index)
The brands of the product. A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property brand. Schema.org property Product.brand.
repeated string brands = 9;
Parameter | |
---|---|
Name | Description |
index | int The index of the element to return. |
Returns | |
---|---|
Type | Description |
String | The brands at the given index. |
getBrandsBytes(int index)
public abstract ByteString getBrandsBytes(int index)
The brands of the product. A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property brand. Schema.org property Product.brand.
repeated string brands = 9;
Parameter | |
---|---|
Name | Description |
index | int The index of the value to return. |
Returns | |
---|---|
Type | Description |
ByteString | The bytes of the brands at the given index. |
getBrandsCount()
public abstract int getBrandsCount()
The brands of the product. A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property brand. Schema.org property Product.brand.
repeated string brands = 9;
Returns | |
---|---|
Type | Description |
int | The count of brands. |
getBrandsList()
public abstract List<String> getBrandsList()
The brands of the product. A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property brand. Schema.org property Product.brand.
repeated string brands = 9;
Returns | |
---|---|
Type | Description |
List<String> | A list containing the brands. |
getCategories(int index)
public abstract String getCategories(int index)
Product categories. This field is repeated for supporting one product belonging to several parallel categories. Strongly recommended using the full path for better search / recommendation quality. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). For example, if a shoes product belongs to both ["Shoes & Accessories" -> "Shoes"] and ["Sports & Fitness" -> "Athletic Clothing" -> "Shoes"], it could be represented as: "categories": [ "Shoes & Accessories > Shoes", "Sports & Fitness > Athletic Clothing > Shoes" ] Must be set for Type.PRIMARY Product otherwise an INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property google_product_category. Schema.org property Product.category. [mc_google_product_category]: https://support.google.com/merchants/answer/6324436
repeated string categories = 7;
Parameter | |
---|---|
Name | Description |
index | int The index of the element to return. |
Returns | |
---|---|
Type | Description |
String | The categories at the given index. |
getCategoriesBytes(int index)
public abstract ByteString getCategoriesBytes(int index)
Product categories. This field is repeated for supporting one product belonging to several parallel categories. Strongly recommended using the full path for better search / recommendation quality. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). For example, if a shoes product belongs to both ["Shoes & Accessories" -> "Shoes"] and ["Sports & Fitness" -> "Athletic Clothing" -> "Shoes"], it could be represented as: "categories": [ "Shoes & Accessories > Shoes", "Sports & Fitness > Athletic Clothing > Shoes" ] Must be set for Type.PRIMARY Product otherwise an INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property google_product_category. Schema.org property Product.category. [mc_google_product_category]: https://support.google.com/merchants/answer/6324436
repeated string categories = 7;
Parameter | |
---|---|
Name | Description |
index | int The index of the value to return. |
Returns | |
---|---|
Type | Description |
ByteString | The bytes of the categories at the given index. |
getCategoriesCount()
public abstract int getCategoriesCount()
Product categories. This field is repeated for supporting one product belonging to several parallel categories. Strongly recommended using the full path for better search / recommendation quality. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). For example, if a shoes product belongs to both ["Shoes & Accessories" -> "Shoes"] and ["Sports & Fitness" -> "Athletic Clothing" -> "Shoes"], it could be represented as: "categories": [ "Shoes & Accessories > Shoes", "Sports & Fitness > Athletic Clothing > Shoes" ] Must be set for Type.PRIMARY Product otherwise an INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property google_product_category. Schema.org property Product.category. [mc_google_product_category]: https://support.google.com/merchants/answer/6324436
repeated string categories = 7;
Returns | |
---|---|
Type | Description |
int | The count of categories. |
getCategoriesList()
public abstract List<String> getCategoriesList()
Product categories. This field is repeated for supporting one product belonging to several parallel categories. Strongly recommended using the full path for better search / recommendation quality. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). For example, if a shoes product belongs to both ["Shoes & Accessories" -> "Shoes"] and ["Sports & Fitness" -> "Athletic Clothing" -> "Shoes"], it could be represented as: "categories": [ "Shoes & Accessories > Shoes", "Sports & Fitness > Athletic Clothing > Shoes" ] Must be set for Type.PRIMARY Product otherwise an INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property google_product_category. Schema.org property Product.category. [mc_google_product_category]: https://support.google.com/merchants/answer/6324436
repeated string categories = 7;
Returns | |
---|---|
Type | Description |
List<String> | A list containing the categories. |
getCollectionMemberIds(int index)
public abstract String getCollectionMemberIds(int index)
The id of the collection members when type is Type.COLLECTION. Non-existent product ids are allowed. The type of the members must be either Type.PRIMARY or Type.VARIANT otherwise an INVALID_ARGUMENT error is thrown. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return.
repeated string collection_member_ids = 5;
Parameter | |
---|---|
Name | Description |
index | int The index of the element to return. |
Returns | |
---|---|
Type | Description |
String | The collectionMemberIds at the given index. |
getCollectionMemberIdsBytes(int index)
public abstract ByteString getCollectionMemberIdsBytes(int index)
The id of the collection members when type is Type.COLLECTION. Non-existent product ids are allowed. The type of the members must be either Type.PRIMARY or Type.VARIANT otherwise an INVALID_ARGUMENT error is thrown. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return.
repeated string collection_member_ids = 5;
Parameter | |
---|---|
Name | Description |
index | int The index of the value to return. |
Returns | |
---|---|
Type | Description |
ByteString | The bytes of the collectionMemberIds at the given index. |
getCollectionMemberIdsCount()
public abstract int getCollectionMemberIdsCount()
The id of the collection members when type is Type.COLLECTION. Non-existent product ids are allowed. The type of the members must be either Type.PRIMARY or Type.VARIANT otherwise an INVALID_ARGUMENT error is thrown. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return.
repeated string collection_member_ids = 5;
Returns | |
---|---|
Type | Description |
int | The count of collectionMemberIds. |
getCollectionMemberIdsList()
public abstract List<String> getCollectionMemberIdsList()
The id of the collection members when type is Type.COLLECTION. Non-existent product ids are allowed. The type of the members must be either Type.PRIMARY or Type.VARIANT otherwise an INVALID_ARGUMENT error is thrown. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return.
repeated string collection_member_ids = 5;
Returns | |
---|---|
Type | Description |
List<String> | A list containing the collectionMemberIds. |
getColorInfo()
public abstract ColorInfo getColorInfo()
The color of the product. Corresponding properties: Google Merchant Center property color. Schema.org property Product.color.
.google.cloud.retail.v2.ColorInfo color_info = 25;
Returns | |
---|---|
Type | Description |
ColorInfo | The colorInfo. |
getColorInfoOrBuilder()
public abstract ColorInfoOrBuilder getColorInfoOrBuilder()
The color of the product. Corresponding properties: Google Merchant Center property color. Schema.org property Product.color.
.google.cloud.retail.v2.ColorInfo color_info = 25;
Returns | |
---|---|
Type | Description |
ColorInfoOrBuilder |
getConditions(int index)
public abstract String getConditions(int index)
The condition of the product. Strongly encouraged to use the standard values: "new", "refurbished", "used". A maximum of 1 value is allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property condition. Schema.org property Offer.itemCondition.
repeated string conditions = 29;
Parameter | |
---|---|
Name | Description |
index | int The index of the element to return. |
Returns | |
---|---|
Type | Description |
String | The conditions at the given index. |
getConditionsBytes(int index)
public abstract ByteString getConditionsBytes(int index)
The condition of the product. Strongly encouraged to use the standard values: "new", "refurbished", "used". A maximum of 1 value is allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property condition. Schema.org property Offer.itemCondition.
repeated string conditions = 29;
Parameter | |
---|---|
Name | Description |
index | int The index of the value to return. |
Returns | |
---|---|
Type | Description |
ByteString | The bytes of the conditions at the given index. |
getConditionsCount()
public abstract int getConditionsCount()
The condition of the product. Strongly encouraged to use the standard values: "new", "refurbished", "used". A maximum of 1 value is allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property condition. Schema.org property Offer.itemCondition.
repeated string conditions = 29;
Returns | |
---|---|
Type | Description |
int | The count of conditions. |
getConditionsList()
public abstract List<String> getConditionsList()
The condition of the product. Strongly encouraged to use the standard values: "new", "refurbished", "used". A maximum of 1 value is allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property condition. Schema.org property Offer.itemCondition.
repeated string conditions = 29;
Returns | |
---|---|
Type | Description |
List<String> | A list containing the conditions. |
getDescription()
public abstract String getDescription()
Product description. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property description. Schema.org property Product.description.
string description = 10;
Returns | |
---|---|
Type | Description |
String | The description. |
getDescriptionBytes()
public abstract ByteString getDescriptionBytes()
Product description. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property description. Schema.org property Product.description.
string description = 10;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for description. |
getExpirationCase()
public abstract Product.ExpirationCase getExpirationCase()
Returns | |
---|---|
Type | Description |
Product.ExpirationCase |
getExpireTime()
public abstract Timestamp getExpireTime()
The timestamp when this product becomes unavailable for SearchService.Search. Note that this is only applicable to Type.PRIMARY and Type.COLLECTION, and ignored for Type.VARIANT. In general, we suggest the users to delete the stale products explicitly, instead of using this field to determine staleness. If it is set, the Product is not available for SearchService.Search after expire_time. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts. expire_time must be later than available_time and publish_time, otherwise an INVALID_ARGUMENT error is thrown. Corresponding properties: Google Merchant Center property expiration_date.
.google.protobuf.Timestamp expire_time = 16;
Returns | |
---|---|
Type | Description |
Timestamp | The expireTime. |
getExpireTimeOrBuilder()
public abstract TimestampOrBuilder getExpireTimeOrBuilder()
The timestamp when this product becomes unavailable for SearchService.Search. Note that this is only applicable to Type.PRIMARY and Type.COLLECTION, and ignored for Type.VARIANT. In general, we suggest the users to delete the stale products explicitly, instead of using this field to determine staleness. If it is set, the Product is not available for SearchService.Search after expire_time. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts. expire_time must be later than available_time and publish_time, otherwise an INVALID_ARGUMENT error is thrown. Corresponding properties: Google Merchant Center property expiration_date.
.google.protobuf.Timestamp expire_time = 16;
Returns | |
---|---|
Type | Description |
TimestampOrBuilder |
getFulfillmentInfo(int index)
public abstract FulfillmentInfo getFulfillmentInfo(int index)
Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. All the elements must have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned.
repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
FulfillmentInfo |
getFulfillmentInfoCount()
public abstract int getFulfillmentInfoCount()
Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. All the elements must have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned.
repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;
Returns | |
---|---|
Type | Description |
int |
getFulfillmentInfoList()
public abstract List<FulfillmentInfo> getFulfillmentInfoList()
Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. All the elements must have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned.
repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;
Returns | |
---|---|
Type | Description |
List<FulfillmentInfo> |
getFulfillmentInfoOrBuilder(int index)
public abstract FulfillmentInfoOrBuilder getFulfillmentInfoOrBuilder(int index)
Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. All the elements must have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned.
repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
FulfillmentInfoOrBuilder |
getFulfillmentInfoOrBuilderList()
public abstract List<? extends FulfillmentInfoOrBuilder> getFulfillmentInfoOrBuilderList()
Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. All the elements must have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned.
repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;
Returns | |
---|---|
Type | Description |
List<? extends com.google.cloud.retail.v2.FulfillmentInfoOrBuilder> |
getGtin()
public abstract String getGtin()
The Global Trade Item Number (GTIN) of the product. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. This field must be a Unigram. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property gtin. Schema.org property Product.isbn, Product.gtin8, Product.gtin12, Product.gtin13, or Product.gtin14. If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.
string gtin = 6;
Returns | |
---|---|
Type | Description |
String | The gtin. |
getGtinBytes()
public abstract ByteString getGtinBytes()
The Global Trade Item Number (GTIN) of the product. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. This field must be a Unigram. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property gtin. Schema.org property Product.isbn, Product.gtin8, Product.gtin12, Product.gtin13, or Product.gtin14. If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.
string gtin = 6;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for gtin. |
getId()
public abstract String getId()
Immutable. Product identifier, which is
the final component of name. For
example, this field is "id_1", if
name is
projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/id_1
.
This field must be a UTF-8 encoded string with a length limit of 128
characters. Otherwise, an INVALID_ARGUMENT error is returned.
Corresponding properties: Google Merchant Center property
id. Schema.org
property Product.sku.
string id = 2 [(.google.api.field_behavior) = IMMUTABLE];
Returns | |
---|---|
Type | Description |
String | The id. |
getIdBytes()
public abstract ByteString getIdBytes()
Immutable. Product identifier, which is
the final component of name. For
example, this field is "id_1", if
name is
projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/id_1
.
This field must be a UTF-8 encoded string with a length limit of 128
characters. Otherwise, an INVALID_ARGUMENT error is returned.
Corresponding properties: Google Merchant Center property
id. Schema.org
property Product.sku.
string id = 2 [(.google.api.field_behavior) = IMMUTABLE];
Returns | |
---|---|
Type | Description |
ByteString | The bytes for id. |
getImages(int index)
public abstract Image getImages(int index)
Product images for the product. We highly recommend putting the main image first. A maximum of 300 images are allowed. Corresponding properties: Google Merchant Center property image_link. Schema.org property Product.image.
repeated .google.cloud.retail.v2.Image images = 23;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
Image |
getImagesCount()
public abstract int getImagesCount()
Product images for the product. We highly recommend putting the main image first. A maximum of 300 images are allowed. Corresponding properties: Google Merchant Center property image_link. Schema.org property Product.image.
repeated .google.cloud.retail.v2.Image images = 23;
Returns | |
---|---|
Type | Description |
int |
getImagesList()
public abstract List<Image> getImagesList()
Product images for the product. We highly recommend putting the main image first. A maximum of 300 images are allowed. Corresponding properties: Google Merchant Center property image_link. Schema.org property Product.image.
repeated .google.cloud.retail.v2.Image images = 23;
Returns | |
---|---|
Type | Description |
List<Image> |
getImagesOrBuilder(int index)
public abstract ImageOrBuilder getImagesOrBuilder(int index)
Product images for the product. We highly recommend putting the main image first. A maximum of 300 images are allowed. Corresponding properties: Google Merchant Center property image_link. Schema.org property Product.image.
repeated .google.cloud.retail.v2.Image images = 23;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
ImageOrBuilder |
getImagesOrBuilderList()
public abstract List<? extends ImageOrBuilder> getImagesOrBuilderList()
Product images for the product. We highly recommend putting the main image first. A maximum of 300 images are allowed. Corresponding properties: Google Merchant Center property image_link. Schema.org property Product.image.
repeated .google.cloud.retail.v2.Image images = 23;
Returns | |
---|---|
Type | Description |
List<? extends com.google.cloud.retail.v2.ImageOrBuilder> |
getLanguageCode()
public abstract String getLanguageCode()
Language of the title/description and other string attributes. Use language tags defined by BCP 47. For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to "en-US" if unset.
string language_code = 11;
Returns | |
---|---|
Type | Description |
String | The languageCode. |
getLanguageCodeBytes()
public abstract ByteString getLanguageCodeBytes()
Language of the title/description and other string attributes. Use language tags defined by BCP 47. For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to "en-US" if unset.
string language_code = 11;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for languageCode. |
getLocalInventories(int index)
public abstract LocalInventory getLocalInventories(int index)
Output only. A list of local inventories specific to different places. This field can be managed by ProductService.AddLocalInventories and ProductService.RemoveLocalInventories APIs if fine-grained, high-volume updates are necessary.
repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
LocalInventory |
getLocalInventoriesCount()
public abstract int getLocalInventoriesCount()
Output only. A list of local inventories specific to different places. This field can be managed by ProductService.AddLocalInventories and ProductService.RemoveLocalInventories APIs if fine-grained, high-volume updates are necessary.
repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
int |
getLocalInventoriesList()
public abstract List<LocalInventory> getLocalInventoriesList()
Output only. A list of local inventories specific to different places. This field can be managed by ProductService.AddLocalInventories and ProductService.RemoveLocalInventories APIs if fine-grained, high-volume updates are necessary.
repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
List<LocalInventory> |
getLocalInventoriesOrBuilder(int index)
public abstract LocalInventoryOrBuilder getLocalInventoriesOrBuilder(int index)
Output only. A list of local inventories specific to different places. This field can be managed by ProductService.AddLocalInventories and ProductService.RemoveLocalInventories APIs if fine-grained, high-volume updates are necessary.
repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
LocalInventoryOrBuilder |
getLocalInventoriesOrBuilderList()
public abstract List<? extends LocalInventoryOrBuilder> getLocalInventoriesOrBuilderList()
Output only. A list of local inventories specific to different places. This field can be managed by ProductService.AddLocalInventories and ProductService.RemoveLocalInventories APIs if fine-grained, high-volume updates are necessary.
repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
List<? extends com.google.cloud.retail.v2.LocalInventoryOrBuilder> |
getMaterials(int index)
public abstract String getMaterials(int index)
The material of the product. For example, "leather", "wooden". A maximum of 20 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 200 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property material. Schema.org property Product.material.
repeated string materials = 27;
Parameter | |
---|---|
Name | Description |
index | int The index of the element to return. |
Returns | |
---|---|
Type | Description |
String | The materials at the given index. |
getMaterialsBytes(int index)
public abstract ByteString getMaterialsBytes(int index)
The material of the product. For example, "leather", "wooden". A maximum of 20 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 200 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property material. Schema.org property Product.material.
repeated string materials = 27;
Parameter | |
---|---|
Name | Description |
index | int The index of the value to return. |
Returns | |
---|---|
Type | Description |
ByteString | The bytes of the materials at the given index. |
getMaterialsCount()
public abstract int getMaterialsCount()
The material of the product. For example, "leather", "wooden". A maximum of 20 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 200 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property material. Schema.org property Product.material.
repeated string materials = 27;
Returns | |
---|---|
Type | Description |
int | The count of materials. |
getMaterialsList()
public abstract List<String> getMaterialsList()
The material of the product. For example, "leather", "wooden". A maximum of 20 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 200 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property material. Schema.org property Product.material.
repeated string materials = 27;
Returns | |
---|---|
Type | Description |
List<String> | A list containing the materials. |
getName()
public abstract String getName()
Immutable. Full resource name of the product, such as
projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id
.
string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
Returns | |
---|---|
Type | Description |
String | The name. |
getNameBytes()
public abstract ByteString getNameBytes()
Immutable. Full resource name of the product, such as
projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id
.
string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
Returns | |
---|---|
Type | Description |
ByteString | The bytes for name. |
getPatterns(int index)
public abstract String getPatterns(int index)
The pattern or graphic print of the product. For example, "striped", "polka dot", "paisley". A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property pattern. Schema.org property Product.pattern.
repeated string patterns = 28;
Parameter | |
---|---|
Name | Description |
index | int The index of the element to return. |
Returns | |
---|---|
Type | Description |
String | The patterns at the given index. |
getPatternsBytes(int index)
public abstract ByteString getPatternsBytes(int index)
The pattern or graphic print of the product. For example, "striped", "polka dot", "paisley". A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property pattern. Schema.org property Product.pattern.
repeated string patterns = 28;
Parameter | |
---|---|
Name | Description |
index | int The index of the value to return. |
Returns | |
---|---|
Type | Description |
ByteString | The bytes of the patterns at the given index. |
getPatternsCount()
public abstract int getPatternsCount()
The pattern or graphic print of the product. For example, "striped", "polka dot", "paisley". A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property pattern. Schema.org property Product.pattern.
repeated string patterns = 28;
Returns | |
---|---|
Type | Description |
int | The count of patterns. |
getPatternsList()
public abstract List<String> getPatternsList()
The pattern or graphic print of the product. For example, "striped", "polka dot", "paisley". A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property pattern. Schema.org property Product.pattern.
repeated string patterns = 28;
Returns | |
---|---|
Type | Description |
List<String> | A list containing the patterns. |
getPriceInfo()
public abstract PriceInfo getPriceInfo()
Product price and cost information. Corresponding properties: Google Merchant Center property price.
.google.cloud.retail.v2.PriceInfo price_info = 14;
Returns | |
---|---|
Type | Description |
PriceInfo | The priceInfo. |
getPriceInfoOrBuilder()
public abstract PriceInfoOrBuilder getPriceInfoOrBuilder()
Product price and cost information. Corresponding properties: Google Merchant Center property price.
.google.cloud.retail.v2.PriceInfo price_info = 14;
Returns | |
---|---|
Type | Description |
PriceInfoOrBuilder |
getPrimaryProductId()
public abstract String getPrimaryProductId()
Variant group identifier. Must be an id, with the same parent branch with this product. Otherwise, an error is thrown. For Type.PRIMARY Products, this field can only be empty or set to the same value as id. For VARIANT Products, this field cannot be empty. A maximum of 2,000 products are allowed to share the same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property item_group_id. Schema.org property Product.inProductGroupWithID.
string primary_product_id = 4;
Returns | |
---|---|
Type | Description |
String | The primaryProductId. |
getPrimaryProductIdBytes()
public abstract ByteString getPrimaryProductIdBytes()
Variant group identifier. Must be an id, with the same parent branch with this product. Otherwise, an error is thrown. For Type.PRIMARY Products, this field can only be empty or set to the same value as id. For VARIANT Products, this field cannot be empty. A maximum of 2,000 products are allowed to share the same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property item_group_id. Schema.org property Product.inProductGroupWithID.
string primary_product_id = 4;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for primaryProductId. |
getPromotions(int index)
public abstract Promotion getPromotions(int index)
The promotions applied to the product. A maximum of 10 values are allowed per Product. Only Promotion.promotion_id will be used, other fields will be ignored if set.
repeated .google.cloud.retail.v2.Promotion promotions = 34;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
Promotion |
getPromotionsCount()
public abstract int getPromotionsCount()
The promotions applied to the product. A maximum of 10 values are allowed per Product. Only Promotion.promotion_id will be used, other fields will be ignored if set.
repeated .google.cloud.retail.v2.Promotion promotions = 34;
Returns | |
---|---|
Type | Description |
int |
getPromotionsList()
public abstract List<Promotion> getPromotionsList()
The promotions applied to the product. A maximum of 10 values are allowed per Product. Only Promotion.promotion_id will be used, other fields will be ignored if set.
repeated .google.cloud.retail.v2.Promotion promotions = 34;
Returns | |
---|---|
Type | Description |
List<Promotion> |
getPromotionsOrBuilder(int index)
public abstract PromotionOrBuilder getPromotionsOrBuilder(int index)
The promotions applied to the product. A maximum of 10 values are allowed per Product. Only Promotion.promotion_id will be used, other fields will be ignored if set.
repeated .google.cloud.retail.v2.Promotion promotions = 34;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
PromotionOrBuilder |
getPromotionsOrBuilderList()
public abstract List<? extends PromotionOrBuilder> getPromotionsOrBuilderList()
The promotions applied to the product. A maximum of 10 values are allowed per Product. Only Promotion.promotion_id will be used, other fields will be ignored if set.
repeated .google.cloud.retail.v2.Promotion promotions = 34;
Returns | |
---|---|
Type | Description |
List<? extends com.google.cloud.retail.v2.PromotionOrBuilder> |
getPublishTime()
public abstract Timestamp getPublishTime()
The timestamp when the product is published by the retailer for the first time, which indicates the freshness of the products. Note that this field is different from available_time, given it purely describes product freshness regardless of when it is available on search and recommendation.
.google.protobuf.Timestamp publish_time = 33;
Returns | |
---|---|
Type | Description |
Timestamp | The publishTime. |
getPublishTimeOrBuilder()
public abstract TimestampOrBuilder getPublishTimeOrBuilder()
The timestamp when the product is published by the retailer for the first time, which indicates the freshness of the products. Note that this field is different from available_time, given it purely describes product freshness regardless of when it is available on search and recommendation.
.google.protobuf.Timestamp publish_time = 33;
Returns | |
---|---|
Type | Description |
TimestampOrBuilder |
getRating()
public abstract Rating getRating()
The rating of this product.
.google.cloud.retail.v2.Rating rating = 15;
Returns | |
---|---|
Type | Description |
Rating | The rating. |
getRatingOrBuilder()
public abstract RatingOrBuilder getRatingOrBuilder()
The rating of this product.
.google.cloud.retail.v2.Rating rating = 15;
Returns | |
---|---|
Type | Description |
RatingOrBuilder |
getRetrievableFields() (deprecated)
public abstract FieldMask getRetrievableFields()
Deprecated. google.cloud.retail.v2.Product.retrievable_fields is deprecated. See google/cloud/retail/v2/product.proto;l=562
Indicates which fields in the Products are returned in SearchResponse. Supported fields for all types:
- audience
- availability
- brands
- color_info
- conditions
- gtin
- materials
- name
- patterns
- price_info
- rating
- sizes
- title
- uri Supported fields only for Type.PRIMARY and Type.COLLECTION:
- categories
- description
- images Supported fields only for Type.VARIANT:
- Only the first image in images To mark attributes as retrievable, include paths of the form "attributes.key" where "key" is the key of a custom attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION, the following fields are always returned in SearchResponse by default:
- name For Type.VARIANT, the following fields are always returned in by default:
- name
- color_info The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is returned. Note: Returning more fields in SearchResponse can increase response payload size and serving latency. This field is deprecated. Use the retrievable site-wide control instead.
.google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];
Returns | |
---|---|
Type | Description |
FieldMask | The retrievableFields. |
getRetrievableFieldsOrBuilder()
public abstract FieldMaskOrBuilder getRetrievableFieldsOrBuilder()
Indicates which fields in the Products are returned in SearchResponse. Supported fields for all types:
- audience
- availability
- brands
- color_info
- conditions
- gtin
- materials
- name
- patterns
- price_info
- rating
- sizes
- title
- uri Supported fields only for Type.PRIMARY and Type.COLLECTION:
- categories
- description
- images Supported fields only for Type.VARIANT:
- Only the first image in images To mark attributes as retrievable, include paths of the form "attributes.key" where "key" is the key of a custom attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION, the following fields are always returned in SearchResponse by default:
- name For Type.VARIANT, the following fields are always returned in by default:
- name
- color_info The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is returned. Note: Returning more fields in SearchResponse can increase response payload size and serving latency. This field is deprecated. Use the retrievable site-wide control instead.
.google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];
Returns | |
---|---|
Type | Description |
FieldMaskOrBuilder |
getSizes(int index)
public abstract String getSizes(int index)
The size of the product. To represent different size systems or size types, consider using this format: [[[size_system:]size_type:]size_value]. For example, in "US:MENS:M", "US" represents size system; "MENS" represents size type; "M" represents size value. In "GIRLS:27", size system is empty; "GIRLS" represents size type; "27" represents size value. In "32 inches", both size system and size type are empty, while size value is "32 inches". A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property size, size_type, and size_system. Schema.org property Product.size.
repeated string sizes = 26;
Parameter | |
---|---|
Name | Description |
index | int The index of the element to return. |
Returns | |
---|---|
Type | Description |
String | The sizes at the given index. |
getSizesBytes(int index)
public abstract ByteString getSizesBytes(int index)
The size of the product. To represent different size systems or size types, consider using this format: [[[size_system:]size_type:]size_value]. For example, in "US:MENS:M", "US" represents size system; "MENS" represents size type; "M" represents size value. In "GIRLS:27", size system is empty; "GIRLS" represents size type; "27" represents size value. In "32 inches", both size system and size type are empty, while size value is "32 inches". A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property size, size_type, and size_system. Schema.org property Product.size.
repeated string sizes = 26;
Parameter | |
---|---|
Name | Description |
index | int The index of the value to return. |
Returns | |
---|---|
Type | Description |
ByteString | The bytes of the sizes at the given index. |
getSizesCount()
public abstract int getSizesCount()
The size of the product. To represent different size systems or size types, consider using this format: [[[size_system:]size_type:]size_value]. For example, in "US:MENS:M", "US" represents size system; "MENS" represents size type; "M" represents size value. In "GIRLS:27", size system is empty; "GIRLS" represents size type; "27" represents size value. In "32 inches", both size system and size type are empty, while size value is "32 inches". A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property size, size_type, and size_system. Schema.org property Product.size.
repeated string sizes = 26;
Returns | |
---|---|
Type | Description |
int | The count of sizes. |
getSizesList()
public abstract List<String> getSizesList()
The size of the product. To represent different size systems or size types, consider using this format: [[[size_system:]size_type:]size_value]. For example, in "US:MENS:M", "US" represents size system; "MENS" represents size type; "M" represents size value. In "GIRLS:27", size system is empty; "GIRLS" represents size type; "27" represents size value. In "32 inches", both size system and size type are empty, while size value is "32 inches". A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property size, size_type, and size_system. Schema.org property Product.size.
repeated string sizes = 26;
Returns | |
---|---|
Type | Description |
List<String> | A list containing the sizes. |
getTags(int index)
public abstract String getTags(int index)
Custom tags associated with the product. At most 250 values are allowed per Product. This value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can be used for filtering recommendation results by passing the tag as part of the PredictRequest.filter. Corresponding properties: Google Merchant Center property custom_label_0–4.
repeated string tags = 13;
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 abstract ByteString getTagsBytes(int index)
Custom tags associated with the product. At most 250 values are allowed per Product. This value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can be used for filtering recommendation results by passing the tag as part of the PredictRequest.filter. Corresponding properties: Google Merchant Center property custom_label_0–4.
repeated string tags = 13;
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 abstract int getTagsCount()
Custom tags associated with the product. At most 250 values are allowed per Product. This value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can be used for filtering recommendation results by passing the tag as part of the PredictRequest.filter. Corresponding properties: Google Merchant Center property custom_label_0–4.
repeated string tags = 13;
Returns | |
---|---|
Type | Description |
int | The count of tags. |
getTagsList()
public abstract List<String> getTagsList()
Custom tags associated with the product. At most 250 values are allowed per Product. This value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can be used for filtering recommendation results by passing the tag as part of the PredictRequest.filter. Corresponding properties: Google Merchant Center property custom_label_0–4.
repeated string tags = 13;
Returns | |
---|---|
Type | Description |
List<String> | A list containing the tags. |
getTitle()
public abstract String getTitle()
Required. Product title. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property title. Schema.org property Product.name.
string title = 8 [(.google.api.field_behavior) = REQUIRED];
Returns | |
---|---|
Type | Description |
String | The title. |
getTitleBytes()
public abstract ByteString getTitleBytes()
Required. Product title. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property title. Schema.org property Product.name.
string title = 8 [(.google.api.field_behavior) = REQUIRED];
Returns | |
---|---|
Type | Description |
ByteString | The bytes for title. |
getTtl()
public abstract Duration getTtl()
Input only. The TTL (time to live) of the product. Note that this is only applicable to Type.PRIMARY and Type.COLLECTION, and ignored for Type.VARIANT. In general, we suggest the users to delete the stale products explicitly, instead of using this field to determine staleness. If it is set, it must be a non-negative value, and expire_time is set as current timestamp plus ttl. The derived expire_time is returned in the output and ttl is left blank when retrieving the Product. If it is set, the product is not available for SearchService.Search after current timestamp plus ttl. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts.
.google.protobuf.Duration ttl = 17 [(.google.api.field_behavior) = INPUT_ONLY];
Returns | |
---|---|
Type | Description |
Duration | The ttl. |
getTtlOrBuilder()
public abstract DurationOrBuilder getTtlOrBuilder()
Input only. The TTL (time to live) of the product. Note that this is only applicable to Type.PRIMARY and Type.COLLECTION, and ignored for Type.VARIANT. In general, we suggest the users to delete the stale products explicitly, instead of using this field to determine staleness. If it is set, it must be a non-negative value, and expire_time is set as current timestamp plus ttl. The derived expire_time is returned in the output and ttl is left blank when retrieving the Product. If it is set, the product is not available for SearchService.Search after current timestamp plus ttl. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts.
.google.protobuf.Duration ttl = 17 [(.google.api.field_behavior) = INPUT_ONLY];
Returns | |
---|---|
Type | Description |
DurationOrBuilder |
getType()
public abstract Product.Type getType()
Immutable. The type of the product. Default to Catalog.product_level_config.ingestion_product_type if unset.
.google.cloud.retail.v2.Product.Type type = 3 [(.google.api.field_behavior) = IMMUTABLE];
Returns | |
---|---|
Type | Description |
Product.Type | The type. |
getTypeValue()
public abstract int getTypeValue()
Immutable. The type of the product. Default to Catalog.product_level_config.ingestion_product_type if unset.
.google.cloud.retail.v2.Product.Type type = 3 [(.google.api.field_behavior) = IMMUTABLE];
Returns | |
---|---|
Type | Description |
int | The enum numeric value on the wire for type. |
getUri()
public abstract String getUri()
Canonical URL directly linking to the product detail page. It is strongly recommended to provide a valid uri for the product, otherwise the service performance could be significantly degraded. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property link. Schema.org property Offer.url.
string uri = 22;
Returns | |
---|---|
Type | Description |
String | The uri. |
getUriBytes()
public abstract ByteString getUriBytes()
Canonical URL directly linking to the product detail page. It is strongly recommended to provide a valid uri for the product, otherwise the service performance could be significantly degraded. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property link. Schema.org property Offer.url.
string uri = 22;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for uri. |
getVariants(int index)
public abstract Product getVariants(int index)
Output only. Product variants grouped together on primary product which share similar product attributes. It's automatically grouped by primary_product_id for all the product variants. Only populated for Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
Product |
getVariantsCount()
public abstract int getVariantsCount()
Output only. Product variants grouped together on primary product which share similar product attributes. It's automatically grouped by primary_product_id for all the product variants. Only populated for Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
int |
getVariantsList()
public abstract List<Product> getVariantsList()
Output only. Product variants grouped together on primary product which share similar product attributes. It's automatically grouped by primary_product_id for all the product variants. Only populated for Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
List<Product> |
getVariantsOrBuilder(int index)
public abstract ProductOrBuilder getVariantsOrBuilder(int index)
Output only. Product variants grouped together on primary product which share similar product attributes. It's automatically grouped by primary_product_id for all the product variants. Only populated for Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
ProductOrBuilder |
getVariantsOrBuilderList()
public abstract List<? extends ProductOrBuilder> getVariantsOrBuilderList()
Output only. Product variants grouped together on primary product which share similar product attributes. It's automatically grouped by primary_product_id for all the product variants. Only populated for Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
List<? extends com.google.cloud.retail.v2.ProductOrBuilder> |
hasAudience()
public abstract boolean hasAudience()
The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product.
.google.cloud.retail.v2.Audience audience = 24;
Returns | |
---|---|
Type | Description |
boolean | Whether the audience field is set. |
hasAvailableQuantity()
public abstract boolean hasAvailableQuantity()
The available quantity of the item.
.google.protobuf.Int32Value available_quantity = 20;
Returns | |
---|---|
Type | Description |
boolean | Whether the availableQuantity field is set. |
hasAvailableTime()
public abstract boolean hasAvailableTime()
The timestamp when this Product becomes available for SearchService.Search. Note that this is only applicable to Type.PRIMARY and Type.COLLECTION, and ignored for Type.VARIANT.
.google.protobuf.Timestamp available_time = 18;
Returns | |
---|---|
Type | Description |
boolean | Whether the availableTime field is set. |
hasColorInfo()
public abstract boolean hasColorInfo()
The color of the product. Corresponding properties: Google Merchant Center property color. Schema.org property Product.color.
.google.cloud.retail.v2.ColorInfo color_info = 25;
Returns | |
---|---|
Type | Description |
boolean | Whether the colorInfo field is set. |
hasExpireTime()
public abstract boolean hasExpireTime()
The timestamp when this product becomes unavailable for SearchService.Search. Note that this is only applicable to Type.PRIMARY and Type.COLLECTION, and ignored for Type.VARIANT. In general, we suggest the users to delete the stale products explicitly, instead of using this field to determine staleness. If it is set, the Product is not available for SearchService.Search after expire_time. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts. expire_time must be later than available_time and publish_time, otherwise an INVALID_ARGUMENT error is thrown. Corresponding properties: Google Merchant Center property expiration_date.
.google.protobuf.Timestamp expire_time = 16;
Returns | |
---|---|
Type | Description |
boolean | Whether the expireTime field is set. |
hasPriceInfo()
public abstract boolean hasPriceInfo()
Product price and cost information. Corresponding properties: Google Merchant Center property price.
.google.cloud.retail.v2.PriceInfo price_info = 14;
Returns | |
---|---|
Type | Description |
boolean | Whether the priceInfo field is set. |
hasPublishTime()
public abstract boolean hasPublishTime()
The timestamp when the product is published by the retailer for the first time, which indicates the freshness of the products. Note that this field is different from available_time, given it purely describes product freshness regardless of when it is available on search and recommendation.
.google.protobuf.Timestamp publish_time = 33;
Returns | |
---|---|
Type | Description |
boolean | Whether the publishTime field is set. |
hasRating()
public abstract boolean hasRating()
The rating of this product.
.google.cloud.retail.v2.Rating rating = 15;
Returns | |
---|---|
Type | Description |
boolean | Whether the rating field is set. |
hasRetrievableFields() (deprecated)
public abstract boolean hasRetrievableFields()
Deprecated. google.cloud.retail.v2.Product.retrievable_fields is deprecated. See google/cloud/retail/v2/product.proto;l=562
Indicates which fields in the Products are returned in SearchResponse. Supported fields for all types:
- audience
- availability
- brands
- color_info
- conditions
- gtin
- materials
- name
- patterns
- price_info
- rating
- sizes
- title
- uri Supported fields only for Type.PRIMARY and Type.COLLECTION:
- categories
- description
- images Supported fields only for Type.VARIANT:
- Only the first image in images To mark attributes as retrievable, include paths of the form "attributes.key" where "key" is the key of a custom attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION, the following fields are always returned in SearchResponse by default:
- name For Type.VARIANT, the following fields are always returned in by default:
- name
- color_info The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is returned. Note: Returning more fields in SearchResponse can increase response payload size and serving latency. This field is deprecated. Use the retrievable site-wide control instead.
.google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];
Returns | |
---|---|
Type | Description |
boolean | Whether the retrievableFields field is set. |
hasTtl()
public abstract boolean hasTtl()
Input only. The TTL (time to live) of the product. Note that this is only applicable to Type.PRIMARY and Type.COLLECTION, and ignored for Type.VARIANT. In general, we suggest the users to delete the stale products explicitly, instead of using this field to determine staleness. If it is set, it must be a non-negative value, and expire_time is set as current timestamp plus ttl. The derived expire_time is returned in the output and ttl is left blank when retrieving the Product. If it is set, the product is not available for SearchService.Search after current timestamp plus ttl. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts.
.google.protobuf.Duration ttl = 17 [(.google.api.field_behavior) = INPUT_ONLY];
Returns | |
---|---|
Type | Description |
boolean | Whether the ttl field is set. |