java.lang.Object
java.lang.Record
it.auties.whatsapp.model.product.Product
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject
public record Product(ImageMessage image, String id, String title, String description, String currencyCode, long priceAmount1000, String retailerId, String url, int productImageCount, String firstImageId, long salePriceAmount1000)
extends Record
implements it.auties.protobuf.model.ProtobufMessage
A model class that represents a product
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for thecurrencyCoderecord component.private final StringThe field for thedescriptionrecord component.private final StringThe field for thefirstImageIdrecord component.private final StringThe field for theidrecord component.private final ImageMessageThe field for theimagerecord component.private final longThe field for thepriceAmount1000record component.private final intThe field for theproductImageCountrecord component.private final StringThe field for theretailerIdrecord component.private final longThe field for thesalePriceAmount1000record component.private final StringThe field for thetitlerecord component.private final StringThe field for theurlrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecurrencyCoderecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefirstImageIdrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.image()Returns the value of theimagerecord component.longReturns the value of thepriceAmount1000record component.intReturns the value of theproductImageCountrecord component.Returns the value of theretailerIdrecord component.longReturns the value of thesalePriceAmount1000record component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.
-
Field Details
-
image
The field for theimagerecord component. -
id
The field for theidrecord component. -
title
The field for thetitlerecord component. -
description
The field for thedescriptionrecord component. -
currencyCode
The field for thecurrencyCoderecord component. -
priceAmount1000
private final long priceAmount1000The field for thepriceAmount1000record component. -
retailerId
The field for theretailerIdrecord component. -
url
The field for theurlrecord component. -
productImageCount
private final int productImageCountThe field for theproductImageCountrecord component. -
firstImageId
The field for thefirstImageIdrecord component. -
salePriceAmount1000
private final long salePriceAmount1000The field for thesalePriceAmount1000record component.
-
-
Constructor Details
-
Product
public Product(ImageMessage image, String id, String title, String description, String currencyCode, long priceAmount1000, String retailerId, String url, int productImageCount, String firstImageId, long salePriceAmount1000) Creates an instance of aProductrecord class.- Parameters:
image- the value for theimagerecord componentid- the value for theidrecord componenttitle- the value for thetitlerecord componentdescription- the value for thedescriptionrecord componentcurrencyCode- the value for thecurrencyCoderecord componentpriceAmount1000- the value for thepriceAmount1000record componentretailerId- the value for theretailerIdrecord componenturl- the value for theurlrecord componentproductImageCount- the value for theproductImageCountrecord componentfirstImageId- the value for thefirstImageIdrecord componentsalePriceAmount1000- the value for thesalePriceAmount1000record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
image
Returns the value of theimagerecord component.- Returns:
- the value of the
imagerecord component
-
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
currencyCode
Returns the value of thecurrencyCoderecord component.- Returns:
- the value of the
currencyCoderecord component
-
priceAmount1000
public long priceAmount1000()Returns the value of thepriceAmount1000record component.- Returns:
- the value of the
priceAmount1000record component
-
retailerId
Returns the value of theretailerIdrecord component.- Returns:
- the value of the
retailerIdrecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
productImageCount
public int productImageCount()Returns the value of theproductImageCountrecord component.- Returns:
- the value of the
productImageCountrecord component
-
firstImageId
Returns the value of thefirstImageIdrecord component.- Returns:
- the value of the
firstImageIdrecord component
-
salePriceAmount1000
public long salePriceAmount1000()Returns the value of thesalePriceAmount1000record component.- Returns:
- the value of the
salePriceAmount1000record component
-