Class ProductDetail (0.14.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
TypeDescription
int

CURRENCY_CODE_FIELD_NUMBER

public static final int CURRENCY_CODE_FIELD_NUMBER
Field Value
TypeDescription
int

DISPLAY_PRICE_FIELD_NUMBER

public static final int DISPLAY_PRICE_FIELD_NUMBER
Field Value
TypeDescription
int

ID_FIELD_NUMBER

public static final int ID_FIELD_NUMBER
Field Value
TypeDescription
int

ITEM_ATTRIBUTES_FIELD_NUMBER

public static final int ITEM_ATTRIBUTES_FIELD_NUMBER
Field Value
TypeDescription
int

ORIGINAL_PRICE_FIELD_NUMBER

public static final int ORIGINAL_PRICE_FIELD_NUMBER
Field Value
TypeDescription
int

QUANTITY_FIELD_NUMBER

public static final int QUANTITY_FIELD_NUMBER
Field Value
TypeDescription
int

STOCK_STATE_FIELD_NUMBER

public static final int STOCK_STATE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static ProductDetail getDefaultInstance()
Returns
TypeDescription
ProductDetail

getDescriptor()

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

newBuilder()

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

newBuilder(ProductDetail prototype)

public static ProductDetail.Builder newBuilder(ProductDetail prototype)
Parameter
NameDescription
prototypeProductDetail
Returns
TypeDescription
ProductDetail.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

The bytes for currencyCode.

getDefaultInstanceForType()

public ProductDetail getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
float

The originalPrice.

getParserForType()

public Parser<ProductDetail> getParserForType()
Returns
TypeDescription
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
TypeDescription
int

The quantity.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
int

The enum numeric value on the wire for stockState.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
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
TypeDescription
boolean

Whether the itemAttributes field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public ProductDetail.Builder newBuilderForType()
Returns
TypeDescription
ProductDetail.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ProductDetail.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
ProductDetail.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public ProductDetail.Builder toBuilder()
Returns
TypeDescription
ProductDetail.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException