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.XmlType;
9
 
10
 
11
/**
12
 * <p>Java class for anonymous complex type.
13
 * 
14
 * <p>The following schema fragment specifies the expected content contained within this class.
15
 * 
16
 * <pre>
17
 * &lt;complexType>
18
 *   &lt;complexContent>
19
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
20
 *       &lt;sequence>
21
 *         &lt;element name="Marketplace" type="{http://www.w3.org/2001/XMLSchema}string"/>
22
 *         &lt;element name="Merchant" type="{http://www.w3.org/2001/XMLSchema}string"/>
23
 *         &lt;element name="ReportTypeList" type="{http://mws.amazonaws.com/doc/2009-01-01/}TypeList" minOccurs="0"/>
24
 *       &lt;/sequence>
25
 *     &lt;/restriction>
26
 *   &lt;/complexContent>
27
 * &lt;/complexType>
28
 * </pre>
29
 * Generated by AWS Code Generator
30
 * <p/>
31
 * Wed Feb 18 13:28:59 PST 2009
32
 * 
33
 */
34
@XmlAccessorType(XmlAccessType.FIELD)
35
@XmlType(name = "", propOrder = {
36
    "marketplace",
37
    "merchant",
38
    "reportTypeList"
39
})
40
@XmlRootElement(name = "GetReportScheduleCountRequest")
41
public class GetReportScheduleCountRequest {
42
 
43
    @XmlElement(name = "Marketplace")
44
    protected String marketplace;
45
    @XmlElement(name = "Merchant", required = true)
46
    protected String merchant;
47
    @XmlElement(name = "ReportTypeList")
48
    protected TypeList reportTypeList;
49
 
50
    /**
51
     * Default constructor
52
     * 
53
     */
54
    public GetReportScheduleCountRequest() {
55
        super();
56
    }
57
 
58
    /**
59
     * Value constructor
60
     * 
61
     */
62
    public GetReportScheduleCountRequest(final String marketplace, final String merchant, final TypeList reportTypeList) {
63
        this.marketplace = marketplace;
64
        this.merchant = merchant;
65
        this.reportTypeList = reportTypeList;
66
    }
67
 
68
    /**
69
     * Gets the value of the marketplace property.
70
     * 
71
     * @deprecated  See {@link #setMarketplace(String)}
72
     * @return
73
     *     possible object is
74
     *     {@link String }
75
     *     
76
     */
77
    public String getMarketplace() {
78
        return marketplace;
79
    }
80
 
81
    /**
82
     * Sets the value of the marketplace property.
83
     * 
84
     * @deprecated Not used anymore.  MWS ignores this parameter, but it is left
85
     * in here for backwards compatibility.
86
     * @param value
87
     *     allowed object is
88
     *     {@link String }
89
     *     
90
     */
91
    public void setMarketplace(String value) {
92
        this.marketplace = value;
93
    }
94
 
95
    /**
96
     * @deprecated  See {@link #setMarketplace(String)}
97
     */
98
    public boolean isSetMarketplace() {
99
        return (this.marketplace!= null);
100
    }
101
 
102
    /**
103
     * Gets the value of the merchant property.
104
     * 
105
     * @return
106
     *     possible object is
107
     *     {@link String }
108
     *     
109
     */
110
    public String getMerchant() {
111
        return merchant;
112
    }
113
 
114
    /**
115
     * Sets the value of the merchant property.
116
     * 
117
     * @param value
118
     *     allowed object is
119
     *     {@link String }
120
     *     
121
     */
122
    public void setMerchant(String value) {
123
        this.merchant = value;
124
    }
125
 
126
    public boolean isSetMerchant() {
127
        return (this.merchant!= null);
128
    }
129
 
130
    /**
131
     * Gets the value of the reportTypeList property.
132
     * 
133
     * @return
134
     *     possible object is
135
     *     {@link TypeList }
136
     *     
137
     */
138
    public TypeList getReportTypeList() {
139
        return reportTypeList;
140
    }
141
 
142
    /**
143
     * Sets the value of the reportTypeList property.
144
     * 
145
     * @param value
146
     *     allowed object is
147
     *     {@link TypeList }
148
     *     
149
     */
150
    public void setReportTypeList(TypeList value) {
151
        this.reportTypeList = value;
152
    }
153
 
154
    public boolean isSetReportTypeList() {
155
        return (this.reportTypeList!= null);
156
    }
157
 
158
    /**
159
     * Sets the value of the Marketplace property.
160
     * 
161
     * @deprecated  See {@link #setMarketplace(String)}
162
     * @param value
163
     * @return
164
     *     this instance
165
     */
166
    public GetReportScheduleCountRequest withMarketplace(String value) {
167
        setMarketplace(value);
168
        return this;
169
    }
170
 
171
    /**
172
     * Sets the value of the Merchant property.
173
     * 
174
     * @param value
175
     * @return
176
     *     this instance
177
     */
178
    public GetReportScheduleCountRequest withMerchant(String value) {
179
        setMerchant(value);
180
        return this;
181
    }
182
 
183
    /**
184
     * Sets the value of the ReportTypeList property.
185
     * 
186
     * @param value
187
     * @return
188
     *     this instance
189
     */
190
    public GetReportScheduleCountRequest withReportTypeList(TypeList value) {
191
        setReportTypeList(value);
192
        return this;
193
    }
194
 
195
 
196
 
197
    /**
198
     *
199
     * JSON fragment representation of this object
200
     *
201
     * @return JSON fragment for this object. Name for outer
202
     * object expected to be set by calling method. This fragment
203
     * returns inner properties representation only
204
     *
205
     */
206
    protected String toJSONFragment() {
207
        StringBuffer json = new StringBuffer();
208
        boolean first = true;
209
        if (isSetMarketplace()) {
210
            if (!first) json.append(", ");
211
            json.append(quoteJSON("Marketplace"));
212
            json.append(" : ");
213
            json.append(quoteJSON(getMarketplace()));
214
            first = false;
215
        }
216
        if (isSetMerchant()) {
217
            if (!first) json.append(", ");
218
            json.append(quoteJSON("Merchant"));
219
            json.append(" : ");
220
            json.append(quoteJSON(getMerchant()));
221
            first = false;
222
        }
223
        if (isSetReportTypeList()) {
224
            if (!first) json.append(", ");
225
            json.append("\"ReportTypeList\" : {");
226
            TypeList  reportTypeList = getReportTypeList();
227
 
228
 
229
            json.append(reportTypeList.toJSONFragment());
230
            json.append("}");
231
            first = false;
232
        }
233
        return json.toString();
234
    }
235
 
236
    /**
237
     *
238
     * Quote JSON string
239
     */
240
    private String quoteJSON(String string) {
241
        StringBuffer sb = new StringBuffer();
242
        sb.append("\"");
243
        int length = string.length();
244
        for (int i = 0; i < length; ++i) {
245
            char c = string.charAt(i);
246
            switch (c) {
247
            case '"':
248
                sb.append("\\\"");
249
                break;
250
            case '\\':
251
                sb.append("\\\\");
252
                break;
253
            case '/':
254
                sb.append("\\/");
255
                break;
256
            case '\b':
257
                sb.append("\\b");
258
                break;
259
            case '\f':
260
                sb.append("\\f");
261
                break;
262
            case '\n':
263
                sb.append("\\n");
264
                break;
265
            case '\r':
266
                sb.append("\\r");
267
                break;
268
            case '\t':
269
                sb.append("\\t");
270
                break;
271
            default:
272
                if (c <  ' ') {
273
                    sb.append("\\u" + String.format("%03x", Integer.valueOf(c)));
274
                } else {
275
                sb.append(c);
276
            }
277
        }
278
        }
279
        sb.append("\"");
280
        return sb.toString();
281
    }
282
 
283
 
284
}