if (engineResponse != null) {
DescribeImageAttributeResponseTypeChoice_type0 param2 = new DescribeImageAttributeResponseTypeChoice_type0();
if (engineResponse.getIsPublic()) {
LaunchPermissionListType param3 = new LaunchPermissionListType();
LaunchPermissionItemType param4 = new LaunchPermissionItemType();
param4.setGroup("all");
param3.addItem(param4);
param2.setLaunchPermission(param3);
} else if (engineResponse.getAccountNamesWithLaunchPermission() != null) {
LaunchPermissionListType param3 = new LaunchPermissionListType();
for (String accountName : engineResponse.getAccountNamesWithLaunchPermission()) {
LaunchPermissionItemType param4 = new LaunchPermissionItemType();
param4.setUserId(accountName);
param3.addItem(param4);
}
param2.setLaunchPermission(param3);
} else if (engineResponse.getDescription() != null) {
NullableAttributeValueType param3 = new NullableAttributeValueType();
param3.setValue(engineResponse.getDescription());
param2.setDescription(param3);
}
param1.setDescribeImageAttributeResponseTypeChoice_type0(param2);
param1.setImageId(engineResponse.getImageId());