Class ProductDetail (0.59.0)

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
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()
Returns
Type Description
ProductDetail

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static ProductDetail.Builder newBuilder()
Returns
Type Description
ProductDetail.Builder

newBuilder(ProductDetail prototype)

public static ProductDetail.Builder newBuilder(ProductDetail prototype)
Parameter
Name Description
prototype ProductDetail
Returns
Type Description
ProductDetail.Builder

parseDelimitedFrom(InputStream input)

public static ProductDetail parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ProductDetail
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ProductDetail parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductDetail
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static ProductDetail parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
ProductDetail
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ProductDetail parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductDetail
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ProductDetail parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
ProductDetail
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ProductDetail parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductDetail
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ProductDetail parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
ProductDetail
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ProductDetail parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductDetail
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static ProductDetail parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ProductDetail
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ProductDetail parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductDetail
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static ProductDetail parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
ProductDetail
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ProductDetail parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductDetail
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<ProductDetail> parser()
Returns
Type Description
Parser<ProductDetail>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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
Type Description
ProductDetail

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()

public String 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];

Returns
Type Description
ByteString

The bytes for id.

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];

Returns
Type Description
FeatureMapOrBuilder

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
Type Description
Parser<ProductDetail>
Overrides

getQuantity()

public int 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];

Returns
Type Description
ProductCatalogItem.StockState

The stockState.

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()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public ProductDetail.Builder newBuilderForType()
Returns
Type Description
ProductDetail.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ProductDetail.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
ProductDetail.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public ProductDetail.Builder toBuilder()
Returns
Type Description
ProductDetail.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException