Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
12451 kshitij.so 1
 
2
package com.amazonaws.mws.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="Marketplace" type="{http://www.w3.org/2001/XMLSchema}string"/>
22
 *         &lt;element name="Merchant" type="{http://www.w3.org/2001/XMLSchema}string"/>
23
 *         &lt;element name="ReportIdList" type="{http://mws.amazonaws.com/doc/2009-01-01/}IdList"/>
24
 *         &lt;element name="Acknowledged" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
25
 *       &lt;/sequence>
26
 *     &lt;/restriction>
27
 *   &lt;/complexContent>
28
 * &lt;/complexType>
29
 * </pre>
30
 * Generated by AWS Code Generator
31
 * <p/>
32
 * Wed Feb 18 13:28:59 PST 2009
33
 * 
34
 */
35
@XmlAccessorType(XmlAccessType.FIELD)
36
@XmlType(name = "", propOrder = {
37
    "marketplace",
38
    "merchant",
39
    "reportIdList",
40
    "acknowledged"
41
})
42
@XmlRootElement(name = "UpdateReportAcknowledgementsRequest")
43
public class UpdateReportAcknowledgementsRequest {
44
 
45
    @XmlElement(name = "Marketplace")
46
    protected String marketplace;
47
    @XmlElement(name = "Merchant", required = true)
48
    protected String merchant;
49
    @XmlElement(name = "ReportIdList", required = true)
50
    protected IdList reportIdList;
51
    @XmlElement(name = "Acknowledged")
52
    protected Boolean acknowledged;
53
 
54
    /**
55
     * Default constructor
56
     * 
57
     */
58
    public UpdateReportAcknowledgementsRequest() {
59
        super();
60
    }
61
 
62
    /**
63
     * Value constructor
64
     * 
65
     */
66
    public UpdateReportAcknowledgementsRequest(final String marketplace, final String merchant, final IdList reportIdList, final Boolean acknowledged) {
67
        this.marketplace = marketplace;
68
        this.merchant = merchant;
69
        this.reportIdList = reportIdList;
70
        this.acknowledged = acknowledged;
71
    }
72
 
73
    /**
74
     * Gets the value of the marketplace property.
75
     * 
76
     * @deprecated  See {@link #setMarketplace(String)}
77
     * @return
78
     *     possible object is
79
     *     {@link String }
80
     *     
81
     */
82
    public String getMarketplace() {
83
        return marketplace;
84
    }
85
 
86
    /**
87
     * Sets the value of the marketplace property.
88
     * 
89
     * @deprecated Not used anymore.  MWS ignores this parameter, but it is left
90
     * in here for backwards compatibility.
91
     * @param value
92
     *     allowed object is
93
     *     {@link String }
94
     *     
95
     */
96
    public void setMarketplace(String value) {
97
        this.marketplace = value;
98
    }
99
 
100
    /**
101
     * @deprecated  See {@link #setMarketplace(String)}
102
     */
103
    public boolean isSetMarketplace() {
104
        return (this.marketplace!= null);
105
    }
106
 
107
    /**
108
     * Gets the value of the merchant property.
109
     * 
110
     * @return
111
     *     possible object is
112
     *     {@link String }
113
     *     
114
     */
115
    public String getMerchant() {
116
        return merchant;
117
    }
118
 
119
    /**
120
     * Sets the value of the merchant property.
121
     * 
122
     * @param value
123
     *     allowed object is
124
     *     {@link String }
125
     *     
126
     */
127
    public void setMerchant(String value) {
128
        this.merchant = value;
129
    }
130
 
131
    public boolean isSetMerchant() {
132
        return (this.merchant!= null);
133
    }
134
 
135
    /**
136
     * Gets the value of the reportIdList property.
137
     * 
138
     * @return
139
     *     possible object is
140
     *     {@link IdList }
141
     *     
142
     */
143
    public IdList getReportIdList() {
144
        return reportIdList;
145
    }
146
 
147
    /**
148
     * Sets the value of the reportIdList property.
149
     * 
150
     * @param value
151
     *     allowed object is
152
     *     {@link IdList }
153
     *     
154
     */
155
    public void setReportIdList(IdList value) {
156
        this.reportIdList = value;
157
    }
158
 
159
    public boolean isSetReportIdList() {
160
        return (this.reportIdList!= null);
161
    }
162
 
163
    /**
164
     * Gets the value of the acknowledged property.
165
     * 
166
     * @return
167
     *     possible object is
168
     *     {@link Boolean }
169
     *     
170
     */
171
    public Boolean isAcknowledged() {
172
        return acknowledged;
173
    }
174
 
175
    /**
176
     * Sets the value of the acknowledged property.
177
     * 
178
     * @param value
179
     *     allowed object is
180
     *     {@link Boolean }
181
     *     
182
     */
183
    public void setAcknowledged(Boolean value) {
184
        this.acknowledged = value;
185
    }
186
 
187
    public boolean isSetAcknowledged() {
188
        return (this.acknowledged!= null);
189
    }
190
 
191
    /**
192
     * Sets the value of the Marketplace property.
193
     * 
194
     * @deprecated  See {@link #setMarketplace(String)}
195
     * @param value
196
     * @return
197
     *     this instance
198
     */
199
    public UpdateReportAcknowledgementsRequest withMarketplace(String value) {
200
        setMarketplace(value);
201
        return this;
202
    }
203
 
204
    /**
205
     * Sets the value of the Merchant property.
206
     * 
207
     * @param value
208
     * @return
209
     *     this instance
210
     */
211
    public UpdateReportAcknowledgementsRequest withMerchant(String value) {
212
        setMerchant(value);
213
        return this;
214
    }
215
 
216
    /**
217
     * Sets the value of the ReportIdList property.
218
     * 
219
     * @param value
220
     * @return
221
     *     this instance
222
     */
223
    public UpdateReportAcknowledgementsRequest withReportIdList(IdList value) {
224
        setReportIdList(value);
225
        return this;
226
    }
227
 
228
    /**
229
     * Sets the value of the Acknowledged property.
230
     * 
231
     * @param value
232
     * @return
233
     *     this instance
234
     */
235
    public UpdateReportAcknowledgementsRequest withAcknowledged(Boolean value) {
236
        setAcknowledged(value);
237
        return this;
238
    }
239
 
240
 
241
 
242
    /**
243
     *
244
     * JSON fragment representation of this object
245
     *
246
     * @return JSON fragment for this object. Name for outer
247
     * object expected to be set by calling method. This fragment
248
     * returns inner properties representation only
249
     *
250
     */
251
    protected String toJSONFragment() {
252
        StringBuffer json = new StringBuffer();
253
        boolean first = true;
254
        if (isSetMarketplace()) {
255
            if (!first) json.append(", ");
256
            json.append(quoteJSON("Marketplace"));
257
            json.append(" : ");
258
            json.append(quoteJSON(getMarketplace()));
259
            first = false;
260
        }
261
        if (isSetMerchant()) {
262
            if (!first) json.append(", ");
263
            json.append(quoteJSON("Merchant"));
264
            json.append(" : ");
265
            json.append(quoteJSON(getMerchant()));
266
            first = false;
267
        }
268
        if (isSetReportIdList()) {
269
            if (!first) json.append(", ");
270
            json.append("\"ReportIdList\" : {");
271
            IdList  reportIdList = getReportIdList();
272
 
273
 
274
            json.append(reportIdList.toJSONFragment());
275
            json.append("}");
276
            first = false;
277
        }
278
        if (isSetAcknowledged()) {
279
            if (!first) json.append(", ");
280
            json.append(quoteJSON("Acknowledged"));
281
            json.append(" : ");
282
            json.append(quoteJSON(isAcknowledged() + ""));
283
            first = false;
284
        }
285
        return json.toString();
286
    }
287
 
288
    /**
289
     *
290
     * Quote JSON string
291
     */
292
    private String quoteJSON(String string) {
293
        StringBuffer sb = new StringBuffer();
294
        sb.append("\"");
295
        int length = string.length();
296
        for (int i = 0; i < length; ++i) {
297
            char c = string.charAt(i);
298
            switch (c) {
299
            case '"':
300
                sb.append("\\\"");
301
                break;
302
            case '\\':
303
                sb.append("\\\\");
304
                break;
305
            case '/':
306
                sb.append("\\/");
307
                break;
308
            case '\b':
309
                sb.append("\\b");
310
                break;
311
            case '\f':
312
                sb.append("\\f");
313
                break;
314
            case '\n':
315
                sb.append("\\n");
316
                break;
317
            case '\r':
318
                sb.append("\\r");
319
                break;
320
            case '\t':
321
                sb.append("\\t");
322
                break;
323
            default:
324
                if (c <  ' ') {
325
                    sb.append("\\u" + String.format("%03x", Integer.valueOf(c)));
326
                } else {
327
                sb.append(c);
328
            }
329
        }
330
        }
331
        sb.append("\"");
332
        return sb.toString();
333
    }
334
 
335
 
336
}