/** Marshall the given parameter object, and output to a JSONWriter */ public void marshall(Notifications notifications, JSONWriter jsonWriter) { if (notifications == null) { throw new AmazonClientException("Invalid argument passed to marshall(...)"); } try { jsonWriter.object(); if (notifications.getProgressing() != null) { jsonWriter.key("Progressing").value(notifications.getProgressing()); } if (notifications.getCompleted() != null) { jsonWriter.key("Completed").value(notifications.getCompleted()); } if (notifications.getWarning() != null) { jsonWriter.key("Warning").value(notifications.getWarning()); } if (notifications.getError() != null) { jsonWriter.key("Error").value(notifications.getError()); } jsonWriter.endObject(); } catch (Throwable t) { throw new AmazonClientException("Unable to marshall request to JSON: " + t.getMessage(), t); } }