public static ModerationLabelJsonUnmarshaller getInstance() { if (instance == null) instance = new ModerationLabelJsonUnmarshaller(); return instance; } }
contentModerationDetection.setModerationLabel(ModerationLabelJsonUnmarshaller.getInstance().unmarshall(context));
if (context.testExpression("ModerationLabels", targetDepth)) { context.nextToken(); detectModerationLabelsResult.setModerationLabels(new ListUnmarshaller<ModerationLabel>(ModerationLabelJsonUnmarshaller.getInstance()) .unmarshall(context));
public ContentModerationDetection unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } ContentModerationDetection contentModerationDetection = new ContentModerationDetection(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Timestamp")) { contentModerationDetection.setTimestamp(LongJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("ModerationLabel")) { contentModerationDetection.setModerationLabel(ModerationLabelJsonUnmarshaller .getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return contentModerationDetection; }
public DetectModerationLabelsResult unmarshall(JsonUnmarshallerContext context) throws Exception { DetectModerationLabelsResult detectModerationLabelsResult = new DetectModerationLabelsResult(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("ModerationLabels")) { detectModerationLabelsResult .setModerationLabels(new ListUnmarshaller<ModerationLabel>( ModerationLabelJsonUnmarshaller.getInstance() ) .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return detectModerationLabelsResult; }
public static ModerationLabelJsonUnmarshaller getInstance() { if (instance == null) instance = new ModerationLabelJsonUnmarshaller(); return instance; } }