public interface ResultItem
An image URL and the product variants it is contained in. If no matching images are found, ResultItem is not present.
ResultItem resultItem = ResultItem.builder()
.imageUrl("{imageUrl}")
.plusProductVariants(productVariantsBuilder -> productVariantsBuilder)
.build()
| Modifier and Type | Method and Description |
|---|---|
static ResultItemBuilder |
builder() |
static ResultItemBuilder |
builder(ResultItem template) |
@NotNull String |
getImageUrl()
The URL of the image.
|
@NotNull @Valid List<ProductVariant> |
getProductVariants()
An array of product variants containing the image URL.
|
static ResultItem |
of() |
static ResultItem |
of(ResultItem template) |
void |
setImageUrl(String imageUrl) |
void |
setProductVariants(List<ProductVariant> productVariants) |
void |
setProductVariants(ProductVariant... productVariants) |
static com.fasterxml.jackson.core.type.TypeReference<ResultItem> |
typeReference() |
default <T> T |
withResultItem(Function<ResultItem,T> helper) |
@NotNull @NotNull String getImageUrl()
The URL of the image.
@NotNull @Valid @NotNull @Valid List<ProductVariant> getProductVariants()
An array of product variants containing the image URL.
void setImageUrl(String imageUrl)
void setProductVariants(ProductVariant... productVariants)
void setProductVariants(List<ProductVariant> productVariants)
static ResultItem of()
static ResultItem of(ResultItem template)
static ResultItemBuilder builder()
static ResultItemBuilder builder(ResultItem template)
default <T> T withResultItem(Function<ResultItem,T> helper)
static com.fasterxml.jackson.core.type.TypeReference<ResultItem> typeReference()