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