| 2747 |
chandransh |
1 |
/**
|
| 3430 |
rajveer |
2 |
* Autogenerated by Thrift Compiler (0.7.0)
|
| 2747 |
chandransh |
3 |
*
|
|
|
4 |
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
|
5 |
*/
|
|
|
6 |
package in.shop2020.payments;
|
|
|
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;
|
| 3430 |
rajveer |
18 |
import java.nio.ByteBuffer;
|
| 2747 |
chandransh |
19 |
import java.util.Arrays;
|
|
|
20 |
import org.slf4j.Logger;
|
|
|
21 |
import org.slf4j.LoggerFactory;
|
|
|
22 |
|
| 3430 |
rajveer |
23 |
public class Refund implements org.apache.thrift.TBase<Refund, Refund._Fields>, java.io.Serializable, Cloneable {
|
|
|
24 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Refund");
|
| 2747 |
chandransh |
25 |
|
| 3430 |
rajveer |
26 |
private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);
|
|
|
27 |
private static final org.apache.thrift.protocol.TField PAYMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("paymentId", org.apache.thrift.protocol.TType.I64, (short)2);
|
|
|
28 |
private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.I64, (short)3);
|
|
|
29 |
private static final org.apache.thrift.protocol.TField ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("orderId", org.apache.thrift.protocol.TType.I64, (short)4);
|
|
|
30 |
private static final org.apache.thrift.protocol.TField AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("amount", org.apache.thrift.protocol.TType.DOUBLE, (short)5);
|
|
|
31 |
private static final org.apache.thrift.protocol.TField GATEWAY_TXN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayTxnId", org.apache.thrift.protocol.TType.STRING, (short)6);
|
|
|
32 |
private static final org.apache.thrift.protocol.TField ATTEMPTS_FIELD_DESC = new org.apache.thrift.protocol.TField("attempts", org.apache.thrift.protocol.TType.I32, (short)7);
|
|
|
33 |
private static final org.apache.thrift.protocol.TField CREATED_AT_FIELD_DESC = new org.apache.thrift.protocol.TField("createdAt", org.apache.thrift.protocol.TType.I64, (short)8);
|
|
|
34 |
private static final org.apache.thrift.protocol.TField PROCESSED_AT_FIELD_DESC = new org.apache.thrift.protocol.TField("processedAt", org.apache.thrift.protocol.TType.I64, (short)9);
|
|
|
35 |
private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.LIST, (short)10);
|
| 2747 |
chandransh |
36 |
|
| 3430 |
rajveer |
37 |
private long id; // required
|
|
|
38 |
private long paymentId; // required
|
|
|
39 |
private long gatewayId; // required
|
|
|
40 |
private long orderId; // required
|
|
|
41 |
private double amount; // required
|
|
|
42 |
private String gatewayTxnId; // required
|
|
|
43 |
private int attempts; // required
|
|
|
44 |
private long createdAt; // required
|
|
|
45 |
private long processedAt; // required
|
|
|
46 |
private List<Attribute> attributes; // required
|
| 2747 |
chandransh |
47 |
|
|
|
48 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
| 3430 |
rajveer |
49 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
| 2747 |
chandransh |
50 |
ID((short)1, "id"),
|
|
|
51 |
PAYMENT_ID((short)2, "paymentId"),
|
|
|
52 |
GATEWAY_ID((short)3, "gatewayId"),
|
|
|
53 |
ORDER_ID((short)4, "orderId"),
|
|
|
54 |
AMOUNT((short)5, "amount"),
|
|
|
55 |
GATEWAY_TXN_ID((short)6, "gatewayTxnId"),
|
|
|
56 |
ATTEMPTS((short)7, "attempts"),
|
|
|
57 |
CREATED_AT((short)8, "createdAt"),
|
|
|
58 |
PROCESSED_AT((short)9, "processedAt"),
|
|
|
59 |
ATTRIBUTES((short)10, "attributes");
|
|
|
60 |
|
|
|
61 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
62 |
|
|
|
63 |
static {
|
|
|
64 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
65 |
byName.put(field.getFieldName(), field);
|
|
|
66 |
}
|
|
|
67 |
}
|
|
|
68 |
|
|
|
69 |
/**
|
|
|
70 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
71 |
*/
|
|
|
72 |
public static _Fields findByThriftId(int fieldId) {
|
| 3430 |
rajveer |
73 |
switch(fieldId) {
|
|
|
74 |
case 1: // ID
|
|
|
75 |
return ID;
|
|
|
76 |
case 2: // PAYMENT_ID
|
|
|
77 |
return PAYMENT_ID;
|
|
|
78 |
case 3: // GATEWAY_ID
|
|
|
79 |
return GATEWAY_ID;
|
|
|
80 |
case 4: // ORDER_ID
|
|
|
81 |
return ORDER_ID;
|
|
|
82 |
case 5: // AMOUNT
|
|
|
83 |
return AMOUNT;
|
|
|
84 |
case 6: // GATEWAY_TXN_ID
|
|
|
85 |
return GATEWAY_TXN_ID;
|
|
|
86 |
case 7: // ATTEMPTS
|
|
|
87 |
return ATTEMPTS;
|
|
|
88 |
case 8: // CREATED_AT
|
|
|
89 |
return CREATED_AT;
|
|
|
90 |
case 9: // PROCESSED_AT
|
|
|
91 |
return PROCESSED_AT;
|
|
|
92 |
case 10: // ATTRIBUTES
|
|
|
93 |
return ATTRIBUTES;
|
|
|
94 |
default:
|
|
|
95 |
return null;
|
|
|
96 |
}
|
| 2747 |
chandransh |
97 |
}
|
|
|
98 |
|
|
|
99 |
/**
|
|
|
100 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
101 |
* if it is not found.
|
|
|
102 |
*/
|
|
|
103 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
104 |
_Fields fields = findByThriftId(fieldId);
|
|
|
105 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
106 |
return fields;
|
|
|
107 |
}
|
|
|
108 |
|
|
|
109 |
/**
|
|
|
110 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
111 |
*/
|
|
|
112 |
public static _Fields findByName(String name) {
|
|
|
113 |
return byName.get(name);
|
|
|
114 |
}
|
|
|
115 |
|
|
|
116 |
private final short _thriftId;
|
|
|
117 |
private final String _fieldName;
|
|
|
118 |
|
|
|
119 |
_Fields(short thriftId, String fieldName) {
|
|
|
120 |
_thriftId = thriftId;
|
|
|
121 |
_fieldName = fieldName;
|
|
|
122 |
}
|
|
|
123 |
|
|
|
124 |
public short getThriftFieldId() {
|
|
|
125 |
return _thriftId;
|
|
|
126 |
}
|
|
|
127 |
|
|
|
128 |
public String getFieldName() {
|
|
|
129 |
return _fieldName;
|
|
|
130 |
}
|
|
|
131 |
}
|
|
|
132 |
|
|
|
133 |
// isset id assignments
|
|
|
134 |
private static final int __ID_ISSET_ID = 0;
|
|
|
135 |
private static final int __PAYMENTID_ISSET_ID = 1;
|
|
|
136 |
private static final int __GATEWAYID_ISSET_ID = 2;
|
|
|
137 |
private static final int __ORDERID_ISSET_ID = 3;
|
|
|
138 |
private static final int __AMOUNT_ISSET_ID = 4;
|
|
|
139 |
private static final int __ATTEMPTS_ISSET_ID = 5;
|
|
|
140 |
private static final int __CREATEDAT_ISSET_ID = 6;
|
|
|
141 |
private static final int __PROCESSEDAT_ISSET_ID = 7;
|
|
|
142 |
private BitSet __isset_bit_vector = new BitSet(8);
|
|
|
143 |
|
| 3430 |
rajveer |
144 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
| 2747 |
chandransh |
145 |
static {
|
| 3430 |
rajveer |
146 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
147 |
tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
148 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
149 |
tmpMap.put(_Fields.PAYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("paymentId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
150 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
151 |
tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
152 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
153 |
tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
154 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
155 |
tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
156 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
|
|
|
157 |
tmpMap.put(_Fields.GATEWAY_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
158 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
159 |
tmpMap.put(_Fields.ATTEMPTS, new org.apache.thrift.meta_data.FieldMetaData("attempts", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
160 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
|
|
|
161 |
tmpMap.put(_Fields.CREATED_AT, new org.apache.thrift.meta_data.FieldMetaData("createdAt", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
162 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
163 |
tmpMap.put(_Fields.PROCESSED_AT, new org.apache.thrift.meta_data.FieldMetaData("processedAt", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
164 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
165 |
tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
166 |
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
|
|
|
167 |
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Attribute.class))));
|
|
|
168 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
169 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Refund.class, metaDataMap);
|
| 2747 |
chandransh |
170 |
}
|
|
|
171 |
|
|
|
172 |
public Refund() {
|
|
|
173 |
}
|
|
|
174 |
|
|
|
175 |
public Refund(
|
|
|
176 |
long id,
|
|
|
177 |
long paymentId,
|
|
|
178 |
long gatewayId,
|
|
|
179 |
long orderId,
|
|
|
180 |
double amount,
|
|
|
181 |
String gatewayTxnId,
|
|
|
182 |
int attempts,
|
|
|
183 |
long createdAt,
|
|
|
184 |
long processedAt,
|
|
|
185 |
List<Attribute> attributes)
|
|
|
186 |
{
|
|
|
187 |
this();
|
|
|
188 |
this.id = id;
|
|
|
189 |
setIdIsSet(true);
|
|
|
190 |
this.paymentId = paymentId;
|
|
|
191 |
setPaymentIdIsSet(true);
|
|
|
192 |
this.gatewayId = gatewayId;
|
|
|
193 |
setGatewayIdIsSet(true);
|
|
|
194 |
this.orderId = orderId;
|
|
|
195 |
setOrderIdIsSet(true);
|
|
|
196 |
this.amount = amount;
|
|
|
197 |
setAmountIsSet(true);
|
|
|
198 |
this.gatewayTxnId = gatewayTxnId;
|
|
|
199 |
this.attempts = attempts;
|
|
|
200 |
setAttemptsIsSet(true);
|
|
|
201 |
this.createdAt = createdAt;
|
|
|
202 |
setCreatedAtIsSet(true);
|
|
|
203 |
this.processedAt = processedAt;
|
|
|
204 |
setProcessedAtIsSet(true);
|
|
|
205 |
this.attributes = attributes;
|
|
|
206 |
}
|
|
|
207 |
|
|
|
208 |
/**
|
|
|
209 |
* Performs a deep copy on <i>other</i>.
|
|
|
210 |
*/
|
|
|
211 |
public Refund(Refund other) {
|
|
|
212 |
__isset_bit_vector.clear();
|
|
|
213 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
214 |
this.id = other.id;
|
|
|
215 |
this.paymentId = other.paymentId;
|
|
|
216 |
this.gatewayId = other.gatewayId;
|
|
|
217 |
this.orderId = other.orderId;
|
|
|
218 |
this.amount = other.amount;
|
|
|
219 |
if (other.isSetGatewayTxnId()) {
|
|
|
220 |
this.gatewayTxnId = other.gatewayTxnId;
|
|
|
221 |
}
|
|
|
222 |
this.attempts = other.attempts;
|
|
|
223 |
this.createdAt = other.createdAt;
|
|
|
224 |
this.processedAt = other.processedAt;
|
|
|
225 |
if (other.isSetAttributes()) {
|
|
|
226 |
List<Attribute> __this__attributes = new ArrayList<Attribute>();
|
|
|
227 |
for (Attribute other_element : other.attributes) {
|
|
|
228 |
__this__attributes.add(new Attribute(other_element));
|
|
|
229 |
}
|
|
|
230 |
this.attributes = __this__attributes;
|
|
|
231 |
}
|
|
|
232 |
}
|
|
|
233 |
|
|
|
234 |
public Refund deepCopy() {
|
|
|
235 |
return new Refund(this);
|
|
|
236 |
}
|
|
|
237 |
|
| 3430 |
rajveer |
238 |
@Override
|
|
|
239 |
public void clear() {
|
|
|
240 |
setIdIsSet(false);
|
|
|
241 |
this.id = 0;
|
|
|
242 |
setPaymentIdIsSet(false);
|
|
|
243 |
this.paymentId = 0;
|
|
|
244 |
setGatewayIdIsSet(false);
|
|
|
245 |
this.gatewayId = 0;
|
|
|
246 |
setOrderIdIsSet(false);
|
|
|
247 |
this.orderId = 0;
|
|
|
248 |
setAmountIsSet(false);
|
|
|
249 |
this.amount = 0.0;
|
|
|
250 |
this.gatewayTxnId = null;
|
|
|
251 |
setAttemptsIsSet(false);
|
|
|
252 |
this.attempts = 0;
|
|
|
253 |
setCreatedAtIsSet(false);
|
|
|
254 |
this.createdAt = 0;
|
|
|
255 |
setProcessedAtIsSet(false);
|
|
|
256 |
this.processedAt = 0;
|
|
|
257 |
this.attributes = null;
|
| 2747 |
chandransh |
258 |
}
|
|
|
259 |
|
|
|
260 |
public long getId() {
|
|
|
261 |
return this.id;
|
|
|
262 |
}
|
|
|
263 |
|
| 3430 |
rajveer |
264 |
public void setId(long id) {
|
| 2747 |
chandransh |
265 |
this.id = id;
|
|
|
266 |
setIdIsSet(true);
|
|
|
267 |
}
|
|
|
268 |
|
|
|
269 |
public void unsetId() {
|
|
|
270 |
__isset_bit_vector.clear(__ID_ISSET_ID);
|
|
|
271 |
}
|
|
|
272 |
|
| 3430 |
rajveer |
273 |
/** Returns true if field id is set (has been assigned a value) and false otherwise */
|
| 2747 |
chandransh |
274 |
public boolean isSetId() {
|
|
|
275 |
return __isset_bit_vector.get(__ID_ISSET_ID);
|
|
|
276 |
}
|
|
|
277 |
|
|
|
278 |
public void setIdIsSet(boolean value) {
|
|
|
279 |
__isset_bit_vector.set(__ID_ISSET_ID, value);
|
|
|
280 |
}
|
|
|
281 |
|
|
|
282 |
public long getPaymentId() {
|
|
|
283 |
return this.paymentId;
|
|
|
284 |
}
|
|
|
285 |
|
| 3430 |
rajveer |
286 |
public void setPaymentId(long paymentId) {
|
| 2747 |
chandransh |
287 |
this.paymentId = paymentId;
|
|
|
288 |
setPaymentIdIsSet(true);
|
|
|
289 |
}
|
|
|
290 |
|
|
|
291 |
public void unsetPaymentId() {
|
|
|
292 |
__isset_bit_vector.clear(__PAYMENTID_ISSET_ID);
|
|
|
293 |
}
|
|
|
294 |
|
| 3430 |
rajveer |
295 |
/** Returns true if field paymentId is set (has been assigned a value) and false otherwise */
|
| 2747 |
chandransh |
296 |
public boolean isSetPaymentId() {
|
|
|
297 |
return __isset_bit_vector.get(__PAYMENTID_ISSET_ID);
|
|
|
298 |
}
|
|
|
299 |
|
|
|
300 |
public void setPaymentIdIsSet(boolean value) {
|
|
|
301 |
__isset_bit_vector.set(__PAYMENTID_ISSET_ID, value);
|
|
|
302 |
}
|
|
|
303 |
|
|
|
304 |
public long getGatewayId() {
|
|
|
305 |
return this.gatewayId;
|
|
|
306 |
}
|
|
|
307 |
|
| 3430 |
rajveer |
308 |
public void setGatewayId(long gatewayId) {
|
| 2747 |
chandransh |
309 |
this.gatewayId = gatewayId;
|
|
|
310 |
setGatewayIdIsSet(true);
|
|
|
311 |
}
|
|
|
312 |
|
|
|
313 |
public void unsetGatewayId() {
|
|
|
314 |
__isset_bit_vector.clear(__GATEWAYID_ISSET_ID);
|
|
|
315 |
}
|
|
|
316 |
|
| 3430 |
rajveer |
317 |
/** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
|
| 2747 |
chandransh |
318 |
public boolean isSetGatewayId() {
|
|
|
319 |
return __isset_bit_vector.get(__GATEWAYID_ISSET_ID);
|
|
|
320 |
}
|
|
|
321 |
|
|
|
322 |
public void setGatewayIdIsSet(boolean value) {
|
|
|
323 |
__isset_bit_vector.set(__GATEWAYID_ISSET_ID, value);
|
|
|
324 |
}
|
|
|
325 |
|
|
|
326 |
public long getOrderId() {
|
|
|
327 |
return this.orderId;
|
|
|
328 |
}
|
|
|
329 |
|
| 3430 |
rajveer |
330 |
public void setOrderId(long orderId) {
|
| 2747 |
chandransh |
331 |
this.orderId = orderId;
|
|
|
332 |
setOrderIdIsSet(true);
|
|
|
333 |
}
|
|
|
334 |
|
|
|
335 |
public void unsetOrderId() {
|
|
|
336 |
__isset_bit_vector.clear(__ORDERID_ISSET_ID);
|
|
|
337 |
}
|
|
|
338 |
|
| 3430 |
rajveer |
339 |
/** Returns true if field orderId is set (has been assigned a value) and false otherwise */
|
| 2747 |
chandransh |
340 |
public boolean isSetOrderId() {
|
|
|
341 |
return __isset_bit_vector.get(__ORDERID_ISSET_ID);
|
|
|
342 |
}
|
|
|
343 |
|
|
|
344 |
public void setOrderIdIsSet(boolean value) {
|
|
|
345 |
__isset_bit_vector.set(__ORDERID_ISSET_ID, value);
|
|
|
346 |
}
|
|
|
347 |
|
|
|
348 |
public double getAmount() {
|
|
|
349 |
return this.amount;
|
|
|
350 |
}
|
|
|
351 |
|
| 3430 |
rajveer |
352 |
public void setAmount(double amount) {
|
| 2747 |
chandransh |
353 |
this.amount = amount;
|
|
|
354 |
setAmountIsSet(true);
|
|
|
355 |
}
|
|
|
356 |
|
|
|
357 |
public void unsetAmount() {
|
|
|
358 |
__isset_bit_vector.clear(__AMOUNT_ISSET_ID);
|
|
|
359 |
}
|
|
|
360 |
|
| 3430 |
rajveer |
361 |
/** Returns true if field amount is set (has been assigned a value) and false otherwise */
|
| 2747 |
chandransh |
362 |
public boolean isSetAmount() {
|
|
|
363 |
return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
|
|
|
364 |
}
|
|
|
365 |
|
|
|
366 |
public void setAmountIsSet(boolean value) {
|
|
|
367 |
__isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
|
|
|
368 |
}
|
|
|
369 |
|
|
|
370 |
public String getGatewayTxnId() {
|
|
|
371 |
return this.gatewayTxnId;
|
|
|
372 |
}
|
|
|
373 |
|
| 3430 |
rajveer |
374 |
public void setGatewayTxnId(String gatewayTxnId) {
|
| 2747 |
chandransh |
375 |
this.gatewayTxnId = gatewayTxnId;
|
|
|
376 |
}
|
|
|
377 |
|
|
|
378 |
public void unsetGatewayTxnId() {
|
|
|
379 |
this.gatewayTxnId = null;
|
|
|
380 |
}
|
|
|
381 |
|
| 3430 |
rajveer |
382 |
/** Returns true if field gatewayTxnId is set (has been assigned a value) and false otherwise */
|
| 2747 |
chandransh |
383 |
public boolean isSetGatewayTxnId() {
|
|
|
384 |
return this.gatewayTxnId != null;
|
|
|
385 |
}
|
|
|
386 |
|
|
|
387 |
public void setGatewayTxnIdIsSet(boolean value) {
|
|
|
388 |
if (!value) {
|
|
|
389 |
this.gatewayTxnId = null;
|
|
|
390 |
}
|
|
|
391 |
}
|
|
|
392 |
|
|
|
393 |
public int getAttempts() {
|
|
|
394 |
return this.attempts;
|
|
|
395 |
}
|
|
|
396 |
|
| 3430 |
rajveer |
397 |
public void setAttempts(int attempts) {
|
| 2747 |
chandransh |
398 |
this.attempts = attempts;
|
|
|
399 |
setAttemptsIsSet(true);
|
|
|
400 |
}
|
|
|
401 |
|
|
|
402 |
public void unsetAttempts() {
|
|
|
403 |
__isset_bit_vector.clear(__ATTEMPTS_ISSET_ID);
|
|
|
404 |
}
|
|
|
405 |
|
| 3430 |
rajveer |
406 |
/** Returns true if field attempts is set (has been assigned a value) and false otherwise */
|
| 2747 |
chandransh |
407 |
public boolean isSetAttempts() {
|
|
|
408 |
return __isset_bit_vector.get(__ATTEMPTS_ISSET_ID);
|
|
|
409 |
}
|
|
|
410 |
|
|
|
411 |
public void setAttemptsIsSet(boolean value) {
|
|
|
412 |
__isset_bit_vector.set(__ATTEMPTS_ISSET_ID, value);
|
|
|
413 |
}
|
|
|
414 |
|
|
|
415 |
public long getCreatedAt() {
|
|
|
416 |
return this.createdAt;
|
|
|
417 |
}
|
|
|
418 |
|
| 3430 |
rajveer |
419 |
public void setCreatedAt(long createdAt) {
|
| 2747 |
chandransh |
420 |
this.createdAt = createdAt;
|
|
|
421 |
setCreatedAtIsSet(true);
|
|
|
422 |
}
|
|
|
423 |
|
|
|
424 |
public void unsetCreatedAt() {
|
|
|
425 |
__isset_bit_vector.clear(__CREATEDAT_ISSET_ID);
|
|
|
426 |
}
|
|
|
427 |
|
| 3430 |
rajveer |
428 |
/** Returns true if field createdAt is set (has been assigned a value) and false otherwise */
|
| 2747 |
chandransh |
429 |
public boolean isSetCreatedAt() {
|
|
|
430 |
return __isset_bit_vector.get(__CREATEDAT_ISSET_ID);
|
|
|
431 |
}
|
|
|
432 |
|
|
|
433 |
public void setCreatedAtIsSet(boolean value) {
|
|
|
434 |
__isset_bit_vector.set(__CREATEDAT_ISSET_ID, value);
|
|
|
435 |
}
|
|
|
436 |
|
|
|
437 |
public long getProcessedAt() {
|
|
|
438 |
return this.processedAt;
|
|
|
439 |
}
|
|
|
440 |
|
| 3430 |
rajveer |
441 |
public void setProcessedAt(long processedAt) {
|
| 2747 |
chandransh |
442 |
this.processedAt = processedAt;
|
|
|
443 |
setProcessedAtIsSet(true);
|
|
|
444 |
}
|
|
|
445 |
|
|
|
446 |
public void unsetProcessedAt() {
|
|
|
447 |
__isset_bit_vector.clear(__PROCESSEDAT_ISSET_ID);
|
|
|
448 |
}
|
|
|
449 |
|
| 3430 |
rajveer |
450 |
/** Returns true if field processedAt is set (has been assigned a value) and false otherwise */
|
| 2747 |
chandransh |
451 |
public boolean isSetProcessedAt() {
|
|
|
452 |
return __isset_bit_vector.get(__PROCESSEDAT_ISSET_ID);
|
|
|
453 |
}
|
|
|
454 |
|
|
|
455 |
public void setProcessedAtIsSet(boolean value) {
|
|
|
456 |
__isset_bit_vector.set(__PROCESSEDAT_ISSET_ID, value);
|
|
|
457 |
}
|
|
|
458 |
|
|
|
459 |
public int getAttributesSize() {
|
|
|
460 |
return (this.attributes == null) ? 0 : this.attributes.size();
|
|
|
461 |
}
|
|
|
462 |
|
|
|
463 |
public java.util.Iterator<Attribute> getAttributesIterator() {
|
|
|
464 |
return (this.attributes == null) ? null : this.attributes.iterator();
|
|
|
465 |
}
|
|
|
466 |
|
|
|
467 |
public void addToAttributes(Attribute elem) {
|
|
|
468 |
if (this.attributes == null) {
|
|
|
469 |
this.attributes = new ArrayList<Attribute>();
|
|
|
470 |
}
|
|
|
471 |
this.attributes.add(elem);
|
|
|
472 |
}
|
|
|
473 |
|
|
|
474 |
public List<Attribute> getAttributes() {
|
|
|
475 |
return this.attributes;
|
|
|
476 |
}
|
|
|
477 |
|
| 3430 |
rajveer |
478 |
public void setAttributes(List<Attribute> attributes) {
|
| 2747 |
chandransh |
479 |
this.attributes = attributes;
|
|
|
480 |
}
|
|
|
481 |
|
|
|
482 |
public void unsetAttributes() {
|
|
|
483 |
this.attributes = null;
|
|
|
484 |
}
|
|
|
485 |
|
| 3430 |
rajveer |
486 |
/** Returns true if field attributes is set (has been assigned a value) and false otherwise */
|
| 2747 |
chandransh |
487 |
public boolean isSetAttributes() {
|
|
|
488 |
return this.attributes != null;
|
|
|
489 |
}
|
|
|
490 |
|
|
|
491 |
public void setAttributesIsSet(boolean value) {
|
|
|
492 |
if (!value) {
|
|
|
493 |
this.attributes = null;
|
|
|
494 |
}
|
|
|
495 |
}
|
|
|
496 |
|
|
|
497 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
498 |
switch (field) {
|
|
|
499 |
case ID:
|
|
|
500 |
if (value == null) {
|
|
|
501 |
unsetId();
|
|
|
502 |
} else {
|
|
|
503 |
setId((Long)value);
|
|
|
504 |
}
|
|
|
505 |
break;
|
|
|
506 |
|
|
|
507 |
case PAYMENT_ID:
|
|
|
508 |
if (value == null) {
|
|
|
509 |
unsetPaymentId();
|
|
|
510 |
} else {
|
|
|
511 |
setPaymentId((Long)value);
|
|
|
512 |
}
|
|
|
513 |
break;
|
|
|
514 |
|
|
|
515 |
case GATEWAY_ID:
|
|
|
516 |
if (value == null) {
|
|
|
517 |
unsetGatewayId();
|
|
|
518 |
} else {
|
|
|
519 |
setGatewayId((Long)value);
|
|
|
520 |
}
|
|
|
521 |
break;
|
|
|
522 |
|
|
|
523 |
case ORDER_ID:
|
|
|
524 |
if (value == null) {
|
|
|
525 |
unsetOrderId();
|
|
|
526 |
} else {
|
|
|
527 |
setOrderId((Long)value);
|
|
|
528 |
}
|
|
|
529 |
break;
|
|
|
530 |
|
|
|
531 |
case AMOUNT:
|
|
|
532 |
if (value == null) {
|
|
|
533 |
unsetAmount();
|
|
|
534 |
} else {
|
|
|
535 |
setAmount((Double)value);
|
|
|
536 |
}
|
|
|
537 |
break;
|
|
|
538 |
|
|
|
539 |
case GATEWAY_TXN_ID:
|
|
|
540 |
if (value == null) {
|
|
|
541 |
unsetGatewayTxnId();
|
|
|
542 |
} else {
|
|
|
543 |
setGatewayTxnId((String)value);
|
|
|
544 |
}
|
|
|
545 |
break;
|
|
|
546 |
|
|
|
547 |
case ATTEMPTS:
|
|
|
548 |
if (value == null) {
|
|
|
549 |
unsetAttempts();
|
|
|
550 |
} else {
|
|
|
551 |
setAttempts((Integer)value);
|
|
|
552 |
}
|
|
|
553 |
break;
|
|
|
554 |
|
|
|
555 |
case CREATED_AT:
|
|
|
556 |
if (value == null) {
|
|
|
557 |
unsetCreatedAt();
|
|
|
558 |
} else {
|
|
|
559 |
setCreatedAt((Long)value);
|
|
|
560 |
}
|
|
|
561 |
break;
|
|
|
562 |
|
|
|
563 |
case PROCESSED_AT:
|
|
|
564 |
if (value == null) {
|
|
|
565 |
unsetProcessedAt();
|
|
|
566 |
} else {
|
|
|
567 |
setProcessedAt((Long)value);
|
|
|
568 |
}
|
|
|
569 |
break;
|
|
|
570 |
|
|
|
571 |
case ATTRIBUTES:
|
|
|
572 |
if (value == null) {
|
|
|
573 |
unsetAttributes();
|
|
|
574 |
} else {
|
|
|
575 |
setAttributes((List<Attribute>)value);
|
|
|
576 |
}
|
|
|
577 |
break;
|
|
|
578 |
|
|
|
579 |
}
|
|
|
580 |
}
|
|
|
581 |
|
|
|
582 |
public Object getFieldValue(_Fields field) {
|
|
|
583 |
switch (field) {
|
|
|
584 |
case ID:
|
| 3430 |
rajveer |
585 |
return Long.valueOf(getId());
|
| 2747 |
chandransh |
586 |
|
|
|
587 |
case PAYMENT_ID:
|
| 3430 |
rajveer |
588 |
return Long.valueOf(getPaymentId());
|
| 2747 |
chandransh |
589 |
|
|
|
590 |
case GATEWAY_ID:
|
| 3430 |
rajveer |
591 |
return Long.valueOf(getGatewayId());
|
| 2747 |
chandransh |
592 |
|
|
|
593 |
case ORDER_ID:
|
| 3430 |
rajveer |
594 |
return Long.valueOf(getOrderId());
|
| 2747 |
chandransh |
595 |
|
|
|
596 |
case AMOUNT:
|
| 3430 |
rajveer |
597 |
return Double.valueOf(getAmount());
|
| 2747 |
chandransh |
598 |
|
|
|
599 |
case GATEWAY_TXN_ID:
|
|
|
600 |
return getGatewayTxnId();
|
|
|
601 |
|
|
|
602 |
case ATTEMPTS:
|
| 3430 |
rajveer |
603 |
return Integer.valueOf(getAttempts());
|
| 2747 |
chandransh |
604 |
|
|
|
605 |
case CREATED_AT:
|
| 3430 |
rajveer |
606 |
return Long.valueOf(getCreatedAt());
|
| 2747 |
chandransh |
607 |
|
|
|
608 |
case PROCESSED_AT:
|
| 3430 |
rajveer |
609 |
return Long.valueOf(getProcessedAt());
|
| 2747 |
chandransh |
610 |
|
|
|
611 |
case ATTRIBUTES:
|
|
|
612 |
return getAttributes();
|
|
|
613 |
|
|
|
614 |
}
|
|
|
615 |
throw new IllegalStateException();
|
|
|
616 |
}
|
|
|
617 |
|
| 3430 |
rajveer |
618 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
619 |
public boolean isSet(_Fields field) {
|
|
|
620 |
if (field == null) {
|
|
|
621 |
throw new IllegalArgumentException();
|
|
|
622 |
}
|
| 2747 |
chandransh |
623 |
|
|
|
624 |
switch (field) {
|
|
|
625 |
case ID:
|
|
|
626 |
return isSetId();
|
|
|
627 |
case PAYMENT_ID:
|
|
|
628 |
return isSetPaymentId();
|
|
|
629 |
case GATEWAY_ID:
|
|
|
630 |
return isSetGatewayId();
|
|
|
631 |
case ORDER_ID:
|
|
|
632 |
return isSetOrderId();
|
|
|
633 |
case AMOUNT:
|
|
|
634 |
return isSetAmount();
|
|
|
635 |
case GATEWAY_TXN_ID:
|
|
|
636 |
return isSetGatewayTxnId();
|
|
|
637 |
case ATTEMPTS:
|
|
|
638 |
return isSetAttempts();
|
|
|
639 |
case CREATED_AT:
|
|
|
640 |
return isSetCreatedAt();
|
|
|
641 |
case PROCESSED_AT:
|
|
|
642 |
return isSetProcessedAt();
|
|
|
643 |
case ATTRIBUTES:
|
|
|
644 |
return isSetAttributes();
|
|
|
645 |
}
|
|
|
646 |
throw new IllegalStateException();
|
|
|
647 |
}
|
|
|
648 |
|
|
|
649 |
@Override
|
|
|
650 |
public boolean equals(Object that) {
|
|
|
651 |
if (that == null)
|
|
|
652 |
return false;
|
|
|
653 |
if (that instanceof Refund)
|
|
|
654 |
return this.equals((Refund)that);
|
|
|
655 |
return false;
|
|
|
656 |
}
|
|
|
657 |
|
|
|
658 |
public boolean equals(Refund that) {
|
|
|
659 |
if (that == null)
|
|
|
660 |
return false;
|
|
|
661 |
|
|
|
662 |
boolean this_present_id = true;
|
|
|
663 |
boolean that_present_id = true;
|
|
|
664 |
if (this_present_id || that_present_id) {
|
|
|
665 |
if (!(this_present_id && that_present_id))
|
|
|
666 |
return false;
|
|
|
667 |
if (this.id != that.id)
|
|
|
668 |
return false;
|
|
|
669 |
}
|
|
|
670 |
|
|
|
671 |
boolean this_present_paymentId = true;
|
|
|
672 |
boolean that_present_paymentId = true;
|
|
|
673 |
if (this_present_paymentId || that_present_paymentId) {
|
|
|
674 |
if (!(this_present_paymentId && that_present_paymentId))
|
|
|
675 |
return false;
|
|
|
676 |
if (this.paymentId != that.paymentId)
|
|
|
677 |
return false;
|
|
|
678 |
}
|
|
|
679 |
|
|
|
680 |
boolean this_present_gatewayId = true;
|
|
|
681 |
boolean that_present_gatewayId = true;
|
|
|
682 |
if (this_present_gatewayId || that_present_gatewayId) {
|
|
|
683 |
if (!(this_present_gatewayId && that_present_gatewayId))
|
|
|
684 |
return false;
|
|
|
685 |
if (this.gatewayId != that.gatewayId)
|
|
|
686 |
return false;
|
|
|
687 |
}
|
|
|
688 |
|
|
|
689 |
boolean this_present_orderId = true;
|
|
|
690 |
boolean that_present_orderId = true;
|
|
|
691 |
if (this_present_orderId || that_present_orderId) {
|
|
|
692 |
if (!(this_present_orderId && that_present_orderId))
|
|
|
693 |
return false;
|
|
|
694 |
if (this.orderId != that.orderId)
|
|
|
695 |
return false;
|
|
|
696 |
}
|
|
|
697 |
|
|
|
698 |
boolean this_present_amount = true;
|
|
|
699 |
boolean that_present_amount = true;
|
|
|
700 |
if (this_present_amount || that_present_amount) {
|
|
|
701 |
if (!(this_present_amount && that_present_amount))
|
|
|
702 |
return false;
|
|
|
703 |
if (this.amount != that.amount)
|
|
|
704 |
return false;
|
|
|
705 |
}
|
|
|
706 |
|
|
|
707 |
boolean this_present_gatewayTxnId = true && this.isSetGatewayTxnId();
|
|
|
708 |
boolean that_present_gatewayTxnId = true && that.isSetGatewayTxnId();
|
|
|
709 |
if (this_present_gatewayTxnId || that_present_gatewayTxnId) {
|
|
|
710 |
if (!(this_present_gatewayTxnId && that_present_gatewayTxnId))
|
|
|
711 |
return false;
|
|
|
712 |
if (!this.gatewayTxnId.equals(that.gatewayTxnId))
|
|
|
713 |
return false;
|
|
|
714 |
}
|
|
|
715 |
|
|
|
716 |
boolean this_present_attempts = true;
|
|
|
717 |
boolean that_present_attempts = true;
|
|
|
718 |
if (this_present_attempts || that_present_attempts) {
|
|
|
719 |
if (!(this_present_attempts && that_present_attempts))
|
|
|
720 |
return false;
|
|
|
721 |
if (this.attempts != that.attempts)
|
|
|
722 |
return false;
|
|
|
723 |
}
|
|
|
724 |
|
|
|
725 |
boolean this_present_createdAt = true;
|
|
|
726 |
boolean that_present_createdAt = true;
|
|
|
727 |
if (this_present_createdAt || that_present_createdAt) {
|
|
|
728 |
if (!(this_present_createdAt && that_present_createdAt))
|
|
|
729 |
return false;
|
|
|
730 |
if (this.createdAt != that.createdAt)
|
|
|
731 |
return false;
|
|
|
732 |
}
|
|
|
733 |
|
|
|
734 |
boolean this_present_processedAt = true;
|
|
|
735 |
boolean that_present_processedAt = true;
|
|
|
736 |
if (this_present_processedAt || that_present_processedAt) {
|
|
|
737 |
if (!(this_present_processedAt && that_present_processedAt))
|
|
|
738 |
return false;
|
|
|
739 |
if (this.processedAt != that.processedAt)
|
|
|
740 |
return false;
|
|
|
741 |
}
|
|
|
742 |
|
|
|
743 |
boolean this_present_attributes = true && this.isSetAttributes();
|
|
|
744 |
boolean that_present_attributes = true && that.isSetAttributes();
|
|
|
745 |
if (this_present_attributes || that_present_attributes) {
|
|
|
746 |
if (!(this_present_attributes && that_present_attributes))
|
|
|
747 |
return false;
|
|
|
748 |
if (!this.attributes.equals(that.attributes))
|
|
|
749 |
return false;
|
|
|
750 |
}
|
|
|
751 |
|
|
|
752 |
return true;
|
|
|
753 |
}
|
|
|
754 |
|
|
|
755 |
@Override
|
|
|
756 |
public int hashCode() {
|
|
|
757 |
return 0;
|
|
|
758 |
}
|
|
|
759 |
|
|
|
760 |
public int compareTo(Refund other) {
|
|
|
761 |
if (!getClass().equals(other.getClass())) {
|
|
|
762 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
763 |
}
|
|
|
764 |
|
|
|
765 |
int lastComparison = 0;
|
|
|
766 |
Refund typedOther = (Refund)other;
|
|
|
767 |
|
| 3430 |
rajveer |
768 |
lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
|
| 2747 |
chandransh |
769 |
if (lastComparison != 0) {
|
|
|
770 |
return lastComparison;
|
|
|
771 |
}
|
| 3430 |
rajveer |
772 |
if (isSetId()) {
|
|
|
773 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
|
|
|
774 |
if (lastComparison != 0) {
|
|
|
775 |
return lastComparison;
|
|
|
776 |
}
|
| 2747 |
chandransh |
777 |
}
|
| 3430 |
rajveer |
778 |
lastComparison = Boolean.valueOf(isSetPaymentId()).compareTo(typedOther.isSetPaymentId());
|
| 2747 |
chandransh |
779 |
if (lastComparison != 0) {
|
|
|
780 |
return lastComparison;
|
|
|
781 |
}
|
| 3430 |
rajveer |
782 |
if (isSetPaymentId()) {
|
|
|
783 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.paymentId, typedOther.paymentId);
|
|
|
784 |
if (lastComparison != 0) {
|
|
|
785 |
return lastComparison;
|
|
|
786 |
}
|
| 2747 |
chandransh |
787 |
}
|
| 3430 |
rajveer |
788 |
lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(typedOther.isSetGatewayId());
|
| 2747 |
chandransh |
789 |
if (lastComparison != 0) {
|
|
|
790 |
return lastComparison;
|
|
|
791 |
}
|
| 3430 |
rajveer |
792 |
if (isSetGatewayId()) {
|
|
|
793 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, typedOther.gatewayId);
|
|
|
794 |
if (lastComparison != 0) {
|
|
|
795 |
return lastComparison;
|
|
|
796 |
}
|
| 2747 |
chandransh |
797 |
}
|
| 3430 |
rajveer |
798 |
lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
|
| 2747 |
chandransh |
799 |
if (lastComparison != 0) {
|
|
|
800 |
return lastComparison;
|
|
|
801 |
}
|
| 3430 |
rajveer |
802 |
if (isSetOrderId()) {
|
|
|
803 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
|
|
|
804 |
if (lastComparison != 0) {
|
|
|
805 |
return lastComparison;
|
|
|
806 |
}
|
| 2747 |
chandransh |
807 |
}
|
| 3430 |
rajveer |
808 |
lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
|
| 2747 |
chandransh |
809 |
if (lastComparison != 0) {
|
|
|
810 |
return lastComparison;
|
|
|
811 |
}
|
| 3430 |
rajveer |
812 |
if (isSetAmount()) {
|
|
|
813 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
|
|
|
814 |
if (lastComparison != 0) {
|
|
|
815 |
return lastComparison;
|
|
|
816 |
}
|
| 2747 |
chandransh |
817 |
}
|
| 3430 |
rajveer |
818 |
lastComparison = Boolean.valueOf(isSetGatewayTxnId()).compareTo(typedOther.isSetGatewayTxnId());
|
| 2747 |
chandransh |
819 |
if (lastComparison != 0) {
|
|
|
820 |
return lastComparison;
|
|
|
821 |
}
|
| 3430 |
rajveer |
822 |
if (isSetGatewayTxnId()) {
|
|
|
823 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayTxnId, typedOther.gatewayTxnId);
|
|
|
824 |
if (lastComparison != 0) {
|
|
|
825 |
return lastComparison;
|
|
|
826 |
}
|
| 2747 |
chandransh |
827 |
}
|
| 3430 |
rajveer |
828 |
lastComparison = Boolean.valueOf(isSetAttempts()).compareTo(typedOther.isSetAttempts());
|
| 2747 |
chandransh |
829 |
if (lastComparison != 0) {
|
|
|
830 |
return lastComparison;
|
|
|
831 |
}
|
| 3430 |
rajveer |
832 |
if (isSetAttempts()) {
|
|
|
833 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attempts, typedOther.attempts);
|
|
|
834 |
if (lastComparison != 0) {
|
|
|
835 |
return lastComparison;
|
|
|
836 |
}
|
| 2747 |
chandransh |
837 |
}
|
| 3430 |
rajveer |
838 |
lastComparison = Boolean.valueOf(isSetCreatedAt()).compareTo(typedOther.isSetCreatedAt());
|
| 2747 |
chandransh |
839 |
if (lastComparison != 0) {
|
|
|
840 |
return lastComparison;
|
|
|
841 |
}
|
| 3430 |
rajveer |
842 |
if (isSetCreatedAt()) {
|
|
|
843 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdAt, typedOther.createdAt);
|
|
|
844 |
if (lastComparison != 0) {
|
|
|
845 |
return lastComparison;
|
|
|
846 |
}
|
| 2747 |
chandransh |
847 |
}
|
| 3430 |
rajveer |
848 |
lastComparison = Boolean.valueOf(isSetProcessedAt()).compareTo(typedOther.isSetProcessedAt());
|
| 2747 |
chandransh |
849 |
if (lastComparison != 0) {
|
|
|
850 |
return lastComparison;
|
|
|
851 |
}
|
| 3430 |
rajveer |
852 |
if (isSetProcessedAt()) {
|
|
|
853 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.processedAt, typedOther.processedAt);
|
|
|
854 |
if (lastComparison != 0) {
|
|
|
855 |
return lastComparison;
|
|
|
856 |
}
|
| 2747 |
chandransh |
857 |
}
|
| 3430 |
rajveer |
858 |
lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes());
|
| 2747 |
chandransh |
859 |
if (lastComparison != 0) {
|
|
|
860 |
return lastComparison;
|
|
|
861 |
}
|
| 3430 |
rajveer |
862 |
if (isSetAttributes()) {
|
|
|
863 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes);
|
|
|
864 |
if (lastComparison != 0) {
|
|
|
865 |
return lastComparison;
|
|
|
866 |
}
|
| 2747 |
chandransh |
867 |
}
|
|
|
868 |
return 0;
|
|
|
869 |
}
|
|
|
870 |
|
| 3430 |
rajveer |
871 |
public _Fields fieldForId(int fieldId) {
|
|
|
872 |
return _Fields.findByThriftId(fieldId);
|
|
|
873 |
}
|
|
|
874 |
|
|
|
875 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
876 |
org.apache.thrift.protocol.TField field;
|
| 2747 |
chandransh |
877 |
iprot.readStructBegin();
|
|
|
878 |
while (true)
|
|
|
879 |
{
|
|
|
880 |
field = iprot.readFieldBegin();
|
| 3430 |
rajveer |
881 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
| 2747 |
chandransh |
882 |
break;
|
|
|
883 |
}
|
| 3430 |
rajveer |
884 |
switch (field.id) {
|
|
|
885 |
case 1: // ID
|
|
|
886 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
887 |
this.id = iprot.readI64();
|
|
|
888 |
setIdIsSet(true);
|
|
|
889 |
} else {
|
|
|
890 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
891 |
}
|
|
|
892 |
break;
|
|
|
893 |
case 2: // PAYMENT_ID
|
|
|
894 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
895 |
this.paymentId = iprot.readI64();
|
|
|
896 |
setPaymentIdIsSet(true);
|
|
|
897 |
} else {
|
|
|
898 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
899 |
}
|
|
|
900 |
break;
|
|
|
901 |
case 3: // GATEWAY_ID
|
|
|
902 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
903 |
this.gatewayId = iprot.readI64();
|
|
|
904 |
setGatewayIdIsSet(true);
|
|
|
905 |
} else {
|
|
|
906 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
907 |
}
|
|
|
908 |
break;
|
|
|
909 |
case 4: // ORDER_ID
|
|
|
910 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
911 |
this.orderId = iprot.readI64();
|
|
|
912 |
setOrderIdIsSet(true);
|
|
|
913 |
} else {
|
|
|
914 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
915 |
}
|
|
|
916 |
break;
|
|
|
917 |
case 5: // AMOUNT
|
|
|
918 |
if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
|
|
|
919 |
this.amount = iprot.readDouble();
|
|
|
920 |
setAmountIsSet(true);
|
|
|
921 |
} else {
|
|
|
922 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
923 |
}
|
|
|
924 |
break;
|
|
|
925 |
case 6: // GATEWAY_TXN_ID
|
|
|
926 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
927 |
this.gatewayTxnId = iprot.readString();
|
|
|
928 |
} else {
|
|
|
929 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
930 |
}
|
|
|
931 |
break;
|
|
|
932 |
case 7: // ATTEMPTS
|
|
|
933 |
if (field.type == org.apache.thrift.protocol.TType.I32) {
|
|
|
934 |
this.attempts = iprot.readI32();
|
|
|
935 |
setAttemptsIsSet(true);
|
|
|
936 |
} else {
|
|
|
937 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
938 |
}
|
|
|
939 |
break;
|
|
|
940 |
case 8: // CREATED_AT
|
|
|
941 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
942 |
this.createdAt = iprot.readI64();
|
|
|
943 |
setCreatedAtIsSet(true);
|
|
|
944 |
} else {
|
|
|
945 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
946 |
}
|
|
|
947 |
break;
|
|
|
948 |
case 9: // PROCESSED_AT
|
|
|
949 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
950 |
this.processedAt = iprot.readI64();
|
|
|
951 |
setProcessedAtIsSet(true);
|
|
|
952 |
} else {
|
|
|
953 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
954 |
}
|
|
|
955 |
break;
|
|
|
956 |
case 10: // ATTRIBUTES
|
|
|
957 |
if (field.type == org.apache.thrift.protocol.TType.LIST) {
|
|
|
958 |
{
|
|
|
959 |
org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
|
|
|
960 |
this.attributes = new ArrayList<Attribute>(_list8.size);
|
|
|
961 |
for (int _i9 = 0; _i9 < _list8.size; ++_i9)
|
| 2747 |
chandransh |
962 |
{
|
| 3430 |
rajveer |
963 |
Attribute _elem10; // required
|
|
|
964 |
_elem10 = new Attribute();
|
|
|
965 |
_elem10.read(iprot);
|
|
|
966 |
this.attributes.add(_elem10);
|
| 2747 |
chandransh |
967 |
}
|
| 3430 |
rajveer |
968 |
iprot.readListEnd();
|
| 2747 |
chandransh |
969 |
}
|
| 3430 |
rajveer |
970 |
} else {
|
|
|
971 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
972 |
}
|
|
|
973 |
break;
|
|
|
974 |
default:
|
|
|
975 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| 2747 |
chandransh |
976 |
}
|
| 3430 |
rajveer |
977 |
iprot.readFieldEnd();
|
| 2747 |
chandransh |
978 |
}
|
|
|
979 |
iprot.readStructEnd();
|
|
|
980 |
validate();
|
|
|
981 |
}
|
|
|
982 |
|
| 3430 |
rajveer |
983 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
| 2747 |
chandransh |
984 |
validate();
|
|
|
985 |
|
|
|
986 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
987 |
oprot.writeFieldBegin(ID_FIELD_DESC);
|
|
|
988 |
oprot.writeI64(this.id);
|
|
|
989 |
oprot.writeFieldEnd();
|
|
|
990 |
oprot.writeFieldBegin(PAYMENT_ID_FIELD_DESC);
|
|
|
991 |
oprot.writeI64(this.paymentId);
|
|
|
992 |
oprot.writeFieldEnd();
|
|
|
993 |
oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
|
|
|
994 |
oprot.writeI64(this.gatewayId);
|
|
|
995 |
oprot.writeFieldEnd();
|
|
|
996 |
oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
|
|
|
997 |
oprot.writeI64(this.orderId);
|
|
|
998 |
oprot.writeFieldEnd();
|
|
|
999 |
oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
|
|
|
1000 |
oprot.writeDouble(this.amount);
|
|
|
1001 |
oprot.writeFieldEnd();
|
|
|
1002 |
if (this.gatewayTxnId != null) {
|
|
|
1003 |
oprot.writeFieldBegin(GATEWAY_TXN_ID_FIELD_DESC);
|
|
|
1004 |
oprot.writeString(this.gatewayTxnId);
|
|
|
1005 |
oprot.writeFieldEnd();
|
|
|
1006 |
}
|
|
|
1007 |
oprot.writeFieldBegin(ATTEMPTS_FIELD_DESC);
|
|
|
1008 |
oprot.writeI32(this.attempts);
|
|
|
1009 |
oprot.writeFieldEnd();
|
|
|
1010 |
oprot.writeFieldBegin(CREATED_AT_FIELD_DESC);
|
|
|
1011 |
oprot.writeI64(this.createdAt);
|
|
|
1012 |
oprot.writeFieldEnd();
|
|
|
1013 |
oprot.writeFieldBegin(PROCESSED_AT_FIELD_DESC);
|
|
|
1014 |
oprot.writeI64(this.processedAt);
|
|
|
1015 |
oprot.writeFieldEnd();
|
|
|
1016 |
if (this.attributes != null) {
|
|
|
1017 |
oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
|
|
|
1018 |
{
|
| 3430 |
rajveer |
1019 |
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.attributes.size()));
|
| 2747 |
chandransh |
1020 |
for (Attribute _iter11 : this.attributes)
|
|
|
1021 |
{
|
|
|
1022 |
_iter11.write(oprot);
|
|
|
1023 |
}
|
|
|
1024 |
oprot.writeListEnd();
|
|
|
1025 |
}
|
|
|
1026 |
oprot.writeFieldEnd();
|
|
|
1027 |
}
|
|
|
1028 |
oprot.writeFieldStop();
|
|
|
1029 |
oprot.writeStructEnd();
|
|
|
1030 |
}
|
|
|
1031 |
|
|
|
1032 |
@Override
|
|
|
1033 |
public String toString() {
|
|
|
1034 |
StringBuilder sb = new StringBuilder("Refund(");
|
|
|
1035 |
boolean first = true;
|
|
|
1036 |
|
|
|
1037 |
sb.append("id:");
|
|
|
1038 |
sb.append(this.id);
|
|
|
1039 |
first = false;
|
|
|
1040 |
if (!first) sb.append(", ");
|
|
|
1041 |
sb.append("paymentId:");
|
|
|
1042 |
sb.append(this.paymentId);
|
|
|
1043 |
first = false;
|
|
|
1044 |
if (!first) sb.append(", ");
|
|
|
1045 |
sb.append("gatewayId:");
|
|
|
1046 |
sb.append(this.gatewayId);
|
|
|
1047 |
first = false;
|
|
|
1048 |
if (!first) sb.append(", ");
|
|
|
1049 |
sb.append("orderId:");
|
|
|
1050 |
sb.append(this.orderId);
|
|
|
1051 |
first = false;
|
|
|
1052 |
if (!first) sb.append(", ");
|
|
|
1053 |
sb.append("amount:");
|
|
|
1054 |
sb.append(this.amount);
|
|
|
1055 |
first = false;
|
|
|
1056 |
if (!first) sb.append(", ");
|
|
|
1057 |
sb.append("gatewayTxnId:");
|
|
|
1058 |
if (this.gatewayTxnId == null) {
|
|
|
1059 |
sb.append("null");
|
|
|
1060 |
} else {
|
|
|
1061 |
sb.append(this.gatewayTxnId);
|
|
|
1062 |
}
|
|
|
1063 |
first = false;
|
|
|
1064 |
if (!first) sb.append(", ");
|
|
|
1065 |
sb.append("attempts:");
|
|
|
1066 |
sb.append(this.attempts);
|
|
|
1067 |
first = false;
|
|
|
1068 |
if (!first) sb.append(", ");
|
|
|
1069 |
sb.append("createdAt:");
|
|
|
1070 |
sb.append(this.createdAt);
|
|
|
1071 |
first = false;
|
|
|
1072 |
if (!first) sb.append(", ");
|
|
|
1073 |
sb.append("processedAt:");
|
|
|
1074 |
sb.append(this.processedAt);
|
|
|
1075 |
first = false;
|
|
|
1076 |
if (!first) sb.append(", ");
|
|
|
1077 |
sb.append("attributes:");
|
|
|
1078 |
if (this.attributes == null) {
|
|
|
1079 |
sb.append("null");
|
|
|
1080 |
} else {
|
|
|
1081 |
sb.append(this.attributes);
|
|
|
1082 |
}
|
|
|
1083 |
first = false;
|
|
|
1084 |
sb.append(")");
|
|
|
1085 |
return sb.toString();
|
|
|
1086 |
}
|
|
|
1087 |
|
| 3430 |
rajveer |
1088 |
public void validate() throws org.apache.thrift.TException {
|
| 2747 |
chandransh |
1089 |
// check for required fields
|
|
|
1090 |
}
|
|
|
1091 |
|
| 3430 |
rajveer |
1092 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
1093 |
try {
|
|
|
1094 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
1095 |
} catch (org.apache.thrift.TException te) {
|
|
|
1096 |
throw new java.io.IOException(te);
|
|
|
1097 |
}
|
|
|
1098 |
}
|
|
|
1099 |
|
|
|
1100 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
1101 |
try {
|
|
|
1102 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
1103 |
__isset_bit_vector = new BitSet(1);
|
|
|
1104 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
1105 |
} catch (org.apache.thrift.TException te) {
|
|
|
1106 |
throw new java.io.IOException(te);
|
|
|
1107 |
}
|
|
|
1108 |
}
|
|
|
1109 |
|
| 2747 |
chandransh |
1110 |
}
|
|
|
1111 |
|