/** Marshall the given parameter object, and output to a JSONWriter */ public void marshall(TagFilter tagFilter, JSONWriter jsonWriter) { if (tagFilter == null) { throw new AmazonClientException("Invalid argument passed to marshall(...)"); } try { jsonWriter.object(); if (tagFilter.getKey() != null) { jsonWriter.key("Key").value(tagFilter.getKey()); } if (tagFilter.getValue() != null) { jsonWriter.key("Value").value(tagFilter.getValue()); } if (tagFilter.getType() != null) { jsonWriter.key("Type").value(tagFilter.getType()); } jsonWriter.endObject(); } catch (Throwable t) { throw new AmazonClientException("Unable to marshall request to JSON: " + t.getMessage(), t); } }