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.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="Scheduled" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
27
 *         &lt;element name="SubmittedDate" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
28
 *         &lt;element name="ReportProcessingStatus" type="{http://www.w3.org/2001/XMLSchema}string"/>
29
 *         &lt;element name="GeneratedReportId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
30
 *         &lt;element name="StartedProcessingDate" type={http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
31
 *         &lt;element name="CompletedDate" type="{http:/www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
32
 *       &lt;/sequence>
33
 *     &lt;/restriction>
34
 *   &lt;/complexContent>
35
 * &lt;/complexType>
36
 * </pre>
37
 * Generated by AWS Code Generator
38
 * <p/>
39
 * Wed Feb 18 13:28:59 PST 2009
40
 * 
41
 */
42
@XmlAccessorType(XmlAccessType.FIELD)
43
@XmlType(name = "ReportRequestInfo", propOrder = {
44
    "reportRequestId",
45
    "reportType",
46
    "startDate",
47
    "endDate",
48
    "scheduled",
49
    "submittedDate",
50
    "reportProcessingStatus",
51
    "generatedReportId",
52
    "startedProcessingDate",
53
    "completedDate"
54
})
55
public class ReportRequestInfo {
56
 
57
    @XmlElement(name = "ReportRequestId", required = true)
58
    protected String reportRequestId;
59
    @XmlElement(name = "ReportType", required = true)
60
    protected String reportType;
61
    @XmlElement(name = "StartDate", required = true)
62
    @XmlSchemaType(name = "dateTime")
63
    protected XMLGregorianCalendar startDate;
64
    @XmlElement(name = "EndDate", required = true)
65
    @XmlSchemaType(name = "dateTime")
66
    protected XMLGregorianCalendar endDate;
67
    @XmlElement(name = "Scheduled", required = true )
68
    protected boolean scheduled;
69
    @XmlElement(name = "SubmittedDate", required = true)
70
    @XmlSchemaType(name = "dateTime")
71
    protected XMLGregorianCalendar submittedDate;
72
    @XmlElement(name = "ReportProcessingStatus", required = true)
73
    protected String reportProcessingStatus;
74
    @XmlElement(name = "GeneratedReportId")
75
    protected String generatedReportId;
76
    @XmlElement(name = "StartedProcessingDate")
77
    @XmlSchemaType(name = "dateTime")
78
    protected XMLGregorianCalendar startedProcessingDate;
79
    @XmlElement(name = "completedDate")
80
    @XmlSchemaType(name = "dateTime")
81
    protected XMLGregorianCalendar completedDate;
82
 
83
    /**
84
     * Default constructor
85
     * 
86
     */
87
    public ReportRequestInfo() {
88
        super();
89
    }
90
 
91
    /**
92
     * Value constructor
93
     * 
94
     */
95
    public ReportRequestInfo(final String reportRequestId, 
96
    		final String reportType, 
97
    		final XMLGregorianCalendar startDate, 
98
    		final XMLGregorianCalendar endDate, 
99
    		final boolean scheduled,
100
    		final XMLGregorianCalendar submittedDate, 
101
    		final String reportProcessingStatus,
102
    		final String generatedReportId,
103
    		final XMLGregorianCalendar startedProcessingDate,
104
    		final XMLGregorianCalendar completedDate) {
105
        this.reportRequestId = reportRequestId;
106
        this.reportType = reportType;
107
        this.startDate = startDate;
108
        this.endDate = endDate;
109
        this.scheduled = scheduled;
110
        this.submittedDate = submittedDate;
111
        this.reportProcessingStatus = reportProcessingStatus;
112
        this.generatedReportId = generatedReportId;
113
        this.startedProcessingDate = startedProcessingDate;
114
        this.completedDate = completedDate;
115
    }
116
 
117
    /**
118
     * Gets the value of the reportRequestId property.
119
     * 
120
     * @return
121
     *     possible object is
122
     *     {@link String }
123
     *     
124
     */
125
    public String getReportRequestId() {
126
        return reportRequestId;
127
    }
128
 
129
    /**
130
     * Sets the value of the reportRequestId property.
131
     * 
132
     * @param value
133
     *     allowed object is
134
     *     {@link String }
135
     *     
136
     */
137
    public void setReportRequestId(String value) {
138
        this.reportRequestId = value;
139
    }
140
 
141
    public boolean isSetReportRequestId() {
142
        return (this.reportRequestId!= null);
143
    }
144
 
145
    /**
146
     * Gets the value of the reportType property.
147
     * 
148
     * @return
149
     *     possible object is
150
     *     {@link String }
151
     *     
152
     */
153
    public String getReportType() {
154
        return reportType;
155
    }
156
 
157
    /**
158
     * Sets the value of the reportType property.
159
     * 
160
     * @param value
161
     *     allowed object is
162
     *     {@link String }
163
     *     
164
     */
165
    public void setReportType(String value) {
166
        this.reportType = value;
167
    }
168
 
169
    public boolean isSetReportType() {
170
        return (this.reportType!= null);
171
    }
172
 
173
    /**
174
     * Gets the value of the startDate property.
175
     * 
176
     * @return
177
     *     possible object is
178
     *     {@link XMLGregorianCalendar }
179
     *     
180
     */
181
    public XMLGregorianCalendar getStartDate() {
182
        return startDate;
183
    }
184
 
185
    /**
186
     * Sets the value of the startDate property.
187
     * 
188
     * @param value
189
     *     allowed object is
190
     *     {@link XMLGregorianCalendar }
191
     *     
192
     */
193
    public void setStartDate(XMLGregorianCalendar value) {
194
        this.startDate = value;
195
    }
196
 
197
    public boolean isSetStartDate() {
198
        return (this.startDate!= null);
199
    }
200
 
201
    /**
202
     * Gets the value of the endDate property.
203
     * 
204
     * @return
205
     *     possible object is
206
     *     {@link XMLGregorianCalendar }
207
     *     
208
     */
209
    public XMLGregorianCalendar getEndDate() {
210
        return endDate;
211
    }
212
 
213
    /**
214
     * Sets the value of the endDate property.
215
     * 
216
     * @param value
217
     *     allowed object is
218
     *     {@link XMLGregorianCalendar }
219
     *     
220
     */
221
    public void setEndDate(XMLGregorianCalendar value) {
222
        this.endDate = value;
223
    }
224
 
225
    public boolean isSetEndDate() {
226
        return (this.endDate!= null);
227
    }
228
 
229
    public boolean isScheduled() {
230
    	return scheduled;
231
    }
232
 
233
    public boolean isSetScheduled() {
234
    	return true;
235
    }
236
 
237
    public void setScheduled(boolean scheduled) {
238
    	this.scheduled = scheduled;
239
    }
240
 
241
    public ReportRequestInfo withScheduled(boolean scheduled) {
242
    	setScheduled(scheduled);
243
    	return this;
244
    }
245
 
246
    public String getGeneratedReportId() {
247
    	return generatedReportId;
248
    }
249
 
250
    public void setGeneratedReportId(String generatedReportId) {
251
    	this.generatedReportId = generatedReportId;
252
    }
253
 
254
    public boolean isSetGeneratedReportId() {
255
    	return generatedReportId!=null;
256
    }
257
 
258
    public ReportRequestInfo withGeneratedReportId(String generatedReportId) {
259
    	setGeneratedReportId(generatedReportId);
260
    	return this;
261
    }
262
 
263
    public XMLGregorianCalendar getStartedProcessingDate() {
264
    	return startedProcessingDate;
265
    }
266
 
267
    public void setStartedProcessingDate(XMLGregorianCalendar startedProcessingDate) {
268
    	this.startedProcessingDate = startedProcessingDate;
269
    }
270
 
271
    public boolean isSetStartedProcessingDate() {
272
    	return startedProcessingDate!=null;
273
    }
274
 
275
    public ReportRequestInfo withStartedProcessingDate(XMLGregorianCalendar startedProcessingDate) {
276
    	setStartedProcessingDate(startedProcessingDate);
277
    	return this;
278
    }
279
 
280
    public XMLGregorianCalendar getCompletedDate() {
281
    	return completedDate;
282
    }
283
 
284
    public void setCompletedDate(XMLGregorianCalendar completedDate) {
285
    	this.completedDate = completedDate;
286
    }
287
 
288
    public boolean isSetCompletedDate() {
289
    	return completedDate!=null;
290
    }
291
 
292
    public ReportRequestInfo withCompletedDate(XMLGregorianCalendar completedDate) {
293
    	setCompletedDate(completedDate);
294
    	return this;
295
    }
296
 
297
    /**
298
     * Gets the value of the submittedDate property.
299
     * 
300
     * @return
301
     *     possible object is
302
     *     {@link XMLGregorianCalendar }
303
     *     
304
     */
305
    public XMLGregorianCalendar getSubmittedDate() {
306
        return submittedDate;
307
    }
308
 
309
    /**
310
     * Sets the value of the submittedDate property.
311
     * 
312
     * @param value
313
     *     allowed object is
314
     *     {@link XMLGregorianCalendar }
315
     *     
316
     */
317
    public void setSubmittedDate(XMLGregorianCalendar value) {
318
        this.submittedDate = value;
319
    }
320
 
321
    public boolean isSetSubmittedDate() {
322
        return (this.submittedDate!= null);
323
    }
324
 
325
    /**
326
     * Gets the value of the reportProcessingStatus property.
327
     * 
328
     * @return
329
     *     possible object is
330
     *     {@link String }
331
     *     
332
     */
333
    public String getReportProcessingStatus() {
334
        return reportProcessingStatus;
335
    }
336
 
337
    /**
338
     * Sets the value of the reportProcessingStatus property.
339
     * 
340
     * @param value
341
     *     allowed object is
342
     *     {@link String }
343
     *     
344
     */
345
    public void setReportProcessingStatus(String value) {
346
        this.reportProcessingStatus = value;
347
    }
348
 
349
    public boolean isSetReportProcessingStatus() {
350
        return (this.reportProcessingStatus!= null);
351
    }
352
 
353
    /**
354
     * Sets the value of the ReportRequestId property.
355
     * 
356
     * @param value
357
     * @return
358
     *     this instance
359
     */
360
    public ReportRequestInfo withReportRequestId(String value) {
361
        setReportRequestId(value);
362
        return this;
363
    }
364
 
365
    /**
366
     * Sets the value of the ReportType property.
367
     * 
368
     * @param value
369
     * @return
370
     *     this instance
371
     */
372
    public ReportRequestInfo withReportType(String value) {
373
        setReportType(value);
374
        return this;
375
    }
376
 
377
    /**
378
     * Sets the value of the StartDate property.
379
     * 
380
     * @param value
381
     * @return
382
     *     this instance
383
     */
384
    public ReportRequestInfo withStartDate(XMLGregorianCalendar value) {
385
        setStartDate(value);
386
        return this;
387
    }
388
 
389
    /**
390
     * Sets the value of the EndDate property.
391
     * 
392
     * @param value
393
     * @return
394
     *     this instance
395
     */
396
    public ReportRequestInfo withEndDate(XMLGregorianCalendar value) {
397
        setEndDate(value);
398
        return this;
399
    }
400
 
401
    /**
402
     * Sets the value of the SubmittedDate property.
403
     * 
404
     * @param value
405
     * @return
406
     *     this instance
407
     */
408
    public ReportRequestInfo withSubmittedDate(XMLGregorianCalendar value) {
409
        setSubmittedDate(value);
410
        return this;
411
    }
412
 
413
    /**
414
     * Sets the value of the ReportProcessingStatus property.
415
     * 
416
     * @param value
417
     * @return
418
     *     this instance
419
     */
420
    public ReportRequestInfo withReportProcessingStatus(String value) {
421
        setReportProcessingStatus(value);
422
        return this;
423
    }
424
 
425
 
426
    /**
427
     * 
428
     * XML fragment representation of this object
429
     * 
430
     * @return XML fragment for this object. Name for outer
431
     * tag expected to be set by calling method. This fragment
432
     * returns inner properties representation only
433
     */
434
    protected String toXMLFragment() {
435
        StringBuffer xml = new StringBuffer();
436
        if (isSetReportRequestId()) {
437
            xml.append("<ReportRequestId>");
438
            xml.append(escapeXML(getReportRequestId()));
439
            xml.append("</ReportRequestId>");
440
        }
441
        if (isSetReportType()) {
442
            xml.append("<ReportType>");
443
            xml.append(escapeXML(getReportType()));
444
            xml.append("</ReportType>");
445
        }
446
        if (isSetStartDate()) {
447
            xml.append("<StartDate>");
448
            xml.append(getStartDate() + "");
449
            xml.append("</StartDate>");
450
        }
451
        if (isSetEndDate()) {
452
            xml.append("<EndDate>");
453
            xml.append(getEndDate() + "");
454
            xml.append("</EndDate>");
455
        }
456
        if (isSetScheduled()) {
457
        	xml.append("<Scheduled>");
458
        	xml.append(isScheduled()+"");
459
        	xml.append("</Scheduled>");
460
        }
461
        if (isSetSubmittedDate()) {
462
            xml.append("<SubmittedDate>");
463
            xml.append(getSubmittedDate() + "");
464
            xml.append("</SubmittedDate>");
465
        }
466
        if (isSetReportProcessingStatus()) {
467
            xml.append("<ReportProcessingStatus>");
468
            xml.append(escapeXML(getReportProcessingStatus()));
469
            xml.append("</ReportProcessingStatus>");
470
        }
471
        if (isSetGeneratedReportId()) {
472
        	xml.append("<GeneratedReportId>");
473
        	xml.append(escapeXML(getGeneratedReportId()));
474
        	xml.append("</GeneratedReportId>");
475
        }
476
        if (isSetStartedProcessingDate()) {
477
        	xml.append("<StartedProcessingDate>");
478
        	xml.append(getStartedProcessingDate()+"");
479
        	xml.append("</StartedProcessingDate>");
480
        }
481
        if (isSetCompletedDate()) {
482
        	xml.append("<CompletedDate>");
483
        	xml.append(getCompletedDate()+"");
484
        	xml.append("</CompletedDate>");
485
        }
486
        return xml.toString();
487
    }
488
 
489
    /**
490
     * 
491
     * Escape XML special characters
492
     */
493
    private String escapeXML(String string) {
494
        StringBuffer sb = new StringBuffer();
495
        int length = string.length();
496
        for (int i = 0; i < length; ++i) {
497
            char c = string.charAt(i);
498
            switch (c) {
499
            case '&':
500
                sb.append("&amp;");
501
                break;
502
            case '<':
503
                sb.append("&lt;");
504
                break;
505
            case '>':
506
                sb.append("&gt;");
507
                break;
508
            case '\'':
509
                sb.append("&#039;");
510
                break;
511
            case '"':
512
                sb.append("&quot;");
513
                break;
514
            default:
515
                sb.append(c);
516
            }
517
        }
518
        return sb.toString();
519
    }
520
 
521
 
522
 
523
    /**
524
     *
525
     * JSON fragment representation of this object
526
     *
527
     * @return JSON fragment for this object. Name for outer
528
     * object expected to be set by calling method. This fragment
529
     * returns inner properties representation only
530
     *
531
     */
532
    protected String toJSONFragment() {
533
        StringBuffer json = new StringBuffer();
534
        boolean first = true;
535
        if (isSetReportRequestId()) {
536
            if (!first) json.append(", ");
537
            json.append(quoteJSON("ReportRequestId"));
538
            json.append(" : ");
539
            json.append(quoteJSON(getReportRequestId()));
540
            first = false;
541
        }
542
        if (isSetReportType()) {
543
            if (!first) json.append(", ");
544
            json.append(quoteJSON("ReportType"));
545
            json.append(" : ");
546
            json.append(quoteJSON(getReportType()));
547
            first = false;
548
        }
549
        if (isSetStartDate()) {
550
            if (!first) json.append(", ");
551
            json.append(quoteJSON("StartDate"));
552
            json.append(" : ");
553
            json.append(quoteJSON(getStartDate() + ""));
554
            first = false;
555
        }
556
        if (isSetEndDate()) {
557
            if (!first) json.append(", ");
558
            json.append(quoteJSON("EndDate"));
559
            json.append(" : ");
560
            json.append(quoteJSON(getEndDate() + ""));
561
            first = false;
562
        }
563
        if (isSetScheduled()) {
564
        	if (!first) json.append(", ");
565
        	json.append(quoteJSON("Scheduled"));
566
        	json.append(" : ");
567
        	json.append(quoteJSON(isScheduled()+""));
568
        	first = false;
569
        }
570
        if (isSetSubmittedDate()) {
571
            if (!first) json.append(", ");
572
            json.append(quoteJSON("SubmittedDate"));
573
            json.append(" : ");
574
            json.append(quoteJSON(getSubmittedDate() + ""));
575
            first = false;
576
        }
577
        if (isSetReportProcessingStatus()) {
578
            if (!first) json.append(", ");
579
            json.append(quoteJSON("ReportProcessingStatus"));
580
            json.append(" : ");
581
            json.append(quoteJSON(getReportProcessingStatus()));
582
            first = false;
583
        }
584
        if (isSetGeneratedReportId()) {
585
        	if (!first) json.append(", ");
586
        	json.append(quoteJSON("GeneratedReportId"));
587
        	json.append(" : ");
588
        	json.append(quoteJSON(getGeneratedReportId()));
589
        	first = false;
590
        }
591
        if (isSetStartedProcessingDate()) {
592
        	if (!first) json.append(", ");
593
        	json.append(quoteJSON("StartedProcessingDate"));
594
        	json.append(" : ");
595
        	json.append(quoteJSON(getStartedProcessingDate()+""));
596
        	first = false;
597
        }
598
        if (isSetCompletedDate()) {
599
        	if (!first) json.append(", ");
600
        	json.append(quoteJSON("CompletedDate"));
601
        	json.append(" : ");
602
        	json.append(quoteJSON(getCompletedDate()+""));
603
        	first = false;
604
        }
605
        return json.toString();
606
    }
607
 
608
    /**
609
     *
610
     * Quote JSON string
611
     */
612
    private String quoteJSON(String string) {
613
        StringBuffer sb = new StringBuffer();
614
        sb.append("\"");
615
        int length = string.length();
616
        for (int i = 0; i < length; ++i) {
617
            char c = string.charAt(i);
618
            switch (c) {
619
            case '"':
620
                sb.append("\\\"");
621
                break;
622
            case '\\':
623
                sb.append("\\\\");
624
                break;
625
            case '/':
626
                sb.append("\\/");
627
                break;
628
            case '\b':
629
                sb.append("\\b");
630
                break;
631
            case '\f':
632
                sb.append("\\f");
633
                break;
634
            case '\n':
635
                sb.append("\\n");
636
                break;
637
            case '\r':
638
                sb.append("\\r");
639
                break;
640
            case '\t':
641
                sb.append("\\t");
642
                break;
643
            default:
644
                if (c <  ' ') {
645
                    sb.append("\\u" + String.format("%03x", Integer.valueOf(c)));
646
                } else {
647
                sb.append(c);
648
            }
649
        }
650
        }
651
        sb.append("\"");
652
        return sb.toString();
653
    }
654
 
655
 
656
}