Record Class Product
java.lang.Object
java.lang.Record
net.ygbstudio.jbrave.core.domain.dto.web.Product
- Record Components:
type- The type of the product.name- The name or title of the product.category- The category or type of the product.price- The price of the product as a formatted string.thumbnail- A thumbnail image representing the product.description- A description of the product.offers- A list of offers available for this product.rating- The rating information for the product.gtin- The Global Trade Item Number (GTIN) of the product (format may vary).gtin8- The 8-digit GTIN of the product.gtin12- The 12-digit GTIN (UPC) of the product.gtin13- The 13-digit GTIN (EAN) of the product.gtin14- The 14-digit GTIN (ITF-14) of the product.
public record Product(String type, String name, String category, String price, Thumbnail thumbnail, String description, List<Offer> offers, Rating rating, String gtin, String gtin8, String gtin12, String gtin13, String gtin14)
extends Record
Represents a product in search results, containing detailed information about the product such as
its name, category, price, and GTIN identifiers. This is used in the Brave Search API to provide
structured data about products that are relevant to the search query.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncategory()Returns the value of thecategoryrecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.gtin()Returns the value of thegtinrecord component.gtin12()Returns the value of thegtin12record component.gtin13()Returns the value of thegtin13record component.gtin14()Returns the value of thegtin14record component.gtin8()Returns the value of thegtin8record component.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.offers()Returns the value of theoffersrecord component.price()Returns the value of thepricerecord component.rating()Returns the value of theratingrecord component.Returns the value of thethumbnailrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
Product
public Product(String type, String name, String category, String price, Thumbnail thumbnail, String description, List<Offer> offers, Rating rating, String gtin, String gtin8, String gtin12, String gtin13, String gtin14) Creates an instance of aProductrecord class.- Parameters:
type- the value for thetyperecord componentname- the value for thenamerecord componentcategory- the value for thecategoryrecord componentprice- the value for thepricerecord componentthumbnail- the value for thethumbnailrecord componentdescription- the value for thedescriptionrecord componentoffers- the value for theoffersrecord componentrating- the value for theratingrecord componentgtin- the value for thegtinrecord componentgtin8- the value for thegtin8record componentgtin12- the value for thegtin12record componentgtin13- the value for thegtin13record componentgtin14- the value for thegtin14record 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. All components in this record class are compared withObjects::equals(Object,Object). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
category
Returns the value of thecategoryrecord component.- Returns:
- the value of the
categoryrecord component
-
price
Returns the value of thepricerecord component.- Returns:
- the value of the
pricerecord component
-
thumbnail
Returns the value of thethumbnailrecord component.- Returns:
- the value of the
thumbnailrecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
offers
Returns the value of theoffersrecord component.- Returns:
- the value of the
offersrecord component
-
rating
Returns the value of theratingrecord component.- Returns:
- the value of the
ratingrecord component
-
gtin
Returns the value of thegtinrecord component.- Returns:
- the value of the
gtinrecord component
-
gtin8
Returns the value of thegtin8record component.- Returns:
- the value of the
gtin8record component
-
gtin12
Returns the value of thegtin12record component.- Returns:
- the value of the
gtin12record component
-
gtin13
Returns the value of thegtin13record component.- Returns:
- the value of the
gtin13record component
-
gtin14
Returns the value of thegtin14record component.- Returns:
- the value of the
gtin14record component
-