public final class ProductDetail extends GeneratedMessageV3 implements ProductDetailOrBuilder
Detailed product information associated with a user event.
Protobuf type google.cloud.recommendationengine.v1beta1.ProductDetail
Static Fields
AVAILABLE_QUANTITY_FIELD_NUMBER
public static final int AVAILABLE_QUANTITY_FIELD_NUMBER
Field Value
CURRENCY_CODE_FIELD_NUMBER
public static final int CURRENCY_CODE_FIELD_NUMBER
Field Value
DISPLAY_PRICE_FIELD_NUMBER
public static final int DISPLAY_PRICE_FIELD_NUMBER
Field Value
ID_FIELD_NUMBER
public static final int ID_FIELD_NUMBER
Field Value
ITEM_ATTRIBUTES_FIELD_NUMBER
public static final int ITEM_ATTRIBUTES_FIELD_NUMBER
Field Value
ORIGINAL_PRICE_FIELD_NUMBER
public static final int ORIGINAL_PRICE_FIELD_NUMBER
Field Value
QUANTITY_FIELD_NUMBER
public static final int QUANTITY_FIELD_NUMBER
Field Value
STOCK_STATE_FIELD_NUMBER
public static final int STOCK_STATE_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static ProductDetail getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static ProductDetail.Builder newBuilder()
Returns
newBuilder(ProductDetail prototype)
public static ProductDetail.Builder newBuilder(ProductDetail prototype)
Parameter
Returns
public static ProductDetail parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static ProductDetail parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static ProductDetail parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static ProductDetail parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static ProductDetail parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static ProductDetail parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static ProductDetail parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static ProductDetail parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static ProductDetail parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static ProductDetail parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static ProductDetail parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static ProductDetail parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<ProductDetail> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
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()
Returns
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
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];
Returns
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
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];
Returns
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()
Returns
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
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];
Returns
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.
|
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
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
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public ProductDetail.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected ProductDetail.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public ProductDetail.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions