use of com.amazonaws.services.personalize.model.ListSchemasResult in project knime-cloud by knime.
the class AmazonPersonalizeUtils method listAllSchemas.
/**
* @param personalize the amazon personalize client
* @return all schemas
*/
public static List<DatasetSchemaSummary> listAllSchemas(final AmazonPersonalize personalize) {
final ListSchemasRequest request = new ListSchemasRequest().withMaxResults(100);
ListSchemasResult result = personalize.listSchemas(request);
List<DatasetSchemaSummary> list = result.getSchemas();
String nextToken;
while ((nextToken = result.getNextToken()) != null) {
result = personalize.listSchemas(request.withNextToken(nextToken));
list.addAll(result.getSchemas());
}
return list;
}
Aggregations