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