/** * <p> * Specifies the confidence that Amazon Rekognition has that the label has been correctly identified. * </p> * <p> * If you don't specify the <code>MinConfidence</code> parameter in the call to <code>DetectModerationLabels</code>, * the operation returns labels with a confidence value greater than or equal to 50 percent. * </p> * * @param confidence * Specifies the confidence that Amazon Rekognition has that the label has been correctly identified.</p> * <p> * If you don't specify the <code>MinConfidence</code> parameter in the call to * <code>DetectModerationLabels</code>, the operation returns labels with a confidence value greater than or * equal to 50 percent. * @return Returns a reference to this object so that method calls can be chained together. */ public ModerationLabel withConfidence(Float confidence) { setConfidence(confidence); return this; }
if (context.testExpression("Confidence", targetDepth)) { context.nextToken(); moderationLabel.setConfidence(context.getUnmarshaller(Float.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; }