public interface ImageSearchResponse
Response format from image search endpoint.
ImageSearchResponse imageSearchResponse = ImageSearchResponse.builder()
.count(0.3)
.offset(0.3)
.total(0.3)
.plusResults(resultsBuilder -> resultsBuilder)
.build()
| Modifier and Type | Method and Description |
|---|---|
static ImageSearchResponseBuilder |
builder() |
static ImageSearchResponseBuilder |
builder(ImageSearchResponse template) |
@NotNull Integer |
getCount()
The maximum number of results to return from a query.
|
@NotNull Double |
getOffset()
Number of elements skipped.
|
@NotNull @Valid List<ResultItem> |
getResults()
An array of image URLs of images that are similar to the query image.
|
@NotNull Integer |
getTotal()
The total number of product images that were have been analyzed.
|
static ImageSearchResponse |
of() |
static ImageSearchResponse |
of(ImageSearchResponse template) |
void |
setCount(Integer count) |
void |
setOffset(Double offset) |
void |
setResults(List<ResultItem> results) |
void |
setResults(ResultItem... results) |
void |
setTotal(Integer total) |
static com.fasterxml.jackson.core.type.TypeReference<ImageSearchResponse> |
typeReference() |
default <T> T |
withImageSearchResponse(Function<ImageSearchResponse,T> helper) |
@NotNull @NotNull Integer getTotal()
The total number of product images that were have been analyzed.
@NotNull @Valid @NotNull @Valid List<ResultItem> getResults()
An array of image URLs of images that are similar to the query image. If no matching images are found, results is empty.
void setResults(ResultItem... results)
void setResults(List<ResultItem> results)
static ImageSearchResponse of()
static ImageSearchResponse of(ImageSearchResponse template)
static ImageSearchResponseBuilder builder()
static ImageSearchResponseBuilder builder(ImageSearchResponse template)
default <T> T withImageSearchResponse(Function<ImageSearchResponse,T> helper)
static com.fasterxml.jackson.core.type.TypeReference<ImageSearchResponse> typeReference()