| 7442 |
vikram.rag |
1 |
/**
|
|
|
2 |
* Autogenerated by Thrift Compiler (0.7.0)
|
|
|
3 |
*
|
|
|
4 |
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
|
5 |
*/
|
|
|
6 |
package in.shop2020.model.v1.order;
|
|
|
7 |
|
|
|
8 |
import java.util.List;
|
|
|
9 |
import java.util.ArrayList;
|
|
|
10 |
import java.util.Map;
|
|
|
11 |
import java.util.HashMap;
|
|
|
12 |
import java.util.EnumMap;
|
|
|
13 |
import java.util.Set;
|
|
|
14 |
import java.util.HashSet;
|
|
|
15 |
import java.util.EnumSet;
|
|
|
16 |
import java.util.Collections;
|
|
|
17 |
import java.util.BitSet;
|
|
|
18 |
import java.nio.ByteBuffer;
|
|
|
19 |
import java.util.Arrays;
|
|
|
20 |
import org.slf4j.Logger;
|
|
|
21 |
import org.slf4j.LoggerFactory;
|
|
|
22 |
|
|
|
23 |
public class AmazonOrdersToAcknowledge implements org.apache.thrift.TBase<AmazonOrdersToAcknowledge, AmazonOrdersToAcknowledge._Fields>, java.io.Serializable, Cloneable {
|
|
|
24 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AmazonOrdersToAcknowledge");
|
|
|
25 |
|
|
|
26 |
private static final org.apache.thrift.protocol.TField AMAZON_ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("amazonOrderId", org.apache.thrift.protocol.TType.STRING, (short)1);
|
|
|
27 |
private static final org.apache.thrift.protocol.TField AMAZON_ORDER_ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("amazonOrderItemId", org.apache.thrift.protocol.TType.STRING, (short)2);
|
|
|
28 |
private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRING, (short)3);
|
|
|
29 |
private static final org.apache.thrift.protocol.TField TRANSACTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transaction_id", org.apache.thrift.protocol.TType.I64, (short)4);
|
|
|
30 |
private static final org.apache.thrift.protocol.TField COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("count", org.apache.thrift.protocol.TType.I32, (short)5);
|
|
|
31 |
|
|
|
32 |
private String amazonOrderId; // required
|
|
|
33 |
private String amazonOrderItemId; // required
|
|
|
34 |
private String status; // required
|
|
|
35 |
private long transaction_id; // required
|
|
|
36 |
private int count; // required
|
|
|
37 |
|
|
|
38 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
39 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
40 |
AMAZON_ORDER_ID((short)1, "amazonOrderId"),
|
|
|
41 |
AMAZON_ORDER_ITEM_ID((short)2, "amazonOrderItemId"),
|
|
|
42 |
STATUS((short)3, "status"),
|
|
|
43 |
TRANSACTION_ID((short)4, "transaction_id"),
|
|
|
44 |
COUNT((short)5, "count");
|
|
|
45 |
|
|
|
46 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
47 |
|
|
|
48 |
static {
|
|
|
49 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
50 |
byName.put(field.getFieldName(), field);
|
|
|
51 |
}
|
|
|
52 |
}
|
|
|
53 |
|
|
|
54 |
/**
|
|
|
55 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
56 |
*/
|
|
|
57 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
58 |
switch(fieldId) {
|
|
|
59 |
case 1: // AMAZON_ORDER_ID
|
|
|
60 |
return AMAZON_ORDER_ID;
|
|
|
61 |
case 2: // AMAZON_ORDER_ITEM_ID
|
|
|
62 |
return AMAZON_ORDER_ITEM_ID;
|
|
|
63 |
case 3: // STATUS
|
|
|
64 |
return STATUS;
|
|
|
65 |
case 4: // TRANSACTION_ID
|
|
|
66 |
return TRANSACTION_ID;
|
|
|
67 |
case 5: // COUNT
|
|
|
68 |
return COUNT;
|
|
|
69 |
default:
|
|
|
70 |
return null;
|
|
|
71 |
}
|
|
|
72 |
}
|
|
|
73 |
|
|
|
74 |
/**
|
|
|
75 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
76 |
* if it is not found.
|
|
|
77 |
*/
|
|
|
78 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
79 |
_Fields fields = findByThriftId(fieldId);
|
|
|
80 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
81 |
return fields;
|
|
|
82 |
}
|
|
|
83 |
|
|
|
84 |
/**
|
|
|
85 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
86 |
*/
|
|
|
87 |
public static _Fields findByName(String name) {
|
|
|
88 |
return byName.get(name);
|
|
|
89 |
}
|
|
|
90 |
|
|
|
91 |
private final short _thriftId;
|
|
|
92 |
private final String _fieldName;
|
|
|
93 |
|
|
|
94 |
_Fields(short thriftId, String fieldName) {
|
|
|
95 |
_thriftId = thriftId;
|
|
|
96 |
_fieldName = fieldName;
|
|
|
97 |
}
|
|
|
98 |
|
|
|
99 |
public short getThriftFieldId() {
|
|
|
100 |
return _thriftId;
|
|
|
101 |
}
|
|
|
102 |
|
|
|
103 |
public String getFieldName() {
|
|
|
104 |
return _fieldName;
|
|
|
105 |
}
|
|
|
106 |
}
|
|
|
107 |
|
|
|
108 |
// isset id assignments
|
|
|
109 |
private static final int __TRANSACTION_ID_ISSET_ID = 0;
|
|
|
110 |
private static final int __COUNT_ISSET_ID = 1;
|
|
|
111 |
private BitSet __isset_bit_vector = new BitSet(2);
|
|
|
112 |
|
|
|
113 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
114 |
static {
|
|
|
115 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
116 |
tmpMap.put(_Fields.AMAZON_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("amazonOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
117 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
118 |
tmpMap.put(_Fields.AMAZON_ORDER_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("amazonOrderItemId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
119 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
120 |
tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
121 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
122 |
tmpMap.put(_Fields.TRANSACTION_ID, new org.apache.thrift.meta_data.FieldMetaData("transaction_id", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
123 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
124 |
tmpMap.put(_Fields.COUNT, new org.apache.thrift.meta_data.FieldMetaData("count", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
125 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
|
|
|
126 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
127 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AmazonOrdersToAcknowledge.class, metaDataMap);
|
|
|
128 |
}
|
|
|
129 |
|
|
|
130 |
public AmazonOrdersToAcknowledge() {
|
|
|
131 |
}
|
|
|
132 |
|
|
|
133 |
public AmazonOrdersToAcknowledge(
|
|
|
134 |
String amazonOrderId,
|
|
|
135 |
String amazonOrderItemId,
|
|
|
136 |
String status,
|
|
|
137 |
long transaction_id,
|
|
|
138 |
int count)
|
|
|
139 |
{
|
|
|
140 |
this();
|
|
|
141 |
this.amazonOrderId = amazonOrderId;
|
|
|
142 |
this.amazonOrderItemId = amazonOrderItemId;
|
|
|
143 |
this.status = status;
|
|
|
144 |
this.transaction_id = transaction_id;
|
|
|
145 |
setTransaction_idIsSet(true);
|
|
|
146 |
this.count = count;
|
|
|
147 |
setCountIsSet(true);
|
|
|
148 |
}
|
|
|
149 |
|
|
|
150 |
/**
|
|
|
151 |
* Performs a deep copy on <i>other</i>.
|
|
|
152 |
*/
|
|
|
153 |
public AmazonOrdersToAcknowledge(AmazonOrdersToAcknowledge other) {
|
|
|
154 |
__isset_bit_vector.clear();
|
|
|
155 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
156 |
if (other.isSetAmazonOrderId()) {
|
|
|
157 |
this.amazonOrderId = other.amazonOrderId;
|
|
|
158 |
}
|
|
|
159 |
if (other.isSetAmazonOrderItemId()) {
|
|
|
160 |
this.amazonOrderItemId = other.amazonOrderItemId;
|
|
|
161 |
}
|
|
|
162 |
if (other.isSetStatus()) {
|
|
|
163 |
this.status = other.status;
|
|
|
164 |
}
|
|
|
165 |
this.transaction_id = other.transaction_id;
|
|
|
166 |
this.count = other.count;
|
|
|
167 |
}
|
|
|
168 |
|
|
|
169 |
public AmazonOrdersToAcknowledge deepCopy() {
|
|
|
170 |
return new AmazonOrdersToAcknowledge(this);
|
|
|
171 |
}
|
|
|
172 |
|
|
|
173 |
@Override
|
|
|
174 |
public void clear() {
|
|
|
175 |
this.amazonOrderId = null;
|
|
|
176 |
this.amazonOrderItemId = null;
|
|
|
177 |
this.status = null;
|
|
|
178 |
setTransaction_idIsSet(false);
|
|
|
179 |
this.transaction_id = 0;
|
|
|
180 |
setCountIsSet(false);
|
|
|
181 |
this.count = 0;
|
|
|
182 |
}
|
|
|
183 |
|
|
|
184 |
public String getAmazonOrderId() {
|
|
|
185 |
return this.amazonOrderId;
|
|
|
186 |
}
|
|
|
187 |
|
|
|
188 |
public void setAmazonOrderId(String amazonOrderId) {
|
|
|
189 |
this.amazonOrderId = amazonOrderId;
|
|
|
190 |
}
|
|
|
191 |
|
|
|
192 |
public void unsetAmazonOrderId() {
|
|
|
193 |
this.amazonOrderId = null;
|
|
|
194 |
}
|
|
|
195 |
|
|
|
196 |
/** Returns true if field amazonOrderId is set (has been assigned a value) and false otherwise */
|
|
|
197 |
public boolean isSetAmazonOrderId() {
|
|
|
198 |
return this.amazonOrderId != null;
|
|
|
199 |
}
|
|
|
200 |
|
|
|
201 |
public void setAmazonOrderIdIsSet(boolean value) {
|
|
|
202 |
if (!value) {
|
|
|
203 |
this.amazonOrderId = null;
|
|
|
204 |
}
|
|
|
205 |
}
|
|
|
206 |
|
|
|
207 |
public String getAmazonOrderItemId() {
|
|
|
208 |
return this.amazonOrderItemId;
|
|
|
209 |
}
|
|
|
210 |
|
|
|
211 |
public void setAmazonOrderItemId(String amazonOrderItemId) {
|
|
|
212 |
this.amazonOrderItemId = amazonOrderItemId;
|
|
|
213 |
}
|
|
|
214 |
|
|
|
215 |
public void unsetAmazonOrderItemId() {
|
|
|
216 |
this.amazonOrderItemId = null;
|
|
|
217 |
}
|
|
|
218 |
|
|
|
219 |
/** Returns true if field amazonOrderItemId is set (has been assigned a value) and false otherwise */
|
|
|
220 |
public boolean isSetAmazonOrderItemId() {
|
|
|
221 |
return this.amazonOrderItemId != null;
|
|
|
222 |
}
|
|
|
223 |
|
|
|
224 |
public void setAmazonOrderItemIdIsSet(boolean value) {
|
|
|
225 |
if (!value) {
|
|
|
226 |
this.amazonOrderItemId = null;
|
|
|
227 |
}
|
|
|
228 |
}
|
|
|
229 |
|
|
|
230 |
public String getStatus() {
|
|
|
231 |
return this.status;
|
|
|
232 |
}
|
|
|
233 |
|
|
|
234 |
public void setStatus(String status) {
|
|
|
235 |
this.status = status;
|
|
|
236 |
}
|
|
|
237 |
|
|
|
238 |
public void unsetStatus() {
|
|
|
239 |
this.status = null;
|
|
|
240 |
}
|
|
|
241 |
|
|
|
242 |
/** Returns true if field status is set (has been assigned a value) and false otherwise */
|
|
|
243 |
public boolean isSetStatus() {
|
|
|
244 |
return this.status != null;
|
|
|
245 |
}
|
|
|
246 |
|
|
|
247 |
public void setStatusIsSet(boolean value) {
|
|
|
248 |
if (!value) {
|
|
|
249 |
this.status = null;
|
|
|
250 |
}
|
|
|
251 |
}
|
|
|
252 |
|
|
|
253 |
public long getTransaction_id() {
|
|
|
254 |
return this.transaction_id;
|
|
|
255 |
}
|
|
|
256 |
|
|
|
257 |
public void setTransaction_id(long transaction_id) {
|
|
|
258 |
this.transaction_id = transaction_id;
|
|
|
259 |
setTransaction_idIsSet(true);
|
|
|
260 |
}
|
|
|
261 |
|
|
|
262 |
public void unsetTransaction_id() {
|
|
|
263 |
__isset_bit_vector.clear(__TRANSACTION_ID_ISSET_ID);
|
|
|
264 |
}
|
|
|
265 |
|
|
|
266 |
/** Returns true if field transaction_id is set (has been assigned a value) and false otherwise */
|
|
|
267 |
public boolean isSetTransaction_id() {
|
|
|
268 |
return __isset_bit_vector.get(__TRANSACTION_ID_ISSET_ID);
|
|
|
269 |
}
|
|
|
270 |
|
|
|
271 |
public void setTransaction_idIsSet(boolean value) {
|
|
|
272 |
__isset_bit_vector.set(__TRANSACTION_ID_ISSET_ID, value);
|
|
|
273 |
}
|
|
|
274 |
|
|
|
275 |
public int getCount() {
|
|
|
276 |
return this.count;
|
|
|
277 |
}
|
|
|
278 |
|
|
|
279 |
public void setCount(int count) {
|
|
|
280 |
this.count = count;
|
|
|
281 |
setCountIsSet(true);
|
|
|
282 |
}
|
|
|
283 |
|
|
|
284 |
public void unsetCount() {
|
|
|
285 |
__isset_bit_vector.clear(__COUNT_ISSET_ID);
|
|
|
286 |
}
|
|
|
287 |
|
|
|
288 |
/** Returns true if field count is set (has been assigned a value) and false otherwise */
|
|
|
289 |
public boolean isSetCount() {
|
|
|
290 |
return __isset_bit_vector.get(__COUNT_ISSET_ID);
|
|
|
291 |
}
|
|
|
292 |
|
|
|
293 |
public void setCountIsSet(boolean value) {
|
|
|
294 |
__isset_bit_vector.set(__COUNT_ISSET_ID, value);
|
|
|
295 |
}
|
|
|
296 |
|
|
|
297 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
298 |
switch (field) {
|
|
|
299 |
case AMAZON_ORDER_ID:
|
|
|
300 |
if (value == null) {
|
|
|
301 |
unsetAmazonOrderId();
|
|
|
302 |
} else {
|
|
|
303 |
setAmazonOrderId((String)value);
|
|
|
304 |
}
|
|
|
305 |
break;
|
|
|
306 |
|
|
|
307 |
case AMAZON_ORDER_ITEM_ID:
|
|
|
308 |
if (value == null) {
|
|
|
309 |
unsetAmazonOrderItemId();
|
|
|
310 |
} else {
|
|
|
311 |
setAmazonOrderItemId((String)value);
|
|
|
312 |
}
|
|
|
313 |
break;
|
|
|
314 |
|
|
|
315 |
case STATUS:
|
|
|
316 |
if (value == null) {
|
|
|
317 |
unsetStatus();
|
|
|
318 |
} else {
|
|
|
319 |
setStatus((String)value);
|
|
|
320 |
}
|
|
|
321 |
break;
|
|
|
322 |
|
|
|
323 |
case TRANSACTION_ID:
|
|
|
324 |
if (value == null) {
|
|
|
325 |
unsetTransaction_id();
|
|
|
326 |
} else {
|
|
|
327 |
setTransaction_id((Long)value);
|
|
|
328 |
}
|
|
|
329 |
break;
|
|
|
330 |
|
|
|
331 |
case COUNT:
|
|
|
332 |
if (value == null) {
|
|
|
333 |
unsetCount();
|
|
|
334 |
} else {
|
|
|
335 |
setCount((Integer)value);
|
|
|
336 |
}
|
|
|
337 |
break;
|
|
|
338 |
|
|
|
339 |
}
|
|
|
340 |
}
|
|
|
341 |
|
|
|
342 |
public Object getFieldValue(_Fields field) {
|
|
|
343 |
switch (field) {
|
|
|
344 |
case AMAZON_ORDER_ID:
|
|
|
345 |
return getAmazonOrderId();
|
|
|
346 |
|
|
|
347 |
case AMAZON_ORDER_ITEM_ID:
|
|
|
348 |
return getAmazonOrderItemId();
|
|
|
349 |
|
|
|
350 |
case STATUS:
|
|
|
351 |
return getStatus();
|
|
|
352 |
|
|
|
353 |
case TRANSACTION_ID:
|
|
|
354 |
return Long.valueOf(getTransaction_id());
|
|
|
355 |
|
|
|
356 |
case COUNT:
|
|
|
357 |
return Integer.valueOf(getCount());
|
|
|
358 |
|
|
|
359 |
}
|
|
|
360 |
throw new IllegalStateException();
|
|
|
361 |
}
|
|
|
362 |
|
|
|
363 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
364 |
public boolean isSet(_Fields field) {
|
|
|
365 |
if (field == null) {
|
|
|
366 |
throw new IllegalArgumentException();
|
|
|
367 |
}
|
|
|
368 |
|
|
|
369 |
switch (field) {
|
|
|
370 |
case AMAZON_ORDER_ID:
|
|
|
371 |
return isSetAmazonOrderId();
|
|
|
372 |
case AMAZON_ORDER_ITEM_ID:
|
|
|
373 |
return isSetAmazonOrderItemId();
|
|
|
374 |
case STATUS:
|
|
|
375 |
return isSetStatus();
|
|
|
376 |
case TRANSACTION_ID:
|
|
|
377 |
return isSetTransaction_id();
|
|
|
378 |
case COUNT:
|
|
|
379 |
return isSetCount();
|
|
|
380 |
}
|
|
|
381 |
throw new IllegalStateException();
|
|
|
382 |
}
|
|
|
383 |
|
|
|
384 |
@Override
|
|
|
385 |
public boolean equals(Object that) {
|
|
|
386 |
if (that == null)
|
|
|
387 |
return false;
|
|
|
388 |
if (that instanceof AmazonOrdersToAcknowledge)
|
|
|
389 |
return this.equals((AmazonOrdersToAcknowledge)that);
|
|
|
390 |
return false;
|
|
|
391 |
}
|
|
|
392 |
|
|
|
393 |
public boolean equals(AmazonOrdersToAcknowledge that) {
|
|
|
394 |
if (that == null)
|
|
|
395 |
return false;
|
|
|
396 |
|
|
|
397 |
boolean this_present_amazonOrderId = true && this.isSetAmazonOrderId();
|
|
|
398 |
boolean that_present_amazonOrderId = true && that.isSetAmazonOrderId();
|
|
|
399 |
if (this_present_amazonOrderId || that_present_amazonOrderId) {
|
|
|
400 |
if (!(this_present_amazonOrderId && that_present_amazonOrderId))
|
|
|
401 |
return false;
|
|
|
402 |
if (!this.amazonOrderId.equals(that.amazonOrderId))
|
|
|
403 |
return false;
|
|
|
404 |
}
|
|
|
405 |
|
|
|
406 |
boolean this_present_amazonOrderItemId = true && this.isSetAmazonOrderItemId();
|
|
|
407 |
boolean that_present_amazonOrderItemId = true && that.isSetAmazonOrderItemId();
|
|
|
408 |
if (this_present_amazonOrderItemId || that_present_amazonOrderItemId) {
|
|
|
409 |
if (!(this_present_amazonOrderItemId && that_present_amazonOrderItemId))
|
|
|
410 |
return false;
|
|
|
411 |
if (!this.amazonOrderItemId.equals(that.amazonOrderItemId))
|
|
|
412 |
return false;
|
|
|
413 |
}
|
|
|
414 |
|
|
|
415 |
boolean this_present_status = true && this.isSetStatus();
|
|
|
416 |
boolean that_present_status = true && that.isSetStatus();
|
|
|
417 |
if (this_present_status || that_present_status) {
|
|
|
418 |
if (!(this_present_status && that_present_status))
|
|
|
419 |
return false;
|
|
|
420 |
if (!this.status.equals(that.status))
|
|
|
421 |
return false;
|
|
|
422 |
}
|
|
|
423 |
|
|
|
424 |
boolean this_present_transaction_id = true;
|
|
|
425 |
boolean that_present_transaction_id = true;
|
|
|
426 |
if (this_present_transaction_id || that_present_transaction_id) {
|
|
|
427 |
if (!(this_present_transaction_id && that_present_transaction_id))
|
|
|
428 |
return false;
|
|
|
429 |
if (this.transaction_id != that.transaction_id)
|
|
|
430 |
return false;
|
|
|
431 |
}
|
|
|
432 |
|
|
|
433 |
boolean this_present_count = true;
|
|
|
434 |
boolean that_present_count = true;
|
|
|
435 |
if (this_present_count || that_present_count) {
|
|
|
436 |
if (!(this_present_count && that_present_count))
|
|
|
437 |
return false;
|
|
|
438 |
if (this.count != that.count)
|
|
|
439 |
return false;
|
|
|
440 |
}
|
|
|
441 |
|
|
|
442 |
return true;
|
|
|
443 |
}
|
|
|
444 |
|
|
|
445 |
@Override
|
|
|
446 |
public int hashCode() {
|
|
|
447 |
return 0;
|
|
|
448 |
}
|
|
|
449 |
|
|
|
450 |
public int compareTo(AmazonOrdersToAcknowledge other) {
|
|
|
451 |
if (!getClass().equals(other.getClass())) {
|
|
|
452 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
453 |
}
|
|
|
454 |
|
|
|
455 |
int lastComparison = 0;
|
|
|
456 |
AmazonOrdersToAcknowledge typedOther = (AmazonOrdersToAcknowledge)other;
|
|
|
457 |
|
|
|
458 |
lastComparison = Boolean.valueOf(isSetAmazonOrderId()).compareTo(typedOther.isSetAmazonOrderId());
|
|
|
459 |
if (lastComparison != 0) {
|
|
|
460 |
return lastComparison;
|
|
|
461 |
}
|
|
|
462 |
if (isSetAmazonOrderId()) {
|
|
|
463 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amazonOrderId, typedOther.amazonOrderId);
|
|
|
464 |
if (lastComparison != 0) {
|
|
|
465 |
return lastComparison;
|
|
|
466 |
}
|
|
|
467 |
}
|
|
|
468 |
lastComparison = Boolean.valueOf(isSetAmazonOrderItemId()).compareTo(typedOther.isSetAmazonOrderItemId());
|
|
|
469 |
if (lastComparison != 0) {
|
|
|
470 |
return lastComparison;
|
|
|
471 |
}
|
|
|
472 |
if (isSetAmazonOrderItemId()) {
|
|
|
473 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amazonOrderItemId, typedOther.amazonOrderItemId);
|
|
|
474 |
if (lastComparison != 0) {
|
|
|
475 |
return lastComparison;
|
|
|
476 |
}
|
|
|
477 |
}
|
|
|
478 |
lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
|
|
|
479 |
if (lastComparison != 0) {
|
|
|
480 |
return lastComparison;
|
|
|
481 |
}
|
|
|
482 |
if (isSetStatus()) {
|
|
|
483 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
|
|
|
484 |
if (lastComparison != 0) {
|
|
|
485 |
return lastComparison;
|
|
|
486 |
}
|
|
|
487 |
}
|
|
|
488 |
lastComparison = Boolean.valueOf(isSetTransaction_id()).compareTo(typedOther.isSetTransaction_id());
|
|
|
489 |
if (lastComparison != 0) {
|
|
|
490 |
return lastComparison;
|
|
|
491 |
}
|
|
|
492 |
if (isSetTransaction_id()) {
|
|
|
493 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transaction_id, typedOther.transaction_id);
|
|
|
494 |
if (lastComparison != 0) {
|
|
|
495 |
return lastComparison;
|
|
|
496 |
}
|
|
|
497 |
}
|
|
|
498 |
lastComparison = Boolean.valueOf(isSetCount()).compareTo(typedOther.isSetCount());
|
|
|
499 |
if (lastComparison != 0) {
|
|
|
500 |
return lastComparison;
|
|
|
501 |
}
|
|
|
502 |
if (isSetCount()) {
|
|
|
503 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.count, typedOther.count);
|
|
|
504 |
if (lastComparison != 0) {
|
|
|
505 |
return lastComparison;
|
|
|
506 |
}
|
|
|
507 |
}
|
|
|
508 |
return 0;
|
|
|
509 |
}
|
|
|
510 |
|
|
|
511 |
public _Fields fieldForId(int fieldId) {
|
|
|
512 |
return _Fields.findByThriftId(fieldId);
|
|
|
513 |
}
|
|
|
514 |
|
|
|
515 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
516 |
org.apache.thrift.protocol.TField field;
|
|
|
517 |
iprot.readStructBegin();
|
|
|
518 |
while (true)
|
|
|
519 |
{
|
|
|
520 |
field = iprot.readFieldBegin();
|
|
|
521 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
522 |
break;
|
|
|
523 |
}
|
|
|
524 |
switch (field.id) {
|
|
|
525 |
case 1: // AMAZON_ORDER_ID
|
|
|
526 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
527 |
this.amazonOrderId = iprot.readString();
|
|
|
528 |
} else {
|
|
|
529 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
530 |
}
|
|
|
531 |
break;
|
|
|
532 |
case 2: // AMAZON_ORDER_ITEM_ID
|
|
|
533 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
534 |
this.amazonOrderItemId = iprot.readString();
|
|
|
535 |
} else {
|
|
|
536 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
537 |
}
|
|
|
538 |
break;
|
|
|
539 |
case 3: // STATUS
|
|
|
540 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
541 |
this.status = iprot.readString();
|
|
|
542 |
} else {
|
|
|
543 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
544 |
}
|
|
|
545 |
break;
|
|
|
546 |
case 4: // TRANSACTION_ID
|
|
|
547 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
548 |
this.transaction_id = iprot.readI64();
|
|
|
549 |
setTransaction_idIsSet(true);
|
|
|
550 |
} else {
|
|
|
551 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
552 |
}
|
|
|
553 |
break;
|
|
|
554 |
case 5: // COUNT
|
|
|
555 |
if (field.type == org.apache.thrift.protocol.TType.I32) {
|
|
|
556 |
this.count = iprot.readI32();
|
|
|
557 |
setCountIsSet(true);
|
|
|
558 |
} else {
|
|
|
559 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
560 |
}
|
|
|
561 |
break;
|
|
|
562 |
default:
|
|
|
563 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
564 |
}
|
|
|
565 |
iprot.readFieldEnd();
|
|
|
566 |
}
|
|
|
567 |
iprot.readStructEnd();
|
|
|
568 |
validate();
|
|
|
569 |
}
|
|
|
570 |
|
|
|
571 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
572 |
validate();
|
|
|
573 |
|
|
|
574 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
575 |
if (this.amazonOrderId != null) {
|
|
|
576 |
oprot.writeFieldBegin(AMAZON_ORDER_ID_FIELD_DESC);
|
|
|
577 |
oprot.writeString(this.amazonOrderId);
|
|
|
578 |
oprot.writeFieldEnd();
|
|
|
579 |
}
|
|
|
580 |
if (this.amazonOrderItemId != null) {
|
|
|
581 |
oprot.writeFieldBegin(AMAZON_ORDER_ITEM_ID_FIELD_DESC);
|
|
|
582 |
oprot.writeString(this.amazonOrderItemId);
|
|
|
583 |
oprot.writeFieldEnd();
|
|
|
584 |
}
|
|
|
585 |
if (this.status != null) {
|
|
|
586 |
oprot.writeFieldBegin(STATUS_FIELD_DESC);
|
|
|
587 |
oprot.writeString(this.status);
|
|
|
588 |
oprot.writeFieldEnd();
|
|
|
589 |
}
|
|
|
590 |
oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
|
|
|
591 |
oprot.writeI64(this.transaction_id);
|
|
|
592 |
oprot.writeFieldEnd();
|
|
|
593 |
oprot.writeFieldBegin(COUNT_FIELD_DESC);
|
|
|
594 |
oprot.writeI32(this.count);
|
|
|
595 |
oprot.writeFieldEnd();
|
|
|
596 |
oprot.writeFieldStop();
|
|
|
597 |
oprot.writeStructEnd();
|
|
|
598 |
}
|
|
|
599 |
|
|
|
600 |
@Override
|
|
|
601 |
public String toString() {
|
|
|
602 |
StringBuilder sb = new StringBuilder("AmazonOrdersToAcknowledge(");
|
|
|
603 |
boolean first = true;
|
|
|
604 |
|
|
|
605 |
sb.append("amazonOrderId:");
|
|
|
606 |
if (this.amazonOrderId == null) {
|
|
|
607 |
sb.append("null");
|
|
|
608 |
} else {
|
|
|
609 |
sb.append(this.amazonOrderId);
|
|
|
610 |
}
|
|
|
611 |
first = false;
|
|
|
612 |
if (!first) sb.append(", ");
|
|
|
613 |
sb.append("amazonOrderItemId:");
|
|
|
614 |
if (this.amazonOrderItemId == null) {
|
|
|
615 |
sb.append("null");
|
|
|
616 |
} else {
|
|
|
617 |
sb.append(this.amazonOrderItemId);
|
|
|
618 |
}
|
|
|
619 |
first = false;
|
|
|
620 |
if (!first) sb.append(", ");
|
|
|
621 |
sb.append("status:");
|
|
|
622 |
if (this.status == null) {
|
|
|
623 |
sb.append("null");
|
|
|
624 |
} else {
|
|
|
625 |
sb.append(this.status);
|
|
|
626 |
}
|
|
|
627 |
first = false;
|
|
|
628 |
if (!first) sb.append(", ");
|
|
|
629 |
sb.append("transaction_id:");
|
|
|
630 |
sb.append(this.transaction_id);
|
|
|
631 |
first = false;
|
|
|
632 |
if (!first) sb.append(", ");
|
|
|
633 |
sb.append("count:");
|
|
|
634 |
sb.append(this.count);
|
|
|
635 |
first = false;
|
|
|
636 |
sb.append(")");
|
|
|
637 |
return sb.toString();
|
|
|
638 |
}
|
|
|
639 |
|
|
|
640 |
public void validate() throws org.apache.thrift.TException {
|
|
|
641 |
// check for required fields
|
|
|
642 |
}
|
|
|
643 |
|
|
|
644 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
645 |
try {
|
|
|
646 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
647 |
} catch (org.apache.thrift.TException te) {
|
|
|
648 |
throw new java.io.IOException(te);
|
|
|
649 |
}
|
|
|
650 |
}
|
|
|
651 |
|
|
|
652 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
653 |
try {
|
|
|
654 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
655 |
__isset_bit_vector = new BitSet(1);
|
|
|
656 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
657 |
} catch (org.apache.thrift.TException te) {
|
|
|
658 |
throw new java.io.IOException(te);
|
|
|
659 |
}
|
|
|
660 |
}
|
|
|
661 |
|
|
|
662 |
}
|
|
|
663 |
|