Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
8224 manish.sha 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="MaxCount" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
26
 *         &lt;element name="ReportTypeList" type="{http://mws.amazonaws.com/doc/2009-01-01/}TypeList" minOccurs="0"/>
27
 *         &lt;element name="Acknowledged" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
28
 *         &lt;element name="AvailableFromDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
29
 *         &lt;element name="AvailableToDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
30
 *         &lt;element name="ReportRequestIdList" type="{http://mws.amazonaws.com/doc/2009-01-01/}IdList" 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
    "maxCount",
46
    "reportTypeList",
47
    "acknowledged",
48
    "availableFromDate",
49
    "availableToDate",
50
    "reportRequestIdList"
51
})
52
@XmlRootElement(name = "GetReportListRequest")
53
public class GetReportListRequest {
54
 
55
    @XmlElement(name = "Marketplace")
56
    protected String marketplace;
57
    @XmlElement(name = "Merchant", required = true)
58
    protected String merchant;
59
    @XmlElement(name = "MaxCount")
60
    protected Integer maxCount;
61
    @XmlElement(name = "ReportTypeList")
62
    protected TypeList reportTypeList;
63
    @XmlElement(name = "Acknowledged")
64
    protected Boolean acknowledged;
65
    @XmlElement(name = "AvailableFromDate")
66
    @XmlSchemaType(name = "dateTime")
67
    protected XMLGregorianCalendar availableFromDate;
68
    @XmlElement(name = "AvailableToDate")
69
    @XmlSchemaType(name = "dateTime")
70
    protected XMLGregorianCalendar availableToDate;
71
    @XmlElement(name = "ReportRequestIdList")
72
    protected IdList reportRequestIdList;
73
 
74
    /**
75
     * Default constructor
76
     * 
77
     */
78
    public GetReportListRequest() {
79
        super();
80
    }
81
 
82
    /**
83
     * Value constructor
84
     * 
85
     */
86
    public GetReportListRequest(
87
            final String marketplace,
88
            final String merchant, 
89
            final Integer maxCount, 
90
            final TypeList reportTypeList, 
91
            final Boolean acknowledged, 
92
            final XMLGregorianCalendar availableFromDate, 
93
            final XMLGregorianCalendar availableToDate, 
94
            final IdList reportRequestIdList) {
95
        this.marketplace = marketplace;
96
        this.merchant = merchant;
97
        this.maxCount = maxCount;
98
        this.reportTypeList = reportTypeList;
99
        this.acknowledged = acknowledged;
100
        this.availableFromDate = availableFromDate;
101
        this.availableToDate = availableToDate;
102
        this.reportRequestIdList = reportRequestIdList;
103
    }
104
 
105
    /**
106
     * Gets the value of the merchant property.
107
     * 
108
     * @return
109
     *     possible object is
110
     *     {@link String }
111
     *     
112
     */
113
    public String getMerchant() {
114
        return merchant;
115
    }
116
 
117
    /**
118
     * Sets the value of the merchant property.
119
     * 
120
     * @param value
121
     *     allowed object is
122
     *     {@link String }
123
     *     
124
     */
125
    public void setMerchant(String value) {
126
        this.merchant = value;
127
    }
128
 
129
    public boolean isSetMerchant() {
130
        return (this.merchant!= null);
131
    }
132
 
133
    /**
134
     * Gets the value of the marketplace property.
135
     * 
136
     * @deprecated  See {@link #setMarketplace(String)}
137
     * @return
138
     *     possible object is
139
     *     {@link String }
140
     *     
141
     */
142
    public String getMarketplace() {
143
        return marketplace;
144
    }
145
 
146
    /**
147
     * Sets the value of the marketplace property.
148
     * 
149
     * @deprecated Not used anymore.  MWS ignores this parameter, but it is left
150
     * in here for backwards compatibility.
151
     * @param value
152
     *     allowed object is
153
     *     {@link String }
154
     *     
155
     */
156
    public void setMarketplace(String value) {
157
        this.marketplace = value;
158
    }
159
 
160
    /**
161
     * @deprecated  See {@link #setMarketplace(String)}
162
     */
163
    public boolean isSetMarketplace() {
164
        return (this.marketplace!= null);
165
    }
166
 
167
    /**
168
     * Sets the value of the Marketplace property.
169
     * 
170
     * @deprecated  See {@link #setMarketplace(String)}
171
     * @param value
172
     * @return
173
     *     this instance
174
     */
175
    public GetReportListRequest withMarketplace(String value) {
176
        setMarketplace(value);
177
        return this;
178
    }
179
 
180
    /**
181
     * Gets the value of the maxCount property.
182
     * 
183
     * @return
184
     *     possible object is
185
     *     {@link Integer }
186
     *     
187
     */
188
    public Integer getMaxCount() {
189
        return maxCount;
190
    }
191
 
192
    /**
193
     * Sets the value of the maxCount property.
194
     * 
195
     * @param value
196
     *     allowed object is
197
     *     {@link Integer }
198
     *     
199
     */
200
    public void setMaxCount(Integer value) {
201
        this.maxCount = value;
202
    }
203
 
204
    public boolean isSetMaxCount() {
205
        return (this.maxCount!= null);
206
    }
207
 
208
    /**
209
     * Gets the value of the reportTypeList property.
210
     * 
211
     * @return
212
     *     possible object is
213
     *     {@link TypeList }
214
     *     
215
     */
216
    public TypeList getReportTypeList() {
217
        return reportTypeList;
218
    }
219
 
220
    /**
221
     * Sets the value of the reportTypeList property.
222
     * 
223
     * @param value
224
     *     allowed object is
225
     *     {@link TypeList }
226
     *     
227
     */
228
    public void setReportTypeList(TypeList value) {
229
        this.reportTypeList = value;
230
    }
231
 
232
    public boolean isSetReportTypeList() {
233
        return (this.reportTypeList!= null);
234
    }
235
 
236
    /**
237
     * Gets the value of the acknowledged property.
238
     * 
239
     * @return
240
     *     possible object is
241
     *     {@link Boolean }
242
     *     
243
     */
244
    public Boolean isAcknowledged() {
245
        return acknowledged;
246
    }
247
 
248
    /**
249
     * Sets the value of the acknowledged property.
250
     * 
251
     * @param value
252
     *     allowed object is
253
     *     {@link Boolean }
254
     *     
255
     */
256
    public void setAcknowledged(Boolean value) {
257
        this.acknowledged = value;
258
    }
259
 
260
    public boolean isSetAcknowledged() {
261
        return (this.acknowledged!= null);
262
    }
263
 
264
    /**
265
     * Gets the value of the availableFromDate property.
266
     * 
267
     * @return
268
     *     possible object is
269
     *     {@link XMLGregorianCalendar }
270
     *     
271
     */
272
    public XMLGregorianCalendar getAvailableFromDate() {
273
        return availableFromDate;
274
    }
275
 
276
    /**
277
     * Sets the value of the availableFromDate property.
278
     * 
279
     * @param value
280
     *     allowed object is
281
     *     {@link XMLGregorianCalendar }
282
     *     
283
     */
284
    public void setAvailableFromDate(XMLGregorianCalendar value) {
285
        this.availableFromDate = value;
286
    }
287
 
288
    public boolean isSetAvailableFromDate() {
289
        return (this.availableFromDate!= null);
290
    }
291
 
292
    /**
293
     * Gets the value of the availableToDate property.
294
     * 
295
     * @return
296
     *     possible object is
297
     *     {@link XMLGregorianCalendar }
298
     *     
299
     */
300
    public XMLGregorianCalendar getAvailableToDate() {
301
        return availableToDate;
302
    }
303
 
304
    /**
305
     * Sets the value of the availableToDate property.
306
     * 
307
     * @param value
308
     *     allowed object is
309
     *     {@link XMLGregorianCalendar }
310
     *     
311
     */
312
    public void setAvailableToDate(XMLGregorianCalendar value) {
313
        this.availableToDate = value;
314
    }
315
 
316
    public boolean isSetAvailableToDate() {
317
        return (this.availableToDate!= null);
318
    }
319
 
320
    /**
321
     * Gets the value of the reportRequestIdList property.
322
     * 
323
     * @return
324
     *     possible object is
325
     *     {@link IdList }
326
     *     
327
     */
328
    public IdList getReportRequestIdList() {
329
        return reportRequestIdList;
330
    }
331
 
332
    /**
333
     * Sets the value of the reportRequestIdList property.
334
     * 
335
     * @param value
336
     *     allowed object is
337
     *     {@link IdList }
338
     *     
339
     */
340
    public void setReportRequestIdList(IdList value) {
341
        this.reportRequestIdList = value;
342
    }
343
 
344
    public boolean isSetReportRequestIdList() {
345
        return (this.reportRequestIdList!= null);
346
    }
347
 
348
    /**
349
     * Sets the value of the Merchant property.
350
     * 
351
     * @param value
352
     * @return
353
     *     this instance
354
     */
355
    public GetReportListRequest withMerchant(String value) {
356
        setMerchant(value);
357
        return this;
358
    }
359
 
360
    /**
361
     * Sets the value of the MaxCount property.
362
     * 
363
     * @param value
364
     * @return
365
     *     this instance
366
     */
367
    public GetReportListRequest withMaxCount(Integer value) {
368
        setMaxCount(value);
369
        return this;
370
    }
371
 
372
    /**
373
     * Sets the value of the ReportTypeList property.
374
     * 
375
     * @param value
376
     * @return
377
     *     this instance
378
     */
379
    public GetReportListRequest withReportTypeList(TypeList value) {
380
        setReportTypeList(value);
381
        return this;
382
    }
383
 
384
    /**
385
     * Sets the value of the Acknowledged property.
386
     * 
387
     * @param value
388
     * @return
389
     *     this instance
390
     */
391
    public GetReportListRequest withAcknowledged(Boolean value) {
392
        setAcknowledged(value);
393
        return this;
394
    }
395
 
396
    /**
397
     * Sets the value of the AvailableFromDate property.
398
     * 
399
     * @param value
400
     * @return
401
     *     this instance
402
     */
403
    public GetReportListRequest withAvailableFromDate(XMLGregorianCalendar value) {
404
        setAvailableFromDate(value);
405
        return this;
406
    }
407
 
408
    /**
409
     * Sets the value of the AvailableToDate property.
410
     * 
411
     * @param value
412
     * @return
413
     *     this instance
414
     */
415
    public GetReportListRequest withAvailableToDate(XMLGregorianCalendar value) {
416
        setAvailableToDate(value);
417
        return this;
418
    }
419
 
420
    /**
421
     * Sets the value of the ReportRequestIdList property.
422
     * 
423
     * @param value
424
     * @return
425
     *     this instance
426
     */
427
    public GetReportListRequest withReportRequestIdList(IdList value) {
428
        setReportRequestIdList(value);
429
        return this;
430
    }
431
 
432
 
433
 
434
    /**
435
     *
436
     * JSON fragment representation of this object
437
     *
438
     * @return JSON fragment for this object. Name for outer
439
     * object expected to be set by calling method. This fragment
440
     * returns inner properties representation only
441
     *
442
     */
443
    protected String toJSONFragment() {
444
        StringBuffer json = new StringBuffer();
445
        boolean first = true;
446
        if (isSetMarketplace()) {
447
            if (!first) json.append(", ");
448
            json.append(quoteJSON("Marketplace"));
449
            json.append(" : ");
450
            json.append(quoteJSON(getMarketplace()));
451
            first = false;
452
        }
453
        if (isSetMerchant()) {
454
            if (!first) json.append(", ");
455
            json.append(quoteJSON("Merchant"));
456
            json.append(" : ");
457
            json.append(quoteJSON(getMerchant()));
458
            first = false;
459
        }
460
        if (isSetMaxCount()) {
461
            if (!first) json.append(", ");
462
            json.append(quoteJSON("MaxCount"));
463
            json.append(" : ");
464
            json.append(quoteJSON(getMaxCount() + ""));
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 (isSetAcknowledged()) {
478
            if (!first) json.append(", ");
479
            json.append(quoteJSON("Acknowledged"));
480
            json.append(" : ");
481
            json.append(quoteJSON(isAcknowledged() + ""));
482
            first = false;
483
        }
484
        if (isSetAvailableFromDate()) {
485
            if (!first) json.append(", ");
486
            json.append(quoteJSON("AvailableFromDate"));
487
            json.append(" : ");
488
            json.append(quoteJSON(getAvailableFromDate() + ""));
489
            first = false;
490
        }
491
        if (isSetAvailableToDate()) {
492
            if (!first) json.append(", ");
493
            json.append(quoteJSON("AvailableToDate"));
494
            json.append(" : ");
495
            json.append(quoteJSON(getAvailableToDate() + ""));
496
            first = false;
497
        }
498
        if (isSetReportRequestIdList()) {
499
            if (!first) json.append(", ");
500
            json.append("\"ReportRequestIdList\" : {");
501
            IdList  reportRequestIdList = getReportRequestIdList();
502
 
503
 
504
            json.append(reportRequestIdList.toJSONFragment());
505
            json.append("}");
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
}