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