return new Function<Object, IterableWithMarker<ImageDetails>>() {
@SuppressWarnings("unchecked")
@Override
public IterableWithMarker<ImageDetails> apply(Object input) {
PaginationOptions paginationOptions = PaginationOptions.class.cast(input);
Collection<String> markers = paginationOptions.buildQueryParameters().get("marker");
if (!markers.isEmpty()) {
return IterableWithMarker.class.cast(imageApi.listInDetail(marker(getOnlyElement(markers))));
}
else {