Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

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