Send feedback
Class ProductDetail (0.38.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 0.38.0 keyboard_arrow_down
public final class ProductDetail extends GeneratedMessageV3 implements ProductDetailOrBuilder
Detailed product information associated with a user event.
Protobuf type google.cloud.recommendationengine.v1beta1.ProductDetail
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
AVAILABLE_QUANTITY_FIELD_NUMBER
public static final int AVAILABLE_QUANTITY_FIELD_NUMBER
Field Value Type Description int
CURRENCY_CODE_FIELD_NUMBER
public static final int CURRENCY_CODE_FIELD_NUMBER
Field Value Type Description int
DISPLAY_PRICE_FIELD_NUMBER
public static final int DISPLAY_PRICE_FIELD_NUMBER
Field Value Type Description int
ID_FIELD_NUMBER
public static final int ID_FIELD_NUMBER
Field Value Type Description int
ITEM_ATTRIBUTES_FIELD_NUMBER
public static final int ITEM_ATTRIBUTES_FIELD_NUMBER
Field Value Type Description int
ORIGINAL_PRICE_FIELD_NUMBER
public static final int ORIGINAL_PRICE_FIELD_NUMBER
Field Value Type Description int
QUANTITY_FIELD_NUMBER
public static final int QUANTITY_FIELD_NUMBER
Field Value Type Description int
STOCK_STATE_FIELD_NUMBER
public static final int STOCK_STATE_FIELD_NUMBER
Field Value Type Description int
Static Methods
getDefaultInstance()
public static ProductDetail getDefaultInstance ()
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
newBuilder()
public static ProductDetail . Builder newBuilder ()
newBuilder(ProductDetail prototype)
public static ProductDetail . Builder newBuilder ( ProductDetail prototype )
public static ProductDetail parseDelimitedFrom ( InputStream input )
public static ProductDetail parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(byte[] data)
public static ProductDetail parseFrom ( byte [] data )
Parameter Name Description data
byte []
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static ProductDetail parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteString data)
public static ProductDetail parseFrom ( ByteString data )
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static ProductDetail parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
public static ProductDetail parseFrom ( CodedInputStream input )
public static ProductDetail parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
public static ProductDetail parseFrom ( InputStream input )
public static ProductDetail parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteBuffer data)
public static ProductDetail parseFrom ( ByteBuffer data )
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static ProductDetail parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
parser()
public static Parser<ProductDetail> parser ()
Methods
equals(Object obj)
public boolean equals ( Object obj )
Parameter Name Description obj
Object
Overrides
getAvailableQuantity()
public int getAvailableQuantity ()
Optional. Quantity of the products in stock when a user event happens.
Optional. If provided, this overrides the available quantity in Catalog for
this event. and can only be set if stock_status
is set to IN_STOCK
.
Note that if an item is out of stock, you must set the stock_state
field
to be OUT_OF_STOCK
. Leaving this field unspecified / as zero is not
sufficient to mark the item out of stock.
int32 available_quantity = 7 [(.google.api.field_behavior) = OPTIONAL];
Returns Type Description int
The availableQuantity.
getCurrencyCode()
public String getCurrencyCode ()
Optional. Currency code for price/costs. Use three-character ISO-4217
code. Required only if originalPrice or displayPrice is set.
string currency_code = 2 [(.google.api.field_behavior) = OPTIONAL];
Returns Type Description String
The currencyCode.
getCurrencyCodeBytes()
public ByteString getCurrencyCodeBytes ()
Optional. Currency code for price/costs. Use three-character ISO-4217
code. Required only if originalPrice or displayPrice is set.
string currency_code = 2 [(.google.api.field_behavior) = OPTIONAL];
Returns Type Description ByteString
The bytes for currencyCode.
getDefaultInstanceForType()
public ProductDetail getDefaultInstanceForType ()
getDisplayPrice()
public float getDisplayPrice ()
Optional. Display price of the product (e.g. discounted price). If
provided, this will override the display price in Catalog for this product.
float display_price = 4 [(.google.api.field_behavior) = OPTIONAL];
Returns Type Description float
The displayPrice.
getId()
Required. Catalog item ID. UTF-8 encoded string with a length limit of 128
characters.
string id = 1 [(.google.api.field_behavior) = REQUIRED];
Returns Type Description String
The id.
getIdBytes()
public ByteString getIdBytes ()
Required. Catalog item ID. UTF-8 encoded string with a length limit of 128
characters.
string id = 1 [(.google.api.field_behavior) = REQUIRED];
getItemAttributes()
public FeatureMap getItemAttributes ()
Optional. Extra features associated with a product in the user event.
.google.cloud.recommendationengine.v1beta1.FeatureMap item_attributes = 8 [(.google.api.field_behavior) = OPTIONAL];
Returns Type Description FeatureMap
The itemAttributes.
getItemAttributesOrBuilder()
public FeatureMapOrBuilder getItemAttributesOrBuilder ()
Optional. Extra features associated with a product in the user event.
.google.cloud.recommendationengine.v1beta1.FeatureMap item_attributes = 8 [(.google.api.field_behavior) = OPTIONAL];
getOriginalPrice()
public float getOriginalPrice ()
Optional. Original price of the product. If provided, this will override
the original price in Catalog for this product.
float original_price = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns Type Description float
The originalPrice.
getParserForType()
public Parser<ProductDetail> getParserForType ()
Overrides
getQuantity()
Optional. Quantity of the product associated with the user event. For
example, this field will be 2 if two products are added to the shopping
cart for add-to-cart
event. Required for add-to-cart
, add-to-list
,
remove-from-cart
, checkout-start
, purchase-complete
, refund
event
types.
int32 quantity = 6 [(.google.api.field_behavior) = OPTIONAL];
Returns Type Description int
The quantity.
getSerializedSize()
public int getSerializedSize ()
Returns Type Description int
Overrides
getStockState()
public ProductCatalogItem . StockState getStockState ()
Optional. Item stock state. If provided, this overrides the stock state
in Catalog for items in this event.
.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.StockState stock_state = 5 [(.google.api.field_behavior) = OPTIONAL];
getStockStateValue()
public int getStockStateValue ()
Optional. Item stock state. If provided, this overrides the stock state
in Catalog for items in this event.
.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.StockState stock_state = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns Type Description int
The enum numeric value on the wire for stockState.
hasItemAttributes()
public boolean hasItemAttributes ()
Optional. Extra features associated with a product in the user event.
.google.cloud.recommendationengine.v1beta1.FeatureMap item_attributes = 8 [(.google.api.field_behavior) = OPTIONAL];
Returns Type Description boolean
Whether the itemAttributes field is set.
hashCode()
Returns Type Description int
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
isInitialized()
public final boolean isInitialized ()
Overrides
newBuilderForType()
public ProductDetail . Builder newBuilderForType ()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected ProductDetail . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Overrides
toBuilder()
public ProductDetail . Builder toBuilder ()
writeTo(CodedOutputStream output)
public void writeTo ( CodedOutputStream output )
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-27 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-27 UTC."],[],[]]