use of com.amazonaws.services.personalize.model.SolutionSummary in project knime-cloud by knime.
the class AmazonPersonalizeUtils method listAllSolutions.
/**
* @param personalize the amazon personalize client
* @return all solutions
*/
public static List<SolutionSummary> listAllSolutions(final AmazonPersonalize personalize) {
final ListSolutionsRequest request = new ListSolutionsRequest().withMaxResults(100);
ListSolutionsResult result = personalize.listSolutions(request);
List<SolutionSummary> list = result.getSolutions();
String nextToken;
while ((nextToken = result.getNextToken()) != null) {
result = personalize.listSolutions(request.withNextToken(nextToken));
list.addAll(result.getSolutions());
}
return list;
}
Aggregations