throw invalidValue(null, "displayNames");
}
LocalizedString displayName = null;
int i=0;
for (ModelValue mv : list) {
ModelObject displayNameModel = mv.asValue(ModelObject.class);
// Parse value (required && non-null)
if (!displayNameModel.has("value")) {
throw requiredField("displayNames["+i+"].value");
}
String value = get(displayNameModel, ModelString.class, "value").getValue();
if (value == null) {
throw invalidValue(value, "displayNames[" + i + "].value");
}
// Parse lang (not-required but if defined must be non-null)
if (displayNameModel.has("lang")) {
ModelString langModel = get(displayNameModel, ModelString.class, "lang");
String lang = langModel.getValue();
if (lang == null) {
throw invalidValue(lang, "displayNames[" + i + "].lang");
}