@Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{ "); sb.append(" volumeID : ").append(volumeID).append(","); sb.append(" format : ").append(format).append(","); if (null != snapshotID && snapshotID.isPresent()) sb.append(" snapshotID : ").append(snapshotID.get()).append(","); if (null != script && script.isPresent()) sb.append(" script : ").append(script.get()).append(","); if (null != scriptParameters && scriptParameters.isPresent()) sb.append(" scriptParameters : ").append(scriptParameters.get()).append(","); if (null != attributes && attributes.isPresent()) sb.append(" attributes : ").append(attributes.get()); sb.append(" }"); if (sb.lastIndexOf(", }") != -1) sb.deleteCharAt(sb.lastIndexOf(", }")); return sb.toString(); }