添加result report xsd

This commit is contained in:
sanmao 2021-02-27 12:22:44 +08:00
parent 606888e78c
commit 4a02f68073
2 changed files with 319 additions and 0 deletions

View File

@ -0,0 +1,109 @@
package com.amazon.SellingPartnerAPI.model.result;
import com.amazon.SellingPartnerAPI.model.feeds.Header;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
/**
* @author linsm
* @date 2021-02-27 12:12
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"header",
"messageType",
"message"
})
@XmlRootElement(name = "AmazonEnvelope")
public class AmazonEnvelope {
@XmlElement(name = "Header", required = true)
protected Header header;
@XmlElement(name = "MessageType", required = true)
protected String messageType;
@XmlElement(name = "Message", required = true)
protected List<AmazonEnvelope.Message> message;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"messageID",
"processingReport"
})
public static class Message {
@XmlElement(name = "MessageID", required = true)
@XmlSchemaType(name = "positiveInteger")
protected BigInteger messageID;
@XmlElement(name = "ProcessingReport")
protected ProcessingReport processingReport;
public BigInteger getMessageID() {
return messageID;
}
public void setMessageID(BigInteger messageID) {
this.messageID = messageID;
}
public ProcessingReport getProcessingReport() {
return processingReport;
}
public void setProcessingReport(ProcessingReport processingReport) {
this.processingReport = processingReport;
}
}
public Header getHeader() {
return header;
}
public void setHeader(Header header) {
this.header = header;
}
public String getMessageType() {
return messageType;
}
public void setMessageType(String messageType) {
this.messageType = messageType;
}
/**
* Gets the value of the message property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the message property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getMessage().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link com.amazon.SellingPartnerAPI.model.feeds.AmazonEnvelope.Message }
*/
public List<AmazonEnvelope.Message> getMessage() {
if (message == null) {
message = new ArrayList<AmazonEnvelope.Message>();
}
return this.message;
}
}

View File

@ -0,0 +1,210 @@
package com.amazon.SellingPartnerAPI.model.result;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.NormalizedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.math.BigInteger;
/**
* GetFeedDocumentResponse Result Report
* @author linsm
* @date 2021-02-27 11:57
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {"documentTransactionID", "statusCode", "processingSummary", "result"})
@XmlRootElement(name = "ProcessingReport")
public class ProcessingReport {
@XmlElement(name = "DocumentTransactionID", required = true)
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
@XmlSchemaType(name = "normalizedString")
protected String documentTransactionID;
@XmlElement(name = "StatusCode")
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
@XmlSchemaType(name = "normalizedString")
protected String statusCode;
@XmlElement(name = "ProcessingSummary")
protected ProcessingSummary processingSummary;
@XmlElement(name = "Result")
protected Result result;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {"messagesProcessed", "messagesSuccessful", "messagesWithError",
"messagesWithWarning"})
public static class ProcessingSummary {
@XmlElement(name = "MessagesProcessed")
@XmlSchemaType(name = "nonNegativeInteger")
protected BigInteger messagesProcessed;
@XmlElement(name = "MessagesSuccessful")
@XmlSchemaType(name = "nonNegativeInteger")
protected BigInteger messagesSuccessful;
@XmlElement(name = "MessagesWithError")
@XmlSchemaType(name = "nonNegativeInteger")
protected BigInteger messagesWithError;
@XmlElement(name = "MessagesWithWarning")
@XmlSchemaType(name = "nonNegativeInteger")
protected BigInteger messagesWithWarning;
public BigInteger getMessagesProcessed() {
return messagesProcessed;
}
public void setMessagesProcessed(BigInteger messagesProcessed) {
this.messagesProcessed = messagesProcessed;
}
public BigInteger getMessagesSuccessful() {
return messagesSuccessful;
}
public void setMessagesSuccessful(BigInteger messagesSuccessful) {
this.messagesSuccessful = messagesSuccessful;
}
public BigInteger getMessagesWithError() {
return messagesWithError;
}
public void setMessagesWithError(BigInteger messagesWithError) {
this.messagesWithError = messagesWithError;
}
public BigInteger getMessagesWithWarning() {
return messagesWithWarning;
}
public void setMessagesWithWarning(BigInteger messagesWithWarning) {
this.messagesWithWarning = messagesWithWarning;
}
}
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {"messageID", "resultCode", "resultMessageCode", "resultDescription",
"additionalInfo"})
public static class Result {
@XmlElement(name = "MessageID", required = true)
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
@XmlSchemaType(name = "normalizedString")
protected String messageID;
@XmlElement(name = "ResultCode")
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
@XmlSchemaType(name = "normalizedString")
protected String resultCode;
@XmlElement(name = "ResultMessageCode", required = true)
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
@XmlSchemaType(name = "normalizedString")
protected String resultMessageCode;
@XmlElement(name = "ResultDescription")
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
@XmlSchemaType(name = "normalizedString")
protected String resultDescription;
@XmlElement(name = "AdditionalInfo")
protected AdditionalInfo additionalInfo;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {"sku"})
public static class AdditionalInfo {
@XmlElement(name = "SKU", required = true)
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
@XmlSchemaType(name = "normalizedString")
private String sku;
public String getSku() {
return sku;
}
public void setSku(String sku) {
this.sku = sku;
}
}
public String getMessageID() {
return messageID;
}
public void setMessageID(String messageID) {
this.messageID = messageID;
}
public String getResultCode() {
return resultCode;
}
public void setResultCode(String resultCode) {
this.resultCode = resultCode;
}
public String getResultMessageCode() {
return resultMessageCode;
}
public void setResultMessageCode(String resultMessageCode) {
this.resultMessageCode = resultMessageCode;
}
public String getResultDescription() {
return resultDescription;
}
public void setResultDescription(String resultDescription) {
this.resultDescription = resultDescription;
}
public AdditionalInfo getAdditionalInfo() {
return additionalInfo;
}
public void setAdditionalInfo(AdditionalInfo additionalInfo) {
this.additionalInfo = additionalInfo;
}
}
public String getDocumentTransactionID() {
return documentTransactionID;
}
public void setDocumentTransactionID(String documentTransactionID) {
this.documentTransactionID = documentTransactionID;
}
public String getStatusCode() {
return statusCode;
}
public void setStatusCode(String statusCode) {
this.statusCode = statusCode;
}
public ProcessingSummary getProcessingSummary() {
return processingSummary;
}
public void setProcessingSummary(ProcessingSummary processingSummary) {
this.processingSummary = processingSummary;
}
public Result getResult() {
return result;
}
public void setResult(Result result) {
this.result = result;
}
}