| 7263 |
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 SourceDetail implements org.apache.thrift.TBase<SourceDetail, SourceDetail._Fields>, java.io.Serializable, Cloneable {
|
|
|
24 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SourceDetail");
|
|
|
25 |
|
|
|
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 EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("email", org.apache.thrift.protocol.TType.STRING, (short)3);
|
| 7410 |
amar.kumar |
29 |
private static final org.apache.thrift.protocol.TField TIN_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("tinNumber", org.apache.thrift.protocol.TType.STRING, (short)4);
|
| 7263 |
anupam.sin |
30 |
|
|
|
31 |
private long id; // required
|
|
|
32 |
private String name; // required
|
|
|
33 |
private String email; // required
|
| 7410 |
amar.kumar |
34 |
private String tinNumber; // required
|
| 7263 |
anupam.sin |
35 |
|
|
|
36 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
37 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
38 |
ID((short)1, "id"),
|
|
|
39 |
NAME((short)2, "name"),
|
| 7410 |
amar.kumar |
40 |
EMAIL((short)3, "email"),
|
|
|
41 |
TIN_NUMBER((short)4, "tinNumber");
|
| 7263 |
anupam.sin |
42 |
|
|
|
43 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
44 |
|
|
|
45 |
static {
|
|
|
46 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
47 |
byName.put(field.getFieldName(), field);
|
|
|
48 |
}
|
|
|
49 |
}
|
|
|
50 |
|
|
|
51 |
/**
|
|
|
52 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
53 |
*/
|
|
|
54 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
55 |
switch(fieldId) {
|
|
|
56 |
case 1: // ID
|
|
|
57 |
return ID;
|
|
|
58 |
case 2: // NAME
|
|
|
59 |
return NAME;
|
|
|
60 |
case 3: // EMAIL
|
|
|
61 |
return EMAIL;
|
| 7410 |
amar.kumar |
62 |
case 4: // TIN_NUMBER
|
|
|
63 |
return TIN_NUMBER;
|
| 7263 |
anupam.sin |
64 |
default:
|
|
|
65 |
return null;
|
|
|
66 |
}
|
|
|
67 |
}
|
|
|
68 |
|
|
|
69 |
/**
|
|
|
70 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
71 |
* if it is not found.
|
|
|
72 |
*/
|
|
|
73 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
74 |
_Fields fields = findByThriftId(fieldId);
|
|
|
75 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
76 |
return fields;
|
|
|
77 |
}
|
|
|
78 |
|
|
|
79 |
/**
|
|
|
80 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
81 |
*/
|
|
|
82 |
public static _Fields findByName(String name) {
|
|
|
83 |
return byName.get(name);
|
|
|
84 |
}
|
|
|
85 |
|
|
|
86 |
private final short _thriftId;
|
|
|
87 |
private final String _fieldName;
|
|
|
88 |
|
|
|
89 |
_Fields(short thriftId, String fieldName) {
|
|
|
90 |
_thriftId = thriftId;
|
|
|
91 |
_fieldName = fieldName;
|
|
|
92 |
}
|
|
|
93 |
|
|
|
94 |
public short getThriftFieldId() {
|
|
|
95 |
return _thriftId;
|
|
|
96 |
}
|
|
|
97 |
|
|
|
98 |
public String getFieldName() {
|
|
|
99 |
return _fieldName;
|
|
|
100 |
}
|
|
|
101 |
}
|
|
|
102 |
|
|
|
103 |
// isset id assignments
|
|
|
104 |
private static final int __ID_ISSET_ID = 0;
|
|
|
105 |
private BitSet __isset_bit_vector = new BitSet(1);
|
|
|
106 |
|
|
|
107 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
108 |
static {
|
|
|
109 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
110 |
tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
111 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
112 |
tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
113 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
114 |
tmpMap.put(_Fields.EMAIL, new org.apache.thrift.meta_data.FieldMetaData("email", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
115 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
| 7410 |
amar.kumar |
116 |
tmpMap.put(_Fields.TIN_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("tinNumber", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
117 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
| 7263 |
anupam.sin |
118 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
119 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SourceDetail.class, metaDataMap);
|
|
|
120 |
}
|
|
|
121 |
|
|
|
122 |
public SourceDetail() {
|
|
|
123 |
}
|
|
|
124 |
|
|
|
125 |
public SourceDetail(
|
|
|
126 |
long id,
|
|
|
127 |
String name,
|
| 7410 |
amar.kumar |
128 |
String email,
|
|
|
129 |
String tinNumber)
|
| 7263 |
anupam.sin |
130 |
{
|
|
|
131 |
this();
|
|
|
132 |
this.id = id;
|
|
|
133 |
setIdIsSet(true);
|
|
|
134 |
this.name = name;
|
|
|
135 |
this.email = email;
|
| 7410 |
amar.kumar |
136 |
this.tinNumber = tinNumber;
|
| 7263 |
anupam.sin |
137 |
}
|
|
|
138 |
|
|
|
139 |
/**
|
|
|
140 |
* Performs a deep copy on <i>other</i>.
|
|
|
141 |
*/
|
|
|
142 |
public SourceDetail(SourceDetail other) {
|
|
|
143 |
__isset_bit_vector.clear();
|
|
|
144 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
145 |
this.id = other.id;
|
|
|
146 |
if (other.isSetName()) {
|
|
|
147 |
this.name = other.name;
|
|
|
148 |
}
|
|
|
149 |
if (other.isSetEmail()) {
|
|
|
150 |
this.email = other.email;
|
|
|
151 |
}
|
| 7410 |
amar.kumar |
152 |
if (other.isSetTinNumber()) {
|
|
|
153 |
this.tinNumber = other.tinNumber;
|
|
|
154 |
}
|
| 7263 |
anupam.sin |
155 |
}
|
|
|
156 |
|
|
|
157 |
public SourceDetail deepCopy() {
|
|
|
158 |
return new SourceDetail(this);
|
|
|
159 |
}
|
|
|
160 |
|
|
|
161 |
@Override
|
|
|
162 |
public void clear() {
|
|
|
163 |
setIdIsSet(false);
|
|
|
164 |
this.id = 0;
|
|
|
165 |
this.name = null;
|
|
|
166 |
this.email = null;
|
| 7410 |
amar.kumar |
167 |
this.tinNumber = null;
|
| 7263 |
anupam.sin |
168 |
}
|
|
|
169 |
|
|
|
170 |
public long getId() {
|
|
|
171 |
return this.id;
|
|
|
172 |
}
|
|
|
173 |
|
|
|
174 |
public void setId(long id) {
|
|
|
175 |
this.id = id;
|
|
|
176 |
setIdIsSet(true);
|
|
|
177 |
}
|
|
|
178 |
|
|
|
179 |
public void unsetId() {
|
|
|
180 |
__isset_bit_vector.clear(__ID_ISSET_ID);
|
|
|
181 |
}
|
|
|
182 |
|
|
|
183 |
/** Returns true if field id is set (has been assigned a value) and false otherwise */
|
|
|
184 |
public boolean isSetId() {
|
|
|
185 |
return __isset_bit_vector.get(__ID_ISSET_ID);
|
|
|
186 |
}
|
|
|
187 |
|
|
|
188 |
public void setIdIsSet(boolean value) {
|
|
|
189 |
__isset_bit_vector.set(__ID_ISSET_ID, value);
|
|
|
190 |
}
|
|
|
191 |
|
|
|
192 |
public String getName() {
|
|
|
193 |
return this.name;
|
|
|
194 |
}
|
|
|
195 |
|
|
|
196 |
public void setName(String name) {
|
|
|
197 |
this.name = name;
|
|
|
198 |
}
|
|
|
199 |
|
|
|
200 |
public void unsetName() {
|
|
|
201 |
this.name = null;
|
|
|
202 |
}
|
|
|
203 |
|
|
|
204 |
/** Returns true if field name is set (has been assigned a value) and false otherwise */
|
|
|
205 |
public boolean isSetName() {
|
|
|
206 |
return this.name != null;
|
|
|
207 |
}
|
|
|
208 |
|
|
|
209 |
public void setNameIsSet(boolean value) {
|
|
|
210 |
if (!value) {
|
|
|
211 |
this.name = null;
|
|
|
212 |
}
|
|
|
213 |
}
|
|
|
214 |
|
|
|
215 |
public String getEmail() {
|
|
|
216 |
return this.email;
|
|
|
217 |
}
|
|
|
218 |
|
|
|
219 |
public void setEmail(String email) {
|
|
|
220 |
this.email = email;
|
|
|
221 |
}
|
|
|
222 |
|
|
|
223 |
public void unsetEmail() {
|
|
|
224 |
this.email = null;
|
|
|
225 |
}
|
|
|
226 |
|
|
|
227 |
/** Returns true if field email is set (has been assigned a value) and false otherwise */
|
|
|
228 |
public boolean isSetEmail() {
|
|
|
229 |
return this.email != null;
|
|
|
230 |
}
|
|
|
231 |
|
|
|
232 |
public void setEmailIsSet(boolean value) {
|
|
|
233 |
if (!value) {
|
|
|
234 |
this.email = null;
|
|
|
235 |
}
|
|
|
236 |
}
|
|
|
237 |
|
| 7410 |
amar.kumar |
238 |
public String getTinNumber() {
|
|
|
239 |
return this.tinNumber;
|
|
|
240 |
}
|
|
|
241 |
|
|
|
242 |
public void setTinNumber(String tinNumber) {
|
|
|
243 |
this.tinNumber = tinNumber;
|
|
|
244 |
}
|
|
|
245 |
|
|
|
246 |
public void unsetTinNumber() {
|
|
|
247 |
this.tinNumber = null;
|
|
|
248 |
}
|
|
|
249 |
|
|
|
250 |
/** Returns true if field tinNumber is set (has been assigned a value) and false otherwise */
|
|
|
251 |
public boolean isSetTinNumber() {
|
|
|
252 |
return this.tinNumber != null;
|
|
|
253 |
}
|
|
|
254 |
|
|
|
255 |
public void setTinNumberIsSet(boolean value) {
|
|
|
256 |
if (!value) {
|
|
|
257 |
this.tinNumber = null;
|
|
|
258 |
}
|
|
|
259 |
}
|
|
|
260 |
|
| 7263 |
anupam.sin |
261 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
262 |
switch (field) {
|
|
|
263 |
case ID:
|
|
|
264 |
if (value == null) {
|
|
|
265 |
unsetId();
|
|
|
266 |
} else {
|
|
|
267 |
setId((Long)value);
|
|
|
268 |
}
|
|
|
269 |
break;
|
|
|
270 |
|
|
|
271 |
case NAME:
|
|
|
272 |
if (value == null) {
|
|
|
273 |
unsetName();
|
|
|
274 |
} else {
|
|
|
275 |
setName((String)value);
|
|
|
276 |
}
|
|
|
277 |
break;
|
|
|
278 |
|
|
|
279 |
case EMAIL:
|
|
|
280 |
if (value == null) {
|
|
|
281 |
unsetEmail();
|
|
|
282 |
} else {
|
|
|
283 |
setEmail((String)value);
|
|
|
284 |
}
|
|
|
285 |
break;
|
|
|
286 |
|
| 7410 |
amar.kumar |
287 |
case TIN_NUMBER:
|
|
|
288 |
if (value == null) {
|
|
|
289 |
unsetTinNumber();
|
|
|
290 |
} else {
|
|
|
291 |
setTinNumber((String)value);
|
|
|
292 |
}
|
|
|
293 |
break;
|
|
|
294 |
|
| 7263 |
anupam.sin |
295 |
}
|
|
|
296 |
}
|
|
|
297 |
|
|
|
298 |
public Object getFieldValue(_Fields field) {
|
|
|
299 |
switch (field) {
|
|
|
300 |
case ID:
|
|
|
301 |
return Long.valueOf(getId());
|
|
|
302 |
|
|
|
303 |
case NAME:
|
|
|
304 |
return getName();
|
|
|
305 |
|
|
|
306 |
case EMAIL:
|
|
|
307 |
return getEmail();
|
|
|
308 |
|
| 7410 |
amar.kumar |
309 |
case TIN_NUMBER:
|
|
|
310 |
return getTinNumber();
|
|
|
311 |
|
| 7263 |
anupam.sin |
312 |
}
|
|
|
313 |
throw new IllegalStateException();
|
|
|
314 |
}
|
|
|
315 |
|
|
|
316 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
317 |
public boolean isSet(_Fields field) {
|
|
|
318 |
if (field == null) {
|
|
|
319 |
throw new IllegalArgumentException();
|
|
|
320 |
}
|
|
|
321 |
|
|
|
322 |
switch (field) {
|
|
|
323 |
case ID:
|
|
|
324 |
return isSetId();
|
|
|
325 |
case NAME:
|
|
|
326 |
return isSetName();
|
|
|
327 |
case EMAIL:
|
|
|
328 |
return isSetEmail();
|
| 7410 |
amar.kumar |
329 |
case TIN_NUMBER:
|
|
|
330 |
return isSetTinNumber();
|
| 7263 |
anupam.sin |
331 |
}
|
|
|
332 |
throw new IllegalStateException();
|
|
|
333 |
}
|
|
|
334 |
|
|
|
335 |
@Override
|
|
|
336 |
public boolean equals(Object that) {
|
|
|
337 |
if (that == null)
|
|
|
338 |
return false;
|
|
|
339 |
if (that instanceof SourceDetail)
|
|
|
340 |
return this.equals((SourceDetail)that);
|
|
|
341 |
return false;
|
|
|
342 |
}
|
|
|
343 |
|
|
|
344 |
public boolean equals(SourceDetail that) {
|
|
|
345 |
if (that == null)
|
|
|
346 |
return false;
|
|
|
347 |
|
|
|
348 |
boolean this_present_id = true;
|
|
|
349 |
boolean that_present_id = true;
|
|
|
350 |
if (this_present_id || that_present_id) {
|
|
|
351 |
if (!(this_present_id && that_present_id))
|
|
|
352 |
return false;
|
|
|
353 |
if (this.id != that.id)
|
|
|
354 |
return false;
|
|
|
355 |
}
|
|
|
356 |
|
|
|
357 |
boolean this_present_name = true && this.isSetName();
|
|
|
358 |
boolean that_present_name = true && that.isSetName();
|
|
|
359 |
if (this_present_name || that_present_name) {
|
|
|
360 |
if (!(this_present_name && that_present_name))
|
|
|
361 |
return false;
|
|
|
362 |
if (!this.name.equals(that.name))
|
|
|
363 |
return false;
|
|
|
364 |
}
|
|
|
365 |
|
|
|
366 |
boolean this_present_email = true && this.isSetEmail();
|
|
|
367 |
boolean that_present_email = true && that.isSetEmail();
|
|
|
368 |
if (this_present_email || that_present_email) {
|
|
|
369 |
if (!(this_present_email && that_present_email))
|
|
|
370 |
return false;
|
|
|
371 |
if (!this.email.equals(that.email))
|
|
|
372 |
return false;
|
|
|
373 |
}
|
|
|
374 |
|
| 7410 |
amar.kumar |
375 |
boolean this_present_tinNumber = true && this.isSetTinNumber();
|
|
|
376 |
boolean that_present_tinNumber = true && that.isSetTinNumber();
|
|
|
377 |
if (this_present_tinNumber || that_present_tinNumber) {
|
|
|
378 |
if (!(this_present_tinNumber && that_present_tinNumber))
|
|
|
379 |
return false;
|
|
|
380 |
if (!this.tinNumber.equals(that.tinNumber))
|
|
|
381 |
return false;
|
|
|
382 |
}
|
|
|
383 |
|
| 7263 |
anupam.sin |
384 |
return true;
|
|
|
385 |
}
|
|
|
386 |
|
|
|
387 |
@Override
|
|
|
388 |
public int hashCode() {
|
|
|
389 |
return 0;
|
|
|
390 |
}
|
|
|
391 |
|
|
|
392 |
public int compareTo(SourceDetail other) {
|
|
|
393 |
if (!getClass().equals(other.getClass())) {
|
|
|
394 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
395 |
}
|
|
|
396 |
|
|
|
397 |
int lastComparison = 0;
|
|
|
398 |
SourceDetail typedOther = (SourceDetail)other;
|
|
|
399 |
|
|
|
400 |
lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
|
|
|
401 |
if (lastComparison != 0) {
|
|
|
402 |
return lastComparison;
|
|
|
403 |
}
|
|
|
404 |
if (isSetId()) {
|
|
|
405 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
|
|
|
406 |
if (lastComparison != 0) {
|
|
|
407 |
return lastComparison;
|
|
|
408 |
}
|
|
|
409 |
}
|
|
|
410 |
lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
|
|
|
411 |
if (lastComparison != 0) {
|
|
|
412 |
return lastComparison;
|
|
|
413 |
}
|
|
|
414 |
if (isSetName()) {
|
|
|
415 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
|
|
|
416 |
if (lastComparison != 0) {
|
|
|
417 |
return lastComparison;
|
|
|
418 |
}
|
|
|
419 |
}
|
|
|
420 |
lastComparison = Boolean.valueOf(isSetEmail()).compareTo(typedOther.isSetEmail());
|
|
|
421 |
if (lastComparison != 0) {
|
|
|
422 |
return lastComparison;
|
|
|
423 |
}
|
|
|
424 |
if (isSetEmail()) {
|
|
|
425 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.email, typedOther.email);
|
|
|
426 |
if (lastComparison != 0) {
|
|
|
427 |
return lastComparison;
|
|
|
428 |
}
|
|
|
429 |
}
|
| 7410 |
amar.kumar |
430 |
lastComparison = Boolean.valueOf(isSetTinNumber()).compareTo(typedOther.isSetTinNumber());
|
|
|
431 |
if (lastComparison != 0) {
|
|
|
432 |
return lastComparison;
|
|
|
433 |
}
|
|
|
434 |
if (isSetTinNumber()) {
|
|
|
435 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tinNumber, typedOther.tinNumber);
|
|
|
436 |
if (lastComparison != 0) {
|
|
|
437 |
return lastComparison;
|
|
|
438 |
}
|
|
|
439 |
}
|
| 7263 |
anupam.sin |
440 |
return 0;
|
|
|
441 |
}
|
|
|
442 |
|
|
|
443 |
public _Fields fieldForId(int fieldId) {
|
|
|
444 |
return _Fields.findByThriftId(fieldId);
|
|
|
445 |
}
|
|
|
446 |
|
|
|
447 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
448 |
org.apache.thrift.protocol.TField field;
|
|
|
449 |
iprot.readStructBegin();
|
|
|
450 |
while (true)
|
|
|
451 |
{
|
|
|
452 |
field = iprot.readFieldBegin();
|
|
|
453 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
454 |
break;
|
|
|
455 |
}
|
|
|
456 |
switch (field.id) {
|
|
|
457 |
case 1: // ID
|
|
|
458 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
459 |
this.id = iprot.readI64();
|
|
|
460 |
setIdIsSet(true);
|
|
|
461 |
} else {
|
|
|
462 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
463 |
}
|
|
|
464 |
break;
|
|
|
465 |
case 2: // NAME
|
|
|
466 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
467 |
this.name = iprot.readString();
|
|
|
468 |
} else {
|
|
|
469 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
470 |
}
|
|
|
471 |
break;
|
|
|
472 |
case 3: // EMAIL
|
|
|
473 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
474 |
this.email = iprot.readString();
|
|
|
475 |
} else {
|
|
|
476 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
477 |
}
|
|
|
478 |
break;
|
| 7410 |
amar.kumar |
479 |
case 4: // TIN_NUMBER
|
|
|
480 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
481 |
this.tinNumber = iprot.readString();
|
|
|
482 |
} else {
|
|
|
483 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
484 |
}
|
|
|
485 |
break;
|
| 7263 |
anupam.sin |
486 |
default:
|
|
|
487 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
488 |
}
|
|
|
489 |
iprot.readFieldEnd();
|
|
|
490 |
}
|
|
|
491 |
iprot.readStructEnd();
|
|
|
492 |
validate();
|
|
|
493 |
}
|
|
|
494 |
|
|
|
495 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
496 |
validate();
|
|
|
497 |
|
|
|
498 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
499 |
oprot.writeFieldBegin(ID_FIELD_DESC);
|
|
|
500 |
oprot.writeI64(this.id);
|
|
|
501 |
oprot.writeFieldEnd();
|
|
|
502 |
if (this.name != null) {
|
|
|
503 |
oprot.writeFieldBegin(NAME_FIELD_DESC);
|
|
|
504 |
oprot.writeString(this.name);
|
|
|
505 |
oprot.writeFieldEnd();
|
|
|
506 |
}
|
|
|
507 |
if (this.email != null) {
|
|
|
508 |
oprot.writeFieldBegin(EMAIL_FIELD_DESC);
|
|
|
509 |
oprot.writeString(this.email);
|
|
|
510 |
oprot.writeFieldEnd();
|
|
|
511 |
}
|
| 7410 |
amar.kumar |
512 |
if (this.tinNumber != null) {
|
|
|
513 |
oprot.writeFieldBegin(TIN_NUMBER_FIELD_DESC);
|
|
|
514 |
oprot.writeString(this.tinNumber);
|
|
|
515 |
oprot.writeFieldEnd();
|
|
|
516 |
}
|
| 7263 |
anupam.sin |
517 |
oprot.writeFieldStop();
|
|
|
518 |
oprot.writeStructEnd();
|
|
|
519 |
}
|
|
|
520 |
|
|
|
521 |
@Override
|
|
|
522 |
public String toString() {
|
|
|
523 |
StringBuilder sb = new StringBuilder("SourceDetail(");
|
|
|
524 |
boolean first = true;
|
|
|
525 |
|
|
|
526 |
sb.append("id:");
|
|
|
527 |
sb.append(this.id);
|
|
|
528 |
first = false;
|
|
|
529 |
if (!first) sb.append(", ");
|
|
|
530 |
sb.append("name:");
|
|
|
531 |
if (this.name == null) {
|
|
|
532 |
sb.append("null");
|
|
|
533 |
} else {
|
|
|
534 |
sb.append(this.name);
|
|
|
535 |
}
|
|
|
536 |
first = false;
|
|
|
537 |
if (!first) sb.append(", ");
|
|
|
538 |
sb.append("email:");
|
|
|
539 |
if (this.email == null) {
|
|
|
540 |
sb.append("null");
|
|
|
541 |
} else {
|
|
|
542 |
sb.append(this.email);
|
|
|
543 |
}
|
|
|
544 |
first = false;
|
| 7410 |
amar.kumar |
545 |
if (!first) sb.append(", ");
|
|
|
546 |
sb.append("tinNumber:");
|
|
|
547 |
if (this.tinNumber == null) {
|
|
|
548 |
sb.append("null");
|
|
|
549 |
} else {
|
|
|
550 |
sb.append(this.tinNumber);
|
|
|
551 |
}
|
|
|
552 |
first = false;
|
| 7263 |
anupam.sin |
553 |
sb.append(")");
|
|
|
554 |
return sb.toString();
|
|
|
555 |
}
|
|
|
556 |
|
|
|
557 |
public void validate() throws org.apache.thrift.TException {
|
|
|
558 |
// check for required fields
|
|
|
559 |
}
|
|
|
560 |
|
|
|
561 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
562 |
try {
|
|
|
563 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
564 |
} catch (org.apache.thrift.TException te) {
|
|
|
565 |
throw new java.io.IOException(te);
|
|
|
566 |
}
|
|
|
567 |
}
|
|
|
568 |
|
|
|
569 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
570 |
try {
|
|
|
571 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
572 |
__isset_bit_vector = new BitSet(1);
|
|
|
573 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
574 |
} catch (org.apache.thrift.TException te) {
|
|
|
575 |
throw new java.io.IOException(te);
|
|
|
576 |
}
|
|
|
577 |
}
|
|
|
578 |
|
|
|
579 |
}
|
|
|
580 |
|