/** * <p> * The name for the parent label. Labels at the top level of the hierarchy have the parent label <code>""</code>. * </p> * * @param parentName * The name for the parent label. Labels at the top level of the hierarchy have the parent label * <code>""</code>. * @return Returns a reference to this object so that method calls can be chained together. */ public ModerationLabel withParentName(String parentName) { setParentName(parentName); return this; }
moderationLabel.setParentName(context.getUnmarshaller(String.class).unmarshall(context));
public ModerationLabel unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } ModerationLabel moderationLabel = new ModerationLabel(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Confidence")) { moderationLabel.setConfidence(FloatJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Name")) { moderationLabel.setName(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("ParentName")) { moderationLabel.setParentName(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return moderationLabel; }