/** * <p> * Identifies an S3 object as the image source. * </p> * * @param s3Object * Identifies an S3 object as the image source. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withS3Object(S3Object s3Object) { setS3Object(s3Object); return this; }
image.setS3Object(S3ObjectJsonUnmarshaller.getInstance().unmarshall(context));
public Image unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } Image image = new Image(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Bytes")) { image.setBytes(ByteBufferJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("S3Object")) { image.setS3Object(S3ObjectJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return image; }