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