Subversion Repositories SmartDukaan

Rev

Rev 12573 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12573 Rev 12576
Line 1... Line -...
1
Unexpected error.  File contents could not be restored from local history during undo/redo.
-
 
2
1
 
-
 
2
package com.amazonservices.mws.orders.model;
-
 
3
 
-
 
4
import javax.xml.bind.annotation.XmlAccessType;
-
 
5
import javax.xml.bind.annotation.XmlAccessorType;
-
 
6
import javax.xml.bind.annotation.XmlElement;
-
 
7
import javax.xml.bind.annotation.XmlRootElement;
-
 
8
import javax.xml.bind.annotation.XmlType;
-
 
9
 
-
 
10
 
-
 
11
/**
-
 
12
 * <p>Java class for anonymous complex type.
-
 
13
 * 
-
 
14
 * <p>The following schema fragment specifies the expected content contained within this class.
-
 
15
 * 
-
 
16
 * <pre>
-
 
17
 * &lt;complexType>
-
 
18
 *   &lt;complexContent>
-
 
19
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
-
 
20
 *       &lt;sequence>
-
 
21
 *         &lt;element name="SellerId" type="{http://www.w3.org/2001/XMLSchema}string"/>
-
 
22
 *         &lt;element name="AmazonOrderId" type="{https://mws.amazonservices.com/Orders/2011-01-01}OrderIdList"/>
-
 
23
 *       &lt;/sequence>
-
 
24
 *     &lt;/restriction>
-
 
25
 *   &lt;/complexContent>
-
 
26
 * &lt;/complexType>
-
 
27
 * </pre>
-
 
28
 * 
-
 
29
 * 
-
 
30
 */
-
 
31
@XmlAccessorType(XmlAccessType.FIELD)
-
 
32
@XmlType(name = "", propOrder = {
-
 
33
    "sellerId",
-
 
34
    "amazonOrderId"
-
 
35
})
-
 
36
@XmlRootElement(name = "GetOrderRequest")
-
 
