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