| 19421 |
manish.sha |
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.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;
|
|
|
18 |
import java.nio.ByteBuffer;
|
|
|
19 |
import java.util.Arrays;
|
|
|
20 |
import org.slf4j.Logger;
|
|
|
21 |
import org.slf4j.LoggerFactory;
|
|
|
22 |
|
|
|
23 |
public class DeliveryEstimateAndCosting implements org.apache.thrift.TBase<DeliveryEstimateAndCosting, DeliveryEstimateAndCosting._Fields>, java.io.Serializable, Cloneable {
|
|
|
24 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DeliveryEstimateAndCosting");
|
|
|
25 |
|
|
|
26 |
private static final org.apache.thrift.protocol.TField LOGISTICS_PROVIDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("logistics_provider_id", org.apache.thrift.protocol.TType.I64, (short)1);
|
|
|
27 |
private static final org.apache.thrift.protocol.TField PINCODE_FIELD_DESC = new org.apache.thrift.protocol.TField("pincode", org.apache.thrift.protocol.TType.STRING, (short)2);
|
|
|
28 |
private static final org.apache.thrift.protocol.TField DELIVERY_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("deliveryTime", org.apache.thrift.protocol.TType.I64, (short)3);
|
|
|
29 |
private static final org.apache.thrift.protocol.TField DELIVERY_DELAY_FIELD_DESC = new org.apache.thrift.protocol.TField("delivery_delay", org.apache.thrift.protocol.TType.I64, (short)4);
|
|
|
30 |
private static final org.apache.thrift.protocol.TField COD_ALLOWED_FIELD_DESC = new org.apache.thrift.protocol.TField("codAllowed", org.apache.thrift.protocol.TType.BOOL, (short)5);
|
|
|
31 |
private static final org.apache.thrift.protocol.TField OTG_AVAILABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("otgAvailable", org.apache.thrift.protocol.TType.BOOL, (short)6);
|
|
|
32 |
private static final org.apache.thrift.protocol.TField LOGISTICS_COST_FIELD_DESC = new org.apache.thrift.protocol.TField("logisticsCost", org.apache.thrift.protocol.TType.DOUBLE, (short)7);
|
|
|
33 |
private static final org.apache.thrift.protocol.TField COD_COLLECTION_CHARGES_FIELD_DESC = new org.apache.thrift.protocol.TField("codCollectionCharges", org.apache.thrift.protocol.TType.DOUBLE, (short)8);
|
|
|
34 |
private static final org.apache.thrift.protocol.TField SHIPPING_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("shippingTime", org.apache.thrift.protocol.TType.I64, (short)9);
|
|
|
35 |
|
|
|
36 |
private long logistics_provider_id; // required
|
|
|
37 |
private String pincode; // required
|
|
|
38 |
private long deliveryTime; // required
|
|
|
39 |
private long delivery_delay; // required
|
|
|
40 |
private boolean codAllowed; // required
|
|
|
41 |
private boolean otgAvailable; // required
|
|
|
42 |
private double logisticsCost; // required
|
|
|
43 |
private double codCollectionCharges; // required
|
|
|
44 |
private long shippingTime; // required
|
|
|
45 |
|
|
|
46 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
47 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
48 |
LOGISTICS_PROVIDER_ID((short)1, "logistics_provider_id"),
|
|
|
49 |
PINCODE((short)2, "pincode"),
|
|
|
50 |
DELIVERY_TIME((short)3, "deliveryTime"),
|
|
|
51 |
DELIVERY_DELAY((short)4, "delivery_delay"),
|
|
|
52 |
COD_ALLOWED((short)5, "codAllowed"),
|
|
|
53 |
OTG_AVAILABLE((short)6, "otgAvailable"),
|
|
|
54 |
LOGISTICS_COST((short)7, "logisticsCost"),
|
|
|
55 |
COD_COLLECTION_CHARGES((short)8, "codCollectionCharges"),
|
|
|
56 |
SHIPPING_TIME((short)9, "shippingTime");
|
|
|
57 |
|
|
|
58 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
59 |
|
|
|
60 |
static {
|
|
|
61 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
62 |
byName.put(field.getFieldName(), field);
|
|
|
63 |
}
|
|
|
64 |
}
|
|
|
65 |
|
|
|
66 |
/**
|
|
|
67 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
68 |
*/
|
|
|
69 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
70 |
switch(fieldId) {
|
|
|
71 |
case 1: // LOGISTICS_PROVIDER_ID
|
|
|
72 |
return LOGISTICS_PROVIDER_ID;
|
|
|
73 |
case 2: // PINCODE
|
|
|
74 |
return PINCODE;
|
|
|
75 |
case 3: // DELIVERY_TIME
|
|
|
76 |
return DELIVERY_TIME;
|
|
|
77 |
case 4: // DELIVERY_DELAY
|
|
|
78 |
return DELIVERY_DELAY;
|
|
|
79 |
case 5: // COD_ALLOWED
|
|
|
80 |
return COD_ALLOWED;
|
|
|
81 |
case 6: // OTG_AVAILABLE
|
|
|
82 |
return OTG_AVAILABLE;
|
|
|
83 |
case 7: // LOGISTICS_COST
|
|
|
84 |
return LOGISTICS_COST;
|
|
|
85 |
case 8: // COD_COLLECTION_CHARGES
|
|
|
86 |
return COD_COLLECTION_CHARGES;
|
|
|
87 |
case 9: // SHIPPING_TIME
|
|
|
88 |
return SHIPPING_TIME;
|
|
|
89 |
default:
|
|
|
90 |
return null;
|
|
|
91 |
}
|
|
|
92 |
}
|
|
|
93 |
|
|
|
94 |
/**
|
|
|
95 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
96 |
* if it is not found.
|
|
|
97 |
*/
|
|
|
98 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
99 |
_Fields fields = findByThriftId(fieldId);
|
|
|
100 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
101 |
return fields;
|
|
|
102 |
}
|
|
|
103 |
|
|
|
104 |
/**
|
|
|
105 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
106 |
*/
|
|
|
107 |
public static _Fields findByName(String name) {
|
|
|
108 |
return byName.get(name);
|
|
|
109 |
}
|
|
|
110 |
|
|
|
111 |
private final short _thriftId;
|
|
|
112 |
private final String _fieldName;
|
|
|
113 |
|
|
|
114 |
_Fields(short thriftId, String fieldName) {
|
|
|
115 |
_thriftId = thriftId;
|
|
|
116 |
_fieldName = fieldName;
|
|
|
117 |
}
|
|
|
118 |
|
|
|
119 |
public short getThriftFieldId() {
|
|
|
120 |
return _thriftId;
|
|
|
121 |
}
|
|
|
122 |
|
|
|
123 |
public String getFieldName() {
|
|
|
124 |
return _fieldName;
|
|
|
125 |
}
|
|
|
126 |
}
|
|
|
127 |
|
|
|
128 |
// isset id assignments
|
|
|
129 |
private static final int __LOGISTICS_PROVIDER_ID_ISSET_ID = 0;
|
|
|
130 |
private static final int __DELIVERYTIME_ISSET_ID = 1;
|
|
|
131 |
private static final int __DELIVERY_DELAY_ISSET_ID = 2;
|
|
|
132 |
private static final int __CODALLOWED_ISSET_ID = 3;
|
|
|
133 |
private static final int __OTGAVAILABLE_ISSET_ID = 4;
|
|
|
134 |
private static final int __LOGISTICSCOST_ISSET_ID = 5;
|
|
|
135 |
private static final int __CODCOLLECTIONCHARGES_ISSET_ID = 6;
|
|
|
136 |
private static final int __SHIPPINGTIME_ISSET_ID = 7;
|
|
|
137 |
private BitSet __isset_bit_vector = new BitSet(8);
|
|
|
138 |
|
|
|
139 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
140 |
static {
|
|
|
141 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
142 |
tmpMap.put(_Fields.LOGISTICS_PROVIDER_ID, new org.apache.thrift.meta_data.FieldMetaData("logistics_provider_id", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
143 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
144 |
tmpMap.put(_Fields.PINCODE, new org.apache.thrift.meta_data.FieldMetaData("pincode", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
145 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
146 |
tmpMap.put(_Fields.DELIVERY_TIME, new org.apache.thrift.meta_data.FieldMetaData("deliveryTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
147 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
148 |
tmpMap.put(_Fields.DELIVERY_DELAY, new org.apache.thrift.meta_data.FieldMetaData("delivery_delay", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
149 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
150 |
tmpMap.put(_Fields.COD_ALLOWED, new org.apache.thrift.meta_data.FieldMetaData("codAllowed", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
151 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
|
|
|
152 |
tmpMap.put(_Fields.OTG_AVAILABLE, new org.apache.thrift.meta_data.FieldMetaData("otgAvailable", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
153 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
|
|
|
154 |
tmpMap.put(_Fields.LOGISTICS_COST, new org.apache.thrift.meta_data.FieldMetaData("logisticsCost", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
155 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
|
|
|
156 |
tmpMap.put(_Fields.COD_COLLECTION_CHARGES, new org.apache.thrift.meta_data.FieldMetaData("codCollectionCharges", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
157 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
|
|
|
158 |
tmpMap.put(_Fields.SHIPPING_TIME, new org.apache.thrift.meta_data.FieldMetaData("shippingTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
159 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
160 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
161 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DeliveryEstimateAndCosting.class, metaDataMap);
|
|
|
162 |
}
|
|
|
163 |
|
|
|
164 |
public DeliveryEstimateAndCosting() {
|
|
|
165 |
}
|
|
|
166 |
|
|
|
167 |
public DeliveryEstimateAndCosting(
|
|
|
168 |
long logistics_provider_id,
|
|
|
169 |
String pincode,
|
|
|
170 |
long deliveryTime,
|
|
|
171 |
long delivery_delay,
|
|
|
172 |
boolean codAllowed,
|
|
|
173 |
boolean otgAvailable,
|
|
|
174 |
double logisticsCost,
|
|
|
175 |
double codCollectionCharges,
|
|
|
176 |
long shippingTime)
|
|
|
177 |
{
|
|
|
178 |
this();
|
|
|
179 |
this.logistics_provider_id = logistics_provider_id;
|
|
|
180 |
setLogistics_provider_idIsSet(true);
|
|
|
181 |
this.pincode = pincode;
|
|
|
182 |
this.deliveryTime = deliveryTime;
|
|
|
183 |
setDeliveryTimeIsSet(true);
|
|
|
184 |
this.delivery_delay = delivery_delay;
|
|
|
185 |
setDelivery_delayIsSet(true);
|
|
|
186 |
this.codAllowed = codAllowed;
|
|
|
187 |
setCodAllowedIsSet(true);
|
|
|
188 |
this.otgAvailable = otgAvailable;
|
|
|
189 |
setOtgAvailableIsSet(true);
|
|
|
190 |
this.logisticsCost = logisticsCost;
|
|
|
191 |
setLogisticsCostIsSet(true);
|
|
|
192 |
this.codCollectionCharges = codCollectionCharges;
|
|
|
193 |
setCodCollectionChargesIsSet(true);
|
|
|
194 |
this.shippingTime = shippingTime;
|
|
|
195 |
setShippingTimeIsSet(true);
|
|
|
196 |
}
|
|
|
197 |
|
|
|
198 |
/**
|
|
|
199 |
* Performs a deep copy on <i>other</i>.
|
|
|
200 |
*/
|
|
|
201 |
public DeliveryEstimateAndCosting(DeliveryEstimateAndCosting other) {
|
|
|
202 |
__isset_bit_vector.clear();
|
|
|
203 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
204 |
this.logistics_provider_id = other.logistics_provider_id;
|
|
|
205 |
if (other.isSetPincode()) {
|
|
|
206 |
this.pincode = other.pincode;
|
|
|
207 |
}
|
|
|
208 |
this.deliveryTime = other.deliveryTime;
|
|
|
209 |
this.delivery_delay = other.delivery_delay;
|
|
|
210 |
this.codAllowed = other.codAllowed;
|
|
|
211 |
this.otgAvailable = other.otgAvailable;
|
|
|
212 |
this.logisticsCost = other.logisticsCost;
|
|
|
213 |
this.codCollectionCharges = other.codCollectionCharges;
|
|
|
214 |
this.shippingTime = other.shippingTime;
|
|
|
215 |
}
|
|
|
216 |
|
|
|
217 |
public DeliveryEstimateAndCosting deepCopy() {
|
|
|
218 |
return new DeliveryEstimateAndCosting(this);
|
|
|
219 |
}
|
|
|
220 |
|
|
|
221 |
@Override
|
|
|
222 |
public void clear() {
|
|
|
223 |
setLogistics_provider_idIsSet(false);
|
|
|
224 |
this.logistics_provider_id = 0;
|
|
|
225 |
this.pincode = null;
|
|
|
226 |
setDeliveryTimeIsSet(false);
|
|
|
227 |
this.deliveryTime = 0;
|
|
|
228 |
setDelivery_delayIsSet(false);
|
|
|
229 |
this.delivery_delay = 0;
|
|
|
230 |
setCodAllowedIsSet(false);
|
|
|
231 |
this.codAllowed = false;
|
|
|
232 |
setOtgAvailableIsSet(false);
|
|
|
233 |
this.otgAvailable = false;
|
|
|
234 |
setLogisticsCostIsSet(false);
|
|
|
235 |
this.logisticsCost = 0.0;
|
|
|
236 |
setCodCollectionChargesIsSet(false);
|
|
|
237 |
this.codCollectionCharges = 0.0;
|
|
|
238 |
setShippingTimeIsSet(false);
|
|
|
239 |
this.shippingTime = 0;
|
|
|
240 |
}
|
|
|
241 |
|
|
|
242 |
public long getLogistics_provider_id() {
|
|
|
243 |
return this.logistics_provider_id;
|
|
|
244 |
}
|
|
|
245 |
|
|
|
246 |
public void setLogistics_provider_id(long logistics_provider_id) {
|
|
|
247 |
this.logistics_provider_id = logistics_provider_id;
|
|
|
248 |
setLogistics_provider_idIsSet(true);
|
|
|
249 |
}
|
|
|
250 |
|
|
|
251 |
public void unsetLogistics_provider_id() {
|
|
|
252 |
__isset_bit_vector.clear(__LOGISTICS_PROVIDER_ID_ISSET_ID);
|
|
|
253 |
}
|
|
|
254 |
|
|
|
255 |
/** Returns true if field logistics_provider_id is set (has been assigned a value) and false otherwise */
|
|
|
256 |
public boolean isSetLogistics_provider_id() {
|
|
|
257 |
return __isset_bit_vector.get(__LOGISTICS_PROVIDER_ID_ISSET_ID);
|
|
|
258 |
}
|
|
|
259 |
|
|
|
260 |
public void setLogistics_provider_idIsSet(boolean value) {
|
|
|
261 |
__isset_bit_vector.set(__LOGISTICS_PROVIDER_ID_ISSET_ID, value);
|
|
|
262 |
}
|
|
|
263 |
|
|
|
264 |
public String getPincode() {
|
|
|
265 |
return this.pincode;
|
|
|
266 |
}
|
|
|
267 |
|
|
|
268 |
public void setPincode(String pincode) {
|
|
|
269 |
this.pincode = pincode;
|
|
|
270 |
}
|
|
|
271 |
|
|
|
272 |
public void unsetPincode() {
|
|
|
273 |
this.pincode = null;
|
|
|
274 |
}
|
|
|
275 |
|
|
|
276 |
/** Returns true if field pincode is set (has been assigned a value) and false otherwise */
|
|
|
277 |
public boolean isSetPincode() {
|
|
|
278 |
return this.pincode != null;
|
|
|
279 |
}
|
|
|
280 |
|
|
|
281 |
public void setPincodeIsSet(boolean value) {
|
|
|
282 |
if (!value) {
|
|
|
283 |
this.pincode = null;
|
|
|
284 |
}
|
|
|
285 |
}
|
|
|
286 |
|
|
|
287 |
public long getDeliveryTime() {
|
|
|
288 |
return this.deliveryTime;
|
|
|
289 |
}
|
|
|
290 |
|
|
|
291 |
public void setDeliveryTime(long deliveryTime) {
|
|
|
292 |
this.deliveryTime = deliveryTime;
|
|
|
293 |
setDeliveryTimeIsSet(true);
|
|
|
294 |
}
|
|
|
295 |
|
|
|
296 |
public void unsetDeliveryTime() {
|
|
|
297 |
__isset_bit_vector.clear(__DELIVERYTIME_ISSET_ID);
|
|
|
298 |
}
|
|
|
299 |
|
|
|
300 |
/** Returns true if field deliveryTime is set (has been assigned a value) and false otherwise */
|
|
|
301 |
public boolean isSetDeliveryTime() {
|
|
|
302 |
return __isset_bit_vector.get(__DELIVERYTIME_ISSET_ID);
|
|
|
303 |
}
|
|
|
304 |
|
|
|
305 |
public void setDeliveryTimeIsSet(boolean value) {
|
|
|
306 |
__isset_bit_vector.set(__DELIVERYTIME_ISSET_ID, value);
|
|
|
307 |
}
|
|
|
308 |
|
|
|
309 |
public long getDelivery_delay() {
|
|
|
310 |
return this.delivery_delay;
|
|
|
311 |
}
|
|
|
312 |
|
|
|
313 |
public void setDelivery_delay(long delivery_delay) {
|
|
|
314 |
this.delivery_delay = delivery_delay;
|
|
|
315 |
setDelivery_delayIsSet(true);
|
|
|
316 |
}
|
|
|
317 |
|
|
|
318 |
public void unsetDelivery_delay() {
|
|
|
319 |
__isset_bit_vector.clear(__DELIVERY_DELAY_ISSET_ID);
|
|
|
320 |
}
|
|
|
321 |
|
|
|
322 |
/** Returns true if field delivery_delay is set (has been assigned a value) and false otherwise */
|
|
|
323 |
public boolean isSetDelivery_delay() {
|
|
|
324 |
return __isset_bit_vector.get(__DELIVERY_DELAY_ISSET_ID);
|
|
|
325 |
}
|
|
|
326 |
|
|
|
327 |
public void setDelivery_delayIsSet(boolean value) {
|
|
|
328 |
__isset_bit_vector.set(__DELIVERY_DELAY_ISSET_ID, value);
|
|
|
329 |
}
|
|
|
330 |
|
|
|
331 |
public boolean isCodAllowed() {
|
|
|
332 |
return this.codAllowed;
|
|
|
333 |
}
|
|
|
334 |
|
|
|
335 |
public void setCodAllowed(boolean codAllowed) {
|
|
|
336 |
this.codAllowed = codAllowed;
|
|
|
337 |
setCodAllowedIsSet(true);
|
|
|
338 |
}
|
|
|
339 |
|
|
|
340 |
public void unsetCodAllowed() {
|
|
|
341 |
__isset_bit_vector.clear(__CODALLOWED_ISSET_ID);
|
|
|
342 |
}
|
|
|
343 |
|
|
|
344 |
/** Returns true if field codAllowed is set (has been assigned a value) and false otherwise */
|
|
|
345 |
public boolean isSetCodAllowed() {
|
|
|
346 |
return __isset_bit_vector.get(__CODALLOWED_ISSET_ID);
|
|
|
347 |
}
|
|
|
348 |
|
|
|
349 |
public void setCodAllowedIsSet(boolean value) {
|
|
|
350 |
__isset_bit_vector.set(__CODALLOWED_ISSET_ID, value);
|
|
|
351 |
}
|
|
|
352 |
|
|
|
353 |
public boolean isOtgAvailable() {
|
|
|
354 |
return this.otgAvailable;
|
|
|
355 |
}
|
|
|
356 |
|
|
|
357 |
public void setOtgAvailable(boolean otgAvailable) {
|
|
|
358 |
this.otgAvailable = otgAvailable;
|
|
|
359 |
setOtgAvailableIsSet(true);
|
|
|
360 |
}
|
|
|
361 |
|
|
|
362 |
public void unsetOtgAvailable() {
|
|
|
363 |
__isset_bit_vector.clear(__OTGAVAILABLE_ISSET_ID);
|
|
|
364 |
}
|
|
|
365 |
|
|
|
366 |
/** Returns true if field otgAvailable is set (has been assigned a value) and false otherwise */
|
|
|
367 |
public boolean isSetOtgAvailable() {
|
|
|
368 |
return __isset_bit_vector.get(__OTGAVAILABLE_ISSET_ID);
|
|
|
369 |
}
|
|
|
370 |
|
|
|
371 |
public void setOtgAvailableIsSet(boolean value) {
|
|
|
372 |
__isset_bit_vector.set(__OTGAVAILABLE_ISSET_ID, value);
|
|
|
373 |
}
|
|
|
374 |
|
|
|
375 |
public double getLogisticsCost() {
|
|
|
376 |
return this.logisticsCost;
|
|
|
377 |
}
|
|
|
378 |
|
|
|
379 |
public void setLogisticsCost(double logisticsCost) {
|
|
|
380 |
this.logisticsCost = logisticsCost;
|
|
|
381 |
setLogisticsCostIsSet(true);
|
|
|
382 |
}
|
|
|
383 |
|
|
|
384 |
public void unsetLogisticsCost() {
|
|
|
385 |
__isset_bit_vector.clear(__LOGISTICSCOST_ISSET_ID);
|
|
|
386 |
}
|
|
|
387 |
|
|
|
388 |
/** Returns true if field logisticsCost is set (has been assigned a value) and false otherwise */
|
|
|
389 |
public boolean isSetLogisticsCost() {
|
|
|
390 |
return __isset_bit_vector.get(__LOGISTICSCOST_ISSET_ID);
|
|
|
391 |
}
|
|
|
392 |
|
|
|
393 |
public void setLogisticsCostIsSet(boolean value) {
|
|
|
394 |
__isset_bit_vector.set(__LOGISTICSCOST_ISSET_ID, value);
|
|
|
395 |
}
|
|
|
396 |
|
|
|
397 |
public double getCodCollectionCharges() {
|
|
|
398 |
return this.codCollectionCharges;
|
|
|
399 |
}
|
|
|
400 |
|
|
|
401 |
public void setCodCollectionCharges(double codCollectionCharges) {
|
|
|
402 |
this.codCollectionCharges = codCollectionCharges;
|
|
|
403 |
setCodCollectionChargesIsSet(true);
|
|
|
404 |
}
|
|
|
405 |
|
|
|
406 |
public void unsetCodCollectionCharges() {
|
|
|
407 |
__isset_bit_vector.clear(__CODCOLLECTIONCHARGES_ISSET_ID);
|
|
|
408 |
}
|
|
|
409 |
|
|
|
410 |
/** Returns true if field codCollectionCharges is set (has been assigned a value) and false otherwise */
|
|
|
411 |
public boolean isSetCodCollectionCharges() {
|
|
|
412 |
return __isset_bit_vector.get(__CODCOLLECTIONCHARGES_ISSET_ID);
|
|
|
413 |
}
|
|
|
414 |
|
|
|
415 |
public void setCodCollectionChargesIsSet(boolean value) {
|
|
|
416 |
__isset_bit_vector.set(__CODCOLLECTIONCHARGES_ISSET_ID, value);
|
|
|
417 |
}
|
|
|
418 |
|
|
|
419 |
public long getShippingTime() {
|
|
|
420 |
return this.shippingTime;
|
|
|
421 |
}
|
|
|
422 |
|
|
|
423 |
public void setShippingTime(long shippingTime) {
|
|
|
424 |
this.shippingTime = shippingTime;
|
|
|
425 |
setShippingTimeIsSet(true);
|
|
|
426 |
}
|
|
|
427 |
|
|
|
428 |
public void unsetShippingTime() {
|
|
|
429 |
__isset_bit_vector.clear(__SHIPPINGTIME_ISSET_ID);
|
|
|
430 |
}
|
|
|
431 |
|
|
|
432 |
/** Returns true if field shippingTime is set (has been assigned a value) and false otherwise */
|
|
|
433 |
public boolean isSetShippingTime() {
|
|
|
434 |
return __isset_bit_vector.get(__SHIPPINGTIME_ISSET_ID);
|
|
|
435 |
}
|
|
|
436 |
|
|
|
437 |
public void setShippingTimeIsSet(boolean value) {
|
|
|
438 |
__isset_bit_vector.set(__SHIPPINGTIME_ISSET_ID, value);
|
|
|
439 |
}
|
|
|
440 |
|
|
|
441 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
442 |
switch (field) {
|
|
|
443 |
case LOGISTICS_PROVIDER_ID:
|
|
|
444 |
if (value == null) {
|
|
|
445 |
unsetLogistics_provider_id();
|
|
|
446 |
} else {
|
|
|
447 |
setLogistics_provider_id((Long)value);
|
|
|
448 |
}
|
|
|
449 |
break;
|
|
|
450 |
|
|
|
451 |
case PINCODE:
|
|
|
452 |
if (value == null) {
|
|
|
453 |
unsetPincode();
|
|
|
454 |
} else {
|
|
|
455 |
setPincode((String)value);
|
|
|
456 |
}
|
|
|
457 |
break;
|
|
|
458 |
|
|
|
459 |
case DELIVERY_TIME:
|
|
|
460 |
if (value == null) {
|
|
|
461 |
unsetDeliveryTime();
|
|
|
462 |
} else {
|
|
|
463 |
setDeliveryTime((Long)value);
|
|
|
464 |
}
|
|
|
465 |
break;
|
|
|
466 |
|
|
|
467 |
case DELIVERY_DELAY:
|
|
|
468 |
if (value == null) {
|
|
|
469 |
unsetDelivery_delay();
|
|
|
470 |
} else {
|
|
|
471 |
setDelivery_delay((Long)value);
|
|
|
472 |
}
|
|
|
473 |
break;
|
|
|
474 |
|
|
|
475 |
case COD_ALLOWED:
|
|
|
476 |
if (value == null) {
|
|
|
477 |
unsetCodAllowed();
|
|
|
478 |
} else {
|
|
|
479 |
setCodAllowed((Boolean)value);
|
|
|
480 |
}
|
|
|
481 |
break;
|
|
|
482 |
|
|
|
483 |
case OTG_AVAILABLE:
|
|
|
484 |
if (value == null) {
|
|
|
485 |
unsetOtgAvailable();
|
|
|
486 |
} else {
|
|
|
487 |
setOtgAvailable((Boolean)value);
|
|
|
488 |
}
|
|
|
489 |
break;
|
|
|
490 |
|
|
|
491 |
case LOGISTICS_COST:
|
|
|
492 |
if (value == null) {
|
|
|
493 |
unsetLogisticsCost();
|
|
|
494 |
} else {
|
|
|
495 |
setLogisticsCost((Double)value);
|
|
|
496 |
}
|
|
|
497 |
break;
|
|
|
498 |
|
|
|
499 |
case COD_COLLECTION_CHARGES:
|
|
|
500 |
if (value == null) {
|
|
|
501 |
unsetCodCollectionCharges();
|
|
|
502 |
} else {
|
|
|
503 |
setCodCollectionCharges((Double)value);
|
|
|
504 |
}
|
|
|
505 |
break;
|
|
|
506 |
|
|
|
507 |
case SHIPPING_TIME:
|
|
|
508 |
if (value == null) {
|
|
|
509 |
unsetShippingTime();
|
|
|
510 |
} else {
|
|
|
511 |
setShippingTime((Long)value);
|
|
|
512 |
}
|
|
|
513 |
break;
|
|
|
514 |
|
|
|
515 |
}
|
|
|
516 |
}
|
|
|
517 |
|
|
|
518 |
public Object getFieldValue(_Fields field) {
|
|
|
519 |
switch (field) {
|
|
|
520 |
case LOGISTICS_PROVIDER_ID:
|
|
|
521 |
return Long.valueOf(getLogistics_provider_id());
|
|
|
522 |
|
|
|
523 |
case PINCODE:
|
|
|
524 |
return getPincode();
|
|
|
525 |
|
|
|
526 |
case DELIVERY_TIME:
|
|
|
527 |
return Long.valueOf(getDeliveryTime());
|
|
|
528 |
|
|
|
529 |
case DELIVERY_DELAY:
|
|
|
530 |
return Long.valueOf(getDelivery_delay());
|
|
|
531 |
|
|
|
532 |
case COD_ALLOWED:
|
|
|
533 |
return Boolean.valueOf(isCodAllowed());
|
|
|
534 |
|
|
|
535 |
case OTG_AVAILABLE:
|
|
|
536 |
return Boolean.valueOf(isOtgAvailable());
|
|
|
537 |
|
|
|
538 |
case LOGISTICS_COST:
|
|
|
539 |
return Double.valueOf(getLogisticsCost());
|
|
|
540 |
|
|
|
541 |
case COD_COLLECTION_CHARGES:
|
|
|
542 |
return Double.valueOf(getCodCollectionCharges());
|
|
|
543 |
|
|
|
544 |
case SHIPPING_TIME:
|
|
|
545 |
return Long.valueOf(getShippingTime());
|
|
|
546 |
|
|
|
547 |
}
|
|
|
548 |
throw new IllegalStateException();
|
|
|
549 |
}
|
|
|
550 |
|
|
|
551 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
552 |
public boolean isSet(_Fields field) {
|
|
|
553 |
if (field == null) {
|
|
|
554 |
throw new IllegalArgumentException();
|
|
|
555 |
}
|
|
|
556 |
|
|
|
557 |
switch (field) {
|
|
|
558 |
case LOGISTICS_PROVIDER_ID:
|
|
|
559 |
return isSetLogistics_provider_id();
|
|
|
560 |
case PINCODE:
|
|
|
561 |
return isSetPincode();
|
|
|
562 |
case DELIVERY_TIME:
|
|
|
563 |
return isSetDeliveryTime();
|
|
|
564 |
case DELIVERY_DELAY:
|
|
|
565 |
return isSetDelivery_delay();
|
|
|
566 |
case COD_ALLOWED:
|
|
|
567 |
return isSetCodAllowed();
|
|
|
568 |
case OTG_AVAILABLE:
|
|
|
569 |
return isSetOtgAvailable();
|
|
|
570 |
case LOGISTICS_COST:
|
|
|
571 |
return isSetLogisticsCost();
|
|
|
572 |
case COD_COLLECTION_CHARGES:
|
|
|
573 |
return isSetCodCollectionCharges();
|
|
|
574 |
case SHIPPING_TIME:
|
|
|
575 |
return isSetShippingTime();
|
|
|
576 |
}
|
|
|
577 |
throw new IllegalStateException();
|
|
|
578 |
}
|
|
|
579 |
|
|
|
580 |
@Override
|
|
|
581 |
public boolean equals(Object that) {
|
|
|
582 |
if (that == null)
|
|
|
583 |
return false;
|
|
|
584 |
if (that instanceof DeliveryEstimateAndCosting)
|
|
|
585 |
return this.equals((DeliveryEstimateAndCosting)that);
|
|
|
586 |
return false;
|
|
|
587 |
}
|
|
|
588 |
|
|
|
589 |
public boolean equals(DeliveryEstimateAndCosting that) {
|
|
|
590 |
if (that == null)
|
|
|
591 |
return false;
|
|
|
592 |
|
|
|
593 |
boolean this_present_logistics_provider_id = true;
|
|
|
594 |
boolean that_present_logistics_provider_id = true;
|
|
|
595 |
if (this_present_logistics_provider_id || that_present_logistics_provider_id) {
|
|
|
596 |
if (!(this_present_logistics_provider_id && that_present_logistics_provider_id))
|
|
|
597 |
return false;
|
|
|
598 |
if (this.logistics_provider_id != that.logistics_provider_id)
|
|
|
599 |
return false;
|
|
|
600 |
}
|
|
|
601 |
|
|
|
602 |
boolean this_present_pincode = true && this.isSetPincode();
|
|
|
603 |
boolean that_present_pincode = true && that.isSetPincode();
|
|
|
604 |
if (this_present_pincode || that_present_pincode) {
|
|
|
605 |
if (!(this_present_pincode && that_present_pincode))
|
|
|
606 |
return false;
|
|
|
607 |
if (!this.pincode.equals(that.pincode))
|
|
|
608 |
return false;
|
|
|
609 |
}
|
|
|
610 |
|
|
|
611 |
boolean this_present_deliveryTime = true;
|
|
|
612 |
boolean that_present_deliveryTime = true;
|
|
|
613 |
if (this_present_deliveryTime || that_present_deliveryTime) {
|
|
|
614 |
if (!(this_present_deliveryTime && that_present_deliveryTime))
|
|
|
615 |
return false;
|
|
|
616 |
if (this.deliveryTime != that.deliveryTime)
|
|
|
617 |
return false;
|
|
|
618 |
}
|
|
|
619 |
|
|
|
620 |
boolean this_present_delivery_delay = true;
|
|
|
621 |
boolean that_present_delivery_delay = true;
|
|
|
622 |
if (this_present_delivery_delay || that_present_delivery_delay) {
|
|
|
623 |
if (!(this_present_delivery_delay && that_present_delivery_delay))
|
|
|
624 |
return false;
|
|
|
625 |
if (this.delivery_delay != that.delivery_delay)
|
|
|
626 |
return false;
|
|
|
627 |
}
|
|
|
628 |
|
|
|
629 |
boolean this_present_codAllowed = true;
|
|
|
630 |
boolean that_present_codAllowed = true;
|
|
|
631 |
if (this_present_codAllowed || that_present_codAllowed) {
|
|
|
632 |
if (!(this_present_codAllowed && that_present_codAllowed))
|
|
|
633 |
return false;
|
|
|
634 |
if (this.codAllowed != that.codAllowed)
|
|
|
635 |
return false;
|
|
|
636 |
}
|
|
|
637 |
|
|
|
638 |
boolean this_present_otgAvailable = true;
|
|
|
639 |
boolean that_present_otgAvailable = true;
|
|
|
640 |
if (this_present_otgAvailable || that_present_otgAvailable) {
|
|
|
641 |
if (!(this_present_otgAvailable && that_present_otgAvailable))
|
|
|
642 |
return false;
|
|
|
643 |
if (this.otgAvailable != that.otgAvailable)
|
|
|
644 |
return false;
|
|
|
645 |
}
|
|
|
646 |
|
|
|
647 |
boolean this_present_logisticsCost = true;
|
|
|
648 |
boolean that_present_logisticsCost = true;
|
|
|
649 |
if (this_present_logisticsCost || that_present_logisticsCost) {
|
|
|
650 |
if (!(this_present_logisticsCost && that_present_logisticsCost))
|
|
|
651 |
return false;
|
|
|
652 |
if (this.logisticsCost != that.logisticsCost)
|
|
|
653 |
return false;
|
|
|
654 |
}
|
|
|
655 |
|
|
|
656 |
boolean this_present_codCollectionCharges = true;
|
|
|
657 |
boolean that_present_codCollectionCharges = true;
|
|
|
658 |
if (this_present_codCollectionCharges || that_present_codCollectionCharges) {
|
|
|
659 |
if (!(this_present_codCollectionCharges && that_present_codCollectionCharges))
|
|
|
660 |
return false;
|
|
|
661 |
if (this.codCollectionCharges != that.codCollectionCharges)
|
|
|
662 |
return false;
|
|
|
663 |
}
|
|
|
664 |
|
|
|
665 |
boolean this_present_shippingTime = true;
|
|
|
666 |
boolean that_present_shippingTime = true;
|
|
|
667 |
if (this_present_shippingTime || that_present_shippingTime) {
|
|
|
668 |
if (!(this_present_shippingTime && that_present_shippingTime))
|
|
|
669 |
return false;
|
|
|
670 |
if (this.shippingTime != that.shippingTime)
|
|
|
671 |
return false;
|
|
|
672 |
}
|
|
|
673 |
|
|
|
674 |
return true;
|
|
|
675 |
}
|
|
|
676 |
|
|
|
677 |
@Override
|
|
|
678 |
public int hashCode() {
|
|
|
679 |
return 0;
|
|
|
680 |
}
|
|
|
681 |
|
|
|
682 |
public int compareTo(DeliveryEstimateAndCosting other) {
|
|
|
683 |
if (!getClass().equals(other.getClass())) {
|
|
|
684 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
685 |
}
|
|
|
686 |
|
|
|
687 |
int lastComparison = 0;
|
|
|
688 |
DeliveryEstimateAndCosting typedOther = (DeliveryEstimateAndCosting)other;
|
|
|
689 |
|
|
|
690 |
lastComparison = Boolean.valueOf(isSetLogistics_provider_id()).compareTo(typedOther.isSetLogistics_provider_id());
|
|
|
691 |
if (lastComparison != 0) {
|
|
|
692 |
return lastComparison;
|
|
|
693 |
}
|
|
|
694 |
if (isSetLogistics_provider_id()) {
|
|
|
695 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.logistics_provider_id, typedOther.logistics_provider_id);
|
|
|
696 |
if (lastComparison != 0) {
|
|
|
697 |
return lastComparison;
|
|
|
698 |
}
|
|
|
699 |
}
|
|
|
700 |
lastComparison = Boolean.valueOf(isSetPincode()).compareTo(typedOther.isSetPincode());
|
|
|
701 |
if (lastComparison != 0) {
|
|
|
702 |
return lastComparison;
|
|
|
703 |
}
|
|
|
704 |
if (isSetPincode()) {
|
|
|
705 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pincode, typedOther.pincode);
|
|
|
706 |
if (lastComparison != 0) {
|
|
|
707 |
return lastComparison;
|
|
|
708 |
}
|
|
|
709 |
}
|
|
|
710 |
lastComparison = Boolean.valueOf(isSetDeliveryTime()).compareTo(typedOther.isSetDeliveryTime());
|
|
|
711 |
if (lastComparison != 0) {
|
|
|
712 |
return lastComparison;
|
|
|
713 |
}
|
|
|
714 |
if (isSetDeliveryTime()) {
|
|
|
715 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deliveryTime, typedOther.deliveryTime);
|
|
|
716 |
if (lastComparison != 0) {
|
|
|
717 |
return lastComparison;
|
|
|
718 |
}
|
|
|
719 |
}
|
|
|
720 |
lastComparison = Boolean.valueOf(isSetDelivery_delay()).compareTo(typedOther.isSetDelivery_delay());
|
|
|
721 |
if (lastComparison != 0) {
|
|
|
722 |
return lastComparison;
|
|
|
723 |
}
|
|
|
724 |
if (isSetDelivery_delay()) {
|
|
|
725 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delivery_delay, typedOther.delivery_delay);
|
|
|
726 |
if (lastComparison != 0) {
|
|
|
727 |
return lastComparison;
|
|
|
728 |
}
|
|
|
729 |
}
|
|
|
730 |
lastComparison = Boolean.valueOf(isSetCodAllowed()).compareTo(typedOther.isSetCodAllowed());
|
|
|
731 |
if (lastComparison != 0) {
|
|
|
732 |
return lastComparison;
|
|
|
733 |
}
|
|
|
734 |
if (isSetCodAllowed()) {
|
|
|
735 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.codAllowed, typedOther.codAllowed);
|
|
|
736 |
if (lastComparison != 0) {
|
|
|
737 |
return lastComparison;
|
|
|
738 |
}
|
|
|
739 |
}
|
|
|
740 |
lastComparison = Boolean.valueOf(isSetOtgAvailable()).compareTo(typedOther.isSetOtgAvailable());
|
|
|
741 |
if (lastComparison != 0) {
|
|
|
742 |
return lastComparison;
|
|
|
743 |
}
|
|
|
744 |
if (isSetOtgAvailable()) {
|
|
|
745 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.otgAvailable, typedOther.otgAvailable);
|
|
|
746 |
if (lastComparison != 0) {
|
|
|
747 |
return lastComparison;
|
|
|
748 |
}
|
|
|
749 |
}
|
|
|
750 |
lastComparison = Boolean.valueOf(isSetLogisticsCost()).compareTo(typedOther.isSetLogisticsCost());
|
|
|
751 |
if (lastComparison != 0) {
|
|
|
752 |
return lastComparison;
|
|
|
753 |
}
|
|
|
754 |
if (isSetLogisticsCost()) {
|
|
|
755 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.logisticsCost, typedOther.logisticsCost);
|
|
|
756 |
if (lastComparison != 0) {
|
|
|
757 |
return lastComparison;
|
|
|
758 |
}
|
|
|
759 |
}
|
|
|
760 |
lastComparison = Boolean.valueOf(isSetCodCollectionCharges()).compareTo(typedOther.isSetCodCollectionCharges());
|
|
|
761 |
if (lastComparison != 0) {
|
|
|
762 |
return lastComparison;
|
|
|
763 |
}
|
|
|
764 |
if (isSetCodCollectionCharges()) {
|
|
|
765 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.codCollectionCharges, typedOther.codCollectionCharges);
|
|
|
766 |
if (lastComparison != 0) {
|
|
|
767 |
return lastComparison;
|
|
|
768 |
}
|
|
|
769 |
}
|
|
|
770 |
lastComparison = Boolean.valueOf(isSetShippingTime()).compareTo(typedOther.isSetShippingTime());
|
|
|
771 |
if (lastComparison != 0) {
|
|
|
772 |
return lastComparison;
|
|
|
773 |
}
|
|
|
774 |
if (isSetShippingTime()) {
|
|
|
775 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shippingTime, typedOther.shippingTime);
|
|
|
776 |
if (lastComparison != 0) {
|
|
|
777 |
return lastComparison;
|
|
|
778 |
}
|
|
|
779 |
}
|
|
|
780 |
return 0;
|
|
|
781 |
}
|
|
|
782 |
|
|
|
783 |
public _Fields fieldForId(int fieldId) {
|
|
|
784 |
return _Fields.findByThriftId(fieldId);
|
|
|
785 |
}
|
|
|
786 |
|
|
|
787 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
788 |
org.apache.thrift.protocol.TField field;
|
|
|
789 |
iprot.readStructBegin();
|
|
|
790 |
while (true)
|
|
|
791 |
{
|
|
|
792 |
field = iprot.readFieldBegin();
|
|
|
793 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
794 |
break;
|
|
|
795 |
}
|
|
|
796 |
switch (field.id) {
|
|
|
797 |
case 1: // LOGISTICS_PROVIDER_ID
|
|
|
798 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
799 |
this.logistics_provider_id = iprot.readI64();
|
|
|
800 |
setLogistics_provider_idIsSet(true);
|
|
|
801 |
} else {
|
|
|
802 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
803 |
}
|
|
|
804 |
break;
|
|
|
805 |
case 2: // PINCODE
|
|
|
806 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
807 |
this.pincode = iprot.readString();
|
|
|
808 |
} else {
|
|
|
809 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
810 |
}
|
|
|
811 |
break;
|
|
|
812 |
case 3: // DELIVERY_TIME
|
|
|
813 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
814 |
this.deliveryTime = iprot.readI64();
|
|
|
815 |
setDeliveryTimeIsSet(true);
|
|
|
816 |
} else {
|
|
|
817 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
818 |
}
|
|
|
819 |
break;
|
|
|
820 |
case 4: // DELIVERY_DELAY
|
|
|
821 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
822 |
this.delivery_delay = iprot.readI64();
|
|
|
823 |
setDelivery_delayIsSet(true);
|
|
|
824 |
} else {
|
|
|
825 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
826 |
}
|
|
|
827 |
break;
|
|
|
828 |
case 5: // COD_ALLOWED
|
|
|
829 |
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
|
|
|
830 |
this.codAllowed = iprot.readBool();
|
|
|
831 |
setCodAllowedIsSet(true);
|
|
|
832 |
} else {
|
|
|
833 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
834 |
}
|
|
|
835 |
break;
|
|
|
836 |
case 6: // OTG_AVAILABLE
|
|
|
837 |
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
|
|
|
838 |
this.otgAvailable = iprot.readBool();
|
|
|
839 |
setOtgAvailableIsSet(true);
|
|
|
840 |
} else {
|
|
|
841 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
842 |
}
|
|
|
843 |
break;
|
|
|
844 |
case 7: // LOGISTICS_COST
|
|
|
845 |
if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
|
|
|
846 |
this.logisticsCost = iprot.readDouble();
|
|
|
847 |
setLogisticsCostIsSet(true);
|
|
|
848 |
} else {
|
|
|
849 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
850 |
}
|
|
|
851 |
break;
|
|
|
852 |
case 8: // COD_COLLECTION_CHARGES
|
|
|
853 |
if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
|
|
|
854 |
this.codCollectionCharges = iprot.readDouble();
|
|
|
855 |
setCodCollectionChargesIsSet(true);
|
|
|
856 |
} else {
|
|
|
857 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
858 |
}
|
|
|
859 |
break;
|
|
|
860 |
case 9: // SHIPPING_TIME
|
|
|
861 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
862 |
this.shippingTime = iprot.readI64();
|
|
|
863 |
setShippingTimeIsSet(true);
|
|
|
864 |
} else {
|
|
|
865 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
866 |
}
|
|
|
867 |
break;
|
|
|
868 |
default:
|
|
|
869 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
870 |
}
|
|
|
871 |
iprot.readFieldEnd();
|
|
|
872 |
}
|
|
|
873 |
iprot.readStructEnd();
|
|
|
874 |
validate();
|
|
|
875 |
}
|
|
|
876 |
|
|
|
877 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
878 |
validate();
|
|
|
879 |
|
|
|
880 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
881 |
oprot.writeFieldBegin(LOGISTICS_PROVIDER_ID_FIELD_DESC);
|
|
|
882 |
oprot.writeI64(this.logistics_provider_id);
|
|
|
883 |
oprot.writeFieldEnd();
|
|
|
884 |
if (this.pincode != null) {
|
|
|
885 |
oprot.writeFieldBegin(PINCODE_FIELD_DESC);
|
|
|
886 |
oprot.writeString(this.pincode);
|
|
|
887 |
oprot.writeFieldEnd();
|
|
|
888 |
}
|
|
|
889 |
oprot.writeFieldBegin(DELIVERY_TIME_FIELD_DESC);
|
|
|
890 |
oprot.writeI64(this.deliveryTime);
|
|
|
891 |
oprot.writeFieldEnd();
|
|
|
892 |
oprot.writeFieldBegin(DELIVERY_DELAY_FIELD_DESC);
|
|
|
893 |
oprot.writeI64(this.delivery_delay);
|
|
|
894 |
oprot.writeFieldEnd();
|
|
|
895 |
oprot.writeFieldBegin(COD_ALLOWED_FIELD_DESC);
|
|
|
896 |
oprot.writeBool(this.codAllowed);
|
|
|
897 |
oprot.writeFieldEnd();
|
|
|
898 |
oprot.writeFieldBegin(OTG_AVAILABLE_FIELD_DESC);
|
|
|
899 |
oprot.writeBool(this.otgAvailable);
|
|
|
900 |
oprot.writeFieldEnd();
|
|
|
901 |
oprot.writeFieldBegin(LOGISTICS_COST_FIELD_DESC);
|
|
|
902 |
oprot.writeDouble(this.logisticsCost);
|
|
|
903 |
oprot.writeFieldEnd();
|
|
|
904 |
oprot.writeFieldBegin(COD_COLLECTION_CHARGES_FIELD_DESC);
|
|
|
905 |
oprot.writeDouble(this.codCollectionCharges);
|
|
|
906 |
oprot.writeFieldEnd();
|
|
|
907 |
oprot.writeFieldBegin(SHIPPING_TIME_FIELD_DESC);
|
|
|
908 |
oprot.writeI64(this.shippingTime);
|
|
|
909 |
oprot.writeFieldEnd();
|
|
|
910 |
oprot.writeFieldStop();
|
|
|
911 |
oprot.writeStructEnd();
|
|
|
912 |
}
|
|
|
913 |
|
|
|
914 |
@Override
|
|
|
915 |
public String toString() {
|
|
|
916 |
StringBuilder sb = new StringBuilder("DeliveryEstimateAndCosting(");
|
|
|
917 |
boolean first = true;
|
|
|
918 |
|
|
|
919 |
sb.append("logistics_provider_id:");
|
|
|
920 |
sb.append(this.logistics_provider_id);
|
|
|
921 |
first = false;
|
|
|
922 |
if (!first) sb.append(", ");
|
|
|
923 |
sb.append("pincode:");
|
|
|
924 |
if (this.pincode == null) {
|
|
|
925 |
sb.append("null");
|
|
|
926 |
} else {
|
|
|
927 |
sb.append(this.pincode);
|
|
|
928 |
}
|
|
|
929 |
first = false;
|
|
|
930 |
if (!first) sb.append(", ");
|
|
|
931 |
sb.append("deliveryTime:");
|
|
|
932 |
sb.append(this.deliveryTime);
|
|
|
933 |
first = false;
|
|
|
934 |
if (!first) sb.append(", ");
|
|
|
935 |
sb.append("delivery_delay:");
|
|
|
936 |
sb.append(this.delivery_delay);
|
|
|
937 |
first = false;
|
|
|
938 |
if (!first) sb.append(", ");
|
|
|
939 |
sb.append("codAllowed:");
|
|
|
940 |
sb.append(this.codAllowed);
|
|
|
941 |
first = false;
|
|
|
942 |
if (!first) sb.append(", ");
|
|
|
943 |
sb.append("otgAvailable:");
|
|
|
944 |
sb.append(this.otgAvailable);
|
|
|
945 |
first = false;
|
|
|
946 |
if (!first) sb.append(", ");
|
|
|
947 |
sb.append("logisticsCost:");
|
|
|
948 |
sb.append(this.logisticsCost);
|
|
|
949 |
first = false;
|
|
|
950 |
if (!first) sb.append(", ");
|
|
|
951 |
sb.append("codCollectionCharges:");
|
|
|
952 |
sb.append(this.codCollectionCharges);
|
|
|
953 |
first = false;
|
|
|
954 |
if (!first) sb.append(", ");
|
|
|
955 |
sb.append("shippingTime:");
|
|
|
956 |
sb.append(this.shippingTime);
|
|
|
957 |
first = false;
|
|
|
958 |
sb.append(")");
|
|
|
959 |
return sb.toString();
|
|
|
960 |
}
|
|
|
961 |
|
|
|
962 |
public void validate() throws org.apache.thrift.TException {
|
|
|
963 |
// check for required fields
|
|
|
964 |
}
|
|
|
965 |
|
|
|
966 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
967 |
try {
|
|
|
968 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
969 |
} catch (org.apache.thrift.TException te) {
|
|
|
970 |
throw new java.io.IOException(te);
|
|
|
971 |
}
|
|
|
972 |
}
|
|
|
973 |
|
|
|
974 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
975 |
try {
|
|
|
976 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
977 |
__isset_bit_vector = new BitSet(1);
|
|
|
978 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
979 |
} catch (org.apache.thrift.TException te) {
|
|
|
980 |
throw new java.io.IOException(te);
|
|
|
981 |
}
|
|
|
982 |
}
|
|
|
983 |
|
|
|
984 |
}
|
|
|
985 |
|