Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
7468 vikram.rag 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.XmlSchemaType;
9
import javax.xml.bind.annotation.XmlType;
10
import javax.xml.datatype.XMLGregorianCalendar;
11
 
12
 
13
/**
14
 * <p>Java class for anonymous complex type.
15
 * 
16
 * <p>The following schema fragment specifies the expected content contained within this class.
17
 * 
18
 * <pre>
19
 * &lt;complexType>
20
 *   &lt;complexContent>
21
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
22
 *       &lt;sequence>
23
 *         &lt;element name="Marketplace" type="{http://www.w3.org/2001/XMLSchema}string"/>
24
 *         &lt;element name="Merchant" type="{http://www.w3.org/2001/XMLSchema}string"/>
25
 *         &lt;element name="ReportRequestIdList" type="{http://mws.amazonaws.com/doc/2009-01-01/}IdList" minOccurs="0"/>
26
 *         &lt;element name="ReportTypeList" type="{http://mws.amazonaws.com/doc/2009-01-01/}TypeList" minOccurs="0"/>
27
 *         &lt;element name="ReportProcessingStatusList" type="{http://mws.amazonaws.com/doc/2009-01-01/}StatusList" minOccurs="0"/>
28
 *         &lt;element name="RequestedFromDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
29
 *         &lt;element name="RequestedToDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
30
 *       &lt;/sequence>
31
 *     &lt;/restriction>
32
 *   &lt;/complexContent>
33
 * &lt;/complexType>
34
 * </pre>
35
 * Generated by AWS Code Generator
36
 * <p/>
37
 * Wed Feb 18 13:28:59 PST 2009
38
 * 
39
 */
