| 6289 |
anupam.sin |
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 RechargeDenomination implements org.apache.thrift.TBase<RechargeDenomination, RechargeDenomination._Fields>, java.io.Serializable, Cloneable {
|
|
|
24 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RechargeDenomination");
|
|
|
25 |
|
|
|
26 |
private static final org.apache.thrift.protocol.TField OPERATOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("operatorId", org.apache.thrift.protocol.TType.I64, (short)1);
|
|
|
27 |
private static final org.apache.thrift.protocol.TField CIRCLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("circleId", org.apache.thrift.protocol.TType.I64, (short)2);
|
|
|
28 |
private static final org.apache.thrift.protocol.TField DENOMINATION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("denominationType", org.apache.thrift.protocol.TType.I32, (short)3);
|
|
|
29 |
private static final org.apache.thrift.protocol.TField AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("amount", org.apache.thrift.protocol.TType.I64, (short)4);
|
|
|
30 |
private static final org.apache.thrift.protocol.TField VALIDITY_FIELD_DESC = new org.apache.thrift.protocol.TField("validity", org.apache.thrift.protocol.TType.STRING, (short)5);
|
|
|
31 |
private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)6);
|
|
|
32 |
|
|
|
33 |
private long operatorId; // required
|
|
|
34 |
private long circleId; // required
|
|
|
35 |
private DenominationType denominationType; // required
|
|
|
36 |
private long amount; // required
|
|
|
37 |
private String validity; // required
|
|
|
38 |
private String description; // required
|
|
|
39 |
|
|
|
40 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
41 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
42 |
OPERATOR_ID((short)1, "operatorId"),
|
|
|
43 |
CIRCLE_ID((short)2, "circleId"),
|
|
|
44 |
/**
|
|
|
45 |
*
|
|
|
46 |
* @see DenominationType
|
|
|
47 |
*/
|
|
|
48 |
DENOMINATION_TYPE((short)3, "denominationType"),
|
|
|
49 |
AMOUNT((short)4, "amount"),
|
|
|
50 |
VALIDITY((short)5, "validity"),
|
|
|
51 |
DESCRIPTION((short)6, "description");
|
|
|
52 |
|
|
|
53 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
54 |
|
|
|
55 |
static {
|
|
|
56 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
57 |
byName.put(field.getFieldName(), field);
|
|
|
58 |
}
|
|
|
59 |
}
|
|
|
60 |
|
|
|
61 |
/**
|
|
|
62 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
63 |
*/
|
|
|
64 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
65 |
switch(fieldId) {
|
|
|
66 |
case 1: // OPERATOR_ID
|
|
|
67 |
return OPERATOR_ID;
|
|
|
68 |
case 2: // CIRCLE_ID
|
|
|
69 |
return CIRCLE_ID;
|
|
|
70 |
case 3: // DENOMINATION_TYPE
|
|
|
71 |
return DENOMINATION_TYPE;
|
|
|
72 |
case 4: // AMOUNT
|
|
|
73 |
return AMOUNT;
|
|
|
74 |
case 5: // VALIDITY
|
|
|
75 |
return VALIDITY;
|
|
|
76 |
case 6: // DESCRIPTION
|
|
|
77 |
return DESCRIPTION;
|
|
|
78 |
default:
|
|
|
79 |
return null;
|
|
|
80 |
}
|
|
|
81 |
}
|
|
|
82 |
|
|
|
83 |
/**
|
|
|
84 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
85 |
* if it is not found.
|
|
|
86 |
*/
|
|
|
87 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
88 |
_Fields fields = findByThriftId(fieldId);
|
|
|
89 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
90 |
return fields;
|
|
|
91 |
}
|
|
|
92 |
|
|
|
93 |
/**
|
|
|
94 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
95 |
*/
|
|
|
96 |
public static _Fields findByName(String name) {
|
|
|
97 |
return byName.get(name);
|
|
|
98 |
}
|
|
|
99 |
|
|
|
100 |
private final short _thriftId;
|
|
|
101 |
private final String _fieldName;
|
|
|
102 |
|
|
|
103 |
_Fields(short thriftId, String fieldName) {
|
|
|
104 |
_thriftId = thriftId;
|
|
|
105 |
_fieldName = fieldName;
|
|
|
106 |
}
|
|
|
107 |
|
|
|
108 |
public short getThriftFieldId() {
|
|
|
109 |
return _thriftId;
|
|
|
110 |
}
|
|
|
111 |
|
|
|
112 |
public String getFieldName() {
|
|
|
113 |
return _fieldName;
|
|
|
114 |
}
|
|
|
115 |
}
|
|
|
116 |
|
|
|
117 |
// isset id assignments
|
|
|
118 |
private static final int __OPERATORID_ISSET_ID = 0;
|
|
|
119 |
private static final int __CIRCLEID_ISSET_ID = 1;
|
|
|
120 |
private static final int __AMOUNT_ISSET_ID = 2;
|
|
|
121 |
private BitSet __isset_bit_vector = new BitSet(3);
|
|
|
122 |
|
|
|
123 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
124 |
static {
|
|
|
125 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
126 |
tmpMap.put(_Fields.OPERATOR_ID, new org.apache.thrift.meta_data.FieldMetaData("operatorId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
127 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
128 |
tmpMap.put(_Fields.CIRCLE_ID, new org.apache.thrift.meta_data.FieldMetaData("circleId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
129 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
130 |
tmpMap.put(_Fields.DENOMINATION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("denominationType", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
131 |
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, DenominationType.class)));
|
|
|
132 |
tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
133 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
134 |
tmpMap.put(_Fields.VALIDITY, new org.apache.thrift.meta_data.FieldMetaData("validity", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
135 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
136 |
tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
137 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
138 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
139 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RechargeDenomination.class, metaDataMap);
|
|
|
140 |
}
|
|
|
141 |
|
|
|
142 |
public RechargeDenomination() {
|
|
|
143 |
}
|
|
|
144 |
|
|
|
145 |
public RechargeDenomination(
|
|
|
146 |
long operatorId,
|
|
|
147 |
long circleId,
|
|
|
148 |
DenominationType denominationType,
|
|
|
149 |
long amount,
|
|
|
150 |
String validity,
|
|
|
151 |
String description)
|
|
|
152 |
{
|
|
|
153 |
this();
|
|
|
154 |
this.operatorId = operatorId;
|
|
|
155 |
setOperatorIdIsSet(true);
|
|
|
156 |
this.circleId = circleId;
|
|
|
157 |
setCircleIdIsSet(true);
|
|
|
158 |
this.denominationType = denominationType;
|
|
|
159 |
this.amount = amount;
|
|
|
160 |
setAmountIsSet(true);
|
|
|
161 |
this.validity = validity;
|
|
|
162 |
this.description = description;
|
|
|
163 |
}
|
|
|
164 |
|
|
|
165 |
/**
|
|
|
166 |
* Performs a deep copy on <i>other</i>.
|
|
|
167 |
*/
|
|
|
168 |
public RechargeDenomination(RechargeDenomination other) {
|
|
|
169 |
__isset_bit_vector.clear();
|
|
|
170 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
171 |
this.operatorId = other.operatorId;
|
|
|
172 |
this.circleId = other.circleId;
|
|
|
173 |
if (other.isSetDenominationType()) {
|
|
|
174 |
this.denominationType = other.denominationType;
|
|
|
175 |
}
|
|
|
176 |
this.amount = other.amount;
|
|
|
177 |
if (other.isSetValidity()) {
|
|
|
178 |
this.validity = other.validity;
|
|
|
179 |
}
|
|
|
180 |
if (other.isSetDescription()) {
|
|
|
181 |
this.description = other.description;
|
|
|
182 |
}
|
|
|
183 |
}
|
|
|
184 |
|
|
|
185 |
public RechargeDenomination deepCopy() {
|
|
|
186 |
return new RechargeDenomination(this);
|
|
|
187 |
}
|
|
|
188 |
|
|
|
189 |
@Override
|
|
|
190 |
public void clear() {
|
|
|
191 |
setOperatorIdIsSet(false);
|
|
|
192 |
this.operatorId = 0;
|
|
|
193 |
setCircleIdIsSet(false);
|
|
|
194 |
this.circleId = 0;
|
|
|
195 |
this.denominationType = null;
|
|
|
196 |
setAmountIsSet(false);
|
|
|
197 |
this.amount = 0;
|
|
|
198 |
this.validity = null;
|
|
|
199 |
this.description = null;
|
|
|
200 |
}
|
|
|
201 |
|
|
|
202 |
public long getOperatorId() {
|
|
|
203 |
return this.operatorId;
|
|
|
204 |
}
|
|
|
205 |
|
|
|
206 |
public void setOperatorId(long operatorId) {
|
|
|
207 |
this.operatorId = operatorId;
|
|
|
208 |
setOperatorIdIsSet(true);
|
|
|
209 |
}
|
|
|
210 |
|
|
|
211 |
public void unsetOperatorId() {
|
|
|
212 |
__isset_bit_vector.clear(__OPERATORID_ISSET_ID);
|
|
|
213 |
}
|
|
|
214 |
|
|
|
215 |
/** Returns true if field operatorId is set (has been assigned a value) and false otherwise */
|
|
|
216 |
public boolean isSetOperatorId() {
|
|
|
217 |
return __isset_bit_vector.get(__OPERATORID_ISSET_ID);
|
|
|
218 |
}
|
|
|
219 |
|
|
|
220 |
public void setOperatorIdIsSet(boolean value) {
|
|
|
221 |
__isset_bit_vector.set(__OPERATORID_ISSET_ID, value);
|
|
|
222 |
}
|
|
|
223 |
|
|
|
224 |
public long getCircleId() {
|
|
|
225 |
return this.circleId;
|
|
|
226 |
}
|
|
|
227 |
|
|
|
228 |
public void setCircleId(long circleId) {
|
|
|
229 |
this.circleId = circleId;
|
|
|
230 |
setCircleIdIsSet(true);
|
|
|
231 |
}
|
|
|
232 |
|
|
|
233 |
public void unsetCircleId() {
|
|
|
234 |
__isset_bit_vector.clear(__CIRCLEID_ISSET_ID);
|
|
|
235 |
}
|
|
|
236 |
|
|
|
237 |
/** Returns true if field circleId is set (has been assigned a value) and false otherwise */
|
|
|
238 |
public boolean isSetCircleId() {
|
|
|
239 |
return __isset_bit_vector.get(__CIRCLEID_ISSET_ID);
|
|
|
240 |
}
|
|
|
241 |
|
|
|
242 |
public void setCircleIdIsSet(boolean value) {
|
|
|
243 |
__isset_bit_vector.set(__CIRCLEID_ISSET_ID, value);
|
|
|
244 |
}
|
|
|
245 |
|
|
|
246 |
/**
|
|
|
247 |
*
|
|
|
248 |
* @see DenominationType
|
|
|
249 |
*/
|
|
|
250 |
public DenominationType getDenominationType() {
|
|
|
251 |
return this.denominationType;
|
|
|
252 |
}
|
|
|
253 |
|
|
|
254 |
/**
|
|
|
255 |
*
|
|
|
256 |
* @see DenominationType
|
|
|
257 |
*/
|
|
|
258 |
public void setDenominationType(DenominationType denominationType) {
|
|
|
259 |
this.denominationType = denominationType;
|
|
|
260 |
}
|
|
|
261 |
|
|
|
262 |
public void unsetDenominationType() {
|
|
|
263 |
this.denominationType = null;
|
|
|
264 |
}
|
|
|
265 |
|
|
|
266 |
/** Returns true if field denominationType is set (has been assigned a value) and false otherwise */
|
|
|
267 |
public boolean isSetDenominationType() {
|
|
|
268 |
return this.denominationType != null;
|
|
|
269 |
}
|
|
|
270 |
|
|
|
271 |
public void setDenominationTypeIsSet(boolean value) {
|
|
|
272 |
if (!value) {
|
|
|
273 |
this.denominationType = null;
|
|
|
274 |
}
|
|
|
275 |
}
|
|
|
276 |
|
|
|
277 |
public long getAmount() {
|
|
|
278 |
return this.amount;
|
|
|
279 |
}
|
|
|
280 |
|
|
|
281 |
public void setAmount(long amount) {
|
|
|
282 |
this.amount = amount;
|
|
|
283 |
setAmountIsSet(true);
|
|
|
284 |
}
|
|
|
285 |
|
|
|
286 |
public void unsetAmount() {
|
|
|
287 |
__isset_bit_vector.clear(__AMOUNT_ISSET_ID);
|
|
|
288 |
}
|
|
|
289 |
|
|
|
290 |
/** Returns true if field amount is set (has been assigned a value) and false otherwise */
|
|
|
291 |
public boolean isSetAmount() {
|
|
|
292 |
return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
|
|
|
293 |
}
|
|
|
294 |
|
|
|
295 |
public void setAmountIsSet(boolean value) {
|
|
|
296 |
__isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
|
|
|
297 |
}
|
|
|
298 |
|
|
|
299 |
public String getValidity() {
|
|
|
300 |
return this.validity;
|
|
|
301 |
}
|
|
|
302 |
|
|
|
303 |
public void setValidity(String validity) {
|
|
|
304 |
this.validity = validity;
|
|
|
305 |
}
|
|
|
306 |
|
|
|
307 |
public void unsetValidity() {
|
|
|
308 |
this.validity = null;
|
|
|
309 |
}
|
|
|
310 |
|
|
|
311 |
/** Returns true if field validity is set (has been assigned a value) and false otherwise */
|
|
|
312 |
public boolean isSetValidity() {
|
|
|
313 |
return this.validity != null;
|
|
|
314 |
}
|
|
|
315 |
|
|
|
316 |
public void setValidityIsSet(boolean value) {
|
|
|
317 |
if (!value) {
|
|
|
318 |
this.validity = null;
|
|
|
319 |
}
|
|
|
320 |
}
|
|
|
321 |
|
|
|
322 |
public String getDescription() {
|
|
|
323 |
return this.description;
|
|
|
324 |
}
|
|
|
325 |
|
|
|
326 |
public void setDescription(String description) {
|
|
|
327 |
this.description = description;
|
|
|
328 |
}
|
|
|
329 |
|
|
|
330 |
public void unsetDescription() {
|
|
|
331 |
this.description = null;
|
|
|
332 |
}
|
|
|
333 |
|
|
|
334 |
/** Returns true if field description is set (has been assigned a value) and false otherwise */
|
|
|
335 |
public boolean isSetDescription() {
|
|
|
336 |
return this.description != null;
|
|
|
337 |
}
|
|
|
338 |
|
|
|
339 |
public void setDescriptionIsSet(boolean value) {
|
|
|
340 |
if (!value) {
|
|
|
341 |
this.description = null;
|
|
|
342 |
}
|
|
|
343 |
}
|
|
|
344 |
|
|
|
345 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
346 |
switch (field) {
|
|
|
347 |
case OPERATOR_ID:
|
|
|
348 |
if (value == null) {
|
|
|
349 |
unsetOperatorId();
|
|
|
350 |
} else {
|
|
|
351 |
setOperatorId((Long)value);
|
|
|
352 |
}
|
|
|
353 |
break;
|
|
|
354 |
|
|
|
355 |
case CIRCLE_ID:
|
|
|
356 |
if (value == null) {
|
|
|
357 |
unsetCircleId();
|
|
|
358 |
} else {
|
|
|
359 |
setCircleId((Long)value);
|
|
|
360 |
}
|
|
|
361 |
break;
|
|
|
362 |
|
|
|
363 |
case DENOMINATION_TYPE:
|
|
|
364 |
if (value == null) {
|
|
|
365 |
unsetDenominationType();
|
|
|
366 |
} else {
|
|
|
367 |
setDenominationType((DenominationType)value);
|
|
|
368 |
}
|
|
|
369 |
break;
|
|
|
370 |
|
|
|
371 |
case AMOUNT:
|
|
|
372 |
if (value == null) {
|
|
|
373 |
unsetAmount();
|
|
|
374 |
} else {
|
|
|
375 |
setAmount((Long)value);
|
|
|
376 |
}
|
|
|
377 |
break;
|
|
|
378 |
|
|
|
379 |
case VALIDITY:
|
|
|
380 |
if (value == null) {
|
|
|
381 |
unsetValidity();
|
|
|
382 |
} else {
|
|
|
383 |
setValidity((String)value);
|
|
|
384 |
}
|
|
|
385 |
break;
|
|
|
386 |
|
|
|
387 |
case DESCRIPTION:
|
|
|
388 |
if (value == null) {
|
|
|
389 |
unsetDescription();
|
|
|
390 |
} else {
|
|
|
391 |
setDescription((String)value);
|
|
|
392 |
}
|
|
|
393 |
break;
|
|
|
394 |
|
|
|
395 |
}
|
|
|
396 |
}
|
|
|
397 |
|
|
|
398 |
public Object getFieldValue(_Fields field) {
|
|
|
399 |
switch (field) {
|
|
|
400 |
case OPERATOR_ID:
|
|
|
401 |
return Long.valueOf(getOperatorId());
|
|
|
402 |
|
|
|
403 |
case CIRCLE_ID:
|
|
|
404 |
return Long.valueOf(getCircleId());
|
|
|
405 |
|
|
|
406 |
case DENOMINATION_TYPE:
|
|
|
407 |
return getDenominationType();
|
|
|
408 |
|
|
|
409 |
case AMOUNT:
|
|
|
410 |
return Long.valueOf(getAmount());
|
|
|
411 |
|
|
|
412 |
case VALIDITY:
|
|
|
413 |
return getValidity();
|
|
|
414 |
|
|
|
415 |
case DESCRIPTION:
|
|
|
416 |
return getDescription();
|
|
|
417 |
|
|
|
418 |
}
|
|
|
419 |
throw new IllegalStateException();
|
|
|
420 |
}
|
|
|
421 |
|
|
|
422 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
423 |
public boolean isSet(_Fields field) {
|
|
|
424 |
if (field == null) {
|
|
|
425 |
throw new IllegalArgumentException();
|
|
|
426 |
}
|
|
|
427 |
|
|
|
428 |
switch (field) {
|
|
|
429 |
case OPERATOR_ID:
|
|
|
430 |
return isSetOperatorId();
|
|
|
431 |
case CIRCLE_ID:
|
|
|
432 |
return isSetCircleId();
|
|
|
433 |
case DENOMINATION_TYPE:
|
|
|
434 |
return isSetDenominationType();
|
|
|
435 |
case AMOUNT:
|
|
|
436 |
return isSetAmount();
|
|
|
437 |
case VALIDITY:
|
|
|
438 |
return isSetValidity();
|
|
|
439 |
case DESCRIPTION:
|
|
|
440 |
return isSetDescription();
|
|
|
441 |
}
|
|
|
442 |
throw new IllegalStateException();
|
|
|
443 |
}
|
|
|
444 |
|
|
|
445 |
@Override
|
|
|
446 |
public boolean equals(Object that) {
|
|
|
447 |
if (that == null)
|
|
|
448 |
return false;
|
|
|
449 |
if (that instanceof RechargeDenomination)
|
|
|
450 |
return this.equals((RechargeDenomination)that);
|
|
|
451 |
return false;
|
|
|
452 |
}
|
|
|
453 |
|
|
|
454 |
public boolean equals(RechargeDenomination that) {
|
|
|
455 |
if (that == null)
|
|
|
456 |
return false;
|
|
|
457 |
|
|
|
458 |
boolean this_present_operatorId = true;
|
|
|
459 |
boolean that_present_operatorId = true;
|
|
|
460 |
if (this_present_operatorId || that_present_operatorId) {
|
|
|
461 |
if (!(this_present_operatorId && that_present_operatorId))
|
|
|
462 |
return false;
|
|
|
463 |
if (this.operatorId != that.operatorId)
|
|
|
464 |
return false;
|
|
|
465 |
}
|
|
|
466 |
|
|
|
467 |
boolean this_present_circleId = true;
|
|
|
468 |
boolean that_present_circleId = true;
|
|
|
469 |
if (this_present_circleId || that_present_circleId) {
|
|
|
470 |
if (!(this_present_circleId && that_present_circleId))
|
|
|
471 |
return false;
|
|
|
472 |
if (this.circleId != that.circleId)
|
|
|
473 |
return false;
|
|
|
474 |
}
|
|
|
475 |
|
|
|
476 |
boolean this_present_denominationType = true && this.isSetDenominationType();
|
|
|
477 |
boolean that_present_denominationType = true && that.isSetDenominationType();
|
|
|
478 |
if (this_present_denominationType || that_present_denominationType) {
|
|
|
479 |
if (!(this_present_denominationType && that_present_denominationType))
|
|
|
480 |
return false;
|
|
|
481 |
if (!this.denominationType.equals(that.denominationType))
|
|
|
482 |
return false;
|
|
|
483 |
}
|
|
|
484 |
|
|
|
485 |
boolean this_present_amount = true;
|
|
|
486 |
boolean that_present_amount = true;
|
|
|
487 |
if (this_present_amount || that_present_amount) {
|
|
|
488 |
if (!(this_present_amount && that_present_amount))
|
|
|
489 |
return false;
|
|
|
490 |
if (this.amount != that.amount)
|
|
|
491 |
return false;
|
|
|
492 |
}
|
|
|
493 |
|
|
|
494 |
boolean this_present_validity = true && this.isSetValidity();
|
|
|
495 |
boolean that_present_validity = true && that.isSetValidity();
|
|
|
496 |
if (this_present_validity || that_present_validity) {
|
|
|
497 |
if (!(this_present_validity && that_present_validity))
|
|
|
498 |
return false;
|
|
|
499 |
if (!this.validity.equals(that.validity))
|
|
|
500 |
return false;
|
|
|
501 |
}
|
|
|
502 |
|
|
|
503 |
boolean this_present_description = true && this.isSetDescription();
|
|
|
504 |
boolean that_present_description = true && that.isSetDescription();
|
|
|
505 |
if (this_present_description || that_present_description) {
|
|
|
506 |
if (!(this_present_description && that_present_description))
|
|
|
507 |
return false;
|
|
|
508 |
if (!this.description.equals(that.description))
|
|
|
509 |
return false;
|
|
|
510 |
}
|
|
|
511 |
|
|
|
512 |
return true;
|
|
|
513 |
}
|
|
|
514 |
|
|
|
515 |
@Override
|
|
|
516 |
public int hashCode() {
|
|
|
517 |
return 0;
|
|
|
518 |
}
|
|
|
519 |
|
|
|
520 |
public int compareTo(RechargeDenomination other) {
|
|
|
521 |
if (!getClass().equals(other.getClass())) {
|
|
|
522 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
523 |
}
|
|
|
524 |
|
|
|
525 |
int lastComparison = 0;
|
|
|
526 |
RechargeDenomination typedOther = (RechargeDenomination)other;
|
|
|
527 |
|
|
|
528 |
lastComparison = Boolean.valueOf(isSetOperatorId()).compareTo(typedOther.isSetOperatorId());
|
|
|
529 |
if (lastComparison != 0) {
|
|
|
530 |
return lastComparison;
|
|
|
531 |
}
|
|
|
532 |
if (isSetOperatorId()) {
|
|
|
533 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operatorId, typedOther.operatorId);
|
|
|
534 |
if (lastComparison != 0) {
|
|
|
535 |
return lastComparison;
|
|
|
536 |
}
|
|
|
537 |
}
|
|
|
538 |
lastComparison = Boolean.valueOf(isSetCircleId()).compareTo(typedOther.isSetCircleId());
|
|
|
539 |
if (lastComparison != 0) {
|
|
|
540 |
return lastComparison;
|
|
|
541 |
}
|
|
|
542 |
if (isSetCircleId()) {
|
|
|
543 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.circleId, typedOther.circleId);
|
|
|
544 |
if (lastComparison != 0) {
|
|
|
545 |
return lastComparison;
|
|
|
546 |
}
|
|
|
547 |
}
|
|
|
548 |
lastComparison = Boolean.valueOf(isSetDenominationType()).compareTo(typedOther.isSetDenominationType());
|
|
|
549 |
if (lastComparison != 0) {
|
|
|
550 |
return lastComparison;
|
|
|
551 |
}
|
|
|
552 |
if (isSetDenominationType()) {
|
|
|
553 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.denominationType, typedOther.denominationType);
|
|
|
554 |
if (lastComparison != 0) {
|
|
|
555 |
return lastComparison;
|
|
|
556 |
}
|
|
|
557 |
}
|
|
|
558 |
lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
|
|
|
559 |
if (lastComparison != 0) {
|
|
|
560 |
return lastComparison;
|
|
|
561 |
}
|
|
|
562 |
if (isSetAmount()) {
|
|
|
563 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
|
|
|
564 |
if (lastComparison != 0) {
|
|
|
565 |
return lastComparison;
|
|
|
566 |
}
|
|
|
567 |
}
|
|
|
568 |
lastComparison = Boolean.valueOf(isSetValidity()).compareTo(typedOther.isSetValidity());
|
|
|
569 |
if (lastComparison != 0) {
|
|
|
570 |
return lastComparison;
|
|
|
571 |
}
|
|
|
572 |
if (isSetValidity()) {
|
|
|
573 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validity, typedOther.validity);
|
|
|
574 |
if (lastComparison != 0) {
|
|
|
575 |
return lastComparison;
|
|
|
576 |
}
|
|
|
577 |
}
|
|
|
578 |
lastComparison = Boolean.valueOf(isSetDescription()).compareTo(typedOther.isSetDescription());
|
|
|
579 |
if (lastComparison != 0) {
|
|
|
580 |
return lastComparison;
|
|
|
581 |
}
|
|
|
582 |
if (isSetDescription()) {
|
|
|
583 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, typedOther.description);
|
|
|
584 |
if (lastComparison != 0) {
|
|
|
585 |
return lastComparison;
|
|
|
586 |
}
|
|
|
587 |
}
|
|
|
588 |
return 0;
|
|
|
589 |
}
|
|
|
590 |
|
|
|
591 |
public _Fields fieldForId(int fieldId) {
|
|
|
592 |
return _Fields.findByThriftId(fieldId);
|
|
|
593 |
}
|
|
|
594 |
|
|
|
595 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
596 |
org.apache.thrift.protocol.TField field;
|
|
|
597 |
iprot.readStructBegin();
|
|
|
598 |
while (true)
|
|
|
599 |
{
|
|
|
600 |
field = iprot.readFieldBegin();
|
|
|
601 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
602 |
break;
|
|
|
603 |
}
|
|
|
604 |
switch (field.id) {
|
|
|
605 |
case 1: // OPERATOR_ID
|
|
|
606 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
607 |
this.operatorId = iprot.readI64();
|
|
|
608 |
setOperatorIdIsSet(true);
|
|
|
609 |
} else {
|
|
|
610 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
611 |
}
|
|
|
612 |
break;
|
|
|
613 |
case 2: // CIRCLE_ID
|
|
|
614 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
615 |
this.circleId = iprot.readI64();
|
|
|
616 |
setCircleIdIsSet(true);
|
|
|
617 |
} else {
|
|
|
618 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
619 |
}
|
|
|
620 |
break;
|
|
|
621 |
case 3: // DENOMINATION_TYPE
|
|
|
622 |
if (field.type == org.apache.thrift.protocol.TType.I32) {
|
|
|
623 |
this.denominationType = DenominationType.findByValue(iprot.readI32());
|
|
|
624 |
} else {
|
|
|
625 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
626 |
}
|
|
|
627 |
break;
|
|
|
628 |
case 4: // AMOUNT
|
|
|
629 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
630 |
this.amount = iprot.readI64();
|
|
|
631 |
setAmountIsSet(true);
|
|
|
632 |
} else {
|
|
|
633 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
634 |
}
|
|
|
635 |
break;
|
|
|
636 |
case 5: // VALIDITY
|
|
|
637 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
638 |
this.validity = iprot.readString();
|
|
|
639 |
} else {
|
|
|
640 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
641 |
}
|
|
|
642 |
break;
|
|
|
643 |
case 6: // DESCRIPTION
|
|
|
644 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
645 |
this.description = iprot.readString();
|
|
|
646 |
} else {
|
|
|
647 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
648 |
}
|
|
|
649 |
break;
|
|
|
650 |
default:
|
|
|
651 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
652 |
}
|
|
|
653 |
iprot.readFieldEnd();
|
|
|
654 |
}
|
|
|
655 |
iprot.readStructEnd();
|
|
|
656 |
validate();
|
|
|
657 |
}
|
|
|
658 |
|
|
|
659 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
660 |
validate();
|
|
|
661 |
|
|
|
662 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
663 |
oprot.writeFieldBegin(OPERATOR_ID_FIELD_DESC);
|
|
|
664 |
oprot.writeI64(this.operatorId);
|
|
|
665 |
oprot.writeFieldEnd();
|
|
|
666 |
oprot.writeFieldBegin(CIRCLE_ID_FIELD_DESC);
|
|
|
667 |
oprot.writeI64(this.circleId);
|
|
|
668 |
oprot.writeFieldEnd();
|
|
|
669 |
if (this.denominationType != null) {
|
|
|
670 |
oprot.writeFieldBegin(DENOMINATION_TYPE_FIELD_DESC);
|
|
|
671 |
oprot.writeI32(this.denominationType.getValue());
|
|
|
672 |
oprot.writeFieldEnd();
|
|
|
673 |
}
|
|
|
674 |
oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
|
|
|
675 |
oprot.writeI64(this.amount);
|
|
|
676 |
oprot.writeFieldEnd();
|
|
|
677 |
if (this.validity != null) {
|
|
|
678 |
oprot.writeFieldBegin(VALIDITY_FIELD_DESC);
|
|
|
679 |
oprot.writeString(this.validity);
|
|
|
680 |
oprot.writeFieldEnd();
|
|
|
681 |
}
|
|
|
682 |
if (this.description != null) {
|
|
|
683 |
oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
|
|
|
684 |
oprot.writeString(this.description);
|
|
|
685 |
oprot.writeFieldEnd();
|
|
|
686 |
}
|
|
|
687 |
oprot.writeFieldStop();
|
|
|
688 |
oprot.writeStructEnd();
|
|
|
689 |
}
|
|
|
690 |
|
|
|
691 |
@Override
|
|
|
692 |
public String toString() {
|
|
|
693 |
StringBuilder sb = new StringBuilder("RechargeDenomination(");
|
|
|
694 |
boolean first = true;
|
|
|
695 |
|
|
|
696 |
sb.append("operatorId:");
|
|
|
697 |
sb.append(this.operatorId);
|
|
|
698 |
first = false;
|
|
|
699 |
if (!first) sb.append(", ");
|
|
|
700 |
sb.append("circleId:");
|
|
|
701 |
sb.append(this.circleId);
|
|
|
702 |
first = false;
|
|
|
703 |
if (!first) sb.append(", ");
|
|
|
704 |
sb.append("denominationType:");
|
|
|
705 |
if (this.denominationType == null) {
|
|
|
706 |
sb.append("null");
|
|
|
707 |
} else {
|
|
|
708 |
sb.append(this.denominationType);
|
|
|
709 |
}
|
|
|
710 |
first = false;
|
|
|
711 |
if (!first) sb.append(", ");
|
|
|
712 |
sb.append("amount:");
|
|
|
713 |
sb.append(this.amount);
|
|
|
714 |
first = false;
|
|
|
715 |
if (!first) sb.append(", ");
|
|
|
716 |
sb.append("validity:");
|
|
|
717 |
if (this.validity == null) {
|
|
|
718 |
sb.append("null");
|
|
|
719 |
} else {
|
|
|
720 |
sb.append(this.validity);
|
|
|
721 |
}
|
|
|
722 |
first = false;
|
|
|
723 |
if (!first) sb.append(", ");
|
|
|
724 |
sb.append("description:");
|
|
|
725 |
if (this.description == null) {
|
|
|
726 |
sb.append("null");
|
|
|
727 |
} else {
|
|
|
728 |
sb.append(this.description);
|
|
|
729 |
}
|
|
|
730 |
first = false;
|
|
|
731 |
sb.append(")");
|
|
|
732 |
return sb.toString();
|
|
|
733 |
}
|
|
|
734 |
|
|
|
735 |
public void validate() throws org.apache.thrift.TException {
|
|
|
736 |
// check for required fields
|
|
|
737 |
}
|
|
|
738 |
|
|
|
739 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
740 |
try {
|
|
|
741 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
742 |
} catch (org.apache.thrift.TException te) {
|
|
|
743 |
throw new java.io.IOException(te);
|
|
|
744 |
}
|
|
|
745 |
}
|
|
|
746 |
|
|
|
747 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
748 |
try {
|
|
|
749 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
750 |
__isset_bit_vector = new BitSet(1);
|
|
|
751 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
752 |
} catch (org.apache.thrift.TException te) {
|
|
|
753 |
throw new java.io.IOException(te);
|
|
|
754 |
}
|
|
|
755 |
}
|
|
|
756 |
|
|
|
757 |
}
|
|
|
758 |
|