Blame | Last modification | View Log | RSS feed
package com.amazonaws.mws.model;import javax.xml.bind.annotation.XmlAccessType;import javax.xml.bind.annotation.XmlAccessorType;import javax.xml.bind.annotation.XmlElement;import javax.xml.bind.annotation.XmlSchemaType;import javax.xml.bind.annotation.XmlType;import javax.xml.datatype.XMLGregorianCalendar;/*** <p>Java class for ReportRequestInfo complex type.** <p>The following schema fragment specifies the expected content contained within this class.** <pre>* <complexType name="ReportRequestInfo">* <complexContent>* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">* <sequence>* <element name="ReportRequestId" type="{http://www.w3.org/2001/XMLSchema}string"/>* <element name="ReportType" type="{http://www.w3.org/2001/XMLSchema}string"/>* <element name="StartDate" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>* <element name="EndDate" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>* <element name="SubmittedDate" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>* <element name="ReportProcessingStatus" type="{http://www.w3.org/2001/XMLSchema}string"/>* </sequence>* </restriction>* </complexContent>* </complexType>* </pre>* Generated by AWS Code Generator* <p/>* Wed Feb 18 13:28:59 PST 2009**/@XmlAccessorType(XmlAccessType.FIELD)@XmlType(name = "ReportRequestInfo", propOrder = {"reportRequestId","reportType","startDate","endDate","submittedDate","reportProcessingStatus"})public class ReportRequestInfo {@XmlElement(name = "ReportRequestId", required = true)protected String reportRequestId;@XmlElement(name = "ReportType", required = true)protected String reportType;@XmlElement(name = "StartDate", required = true)@XmlSchemaType(name = "dateTime")protected XMLGregorianCalendar startDate;@XmlElement(name = "EndDate", required = true)@XmlSchemaType(name = "dateTime")protected XMLGregorianCalendar endDate;@XmlElement(name = "SubmittedDate", required = true)@XmlSchemaType(name = "dateTime")protected XMLGregorianCalendar submittedDate;@XmlElement(name = "ReportProcessingStatus", required = true)protected String reportProcessingStatus;/*** Default constructor**/public ReportRequestInfo() {super();}/*** Value constructor**/public ReportRequestInfo(final String reportRequestId, final String reportType, final XMLGregorianCalendar startDate, final XMLGregorianCalendar endDate, final XMLGregorianCalendar submittedDate, final String reportProcessingStatus) {this.reportRequestId = reportRequestId;this.reportType = reportType;this.startDate = startDate;this.endDate = endDate;this.submittedDate = submittedDate;this.reportProcessingStatus = reportProcessingStatus;}/*** Gets the value of the reportRequestId property.** @return* possible object is* {@link String }**/public String getReportRequestId() {return reportRequestId;}/*** Sets the value of the reportRequestId property.** @param value* allowed object is* {@link String }**/public void setReportRequestId(String value) {this.reportRequestId = value;}public boolean isSetReportRequestId() {return (this.reportRequestId!= null);}/*** Gets the value of the reportType property.** @return* possible object is* {@link String }**/public String getReportType() {return reportType;}/*** Sets the value of the reportType property.** @param value* allowed object is* {@link String }**/public void setReportType(String value) {this.reportType = value;}public boolean isSetReportType() {return (this.reportType!= null);}/*** Gets the value of the startDate property.** @return* possible object is* {@link XMLGregorianCalendar }**/public XMLGregorianCalendar getStartDate() {return startDate;}/*** Sets the value of the startDate property.** @param value* allowed object is* {@link XMLGregorianCalendar }**/public void setStartDate(XMLGregorianCalendar value) {this.startDate = value;}public boolean isSetStartDate() {return (this.startDate!= null);}/*** Gets the value of the endDate property.** @return* possible object is* {@link XMLGregorianCalendar }**/public XMLGregorianCalendar getEndDate() {return endDate;}/*** Sets the value of the endDate property.** @param value* allowed object is* {@link XMLGregorianCalendar }**/public void setEndDate(XMLGregorianCalendar value) {this.endDate = value;}public boolean isSetEndDate() {return (this.endDate!= null);}/*** Gets the value of the submittedDate property.** @return* possible object is* {@link XMLGregorianCalendar }**/public XMLGregorianCalendar getSubmittedDate() {return submittedDate;}/*** Sets the value of the submittedDate property.** @param value* allowed object is* {@link XMLGregorianCalendar }**/public void setSubmittedDate(XMLGregorianCalendar value) {this.submittedDate = value;}public boolean isSetSubmittedDate() {return (this.submittedDate!= null);}/*** Gets the value of the reportProcessingStatus property.** @return* possible object is* {@link String }**/public String getReportProcessingStatus() {return reportProcessingStatus;}/*** Sets the value of the reportProcessingStatus property.** @param value* allowed object is* {@link String }**/public void setReportProcessingStatus(String value) {this.reportProcessingStatus = value;}public boolean isSetReportProcessingStatus() {return (this.reportProcessingStatus!= null);}/*** Sets the value of the ReportRequestId property.** @param value* @return* this instance*/public ReportRequestInfo withReportRequestId(String value) {setReportRequestId(value);return this;}/*** Sets the value of the ReportType property.** @param value* @return* this instance*/public ReportRequestInfo withReportType(String value) {setReportType(value);return this;}/*** Sets the value of the StartDate property.** @param value* @return* this instance*/public ReportRequestInfo withStartDate(XMLGregorianCalendar value) {setStartDate(value);return this;}/*** Sets the value of the EndDate property.** @param value* @return* this instance*/public ReportRequestInfo withEndDate(XMLGregorianCalendar value) {setEndDate(value);return this;}/*** Sets the value of the SubmittedDate property.** @param value* @return* this instance*/public ReportRequestInfo withSubmittedDate(XMLGregorianCalendar value) {setSubmittedDate(value);return this;}/*** Sets the value of the ReportProcessingStatus property.** @param value* @return* this instance*/public ReportRequestInfo withReportProcessingStatus(String value) {setReportProcessingStatus(value);return this;}/**** XML fragment representation of this object** @return XML fragment for this object. Name for outer* tag expected to be set by calling method. This fragment* returns inner properties representation only*/protected String toXMLFragment() {StringBuffer xml = new StringBuffer();if (isSetReportRequestId()) {xml.append("<ReportRequestId>");xml.append(escapeXML(getReportRequestId()));xml.append("</ReportRequestId>");}if (isSetReportType()) {xml.append("<ReportType>");xml.append(escapeXML(getReportType()));xml.append("</ReportType>");}if (isSetStartDate()) {xml.append("<StartDate>");xml.append(getStartDate() + "");xml.append("</StartDate>");}if (isSetEndDate()) {xml.append("<EndDate>");xml.append(getEndDate() + "");xml.append("</EndDate>");}if (isSetSubmittedDate()) {xml.append("<SubmittedDate>");xml.append(getSubmittedDate() + "");xml.append("</SubmittedDate>");}if (isSetReportProcessingStatus()) {xml.append("<ReportProcessingStatus>");xml.append(escapeXML(getReportProcessingStatus()));xml.append("</ReportProcessingStatus>");}return xml.toString();}/**** Escape XML special characters*/private String escapeXML(String string) {StringBuffer sb = new StringBuffer();int length = string.length();for (int i = 0; i < length; ++i) {char c = string.charAt(i);switch (c) {case '&':sb.append("&");break;case '<':sb.append("<");break;case '>':sb.append(">");break;case '\'':sb.append("'");break;case '"':sb.append(""");break;default:sb.append(c);}}return sb.toString();}/**** JSON fragment representation of this object** @return JSON fragment for this object. Name for outer* object expected to be set by calling method. This fragment* returns inner properties representation only**/protected String toJSONFragment() {StringBuffer json = new StringBuffer();boolean first = true;if (isSetReportRequestId()) {if (!first) json.append(", ");json.append(quoteJSON("ReportRequestId"));json.append(" : ");json.append(quoteJSON(getReportRequestId()));first = false;}if (isSetReportType()) {if (!first) json.append(", ");json.append(quoteJSON("ReportType"));json.append(" : ");json.append(quoteJSON(getReportType()));first = false;}if (isSetStartDate()) {if (!first) json.append(", ");json.append(quoteJSON("StartDate"));json.append(" : ");json.append(quoteJSON(getStartDate() + ""));first = false;}if (isSetEndDate()) {if (!first) json.append(", ");json.append(quoteJSON("EndDate"));json.append(" : ");json.append(quoteJSON(getEndDate() + ""));first = false;}if (isSetSubmittedDate()) {if (!first) json.append(", ");json.append(quoteJSON("SubmittedDate"));json.append(" : ");json.append(quoteJSON(getSubmittedDate() + ""));first = false;}if (isSetReportProcessingStatus()) {if (!first) json.append(", ");json.append(quoteJSON("ReportProcessingStatus"));json.append(" : ");json.append(quoteJSON(getReportProcessingStatus()));first = false;}return json.toString();}/**** Quote JSON string*/private String quoteJSON(String string) {StringBuffer sb = new StringBuffer();sb.append("\"");int length = string.length();for (int i = 0; i < length; ++i) {char c = string.charAt(i);switch (c) {case '"':sb.append("\\\"");break;case '\\':sb.append("\\\\");break;case '/':sb.append("\\/");break;case '\b':sb.append("\\b");break;case '\f':sb.append("\\f");break;case '\n':sb.append("\\n");break;case '\r':sb.append("\\r");break;case '\t':sb.append("\\t");break;default:if (c < ' ') {sb.append("\\u" + String.format("%03x", Integer.valueOf(c)));} else {sb.append(c);}}}sb.append("\"");return sb.toString();}}