public DeviceType unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } DeviceType deviceType = new DeviceType(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("DeviceKey")) { deviceType.setDeviceKey(StringJsonUnmarshaller.getInstance().unmarshall(context)); } else if (name.equals("DeviceAttributes")) { deviceType.setDeviceAttributes( new ListUnmarshaller<AttributeType>(AttributeTypeJsonUnmarshaller.getInstance()) .unmarshall(context)); } else if (name.equals("DeviceCreateDate")) { deviceType.setDeviceCreateDate(DateJsonUnmarshaller.getInstance().unmarshall(context)); } else if (name.equals("DeviceLastModifiedDate")) { deviceType.setDeviceLastModifiedDate( DateJsonUnmarshaller.getInstance().unmarshall(context)); } else if (name.equals("DeviceLastAuthenticatedDate")) { deviceType.setDeviceLastAuthenticatedDate( DateJsonUnmarshaller.getInstance().unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return deviceType; }