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