Search in sources :

Example 1 with SolutionSummary

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;
}
Also used : ListSolutionsRequest(com.amazonaws.services.personalize.model.ListSolutionsRequest) ListSolutionsResult(com.amazonaws.services.personalize.model.ListSolutionsResult) SolutionSummary(com.amazonaws.services.personalize.model.SolutionSummary)

Aggregations

ListSolutionsRequest (com.amazonaws.services.personalize.model.ListSolutionsRequest)1 ListSolutionsResult (com.amazonaws.services.personalize.model.ListSolutionsResult)1 SolutionSummary (com.amazonaws.services.personalize.model.SolutionSummary)1