/** * <p> * A list of objects that describe the vocabularies that match the search criteria in the request. * </p> * * @param vocabularies * A list of objects that describe the vocabularies that match the search criteria in the request. * @return Returns a reference to this object so that method calls can be chained together. */ public ListVocabulariesResult withVocabularies(java.util.Collection<VocabularyInfo> vocabularies) { setVocabularies(vocabularies); return this; }
/** * <p> * A list of objects that describe the vocabularies that match the search criteria in the request. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setVocabularies(java.util.Collection)} or {@link #withVocabularies(java.util.Collection)} if you want to * override the existing values. * </p> * * @param vocabularies * A list of objects that describe the vocabularies that match the search criteria in the request. * @return Returns a reference to this object so that method calls can be chained together. */ public ListVocabulariesResult withVocabularies(VocabularyInfo... vocabularies) { if (this.vocabularies == null) { setVocabularies(new java.util.ArrayList<VocabularyInfo>(vocabularies.length)); } for (VocabularyInfo ele : vocabularies) { this.vocabularies.add(ele); } return this; }
listVocabulariesResult.setVocabularies(new ListUnmarshaller<VocabularyInfo>(VocabularyInfoJsonUnmarshaller.getInstance()) .unmarshall(context));
/** * <p> * A list of objects that describe the vocabularies that match the search * criteria in the request. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param vocabularies <p> * A list of objects that describe the vocabularies that match * the search criteria in the request. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public ListVocabulariesResult withVocabularies(java.util.Collection<VocabularyInfo> vocabularies) { setVocabularies(vocabularies); return this; }
public ListVocabulariesResult unmarshall(JsonUnmarshallerContext context) throws Exception { ListVocabulariesResult listVocabulariesResult = new ListVocabulariesResult(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Status")) { listVocabulariesResult.setStatus(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("NextToken")) { listVocabulariesResult.setNextToken(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Vocabularies")) { listVocabulariesResult.setVocabularies(new ListUnmarshaller<VocabularyInfo>( VocabularyInfoJsonUnmarshaller.getInstance() ) .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return listVocabulariesResult; }