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