public static FaceJsonUnmarshaller getInstance() { if (instance == null) instance = new FaceJsonUnmarshaller(); return instance; } }
faceMatch.setFace(FaceJsonUnmarshaller.getInstance().unmarshall(context));
if (context.testExpression("Faces", targetDepth)) { context.nextToken(); listFacesResult.setFaces(new ListUnmarshaller<Face>(FaceJsonUnmarshaller.getInstance()).unmarshall(context));
if (context.testExpression("Face", targetDepth)) { context.nextToken(); faceRecord.setFace(FaceJsonUnmarshaller.getInstance().unmarshall(context));
public ListFacesResult unmarshall(JsonUnmarshallerContext context) throws Exception { ListFacesResult listFacesResult = new ListFacesResult(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Faces")) { listFacesResult.setFaces(new ListUnmarshaller<Face>(FaceJsonUnmarshaller .getInstance() ) .unmarshall(context)); } else if (name.equals("NextToken")) { listFacesResult.setNextToken(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("FaceModelVersion")) { listFacesResult.setFaceModelVersion(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return listFacesResult; }
public FaceMatch unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } FaceMatch faceMatch = new FaceMatch(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Similarity")) { faceMatch.setSimilarity(FloatJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Face")) { faceMatch.setFace(FaceJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return faceMatch; }
public static FaceJsonUnmarshaller getInstance() { if (instance == null) instance = new FaceJsonUnmarshaller(); return instance; } }
public FaceRecord unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } FaceRecord faceRecord = new FaceRecord(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Face")) { faceRecord.setFace(FaceJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("FaceDetail")) { faceRecord.setFaceDetail(FaceDetailJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return faceRecord; }