Interface ImageSearchResponse
public interface ImageSearchResponse
Response format from image search endpoint.
Example to create an instance using the builder pattern
ImageSearchResponse imageSearchResponse = ImageSearchResponse.builder()
.count(0.3)
.offset(0.3)
.total(0.3)
.plusResults(resultsBuilder -> resultsBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ImageSearchResponseBuilder
builder()
builder factory method for ImageSearchResponsestatic ImageSearchResponseBuilder
builder
(ImageSearchResponse template) create builder for ImageSearchResponse instancestatic ImageSearchResponse
deepCopy
(ImageSearchResponse template) factory method to create a deep copy of ImageSearchResponse@NotNull Integer
getCount()
The maximum number of results to return from a query.@NotNull Double
Number of elements skipped.@NotNull @Valid List<ResultItem>
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()
factory methodstatic ImageSearchResponse
of
(ImageSearchResponse template) factory method to create a shallow copy ImageSearchResponsevoid
The maximum number of results to return from a query.void
Number of elements skipped.void
setResults
(ResultItem... results) An array of image URLs of images that are similar to the query image.void
setResults
(List<ResultItem> results) An array of image URLs of images that are similar to the query image.void
The total number of product images that were have been analyzed.static com.fasterxml.jackson.core.type.TypeReference<ImageSearchResponse>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withImageSearchResponse
(Function<ImageSearchResponse, T> helper) accessor map function
-
Method Details
-
getCount
The maximum number of results to return from a query.
- Returns:
- count
-
getOffset
Number of elements skipped.
- Returns:
- offset
-
getTotal
The total number of product images that were have been analyzed.
- Returns:
- total
-
getResults
An array of image URLs of images that are similar to the query image. If no matching images are found, results is empty.
- Returns:
- results
-
setCount
The maximum number of results to return from a query.
- Parameters:
count
- value to be set
-
setOffset
Number of elements skipped.
- Parameters:
offset
- value to be set
-
setTotal
The total number of product images that were have been analyzed.
- Parameters:
total
- value to be set
-
setResults
An array of image URLs of images that are similar to the query image. If no matching images are found, results is empty.
- Parameters:
results
- values to be set
-
setResults
An array of image URLs of images that are similar to the query image. If no matching images are found, results is empty.
- Parameters:
results
- values to be set
-
of
factory method- Returns:
- instance of ImageSearchResponse
-
of
factory method to create a shallow copy ImageSearchResponse- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ImageSearchResponse- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ImageSearchResponse- Returns:
- builder
-
builder
create builder for ImageSearchResponse instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withImageSearchResponse
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-