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