/** * <p> * The label name for the type of content detected in the image. * </p> * * @param name * The label name for the type of content detected in the image. * @return Returns a reference to this object so that method calls can be chained together. */ public ModerationLabel withName(String name) { setName(name); return this; }
moderationLabel.setName(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; }