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