EC2ModifyImageAttribute request = new EC2ModifyImageAttribute();
ModifyImageAttributeType miat = modifyImageAttribute.getModifyImageAttribute();
ModifyImageAttributeTypeChoice_type0 item = miat.getModifyImageAttributeTypeChoice_type0();
AttributeValueType description = item.getDescription();
LaunchPermissionOperationType launchPermOp = item.getLaunchPermission();
if (null != description) {
request.setImageId(miat.getImageId());
request.setAttribute(ImageAttribute.description);
request.setDescription(description.getValue());
return toModifyImageAttributeResponse(engine.modifyImageAttribute(request));
} else if (launchPermOp != null) {
request.setImageId(miat.getImageId());
request.setAttribute(ImageAttribute.launchPermission);
if (launchPermOp.getAdd() != null) {