40
@XmlAccessorType(XmlAccessType.FIELD)
41
@XmlType(name = "", propOrder = {
42
    "marketplace",
43
    "merchant",
44
    "reportRequestIdList",
45
    "reportTypeList",
46
    "reportProcessingStatusList",
47
    "requestedFromDate",
48
    "requestedToDate"
49
})
50
@XmlRootElement(name = "CancelReportRequestsRequest")
51
public class CancelReportRequestsRequest {
52
 
53
    @XmlElement(name = "Marketplace")
54
    protected String marketplace;
55
    @XmlElement(name = "Merchant", required = true)
56
    protected String merchant;
57
    @XmlElement(name = "ReportRequestIdList")
58
    protected IdList reportRequestIdList;
59
    @XmlElement(name = "ReportTypeList")
60
    protected TypeList reportTypeList;
61
    @XmlElement(name = "ReportProcessingStatusList")
62
    protected StatusList reportProcessingStatusList;
63
    @XmlElement(name = "RequestedFromDate")
64
    @XmlSchemaType(name = "dateTime")
65
    protected XMLGregorianCalendar requestedFromDate;
66
    @XmlElement(name = "RequestedToDate")
67
    @XmlSchemaType(name = "dateTime")
68
    protected XMLGregorianCalendar requestedToDate;
69
 
70
    /**
71
     * Default constructor
72
     * 
73
     */
74
    public CancelReportRequestsRequest() {
75
        super();
76
    }
77
 
78
    /**
79
     * Value constructor
80
     * 
81
     */
82
    public CancelReportRequestsRequest(final String marketplace, final String merchant, final IdList reportRequestIdList, final TypeList reportTypeList, final StatusList reportProcessingStatusList, final XMLGregorianCalendar requestedFromDate, final XMLGregorianCalendar requestedToDate) {
83
        this.marketplace = marketplace;
84
        this.merchant = merchant;
85
        this.reportRequestIdList = reportRequestIdList;
86
        this.reportTypeList = reportTypeList;
87
        this.reportProcessingStatusList = reportProcessingStatusList;
88
        this.requestedFromDate = requestedFromDate;
89
        this.requestedToDate = requestedToDate;
90
    }
91
 
92
    /**
93
     * Gets the value of the marketplace property.
94
     * 
95
     * @deprecated  See {@link #setMarketplace(String)}
96
     * @return
97
     *     possible object is
98
     *     {@link String }
99
     *     
100
     */
101
    public String getMarketplace() {
102
        return marketplace;
103
    }
104
 
105
    /**
106
     * Sets the value of the marketplace property.
107
     * 
108
     * @deprecated Not used anymore.  MWS ignores this parameter, but it is left
109
     * in here for backwards compatibility.
110
     * @param value
111
     *     allowed object is
112
     *     {@link String }
113
     *     
114
     */
115
    public void setMarketplace(String value) {
116
        this.marketplace = value;
117
    }
118
 
119
    /**
120
     * @deprecated  See {@link #setMarketplace(String)}
121
     */
122
    public boolean isSetMarketplace() {
123
        return (this.marketplace!= null);
124
    }
125
 
126
    /**
127
     * Gets the value of the merchant property.
128
     * 
129
     * @return
130
     *     possible object is
131
     *     {@link String }
132
     *     
133
     */
134
    public String getMerchant() {
135
        return merchant;
136
    }
137
 
138
    /**
139
     * Sets the value of the merchant property.
140
     * 
141
     * @param value
142
     *     allowed object is
143
     *     {@link String }
144
     *     
145
     */
146
    public void setMerchant(String value) {
147
        this.merchant = value;
148
    }
149
 
150
    public boolean isSetMerchant() {
151
        return (this.merchant!= null);
152
    }
153
 
154
    /**
155
     * Gets the value of the reportRequestIdList property.
156
     * 
157
     * @return
158
     *     possible object is
159
     *     {@link IdList }
160
     *     
161
     */
162
    public IdList getReportRequestIdList() {
163
        return reportRequestIdList;
164
    }
165
 
166
    /**
167
     * Sets the value of the reportRequestIdList property.
168
     * 
169
     * @param value
170
     *     allowed object is
171
     *     {@link IdList }
172
     *     
173
     */
174
    public void setReportRequestIdList(IdList value) {
175
        this.reportRequestIdList = value;
176
    }
177
 
178
    public boolean isSetReportRequestIdList() {
179
        return (this.reportRequestIdList!= null);
180
    }
181
 
182
    /**
183
     * Gets the value of the reportTypeList property.
184
     * 
185
     * @return
186
     *     possible object is
187
     *     {@link TypeList }
188
     *     
189
     */
190
    public TypeList getReportTypeList() {
191
        return reportTypeList;
192
    }
193
 
194
    /**
195
     * Sets the value of the reportTypeList property.
196
     * 
197
     * @param value
198
     *     allowed object is
199
     *     {@link TypeList }
200
     *     
201
     */
202
    public void setReportTypeList(TypeList value) {
203
        this.reportTypeList = value;
204
    }
205
 
206
    public boolean isSetReportTypeList() {
207
        return (this.reportTypeList!= null);
208
    }
209
 
210
    /**
211
     * Gets the value of the reportProcessingStatusList property.
212
     * 
213
     * @return
214
     *     possible object is
215
     *     {@link StatusList }
216
     *     
217
     */
218
    public StatusList getReportProcessingStatusList() {
219
        return reportProcessingStatusList;
220
    }
221
 
222
    /**
223
     * Sets the value of the reportProcessingStatusList property.
224
     * 
225
     * @param value
226
     *     allowed object is
227
     *     {@link StatusList }
228
     *     
229
     */
230
    public void setReportProcessingStatusList(StatusList value) {
231
        this.reportProcessingStatusList = value;
232
    }
233
 
234
    public boolean isSetReportProcessingStatusList() {
235
        return (this.reportProcessingStatusList!= null);
236
    }
237
 
238
    /**
239
     * Gets the value of the requestedFromDate property.
240
     * 
241
     * @return
242
     *     possible object is
243
     *     {@link XMLGregorianCalendar }
244
     *     
245
     */
246
    public XMLGregorianCalendar getRequestedFromDate() {
247
        return requestedFromDate;
248
    }
249
 
250
    /**
251
     * Sets the value of the requestedFromDate property.
252
     * 
253
     * @param value
254
     *     allowed object is
255
     *     {@link XMLGregorianCalendar }
256
     *     
257
     */
258
    public void setRequestedFromDate(XMLGregorianCalendar value) {
259
        this.requestedFromDate = value;
260
    }
261
 
262
    public boolean isSetRequestedFromDate() {
263
        return (this.requestedFromDate!= null);
264
    }
265
 
266
    /**
267
     * Gets the value of the requestedToDate property.
268
     * 
269
     * @return
270
     *     possible object is
271
     *     {@link XMLGregorianCalendar }
272
     *     
273
     */
274
    public XMLGregorianCalendar getRequestedToDate() {
275
        return requestedToDate;
276
    }
277
 
278
    /**
279
     * Sets the value of the requestedToDate property.
280
     * 
281
     * @param value
282
     *     allowed object is
283
     *     {@link XMLGregorianCalendar }
284
     *     
285
     */
286
    public void setRequestedToDate(XMLGregorianCalendar value) {
287
        this.requestedToDate = value;
288
    }
289
 
290
    public boolean isSetRequestedToDate() {
291
        return (this.requestedToDate!= null);
292
    }
293
 
294
    /**
295
     * Sets the value of the Marketplace property.
296
     * 
297
     * @deprecated  See {@link #setMarketplace(String)}
298
     * @param value
299
     * @return
300
     *     this instance
301
     */
302
    public CancelReportRequestsRequest withMarketplace(String value) {
303
        setMarketplace(value);
304
        return this;
305
    }
306
 
307
    /**
308
     * Sets the value of the Merchant property.
309
     * 
310
     * @param value
311
     * @return
312
     *     this instance
313
     */
314
    public CancelReportRequestsRequest withMerchant(String value) {
315
        setMerchant(value);
316
        return this;
317
    }
318
 
319
    /**
320
     * Sets the value of the ReportRequestIdList property.
321
     * 
322
     * @param value
323
     * @return
324
     *     this instance
325
     */
326
    public CancelReportRequestsRequest withReportRequestIdList(IdList value) {
327
        setReportRequestIdList(value);
328
        return this;
329
    }
330
 
331
    /**
332
     * Sets the value of the ReportTypeList property.
333
     * 
334
     * @param value
335
     * @return
336
     *     this instance
337
     */
338
    public CancelReportRequestsRequest withReportTypeList(TypeList value) {
339
        setReportTypeList(value);
340
        return this;
341
    }
342
 
343
    /**
344
     * Sets the value of the ReportProcessingStatusList property.
345
     * 
346
     * @param value
347
     * @return
348
     *     this instance
349
     */
350
    public CancelReportRequestsRequest withReportProcessingStatusList(StatusList value) {
351
        setReportProcessingStatusList(value);
352
        return this;
353
    }
354
 
355
    /**
356
     * Sets the value of the RequestedFromDate property.
357
     * 
358
     * @param value
359
     * @return
360
     *     this instance
361
     */
362
    public CancelReportRequestsRequest withRequestedFromDate(XMLGregorianCalendar value) {
363
        setRequestedFromDate(value);
364
        return this;
365
    }
366
 
367
    /**
368
     * Sets the value of the RequestedToDate property.
369
     * 
370
     * @param value
371
     * @return
372
     *     this instance
373
     */
374
    public CancelReportRequestsRequest withRequestedToDate(XMLGregorianCalendar value) {
375
        setRequestedToDate(value);
376
        return this;
377
    }
378
 
379
 
380
 
381
    /**
382
     *
383
     * JSON fragment representation of this object
384
     *
385
     * @return JSON fragment for this object. Name for outer
386
     * object expected to be set by calling method. This fragment
387
     * returns inner properties representation only
388
     *
389
     */
390
    protected String toJSONFragment() {
391
        StringBuffer json = new StringBuffer();
392
        boolean first = true;
393
        if (isSetMarketplace()) {
394
            if (!first) json.append(", ");
395
            json.append(quoteJSON("Marketplace"));
396
            json.append(" : ");
397
            json.append(quoteJSON(getMarketplace()));
398
            first = false;
399
        }
400
        if (isSetMerchant()) {
401
            if (!first) json.append(", ");
402
            json.append(quoteJSON("Merchant"));
403
            json.append(" : ");
404
            json.append(quoteJSON(getMerchant()));
405
            first = false;
406
        }
407
        if (isSetReportRequestIdList()) {
408
            if (!first) json.append(", ");
409
            json.append("\"ReportRequestIdList\" : {");
410
            IdList  reportRequestIdList = getReportRequestIdList();
411
 
412
 
413
            json.append(reportRequestIdList.toJSONFragment());
414
            json.append("}");
415
            first = false;
416
        }
417
        if (isSetReportTypeList()) {
418
            if (!first) json.append(", ");
419
            json.append("\"ReportTypeList\" : {");
420
            TypeList  reportTypeList = getReportTypeList();
421
 
422
 
423
            json.append(reportTypeList.toJSONFragment());
424
            json.append("}");
425
            first = false;
426
        }
427
        if (isSetReportProcessingStatusList()) {
428
            if (!first) json.append(", ");
429
            json.append("\"ReportProcessingStatusList\" : {");
430
            StatusList  reportProcessingStatusList = getReportProcessingStatusList();
431
 
432
 
433
            json.append(reportProcessingStatusList.toJSONFragment());
434
            json.append("}");
435
            first = false;
436
        }
437
        if (isSetRequestedFromDate()) {
438
            if (!first) json.append(", ");
439
            json.append(quoteJSON("RequestedFromDate"));
440
            json.append(" : ");
441
            json.append(quoteJSON(getRequestedFromDate() + ""));
442
            first = false;
443
        }
444
        if (isSetRequestedToDate()) {
445
            if (!first) json.append(", ");
446
            json.append(quoteJSON("RequestedToDate"));
447
            json.append(" : ");
448
            json.append(quoteJSON(getRequestedToDate() + ""));
449
            first = false;
450
        }
451
        return json.toString();
452
    }
453
 
454
    /**
455
     *
456
     * Quote JSON string
457
     */
458
    private String quoteJSON(String string) {
459
        StringBuffer sb = new StringBuffer();
460
        sb.append("\"");
461
        int length = string.length();
462
        for (int i = 0; i < length; ++i) {
463
            char c = string.charAt(i);
464
            switch (c) {
465
            case '"':
466
                sb.append("\\\"");
467
                break;
468
            case '\\':
469
                sb.append("\\\\");
470
                break;
471
            case '/':
472
                sb.append("\\/");
473
                break;
474
            case '\b':
475
                sb.append("\\b");
476
                break;
477
            case '\f':
478
                sb.append("\\f");
479
                break;
480
            case '\n':
481
                sb.append("\\n");
482
                break;
483
            case '\r':
484
                sb.append("\\r");
485
                break;
486
            case '\t':
487
                sb.append("\\t");
488
                break;
489
            default:
490
                if (c <  ' ') {
491
                    sb.append("\\u" + String.format("%03x", Integer.valueOf(c)));
492
                } else {
493
                sb.append(c);
494
            }
495
        }
496
        }
497
        sb.append("\"");
498
        return sb.toString();
499
    }
500
 
501
 
502
}