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 ImageSearchResponseBuilderbuilder()builder factory method for ImageSearchResponsestatic ImageSearchResponseBuilderbuilder(ImageSearchResponse template) create builder for ImageSearchResponse instancestatic ImageSearchResponsedeepCopy(ImageSearchResponse template) factory method to create a deep copy of ImageSearchResponse@NotNull IntegergetCount()The maximum number of results to return from a query.@NotNull DoubleNumber of elements skipped.@NotNull @Valid List<ResultItem>An array of image URLs of images that are similar to the query image.@NotNull IntegergetTotal()The total number of product images that were have been analyzed.static ImageSearchResponseof()factory methodstatic ImageSearchResponseof(ImageSearchResponse template) factory method to create a shallow copy ImageSearchResponsevoidThe maximum number of results to return from a query.voidNumber of elements skipped.voidsetResults(ResultItem... results) An array of image URLs of images that are similar to the query image.voidsetResults(List<ResultItem> results) An array of image URLs of images that are similar to the query image.voidThe 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> TwithImageSearchResponse(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
-