37
public class GetOrderRequest {
-
 
38
 
-
 
39
    @XmlElement(name = "SellerId", required = true)
-
 
40
    protected String sellerId;
-
 
41
    @XmlElement(name = "AmazonOrderId", required = true)
-
 
42
    protected OrderIdList amazonOrderId;
-
 
43
 
-
 
44
    /**
-
 
45
     * Default constructor
-
 
46
     * 
-
 
47
     */
-
 
48
    public GetOrderRequest() {
-
 
49
        super();
-
 
50
    }
-
 
51
 
-
 
52
    /**
-
 
53
     * Value constructor
-
 
54
     * 
-
 
55
     */
-
 
56
    public GetOrderRequest(final String sellerId, final OrderIdList amazonOrderId) {
-
 
57
        this.sellerId = sellerId;
-
 
58
        this.amazonOrderId = amazonOrderId;
-
 
59
    }
-
 
60
 
-
 
61
    /**
-
 
62
     * Gets the value of the sellerId property.
-
 
63
     * 
-
 
64
     * @return
-
 
65
     *     possible object is
-
 
66
     *     {@link String }
-
 
67
     *     
-
 
68
     */
-
 
69
    public String getSellerId() {
-
 
70
        return sellerId;
-
 
71
    }
-
 
72
 
-
 
73
    /**
-
 
74
     * Sets the value of the sellerId property.
-
 
75
     * 
-
 
76
     * @param value
-
 
77
     *     allowed object is
-
 
78
     *     {@link String }
-
 
79
     *     
-
 
80
     */
-
 
81
    public void setSellerId(String value) {
-
 
82
        this.sellerId = value;
-
 
83
    }
-
 
84
 
-
 
85
    public boolean isSetSellerId() {
-
 
86
        return (this.sellerId!= null);
-
 
87
    }
-
 
88
 
-
 
89
    /**
-
 
90
     * Gets the value of the amazonOrderId property.
-
 
91
     * 
-
 
92
     * @return
-
 
93
     *     possible object is
-
 
94
     *     {@link OrderIdList }
-
 
95
     *     
-
 
96
     */
-
 
97
    public OrderIdList getAmazonOrderId() {
-
 
98
        return amazonOrderId;
-
 
99
    }
-
 
100
 
-
 
101
    /**
-
 
102
     * Sets the value of the amazonOrderId property.
-
 
103
     * 
-
 
104
     * @param value
-
 
105
     *     allowed object is
-
 
106
     *     {@link OrderIdList }
-
 
107
     *     
-
 
108
     */
-
 
109
    public void setAmazonOrderId(OrderIdList value) {
-
 
110
        this.amazonOrderId = value;
-
 
111
    }
-
 
112
 
-
 
113
    public boolean isSetAmazonOrderId() {
-
 
114
        return (this.amazonOrderId!= null);
-
 
115
    }
-
 
116
 
-
 
117
    /**
-
 
118
     * Sets the value of the SellerId property.
-
 
119
     * 
-
 
120
     * @param value
-
 
121
     * @return
-
 
122
     *     this instance
-
 
123
     */
-
 
124
    public GetOrderRequest withSellerId(String value) {
-
 
125
        setSellerId(value);
-
 
126
        return this;
-
 
127
    }
-
 
128
 
-
 
129
    /**
-
 
130
     * Sets the value of the AmazonOrderId property.
-
 
131
     * 
-
 
132
     * @param value
-
 
133
     * @return
-
 
134
     *     this instance
-
 
135
     */
-
 
136
    public GetOrderRequest withAmazonOrderId(OrderIdList value) {
-
 
137
        setAmazonOrderId(value);
-
 
138
        return this;
-
 
139
    }
-
 
140
    
-
 
141
 
-
 
142
 
-
 
143
 
-
 
144
    /**
-
 
145
     *
-
 
146
     * JSON fragment representation of this object
-
 
147
     *
-
 
148
     * @return JSON fragment for this object. Name for outer
-
 
149
     * object expected to be set by calling method. This fragment
-
 
150
     * returns inner properties representation only
-
 
151
     *
-
 
152
     */
-
 
153
    protected String toJSONFragment() {
-
 
154
        StringBuffer json = new StringBuffer();
-
 
155
        boolean first = true;
-
 
156
        if (isSetSellerId()) {
-
 
157
            if (!first) json.append(", ");
-
 
158
            json.append(quoteJSON("SellerId"));
-
 
159
            json.append(" : ");
-
 
160
            json.append(quoteJSON(getSellerId()));
-
 
161
            first = false;
-
 
162
        }
-
 
163
        if (isSetAmazonOrderId()) {
-
 
164
            if (!first) json.append(", ");
-
 
165
            json.append("\"AmazonOrderId\" : {");
-
 
166
            OrderIdList  amazonOrderId = getAmazonOrderId();
-
 
167
 
-
 
168
 
-
 
169
            json.append(amazonOrderId.toJSONFragment());
-
 
170
            json.append("}");
-
 
171
            first = false;
-
 
172
        }
-
 
173
        return json.toString();
-
 
174
    }
-
 
175
 
-
 
176
    /**
-
 
177
     *
-
 
178
     * Quote JSON string
-
 
179
     */
-
 
180
    private String quoteJSON(String string) {
-
 
181
        if (string == null)
-
 
182
            return "null";
-
 
183
        StringBuffer sb = new StringBuffer();
-
 
184
        sb.append("\"");
-
 
185
        int length = string.length();
-
 
186
        for (int i = 0; i < length; ++i) {
-
 
187
            char c = string.charAt(i);
-
 
188
            switch (c) {
-
 
189
            case '"':
-
 
190
                sb.append("\\\"");
-
 
191
                break;
-
 
192
            case '\\':
-
 
193
                sb.append("\\\\");
-
 
194
                break;
-
 
195
            case '/':
-
 
196
                sb.append("\\/");
-
 
197
                break;
-
 
198
            case '\b':
-
 
199
                sb.append("\\b");
-
 
200
                break;
-
 
201
            case '\f':
-
 
202
                sb.append("\\f");
-
 
203
                break;
-
 
204
            case '\n':
-
 
205
                sb.append("\\n");
-
 
206
                break;
-
 
207
            case '\r':
-
 
208
                sb.append("\\r");
-
 
209
                break;
-
 
210
            case '\t':
-
 
211
                sb.append("\\t");
-
 
212
                break;
-
 
213
            default:
-
 
214
                if (c <  ' ') {
-
 
215
                    sb.append("\\u" + String.format("%03x", Integer.valueOf(c)));
-
 
216
                } else {
-
 
217
                sb.append(c);
-
 
218
            }
-
 
219
        }
-
 
220
        }
-
 
221
        sb.append("\"");
-
 
222
        return sb.toString();
-
 
223
    }
-
 
224
 
-
 
225
 
-
 
226
}
-
 
227