/** * <p> * If the result is truncated, the response provides a <code>NextToken</code> that you can use in the subsequent * request to fetch the next set of collection IDs. * </p> * * @param nextToken * If the result is truncated, the response provides a <code>NextToken</code> that you can use in the * subsequent request to fetch the next set of collection IDs. * @return Returns a reference to this object so that method calls can be chained together. */ public ListCollectionsResult withNextToken(String nextToken) { setNextToken(nextToken); return this; }
listCollectionsResult.setNextToken(context.getUnmarshaller(String.class).unmarshall(context));
public ListCollectionsResult unmarshall(JsonUnmarshallerContext context) throws Exception { ListCollectionsResult listCollectionsResult = new ListCollectionsResult(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("CollectionIds")) { listCollectionsResult.setCollectionIds(new ListUnmarshaller<String>( StringJsonUnmarshaller.getInstance() ) .unmarshall(context)); } else if (name.equals("NextToken")) { listCollectionsResult.setNextToken(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("FaceModelVersions")) { listCollectionsResult.setFaceModelVersions(new ListUnmarshaller<String>( StringJsonUnmarshaller.getInstance() ) .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return listCollectionsResult; }