| 1982 |
varun.gupt |
1 |
/**
|
| 3430 |
rajveer |
2 |
* Autogenerated by Thrift Compiler (0.7.0)
|
| 1982 |
varun.gupt |
3 |
*
|
|
|
4 |
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
|
5 |
*/
|
|
|
6 |
package in.shop2020.model.v1.user;
|
|
|
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;
|
| 1982 |
varun.gupt |
19 |
import java.util.Arrays;
|
|
|
20 |
import org.slf4j.Logger;
|
|
|
21 |
import org.slf4j.LoggerFactory;
|
|
|
22 |
|
|
|
23 |
public class PromotionService {
|
|
|
24 |
|
|
|
25 |
/**
|
|
|
26 |
* Promotion Service
|
|
|
27 |
*/
|
| 3374 |
rajveer |
28 |
public interface Iface extends in.shop2020.generic.GenericService.Iface {
|
| 1982 |
varun.gupt |
29 |
|
| 3430 |
rajveer |
30 |
public void createPromotion(String name, String ruleExecutionSrc, long startOn, long endOn) throws PromotionException, org.apache.thrift.TException;
|
| 1982 |
varun.gupt |
31 |
|
| 6301 |
amit.gupta |
32 |
public Coupon getCoupon(String couponCode) throws PromotionException, org.apache.thrift.TException;
|
|
|
33 |
|
|
|
34 |
public boolean isGiftVoucher(String couponCode) throws PromotionException, org.apache.thrift.TException;
|
|
|
35 |
|
| 6356 |
amit.gupta |
36 |
public boolean isCodApplicable(String couponCode) throws PromotionException, org.apache.thrift.TException;
|
|
|
37 |
|
| 3430 |
rajveer |
38 |
public List<Promotion> getAllPromotions() throws PromotionException, org.apache.thrift.TException;
|
| 1982 |
varun.gupt |
39 |
|
| 3430 |
rajveer |
40 |
public Promotion getPromotionById(long promotionId) throws PromotionException, org.apache.thrift.TException;
|
| 1982 |
varun.gupt |
41 |
|
| 3430 |
rajveer |
42 |
public void generateCouponsForPromotion(long promotionId, String couponCode) throws PromotionException, org.apache.thrift.TException;
|
| 1982 |
varun.gupt |
43 |
|
| 3430 |
rajveer |
44 |
public Cart applyCoupon(String couponCode, long cartId) throws PromotionException, org.apache.thrift.TException;
|
| 1982 |
varun.gupt |
45 |
|
| 6736 |
amit.gupta |
46 |
public Map<Long,Double> getEmiDiscount(long cartId) throws PromotionException, org.apache.thrift.TException;
|
|
|
47 |
|
| 6433 |
anupam.sin |
48 |
public Map<Long,String> applyRechargeCoupon(String couponCode, long totalAmount, long userId) throws PromotionException, org.apache.thrift.TException;
|
|
|
49 |
|
| 3430 |
rajveer |
50 |
public void trackCouponUsage(String couponCode, long transactionId, long userId) throws PromotionException, org.apache.thrift.TException;
|
| 1982 |
varun.gupt |
51 |
|
| 3430 |
rajveer |
52 |
public long getCouponUsageCountByUser(String couponCode, long userId) throws PromotionException, org.apache.thrift.TException;
|
| 1982 |
varun.gupt |
53 |
|
| 6497 |
amit.gupta |
54 |
public List<Coupon> getActiveCodes(long promotionId) throws PromotionException, org.apache.thrift.TException;
|
|
|
55 |
|
|
|
56 |
public void deleteCoupon(String couponCode) throws PromotionException, org.apache.thrift.TException;
|
|
|
57 |
|
| 3385 |
varun.gupt |
58 |
/**
|
|
|
59 |
* Returns a list of active coupons
|
|
|
60 |
*/
|
| 3430 |
rajveer |
61 |
public List<Coupon> getActiveCoupons() throws PromotionException, org.apache.thrift.TException;
|
| 3385 |
varun.gupt |
62 |
|
|
|
63 |
/**
|
| 6561 |
amit.gupta |
64 |
* Creates a coupon with prefix (optional, pass null)and returns couponcode if successfully created.
|
| 6250 |
amit.gupta |
65 |
*
|
|
|
66 |
* @param promotionId
|
| 6730 |
anupam.sin |
67 |
* @param couponCode
|
| 6679 |
anupam.sin |
68 |
* @param arguments
|
| 6356 |
amit.gupta |
69 |
* @param isCod
|
| 6561 |
amit.gupta |
70 |
* @param prefix
|
| 6250 |
amit.gupta |
71 |
*/
|
| 6730 |
anupam.sin |
72 |
public String createCoupon(long promotionId, String couponCode, String arguments, boolean isCod, String prefix) throws PromotionException, org.apache.thrift.TException;
|
| 6250 |
amit.gupta |
73 |
|
|
|
74 |
/**
|
| 3385 |
varun.gupt |
75 |
* Returns the count of successful payments done using a given coupon
|
|
|
76 |
*
|
|
|
77 |
* @param couponCode
|
|
|
78 |
*/
|
| 3430 |
rajveer |
79 |
public long getSuccessfulPaymentCountForCoupon(String couponCode) throws PromotionException, org.apache.thrift.TException;
|
| 3385 |
varun.gupt |
80 |
|
|
|
81 |
/**
|
|
|
82 |
* Returns the doc string of the rule module
|
|
|
83 |
*
|
|
|
84 |
* @param ruleName
|
|
|
85 |
*/
|
| 3430 |
rajveer |
86 |
public String getRuleDocString(String ruleName) throws org.apache.thrift.TException;
|
| 3385 |
varun.gupt |
87 |
|
| 4189 |
varun.gupt |
88 |
public List<ItemCouponDiscount> getItemDiscountMap(List<Long> itemIds) throws PromotionException, org.apache.thrift.TException;
|
|
|
89 |
|
| 4494 |
varun.gupt |
90 |
public Map<String,Double> getDiscountsForEntity(long entityId) throws org.apache.thrift.TException;
|
|
|
91 |
|
| 5469 |
rajveer |
92 |
public void addVoucher(Voucher voucher) throws org.apache.thrift.TException;
|
|
|
93 |
|
|
|
94 |
public Voucher assignVoucher(long userId, String userEmail, VoucherType voucherType, long amount) throws org.apache.thrift.TException;
|
|
|
95 |
|
|
|
96 |
public boolean markVoucherAsRedeemed(String voucherCode, long redeemedOn) throws org.apache.thrift.TException;
|
|
|
97 |
|
| 1982 |
varun.gupt |
98 |
}
|
|
|
99 |
|
| 3430 |
rajveer |
100 |
public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
|
| 1982 |
varun.gupt |
101 |
|
| 3430 |
rajveer |
102 |
public void createPromotion(String name, String ruleExecutionSrc, long startOn, long endOn, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPromotion_call> resultHandler) throws org.apache.thrift.TException;
|
| 1982 |
varun.gupt |
103 |
|
| 6301 |
amit.gupta |
104 |
public void getCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCoupon_call> resultHandler) throws org.apache.thrift.TException;
|
|
|
105 |
|
|
|
106 |
public void isGiftVoucher(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isGiftVoucher_call> resultHandler) throws org.apache.thrift.TException;
|
|
|
107 |
|
| 6356 |
amit.gupta |
108 |
public void isCodApplicable(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isCodApplicable_call> resultHandler) throws org.apache.thrift.TException;
|
|
|
109 |
|
| 3430 |
rajveer |
110 |
public void getAllPromotions(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPromotions_call> resultHandler) throws org.apache.thrift.TException;
|
|
|
111 |
|
|
|
112 |
public void getPromotionById(long promotionId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPromotionById_call> resultHandler) throws org.apache.thrift.TException;
|
|
|
113 |
|
|
|
114 |
public void generateCouponsForPromotion(long promotionId, String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.generateCouponsForPromotion_call> resultHandler) throws org.apache.thrift.TException;
|
|
|
115 |
|
|
|
116 |
public void applyCoupon(String couponCode, long cartId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.applyCoupon_call> resultHandler) throws org.apache.thrift.TException;
|
|
|
117 |
|
| 6736 |
amit.gupta |
118 |
public void getEmiDiscount(long cartId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getEmiDiscount_call> resultHandler) throws org.apache.thrift.TException;
|
|
|
119 |
|
| 6433 |
anupam.sin |
120 |
public void applyRechargeCoupon(String couponCode, long totalAmount, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.applyRechargeCoupon_call> resultHandler) throws org.apache.thrift.TException;
|
|
|
121 |
|
| 3430 |
rajveer |
122 |
public void trackCouponUsage(String couponCode, long transactionId, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.trackCouponUsage_call> resultHandler) throws org.apache.thrift.TException;
|
|
|
123 |
|
|
|
124 |
public void getCouponUsageCountByUser(String couponCode, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCouponUsageCountByUser_call> resultHandler) throws org.apache.thrift.TException;
|
|
|
125 |
|
| 6497 |
amit.gupta |
126 |
public void getActiveCodes(long promotionId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActiveCodes_call> resultHandler) throws org.apache.thrift.TException;
|
|
|
127 |
|
|
|
128 |
public void deleteCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.deleteCoupon_call> resultHandler) throws org.apache.thrift.TException;
|
|
|
129 |
|
| 3430 |
rajveer |
130 |
public void getActiveCoupons(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActiveCoupons_call> resultHandler) throws org.apache.thrift.TException;
|
|
|
131 |
|
| 6730 |
anupam.sin |
132 |
public void createCoupon(long promotionId, String couponCode, String arguments, boolean isCod, String prefix, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createCoupon_call> resultHandler) throws org.apache.thrift.TException;
|
| 6250 |
amit.gupta |
133 |
|
| 3430 |
rajveer |
134 |
public void getSuccessfulPaymentCountForCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuccessfulPaymentCountForCoupon_call> resultHandler) throws org.apache.thrift.TException;
|
|
|
135 |
|
|
|
136 |
public void getRuleDocString(String ruleName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRuleDocString_call> resultHandler) throws org.apache.thrift.TException;
|
|
|
137 |
|
| 4189 |
varun.gupt |
138 |
public void getItemDiscountMap(List<Long> itemIds, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemDiscountMap_call> resultHandler) throws org.apache.thrift.TException;
|
|
|
139 |
|
| 4494 |
varun.gupt |
140 |
public void getDiscountsForEntity(long entityId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getDiscountsForEntity_call> resultHandler) throws org.apache.thrift.TException;
|
|
|
141 |
|
| 5469 |
rajveer |
142 |
public void addVoucher(Voucher voucher, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addVoucher_call> resultHandler) throws org.apache.thrift.TException;
|
|
|
143 |
|
|
|
144 |
public void assignVoucher(long userId, String userEmail, VoucherType voucherType, long amount, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.assignVoucher_call> resultHandler) throws org.apache.thrift.TException;
|
|
|
145 |
|
|
|
146 |
public void markVoucherAsRedeemed(String voucherCode, long redeemedOn, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.markVoucherAsRedeemed_call> resultHandler) throws org.apache.thrift.TException;
|
|
|
147 |
|
| 3430 |
rajveer |
148 |
}
|
|
|
149 |
|
|
|
150 |
public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
|
|
|
151 |
public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
|
|
|
152 |
public Factory() {}
|
|
|
153 |
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
|
|
|
154 |
return new Client(prot);
|
|
|
155 |
}
|
|
|
156 |
public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
|
|
|
157 |
return new Client(iprot, oprot);
|
|
|
158 |
}
|
| 1982 |
varun.gupt |
159 |
}
|
|
|
160 |
|
| 3430 |
rajveer |
161 |
public Client(org.apache.thrift.protocol.TProtocol prot)
|
| 1982 |
varun.gupt |
162 |
{
|
| 3430 |
rajveer |
163 |
super(prot, prot);
|
| 1982 |
varun.gupt |
164 |
}
|
|
|
165 |
|
| 3430 |
rajveer |
166 |
public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
|
|
|
167 |
super(iprot, oprot);
|
| 1982 |
varun.gupt |
168 |
}
|
|
|
169 |
|
| 3430 |
rajveer |
170 |
public void createPromotion(String name, String ruleExecutionSrc, long startOn, long endOn) throws PromotionException, org.apache.thrift.TException
|
| 1982 |
varun.gupt |
171 |
{
|
|
|
172 |
send_createPromotion(name, ruleExecutionSrc, startOn, endOn);
|
|
|
173 |
recv_createPromotion();
|
|
|
174 |
}
|
|
|
175 |
|
| 3430 |
rajveer |
176 |
public void send_createPromotion(String name, String ruleExecutionSrc, long startOn, long endOn) throws org.apache.thrift.TException
|
| 1982 |
varun.gupt |
177 |
{
|
|
|
178 |
createPromotion_args args = new createPromotion_args();
|
| 3430 |
rajveer |
179 |
args.setName(name);
|
|
|
180 |
args.setRuleExecutionSrc(ruleExecutionSrc);
|
|
|
181 |
args.setStartOn(startOn);
|
|
|
182 |
args.setEndOn(endOn);
|
|
|
183 |
sendBase("createPromotion", args);
|
| 1982 |
varun.gupt |
184 |
}
|
|
|
185 |
|
| 3430 |
rajveer |
186 |
public void recv_createPromotion() throws PromotionException, org.apache.thrift.TException
|
| 1982 |
varun.gupt |
187 |
{
|
|
|
188 |
createPromotion_result result = new createPromotion_result();
|
| 3430 |
rajveer |
189 |
receiveBase(result, "createPromotion");
|
| 1982 |
varun.gupt |
190 |
if (result.pex != null) {
|
|
|
191 |
throw result.pex;
|
|
|
192 |
}
|
|
|
193 |
return;
|
|
|
194 |
}
|
|
|
195 |
|
| 6301 |
amit.gupta |
196 |
public Coupon getCoupon(String couponCode) throws PromotionException, org.apache.thrift.TException
|
|
|
197 |
{
|
|
|
198 |
send_getCoupon(couponCode);
|
|
|
199 |
return recv_getCoupon();
|
|
|
200 |
}
|
|
|
201 |
|
|
|
202 |
public void send_getCoupon(String couponCode) throws org.apache.thrift.TException
|
|
|
203 |
{
|
|
|
204 |
getCoupon_args args = new getCoupon_args();
|
|
|
205 |
args.setCouponCode(couponCode);
|
|
|
206 |
sendBase("getCoupon", args);
|
|
|
207 |
}
|
|
|
208 |
|
|
|
209 |
public Coupon recv_getCoupon() throws PromotionException, org.apache.thrift.TException
|
|
|
210 |
{
|
|
|
211 |
getCoupon_result result = new getCoupon_result();
|
|
|
212 |
receiveBase(result, "getCoupon");
|
|
|
213 |
if (result.isSetSuccess()) {
|
|
|
214 |
return result.success;
|
|
|
215 |
}
|
|
|
216 |
if (result.pex != null) {
|
|
|
217 |
throw result.pex;
|
|
|
218 |
}
|
|
|
219 |
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCoupon failed: unknown result");
|
|
|
220 |
}
|
|
|
221 |
|
|
|
222 |
public boolean isGiftVoucher(String couponCode) throws PromotionException, org.apache.thrift.TException
|
|
|
223 |
{
|
|
|
224 |
send_isGiftVoucher(couponCode);
|
|
|
225 |
return recv_isGiftVoucher();
|
|
|
226 |
}
|
|
|
227 |
|
|
|
228 |
public void send_isGiftVoucher(String couponCode) throws org.apache.thrift.TException
|
|
|
229 |
{
|
|
|
230 |
isGiftVoucher_args args = new isGiftVoucher_args();
|
|
|
231 |
args.setCouponCode(couponCode);
|
|
|
232 |
sendBase("isGiftVoucher", args);
|
|
|
233 |
}
|
|
|
234 |
|
|
|
235 |
public boolean recv_isGiftVoucher() throws PromotionException, org.apache.thrift.TException
|
|
|
236 |
{
|
|
|
237 |
isGiftVoucher_result result = new isGiftVoucher_result();
|
|
|
238 |
receiveBase(result, "isGiftVoucher");
|
|
|
239 |
if (result.isSetSuccess()) {
|
|
|
240 |
return result.success;
|
|
|
241 |
}
|
|
|
242 |
if (result.pex != null) {
|
|
|
243 |
throw result.pex;
|
|
|
244 |
}
|
|
|
245 |
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isGiftVoucher failed: unknown result");
|
|
|
246 |
}
|
|
|
247 |
|
| 6356 |
amit.gupta |
248 |
public boolean isCodApplicable(String couponCode) throws PromotionException, org.apache.thrift.TException
|
|
|
249 |
{
|
|
|
250 |
send_isCodApplicable(couponCode);
|
|
|
251 |
return recv_isCodApplicable();
|
|
|
252 |
}
|
|
|
253 |
|
|
|
254 |
public void send_isCodApplicable(String couponCode) throws org.apache.thrift.TException
|
|
|
255 |
{
|
|
|
256 |
isCodApplicable_args args = new isCodApplicable_args();
|
|
|
257 |
args.setCouponCode(couponCode);
|
|
|
258 |
sendBase("isCodApplicable", args);
|
|
|
259 |
}
|
|
|
260 |
|
|
|
261 |
public boolean recv_isCodApplicable() throws PromotionException, org.apache.thrift.TException
|
|
|
262 |
{
|
|
|
263 |
isCodApplicable_result result = new isCodApplicable_result();
|
|
|
264 |
receiveBase(result, "isCodApplicable");
|
|
|
265 |
if (result.isSetSuccess()) {
|
|
|
266 |
return result.success;
|
|
|
267 |
}
|
|
|
268 |
if (result.pex != null) {
|
|
|
269 |
throw result.pex;
|
|
|
270 |
}
|
|
|
271 |
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isCodApplicable failed: unknown result");
|
|
|
272 |
}
|
|
|
273 |
|
| 3430 |
rajveer |
274 |
public List<Promotion> getAllPromotions() throws PromotionException, org.apache.thrift.TException
|
| 1982 |
varun.gupt |
275 |
{
|
|
|
276 |
send_getAllPromotions();
|
|
|
277 |
return recv_getAllPromotions();
|
|
|
278 |
}
|
|
|
279 |
|
| 3430 |
rajveer |
280 |
public void send_getAllPromotions() throws org.apache.thrift.TException
|
| 1982 |
varun.gupt |
281 |
{
|
|
|
282 |
getAllPromotions_args args = new getAllPromotions_args();
|
| 3430 |
rajveer |
283 |
sendBase("getAllPromotions", args);
|
| 1982 |
varun.gupt |
284 |
}
|
|
|
285 |
|
| 3430 |
rajveer |
286 |
public List<Promotion> recv_getAllPromotions() throws PromotionException, org.apache.thrift.TException
|
| 1982 |
varun.gupt |
287 |
{
|
|
|
288 |
getAllPromotions_result result = new getAllPromotions_result();
|
| 3430 |
rajveer |
289 |
receiveBase(result, "getAllPromotions");
|
| 1982 |
varun.gupt |
290 |
if (result.isSetSuccess()) {
|
|
|
291 |
return result.success;
|
|
|
292 |
}
|
|
|
293 |
if (result.pex != null) {
|
|
|
294 |
throw result.pex;
|
|
|
295 |
}
|
| 3430 |
rajveer |
296 |
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPromotions failed: unknown result");
|
| 1982 |
varun.gupt |
297 |
}
|
|
|
298 |
|
| 3430 |
rajveer |
299 |
public Promotion getPromotionById(long promotionId) throws PromotionException, org.apache.thrift.TException
|
| 1982 |
varun.gupt |
300 |
{
|
|
|
301 |
send_getPromotionById(promotionId);
|
|
|
302 |
return recv_getPromotionById();
|
|
|
303 |
}
|
|
|
304 |
|
| 3430 |
rajveer |
305 |
public void send_getPromotionById(long promotionId) throws org.apache.thrift.TException
|
| 1982 |
varun.gupt |
306 |
{
|
|
|
307 |
getPromotionById_args args = new getPromotionById_args();
|
| 3430 |
rajveer |
308 |
args.setPromotionId(promotionId);
|
|
|
309 |
sendBase("getPromotionById", args);
|
| 1982 |
varun.gupt |
310 |
}
|
|
|
311 |
|
| 3430 |
rajveer |
312 |
public Promotion recv_getPromotionById() throws PromotionException, org.apache.thrift.TException
|
| 1982 |
varun.gupt |
313 |
{
|
|
|
314 |
getPromotionById_result result = new getPromotionById_result();
|
| 3430 |
rajveer |
315 |
receiveBase(result, "getPromotionById");
|
| 1982 |
varun.gupt |
316 |
if (result.isSetSuccess()) {
|
|
|
317 |
return result.success;
|
|
|
318 |
}
|
|
|
319 |
if (result.pex != null) {
|
|
|
320 |
throw result.pex;
|
|
|
321 |
}
|
| 3430 |
rajveer |
322 |
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPromotionById failed: unknown result");
|
| 1982 |
varun.gupt |
323 |
}
|
|
|
324 |
|
| 3430 |
rajveer |
325 |
public void generateCouponsForPromotion(long promotionId, String couponCode) throws PromotionException, org.apache.thrift.TException
|
| 1982 |
varun.gupt |
326 |
{
|
|
|
327 |
send_generateCouponsForPromotion(promotionId, couponCode);
|
|
|
328 |
recv_generateCouponsForPromotion();
|
|
|
329 |
}
|
|
|
330 |
|
| 3430 |
rajveer |
331 |
public void send_generateCouponsForPromotion(long promotionId, String couponCode) throws org.apache.thrift.TException
|
| 1982 |
varun.gupt |
332 |
{
|
|
|
333 |
generateCouponsForPromotion_args args = new generateCouponsForPromotion_args();
|
| 3430 |
rajveer |
334 |
args.setPromotionId(promotionId);
|
|
|
335 |
args.setCouponCode(couponCode);
|
|
|
336 |
sendBase("generateCouponsForPromotion", args);
|
| 1982 |
varun.gupt |
337 |
}
|
|
|
338 |
|
| 3430 |
rajveer |
339 |
public void recv_generateCouponsForPromotion() throws PromotionException, org.apache.thrift.TException
|
| 1982 |
varun.gupt |
340 |
{
|
|
|
341 |
generateCouponsForPromotion_result result = new generateCouponsForPromotion_result();
|
| 3430 |
rajveer |
342 |
receiveBase(result, "generateCouponsForPromotion");
|
| 1982 |
varun.gupt |
343 |
if (result.pex != null) {
|
|
|
344 |
throw result.pex;
|
|
|
345 |
}
|
|
|
346 |
return;
|
|
|
347 |
}
|
|
|
348 |
|
| 3430 |
rajveer |
349 |
public Cart applyCoupon(String couponCode, long cartId) throws PromotionException, org.apache.thrift.TException
|
| 1982 |
varun.gupt |
350 |
{
|
|
|
351 |
send_applyCoupon(couponCode, cartId);
|
|
|
352 |
return recv_applyCoupon();
|
|
|
353 |
}
|
|
|
354 |
|
| 3430 |
rajveer |
355 |
public void send_applyCoupon(String couponCode, long cartId) throws org.apache.thrift.TException
|
| 1982 |
varun.gupt |
356 |
{
|
|
|
357 |
applyCoupon_args args = new applyCoupon_args();
|
| 3430 |
rajveer |
358 |
args.setCouponCode(couponCode);
|
|
|
359 |
args.setCartId(cartId);
|
|
|
360 |
sendBase("applyCoupon", args);
|
| 1982 |
varun.gupt |
361 |
}
|
|
|
362 |
|
| 3430 |
rajveer |
363 |
public Cart recv_applyCoupon() throws PromotionException, org.apache.thrift.TException
|
| 1982 |
varun.gupt |
364 |
{
|
|
|
365 |
applyCoupon_result result = new applyCoupon_result();
|
| 3430 |
rajveer |
366 |
receiveBase(result, "applyCoupon");
|
| 1982 |
varun.gupt |
367 |
if (result.isSetSuccess()) {
|
|
|
368 |
return result.success;
|
|
|
369 |
}
|
|
|
370 |
if (result.pex != null) {
|
|
|
371 |
throw result.pex;
|
|
|
372 |
}
|
| 3430 |
rajveer |
373 |
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "applyCoupon failed: unknown result");
|
| 1982 |
varun.gupt |
374 |
}
|
|
|
375 |
|
| 6736 |
amit.gupta |
376 |
public Map<Long,Double> getEmiDiscount(long cartId) throws PromotionException, org.apache.thrift.TException
|
|
|
377 |
{
|
|
|
378 |
send_getEmiDiscount(cartId);
|
|
|
379 |
return recv_getEmiDiscount();
|
|
|
380 |
}
|
|
|
381 |
|
|
|
382 |
public void send_getEmiDiscount(long cartId) throws org.apache.thrift.TException
|
|
|
383 |
{
|
|
|
384 |
getEmiDiscount_args args = new getEmiDiscount_args();
|
|
|
385 |
args.setCartId(cartId);
|
|
|
386 |
sendBase("getEmiDiscount", args);
|
|
|
387 |
}
|
|
|
388 |
|
|
|
389 |
public Map<Long,Double> recv_getEmiDiscount() throws PromotionException, org.apache.thrift.TException
|
|
|
390 |
{
|
|
|
391 |
getEmiDiscount_result result = new getEmiDiscount_result();
|
|
|
392 |
receiveBase(result, "getEmiDiscount");
|
|
|
393 |
if (result.isSetSuccess()) {
|
|
|
394 |
return result.success;
|
|
|
395 |
}
|
|
|
396 |
if (result.pex != null) {
|
|
|
397 |
throw result.pex;
|
|
|
398 |
}
|
|
|
399 |
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getEmiDiscount failed: unknown result");
|
|
|
400 |
}
|
|
|
401 |
|
| 6433 |
anupam.sin |
402 |
public Map<Long,String> applyRechargeCoupon(String couponCode, long totalAmount, long userId) throws PromotionException, org.apache.thrift.TException
|
|
|
403 |
{
|
|
|
404 |
send_applyRechargeCoupon(couponCode, totalAmount, userId);
|
|
|
405 |
return recv_applyRechargeCoupon();
|
|
|
406 |
}
|
|
|
407 |
|
|
|
408 |
public void send_applyRechargeCoupon(String couponCode, long totalAmount, long userId) throws org.apache.thrift.TException
|
|
|
409 |
{
|
|
|
410 |
applyRechargeCoupon_args args = new applyRechargeCoupon_args();
|
|
|
411 |
args.setCouponCode(couponCode);
|
|
|
412 |
args.setTotalAmount(totalAmount);
|
|
|
413 |
args.setUserId(userId);
|
|
|
414 |
sendBase("applyRechargeCoupon", args);
|
|
|
415 |
}
|
|
|
416 |
|
|
|
417 |
public Map<Long,String> recv_applyRechargeCoupon() throws PromotionException, org.apache.thrift.TException
|
|
|
418 |
{
|
|
|
419 |
applyRechargeCoupon_result result = new applyRechargeCoupon_result();
|
|
|
420 |
receiveBase(result, "applyRechargeCoupon");
|
|
|
421 |
if (result.isSetSuccess()) {
|
|
|
422 |
return result.success;
|
|
|
423 |
}
|
|
|
424 |
if (result.pex != null) {
|
|
|
425 |
throw result.pex;
|
|
|
426 |
}
|
|
|
427 |
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "applyRechargeCoupon failed: unknown result");
|
|
|
428 |
}
|
|
|
429 |
|
| 3430 |
rajveer |
430 |
public void trackCouponUsage(String couponCode, long transactionId, long userId) throws PromotionException, org.apache.thrift.TException
|
| 1982 |
varun.gupt |
431 |
{
|
|
|
432 |
send_trackCouponUsage(couponCode, transactionId, userId);
|
|
|
433 |
recv_trackCouponUsage();
|
|
|
434 |
}
|
|
|
435 |
|
| 3430 |
rajveer |
436 |
public void send_trackCouponUsage(String couponCode, long transactionId, long userId) throws org.apache.thrift.TException
|
| 1982 |
varun.gupt |
437 |
{
|
|
|
438 |
trackCouponUsage_args args = new trackCouponUsage_args();
|
| 3430 |
rajveer |
439 |
args.setCouponCode(couponCode);
|
|
|
440 |
args.setTransactionId(transactionId);
|
|
|
441 |
args.setUserId(userId);
|
|
|
442 |
sendBase("trackCouponUsage", args);
|
| 1982 |
varun.gupt |
443 |
}
|
|
|
444 |
|
| 3430 |
rajveer |
445 |
public void recv_trackCouponUsage() throws PromotionException, org.apache.thrift.TException
|
| 1982 |
varun.gupt |
446 |
{
|
|
|
447 |
trackCouponUsage_result result = new trackCouponUsage_result();
|
| 3430 |
rajveer |
448 |
receiveBase(result, "trackCouponUsage");
|
| 1982 |
varun.gupt |
449 |
if (result.pex != null) {
|
|
|
450 |
throw result.pex;
|
|
|
451 |
}
|
|
|
452 |
return;
|
|
|
453 |
}
|
|
|
454 |
|
| 3430 |
rajveer |
455 |
public long getCouponUsageCountByUser(String couponCode, long userId) throws PromotionException, org.apache.thrift.TException
|
| 1982 |
varun.gupt |
456 |
{
|
|
|
457 |
send_getCouponUsageCountByUser(couponCode, userId);
|
|
|
458 |
return recv_getCouponUsageCountByUser();
|
|
|
459 |
}
|
|
|
460 |
|
| 3430 |
rajveer |
461 |
public void send_getCouponUsageCountByUser(String couponCode, long userId) throws org.apache.thrift.TException
|
| 1982 |
varun.gupt |
462 |
{
|
|
|
463 |
getCouponUsageCountByUser_args args = new getCouponUsageCountByUser_args();
|
| 3430 |
rajveer |
464 |
args.setCouponCode(couponCode);
|
|
|
465 |
args.setUserId(userId);
|
|
|
466 |
sendBase("getCouponUsageCountByUser", args);
|
| 1982 |
varun.gupt |
467 |
}
|
|
|
468 |
|
| 3430 |
rajveer |
469 |
public long recv_getCouponUsageCountByUser() throws PromotionException, org.apache.thrift.TException
|
| 1982 |
varun.gupt |
470 |
{
|
|
|
471 |
getCouponUsageCountByUser_result result = new getCouponUsageCountByUser_result();
|
| 3430 |
rajveer |
472 |
receiveBase(result, "getCouponUsageCountByUser");
|
| 1982 |
varun.gupt |
473 |
if (result.isSetSuccess()) {
|
|
|
474 |
return result.success;
|
|
|
475 |
}
|
|
|
476 |
if (result.pex != null) {
|
|
|
477 |
throw result.pex;
|
|
|
478 |
}
|
| 3430 |
rajveer |
479 |
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCouponUsageCountByUser failed: unknown result");
|
| 1982 |
varun.gupt |
480 |
}
|
|
|
481 |
|
| 6497 |
amit.gupta |
482 |
public List<Coupon> getActiveCodes(long promotionId) throws PromotionException, org.apache.thrift.TException
|
|
|
483 |
{
|
|
|
484 |
send_getActiveCodes(promotionId);
|
|
|
485 |
return recv_getActiveCodes();
|
|
|
486 |
}
|
|
|
487 |
|
|
|
488 |
public void send_getActiveCodes(long promotionId) throws org.apache.thrift.TException
|
|
|
489 |
{
|
|
|
490 |
getActiveCodes_args args = new getActiveCodes_args();
|
|
|
491 |
args.setPromotionId(promotionId);
|
|
|
492 |
sendBase("getActiveCodes", args);
|
|
|
493 |
}
|
|
|
494 |
|
|
|
495 |
public List<Coupon> recv_getActiveCodes() throws PromotionException, org.apache.thrift.TException
|
|
|
496 |
{
|
|
|
497 |
getActiveCodes_result result = new getActiveCodes_result();
|
|
|
498 |
receiveBase(result, "getActiveCodes");
|
|
|
499 |
if (result.isSetSuccess()) {
|
|
|
500 |
return result.success;
|
|
|
501 |
}
|
|
|
502 |
if (result.pex != null) {
|
|
|
503 |
throw result.pex;
|
|
|
504 |
}
|
|
|
505 |
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getActiveCodes failed: unknown result");
|
|
|
506 |
}
|
|
|
507 |
|
|
|
508 |
public void deleteCoupon(String couponCode) throws PromotionException, org.apache.thrift.TException
|
|
|
509 |
{
|
|
|
510 |
send_deleteCoupon(couponCode);
|
|
|
511 |
recv_deleteCoupon();
|
|
|
512 |
}
|
|
|
513 |
|
|
|
514 |
public void send_deleteCoupon(String couponCode) throws org.apache.thrift.TException
|
|
|
515 |
{
|
|
|
516 |
deleteCoupon_args args = new deleteCoupon_args();
|
|
|
517 |
args.setCouponCode(couponCode);
|
|
|
518 |
sendBase("deleteCoupon", args);
|
|
|
519 |
}
|
|
|
520 |
|
|
|
521 |
public void recv_deleteCoupon() throws PromotionException, org.apache.thrift.TException
|
|
|
522 |
{
|
|
|
523 |
deleteCoupon_result result = new deleteCoupon_result();
|
|
|
524 |
receiveBase(result, "deleteCoupon");
|
|
|
525 |
if (result.pex != null) {
|
|
|
526 |
throw result.pex;
|
|
|
527 |
}
|
|
|
528 |
return;
|
|
|
529 |
}
|
|
|
530 |
|
| 3430 |
rajveer |
531 |
public List<Coupon> getActiveCoupons() throws PromotionException, org.apache.thrift.TException
|
| 3385 |
varun.gupt |
532 |
{
|
|
|
533 |
send_getActiveCoupons();
|
|
|
534 |
return recv_getActiveCoupons();
|
|
|
535 |
}
|
|
|
536 |
|
| 3430 |
rajveer |
537 |
public void send_getActiveCoupons() throws org.apache.thrift.TException
|
| 3385 |
varun.gupt |
538 |
{
|
|
|
539 |
getActiveCoupons_args args = new getActiveCoupons_args();
|
| 3430 |
rajveer |
540 |
sendBase("getActiveCoupons", args);
|
| 3385 |
varun.gupt |
541 |
}
|
|
|
542 |
|
| 3430 |
rajveer |
543 |
public List<Coupon> recv_getActiveCoupons() throws PromotionException, org.apache.thrift.TException
|
| 3385 |
varun.gupt |
544 |
{
|
|
|
545 |
getActiveCoupons_result result = new getActiveCoupons_result();
|
| 3430 |
rajveer |
546 |
receiveBase(result, "getActiveCoupons");
|
| 3385 |
varun.gupt |
547 |
if (result.isSetSuccess()) {
|
|
|
548 |
return result.success;
|
|
|
549 |
}
|
|
|
550 |
if (result.pex != null) {
|
|
|
551 |
throw result.pex;
|
|
|
552 |
}
|
| 3430 |
rajveer |
553 |
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getActiveCoupons failed: unknown result");
|
| 3385 |
varun.gupt |
554 |
}
|
|
|
555 |
|
| 6730 |
anupam.sin |
556 |
public String createCoupon(long promotionId, String couponCode, String arguments, boolean isCod, String prefix) throws PromotionException, org.apache.thrift.TException
|
| 6250 |
amit.gupta |
557 |
{
|
| 6730 |
anupam.sin |
558 |
send_createCoupon(promotionId, couponCode, arguments, isCod, prefix);
|
| 6250 |
amit.gupta |
559 |
return recv_createCoupon();
|
|
|
560 |
}
|
|
|
561 |
|
| 6730 |
anupam.sin |
562 |
public void send_createCoupon(long promotionId, String couponCode, String arguments, boolean isCod, String prefix) throws org.apache.thrift.TException
|
| 6250 |
amit.gupta |
563 |
{
|
|
|
564 |
createCoupon_args args = new createCoupon_args();
|
|
|
565 |
args.setPromotionId(promotionId);
|
| 6730 |
anupam.sin |
566 |
args.setCouponCode(couponCode);
|
| 6679 |
anupam.sin |
567 |
args.setArguments(arguments);
|
| 6356 |
amit.gupta |
568 |
args.setIsCod(isCod);
|
| 6561 |
amit.gupta |
569 |
args.setPrefix(prefix);
|
| 6250 |
amit.gupta |
570 |
sendBase("createCoupon", args);
|
|
|
571 |
}
|
|
|
572 |
|
|
|
573 |
public String recv_createCoupon() throws PromotionException, org.apache.thrift.TException
|
|
|
574 |
{
|
|
|
575 |
createCoupon_result result = new createCoupon_result();
|
|
|
576 |
receiveBase(result, "createCoupon");
|
|
|
577 |
if (result.isSetSuccess()) {
|
|
|
578 |
return result.success;
|
|
|
579 |
}
|
|
|
580 |
if (result.pex != null) {
|
|
|
581 |
throw result.pex;
|
|
|
582 |
}
|
|
|
583 |
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createCoupon failed: unknown result");
|
|
|
584 |
}
|
|
|
585 |
|
| 3430 |
rajveer |
586 |
public long getSuccessfulPaymentCountForCoupon(String couponCode) throws PromotionException, org.apache.thrift.TException
|
| 3385 |
varun.gupt |
587 |
{
|
|
|
588 |
send_getSuccessfulPaymentCountForCoupon(couponCode);
|
|
|
589 |
return recv_getSuccessfulPaymentCountForCoupon();
|
|
|
590 |
}
|
|
|
591 |
|
| 3430 |
rajveer |
592 |
public void send_getSuccessfulPaymentCountForCoupon(String couponCode) throws org.apache.thrift.TException
|
| 3385 |
varun.gupt |
593 |
{
|
|
|
594 |
getSuccessfulPaymentCountForCoupon_args args = new getSuccessfulPaymentCountForCoupon_args();
|
| 3430 |
rajveer |
595 |
args.setCouponCode(couponCode);
|
|
|
596 |
sendBase("getSuccessfulPaymentCountForCoupon", args);
|
| 3385 |
varun.gupt |
597 |
}
|
|
|
598 |
|
| 3430 |
rajveer |
599 |
public long recv_getSuccessfulPaymentCountForCoupon() throws PromotionException, org.apache.thrift.TException
|
| 3385 |
varun.gupt |
600 |
{
|
|
|
601 |
getSuccessfulPaymentCountForCoupon_result result = new getSuccessfulPaymentCountForCoupon_result();
|
| 3430 |
rajveer |
602 |
receiveBase(result, "getSuccessfulPaymentCountForCoupon");
|
| 3385 |
varun.gupt |
603 |
if (result.isSetSuccess()) {
|
|
|
604 |
return result.success;
|
|
|
605 |
}
|
|
|
606 |
if (result.pex != null) {
|
|
|
607 |
throw result.pex;
|
|
|
608 |
}
|
| 3430 |
rajveer |
609 |
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSuccessfulPaymentCountForCoupon failed: unknown result");
|
| 3385 |
varun.gupt |
610 |
}
|
|
|
611 |
|
| 3430 |
rajveer |
612 |
public String getRuleDocString(String ruleName) throws org.apache.thrift.TException
|
| 3385 |
varun.gupt |
613 |
{
|
|
|
614 |
send_getRuleDocString(ruleName);
|
|
|
615 |
return recv_getRuleDocString();
|
|
|
616 |
}
|
|
|
617 |
|
| 3430 |
rajveer |
618 |
public void send_getRuleDocString(String ruleName) throws org.apache.thrift.TException
|
| 3385 |
varun.gupt |
619 |
{
|
|
|
620 |
getRuleDocString_args args = new getRuleDocString_args();
|
| 3430 |
rajveer |
621 |
args.setRuleName(ruleName);
|
|
|
622 |
sendBase("getRuleDocString", args);
|
| 3385 |
varun.gupt |
623 |
}
|
|
|
624 |
|
| 3430 |
rajveer |
625 |
public String recv_getRuleDocString() throws org.apache.thrift.TException
|
| 3385 |
varun.gupt |
626 |
{
|
|
|
627 |
getRuleDocString_result result = new getRuleDocString_result();
|
| 3430 |
rajveer |
628 |
receiveBase(result, "getRuleDocString");
|
| 3385 |
varun.gupt |
629 |
if (result.isSetSuccess()) {
|
|
|
630 |
return result.success;
|
|
|
631 |
}
|
| 3430 |
rajveer |
632 |
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRuleDocString failed: unknown result");
|
| 3385 |
varun.gupt |
633 |
}
|
|
|
634 |
|
| 4189 |
varun.gupt |
635 |
public List<ItemCouponDiscount> getItemDiscountMap(List<Long> itemIds) throws PromotionException, org.apache.thrift.TException
|
|
|
636 |
{
|
|
|
637 |
send_getItemDiscountMap(itemIds);
|
|
|
638 |
return recv_getItemDiscountMap();
|
|
|
639 |
}
|
|
|
640 |
|
|
|
641 |
public void send_getItemDiscountMap(List<Long> itemIds) throws org.apache.thrift.TException
|
|
|
642 |
{
|
|
|
643 |
getItemDiscountMap_args args = new getItemDiscountMap_args();
|
|
|
644 |
args.setItemIds(itemIds);
|
|
|
645 |
sendBase("getItemDiscountMap", args);
|
|
|
646 |
}
|
|
|
647 |
|
|
|
648 |
public List<ItemCouponDiscount> recv_getItemDiscountMap() throws PromotionException, org.apache.thrift.TException
|
|
|
649 |
{
|
|
|
650 |
getItemDiscountMap_result result = new getItemDiscountMap_result();
|
|
|
651 |
receiveBase(result, "getItemDiscountMap");
|
|
|
652 |
if (result.isSetSuccess()) {
|
|
|
653 |
return result.success;
|
|
|
654 |
}
|
|
|
655 |
if (result.pex != null) {
|
|
|
656 |
throw result.pex;
|
|
|
657 |
}
|
|
|
658 |
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemDiscountMap failed: unknown result");
|
|
|
659 |
}
|
|
|
660 |
|
| 4494 |
varun.gupt |
661 |
public Map<String,Double> getDiscountsForEntity(long entityId) throws org.apache.thrift.TException
|
|
|
662 |
{
|
|
|
663 |
send_getDiscountsForEntity(entityId);
|
|
|
664 |
return recv_getDiscountsForEntity();
|
|
|
665 |
}
|
|
|
666 |
|
|
|
667 |
public void send_getDiscountsForEntity(long entityId) throws org.apache.thrift.TException
|
|
|
668 |
{
|
|
|
669 |
getDiscountsForEntity_args args = new getDiscountsForEntity_args();
|
|
|
670 |
args.setEntityId(entityId);
|
|
|
671 |
sendBase("getDiscountsForEntity", args);
|
|
|
672 |
}
|
|
|
673 |
|
|
|
674 |
public Map<String,Double> recv_getDiscountsForEntity() throws org.apache.thrift.TException
|
|
|
675 |
{
|
|
|
676 |
getDiscountsForEntity_result result = new getDiscountsForEntity_result();
|
|
|
677 |
receiveBase(result, "getDiscountsForEntity");
|
|
|
678 |
if (result.isSetSuccess()) {
|
|
|
679 |
return result.success;
|
|
|
680 |
}
|
|
|
681 |
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getDiscountsForEntity failed: unknown result");
|
|
|
682 |
}
|
|
|
683 |
|
| 5469 |
rajveer |
684 |
public void addVoucher(Voucher voucher) throws org.apache.thrift.TException
|
|
|
685 |
{
|
|
|
686 |
send_addVoucher(voucher);
|
|
|
687 |
recv_addVoucher();
|
|
|
688 |
}
|
|
|
689 |
|
|
|
690 |
public void send_addVoucher(Voucher voucher) throws org.apache.thrift.TException
|
|
|
691 |
{
|
|
|
692 |
addVoucher_args args = new addVoucher_args();
|
|
|
693 |
args.setVoucher(voucher);
|
|
|
694 |
sendBase("addVoucher", args);
|
|
|
695 |
}
|
|
|
696 |
|
|
|
697 |
public void recv_addVoucher() throws org.apache.thrift.TException
|
|
|
698 |
{
|
|
|
699 |
addVoucher_result result = new addVoucher_result();
|
|
|
700 |
receiveBase(result, "addVoucher");
|
|
|
701 |
return;
|
|
|
702 |
}
|
|
|
703 |
|
|
|
704 |
public Voucher assignVoucher(long userId, String userEmail, VoucherType voucherType, long amount) throws org.apache.thrift.TException
|
|
|
705 |
{
|
|
|
706 |
send_assignVoucher(userId, userEmail, voucherType, amount);
|
|
|
707 |
return recv_assignVoucher();
|
|
|
708 |
}
|
|
|
709 |
|
|
|
710 |
public void send_assignVoucher(long userId, String userEmail, VoucherType voucherType, long amount) throws org.apache.thrift.TException
|
|
|
711 |
{
|
|
|
712 |
assignVoucher_args args = new assignVoucher_args();
|
|
|
713 |
args.setUserId(userId);
|
|
|
714 |
args.setUserEmail(userEmail);
|
|
|
715 |
args.setVoucherType(voucherType);
|
|
|
716 |
args.setAmount(amount);
|
|
|
717 |
sendBase("assignVoucher", args);
|
|
|
718 |
}
|
|
|
719 |
|
|
|
720 |
public Voucher recv_assignVoucher() throws org.apache.thrift.TException
|
|
|
721 |
{
|
|
|
722 |
assignVoucher_result result = new assignVoucher_result();
|
|
|
723 |
receiveBase(result, "assignVoucher");
|
|
|
724 |
if (result.isSetSuccess()) {
|
|
|
725 |
return result.success;
|
|
|
726 |
}
|
|
|
727 |
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "assignVoucher failed: unknown result");
|
|
|
728 |
}
|
|
|
729 |
|
|
|
730 |
public boolean markVoucherAsRedeemed(String voucherCode, long redeemedOn) throws org.apache.thrift.TException
|
|
|
731 |
{
|
|
|
732 |
send_markVoucherAsRedeemed(voucherCode, redeemedOn);
|
|
|
733 |
return recv_markVoucherAsRedeemed();
|
|
|
734 |
}
|
|
|
735 |
|
|
|
736 |
public void send_markVoucherAsRedeemed(String voucherCode, long redeemedOn) throws org.apache.thrift.TException
|
|
|
737 |
{
|
|
|
738 |
markVoucherAsRedeemed_args args = new markVoucherAsRedeemed_args();
|
|
|
739 |
args.setVoucherCode(voucherCode);
|
|
|
740 |
args.setRedeemedOn(redeemedOn);
|
|
|
741 |
sendBase("markVoucherAsRedeemed", args);
|
|
|
742 |
}
|
|
|
743 |
|
|
|
744 |
public boolean recv_markVoucherAsRedeemed() throws org.apache.thrift.TException
|
|
|
745 |
{
|
|
|
746 |
markVoucherAsRedeemed_result result = new markVoucherAsRedeemed_result();
|
|
|
747 |
receiveBase(result, "markVoucherAsRedeemed");
|
|
|
748 |
if (result.isSetSuccess()) {
|
|
|
749 |
return result.success;
|
|
|
750 |
}
|
|
|
751 |
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "markVoucherAsRedeemed failed: unknown result");
|
|
|
752 |
}
|
|
|
753 |
|
| 1982 |
varun.gupt |
754 |
}
|
| 3430 |
rajveer |
755 |
public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
|
|
|
756 |
public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
|
|
|
757 |
private org.apache.thrift.async.TAsyncClientManager clientManager;
|
|
|
758 |
private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
|
|
|
759 |
public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
|
|
|
760 |
this.clientManager = clientManager;
|
|
|
761 |
this.protocolFactory = protocolFactory;
|
|
|
762 |
}
|
|
|
763 |
public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
|
|
|
764 |
return new AsyncClient(protocolFactory, clientManager, transport);
|
|
|
765 |
}
|
| 1982 |
varun.gupt |
766 |
}
|
|
|
767 |
|
| 3430 |
rajveer |
768 |
public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
|
|
|
769 |
super(protocolFactory, clientManager, transport);
|
|
|
770 |
}
|
| 1982 |
varun.gupt |
771 |
|
| 3430 |
rajveer |
772 |
public void createPromotion(String name, String ruleExecutionSrc, long startOn, long endOn, org.apache.thrift.async.AsyncMethodCallback<createPromotion_call> resultHandler) throws org.apache.thrift.TException {
|
|
|
773 |
checkReady();
|
|
|
774 |
createPromotion_call method_call = new createPromotion_call(name, ruleExecutionSrc, startOn, endOn, resultHandler, this, ___protocolFactory, ___transport);
|
|
|
775 |
this.___currentMethod = method_call;
|
|
|
776 |
___manager.call(method_call);
|
| 1982 |
varun.gupt |
777 |
}
|
|
|
778 |
|
| 3430 |
rajveer |
779 |
public static class createPromotion_call extends org.apache.thrift.async.TAsyncMethodCall {
|
|
|
780 |
private String name;
|
|
|
781 |
private String ruleExecutionSrc;
|
|
|
782 |
private long startOn;
|
|
|
783 |
private long endOn;
|
|
|
784 |
public createPromotion_call(String name, String ruleExecutionSrc, long startOn, long endOn, org.apache.thrift.async.AsyncMethodCallback<createPromotion_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
|
|
785 |
super(client, protocolFactory, transport, resultHandler, false);
|
|
|
786 |
this.name = name;
|
|
|
787 |
this.ruleExecutionSrc = ruleExecutionSrc;
|
|
|
788 |
this.startOn = startOn;
|
|
|
789 |
this.endOn = endOn;
|
| 1982 |
varun.gupt |
790 |
}
|
|
|
791 |
|
| 3430 |
rajveer |
792 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
|
|
793 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPromotion", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
| 1982 |
varun.gupt |
794 |
createPromotion_args args = new createPromotion_args();
|
| 3430 |
rajveer |
795 |
args.setName(name);
|
|
|
796 |
args.setRuleExecutionSrc(ruleExecutionSrc);
|
|
|
797 |
args.setStartOn(startOn);
|
|
|
798 |
args.setEndOn(endOn);
|
|
|
799 |
args.write(prot);
|
|
|
800 |
prot.writeMessageEnd();
|
| 1982 |
varun.gupt |
801 |
}
|
|
|
802 |
|
| 3430 |
rajveer |
803 |
public void getResult() throws PromotionException, org.apache.thrift.TException {
|
|
|
804 |
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
|
|
805 |
throw new IllegalStateException("Method call not finished!");
|
| 1982 |
varun.gupt |
806 |
}
|
| 3430 |
rajveer |
807 |
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
|
|
808 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
|
|
809 |
(new Client(prot)).recv_createPromotion();
|
| 1982 |
varun.gupt |
810 |
}
|
| 3430 |
rajveer |
811 |
}
|
| 1982 |
varun.gupt |
812 |
|
| 6301 |
amit.gupta |
813 |
public void getCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<getCoupon_call> resultHandler) throws org.apache.thrift.TException {
|
|
|
814 |
checkReady();
|
|
|
815 |
getCoupon_call method_call = new getCoupon_call(couponCode, resultHandler, this, ___protocolFactory, ___transport);
|
|
|
816 |
this.___currentMethod = method_call;
|
|
|
817 |
___manager.call(method_call);
|
|
|
818 |
}
|
|
|
819 |
|
|
|
820 |
public static class getCoupon_call extends org.apache.thrift.async.TAsyncMethodCall {
|
|
|
821 |
private String couponCode;
|
|
|
822 |
public getCoupon_call(String couponCode, org.apache.thrift.async.AsyncMethodCallback<getCoupon_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
|
|
823 |
super(client, protocolFactory, transport, resultHandler, false);
|
|
|
824 |
this.couponCode = couponCode;
|
|
|
825 |
}
|
|
|
826 |
|
|
|
827 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
|
|
828 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCoupon", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
|
|
829 |
getCoupon_args args = new getCoupon_args();
|
|
|
830 |
args.setCouponCode(couponCode);
|
|
|
831 |
args.write(prot);
|
|
|
832 |
prot.writeMessageEnd();
|
|
|
833 |
}
|
|
|
834 |
|
|
|
835 |
public Coupon getResult() throws PromotionException, org.apache.thrift.TException {
|
|
|
836 |
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
|
|
837 |
throw new IllegalStateException("Method call not finished!");
|
|
|
838 |
}
|
|
|
839 |
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
|
|
840 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
|
|
841 |
return (new Client(prot)).recv_getCoupon();
|
|
|
842 |
}
|
|
|
843 |
}
|
|
|
844 |
|
|
|
845 |
public void isGiftVoucher(String couponCode, org.apache.thrift.async.AsyncMethodCallback<isGiftVoucher_call> resultHandler) throws org.apache.thrift.TException {
|
|
|
846 |
checkReady();
|
|
|
847 |
isGiftVoucher_call method_call = new isGiftVoucher_call(couponCode, resultHandler, this, ___protocolFactory, ___transport);
|
|
|
848 |
this.___currentMethod = method_call;
|
|
|
849 |
___manager.call(method_call);
|
|
|
850 |
}
|
|
|
851 |
|
|
|
852 |
public static class isGiftVoucher_call extends org.apache.thrift.async.TAsyncMethodCall {
|
|
|
853 |
private String couponCode;
|
|
|
854 |
public isGiftVoucher_call(String couponCode, org.apache.thrift.async.AsyncMethodCallback<isGiftVoucher_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
|
|
855 |
super(client, protocolFactory, transport, resultHandler, false);
|
|
|
856 |
this.couponCode = couponCode;
|
|
|
857 |
}
|
|
|
858 |
|
|
|
859 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
|
|
860 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isGiftVoucher", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
|
|
861 |
isGiftVoucher_args args = new isGiftVoucher_args();
|
|
|
862 |
args.setCouponCode(couponCode);
|
|
|
863 |
args.write(prot);
|
|
|
864 |
prot.writeMessageEnd();
|
|
|
865 |
}
|
|
|
866 |
|
|
|
867 |
public boolean getResult() throws PromotionException, org.apache.thrift.TException {
|
|
|
868 |
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
|
|
869 |
throw new IllegalStateException("Method call not finished!");
|
|
|
870 |
}
|
|
|
871 |
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
|
|
872 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
|
|
873 |
return (new Client(prot)).recv_isGiftVoucher();
|
|
|
874 |
}
|
|
|
875 |
}
|
|
|
876 |
|
| 6356 |
amit.gupta |
877 |
public void isCodApplicable(String couponCode, org.apache.thrift.async.AsyncMethodCallback<isCodApplicable_call> resultHandler) throws org.apache.thrift.TException {
|
|
|
878 |
checkReady();
|
|
|
879 |
isCodApplicable_call method_call = new isCodApplicable_call(couponCode, resultHandler, this, ___protocolFactory, ___transport);
|
|
|
880 |
this.___currentMethod = method_call;
|
|
|
881 |
___manager.call(method_call);
|
|
|
882 |
}
|
|
|
883 |
|
|
|
884 |
public static class isCodApplicable_call extends org.apache.thrift.async.TAsyncMethodCall {
|
|
|
885 |
private String couponCode;
|
|
|
886 |
public isCodApplicable_call(String couponCode, org.apache.thrift.async.AsyncMethodCallback<isCodApplicable_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
|
|
887 |
super(client, protocolFactory, transport, resultHandler, false);
|
|
|
888 |
this.couponCode = couponCode;
|
|
|
889 |
}
|
|
|
890 |
|
|
|
891 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
|
|
892 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isCodApplicable", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
|
|
893 |
isCodApplicable_args args = new isCodApplicable_args();
|
|
|
894 |
args.setCouponCode(couponCode);
|
|
|
895 |
args.write(prot);
|
|
|
896 |
prot.writeMessageEnd();
|
|
|
897 |
}
|
|
|
898 |
|
|
|
899 |
public boolean getResult() throws PromotionException, org.apache.thrift.TException {
|
|
|
900 |
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
|
|
901 |
throw new IllegalStateException("Method call not finished!");
|
|
|
902 |
}
|
|
|
903 |
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
|
|
904 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
|
|
905 |
return (new Client(prot)).recv_isCodApplicable();
|
|
|
906 |
}
|
|
|
907 |
}
|
|
|
908 |
|
| 3430 |
rajveer |
909 |
public void getAllPromotions(org.apache.thrift.async.AsyncMethodCallback<getAllPromotions_call> resultHandler) throws org.apache.thrift.TException {
|
|
|
910 |
checkReady();
|
|
|
911 |
getAllPromotions_call method_call = new getAllPromotions_call(resultHandler, this, ___protocolFactory, ___transport);
|
|
|
912 |
this.___currentMethod = method_call;
|
|
|
913 |
___manager.call(method_call);
|
| 1982 |
varun.gupt |
914 |
}
|
|
|
915 |
|
| 3430 |
rajveer |
916 |
public static class getAllPromotions_call extends org.apache.thrift.async.TAsyncMethodCall {
|
|
|
917 |
public getAllPromotions_call(org.apache.thrift.async.AsyncMethodCallback<getAllPromotions_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
|
|
918 |
super(client, protocolFactory, transport, resultHandler, false);
|
| 1982 |
varun.gupt |
919 |
}
|
|
|
920 |
|
| 3430 |
rajveer |
921 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
|
|
922 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPromotions", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
|
|
923 |
getAllPromotions_args args = new getAllPromotions_args();
|
|
|
924 |
args.write(prot);
|
|
|
925 |
prot.writeMessageEnd();
|
|
|
926 |
}
|
| 1982 |
varun.gupt |
927 |
|
| 3430 |
rajveer |
928 |
public List<Promotion> getResult() throws PromotionException, org.apache.thrift.TException {
|
|
|
929 |
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
|
|
930 |
throw new IllegalStateException("Method call not finished!");
|
| 1982 |
varun.gupt |
931 |
}
|
| 3430 |
rajveer |
932 |
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
|
|
933 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
|
|
934 |
return (new Client(prot)).recv_getAllPromotions();
|
| 1982 |
varun.gupt |
935 |
}
|
| 3430 |
rajveer |
936 |
}
|
| 1982 |
varun.gupt |
937 |
|
| 3430 |
rajveer |
938 |
public void getPromotionById(long promotionId, org.apache.thrift.async.AsyncMethodCallback<getPromotionById_call> resultHandler) throws org.apache.thrift.TException {
|
|
|
939 |
checkReady();
|
|
|
940 |
getPromotionById_call method_call = new getPromotionById_call(promotionId, resultHandler, this, ___protocolFactory, ___transport);
|
|
|
941 |
this.___currentMethod = method_call;
|
|
|
942 |
___manager.call(method_call);
|
| 1982 |
varun.gupt |
943 |
}
|
|
|
944 |
|
| 3430 |
rajveer |
945 |
public static class getPromotionById_call extends org.apache.thrift.async.TAsyncMethodCall {
|
|
|
946 |
private long promotionId;
|
|
|
947 |
public getPromotionById_call(long promotionId, org.apache.thrift.async.AsyncMethodCallback<getPromotionById_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
|
|
948 |
super(client, protocolFactory, transport, resultHandler, false);
|
|
|
949 |
this.promotionId = promotionId;
|
| 1982 |
varun.gupt |
950 |
}
|
|
|
951 |
|
| 3430 |
rajveer |
952 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
|
|
953 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPromotionById", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
|
|
954 |
getPromotionById_args args = new getPromotionById_args();
|
|
|
955 |
args.setPromotionId(promotionId);
|
|
|
956 |
args.write(prot);
|
|
|
957 |
prot.writeMessageEnd();
|
|
|
958 |
}
|
| 1982 |
varun.gupt |
959 |
|
| 3430 |
rajveer |
960 |
public Promotion getResult() throws PromotionException, org.apache.thrift.TException {
|
|
|
961 |
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
|
|
962 |
throw new IllegalStateException("Method call not finished!");
|
| 1982 |
varun.gupt |
963 |
}
|
| 3430 |
rajveer |
964 |
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
|
|
965 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
|
|
966 |
return (new Client(prot)).recv_getPromotionById();
|
| 1982 |
varun.gupt |
967 |
}
|
| 3430 |
rajveer |
968 |
}
|
| 1982 |
varun.gupt |
969 |
|
| 3430 |
rajveer |
970 |
public void generateCouponsForPromotion(long promotionId, String couponCode, org.apache.thrift.async.AsyncMethodCallback<generateCouponsForPromotion_call> resultHandler) throws org.apache.thrift.TException {
|
|
|
971 |
checkReady();
|
|
|
972 |
generateCouponsForPromotion_call method_call = new generateCouponsForPromotion_call(promotionId, couponCode, resultHandler, this, ___protocolFactory, ___transport);
|
|
|
973 |
this.___currentMethod = method_call;
|
|
|
974 |
___manager.call(method_call);
|
| 1982 |
varun.gupt |
975 |
}
|
|
|
976 |
|
| 3430 |
rajveer |
977 |
public static class generateCouponsForPromotion_call extends org.apache.thrift.async.TAsyncMethodCall {
|
|
|
978 |
private long promotionId;
|
|
|
979 |
private String couponCode;
|
|
|
980 |
public generateCouponsForPromotion_call(long promotionId, String couponCode, org.apache.thrift.async.AsyncMethodCallback<generateCouponsForPromotion_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
|
|
981 |
super(client, protocolFactory, transport, resultHandler, false);
|
|
|
982 |
this.promotionId = promotionId;
|
|
|
983 |
this.couponCode = couponCode;
|
| 1982 |
varun.gupt |
984 |
}
|
|
|
985 |
|
| 3430 |
rajveer |
986 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
|
|
987 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("generateCouponsForPromotion", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
|
|
988 |
generateCouponsForPromotion_args args = new generateCouponsForPromotion_args();
|
|
|
989 |
args.setPromotionId(promotionId);
|
|
|
990 |
args.setCouponCode(couponCode);
|
|
|
991 |
args.write(prot);
|
|
|
992 |
prot.writeMessageEnd();
|
| 3385 |
varun.gupt |
993 |
}
|
|
|
994 |
|
| 3430 |
rajveer |
995 |
public void getResult() throws PromotionException, org.apache.thrift.TException {
|
|
|
996 |
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
|
|
997 |
throw new IllegalStateException("Method call not finished!");
|
| 3385 |
varun.gupt |
998 |
}
|
| 3430 |
rajveer |
999 |
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
|
|
1000 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
|
|
1001 |
(new Client(prot)).recv_generateCouponsForPromotion();
|
| 3385 |
varun.gupt |
1002 |
}
|
|
|
1003 |
}
|
|
|
1004 |
|
| 3430 |
rajveer |
1005 |
public void applyCoupon(String couponCode, long cartId, org.apache.thrift.async.AsyncMethodCallback<applyCoupon_call> resultHandler) throws org.apache.thrift.TException {
|
|
|
1006 |
checkReady();
|
|
|
1007 |
applyCoupon_call method_call = new applyCoupon_call(couponCode, cartId, resultHandler, this, ___protocolFactory, ___transport);
|
|
|
1008 |
this.___currentMethod = method_call;
|
|
|
1009 |
___manager.call(method_call);
|
| 3385 |
varun.gupt |
1010 |
}
|
|
|
1011 |
|
| 3430 |
rajveer |
1012 |
public static class applyCoupon_call extends org.apache.thrift.async.TAsyncMethodCall {
|
|
|
1013 |
private String couponCode;
|
|
|
1014 |
private long cartId;
|
|
|
1015 |
public applyCoupon_call(String couponCode, long cartId, org.apache.thrift.async.AsyncMethodCallback<applyCoupon_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
|
|
1016 |
super(client, protocolFactory, transport, resultHandler, false);
|
|
|
1017 |
this.couponCode = couponCode;
|
|
|
1018 |
this.cartId = cartId;
|
| 1982 |
varun.gupt |
1019 |
}
|
|
|
1020 |
|
| 3430 |
rajveer |
1021 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
|
|
1022 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("applyCoupon", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
|
|
1023 |
applyCoupon_args args = new applyCoupon_args();
|
|
|
1024 |
args.setCouponCode(couponCode);
|
|
|
1025 |
args.setCartId(cartId);
|
|
|
1026 |
args.write(prot);
|
|
|
1027 |
prot.writeMessageEnd();
|
| 1982 |
varun.gupt |
1028 |
}
|
|
|
1029 |
|
| 3430 |
rajveer |
1030 |
public Cart getResult() throws PromotionException, org.apache.thrift.TException {
|
|
|
1031 |
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
|
|
1032 |
throw new IllegalStateException("Method call not finished!");
|
|
|
1033 |
}
|
|
|
1034 |
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
|
|
1035 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
|
|
1036 |
return (new Client(prot)).recv_applyCoupon();
|
| 1982 |
varun.gupt |
1037 |
}
|
| 3430 |
rajveer |
1038 |
}
|
| 1982 |
varun.gupt |
1039 |
|
| 6736 |
amit.gupta |
1040 |
public void getEmiDiscount(long cartId, org.apache.thrift.async.AsyncMethodCallback<getEmiDiscount_call> resultHandler) throws org.apache.thrift.TException {
|
|
|
1041 |
checkReady();
|
|
|
1042 |
getEmiDiscount_call method_call = new getEmiDiscount_call(cartId, resultHandler, this, ___protocolFactory, ___transport);
|
|
|
1043 |
this.___currentMethod = method_call;
|
|
|
1044 |
___manager.call(method_call);
|
|
|
1045 |
}
|
|
|
1046 |
|
|
|
1047 |
public static class getEmiDiscount_call extends org.apache.thrift.async.TAsyncMethodCall {
|
|
|
1048 |
private long cartId;
|
|
|
1049 |
public getEmiDiscount_call(long cartId, org.apache.thrift.async.AsyncMethodCallback<getEmiDiscount_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
|
|
1050 |
super(client, protocolFactory, transport, resultHandler, false);
|
|
|
1051 |
this.cartId = cartId;
|
|
|
1052 |
}
|
|
|
1053 |
|
|
|
1054 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
|
|
1055 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getEmiDiscount", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
|
|
1056 |
getEmiDiscount_args args = new getEmiDiscount_args();
|
|
|
1057 |
args.setCartId(cartId);
|
|
|
1058 |
args.write(prot);
|
|
|
1059 |
prot.writeMessageEnd();
|
|
|
1060 |
}
|
|
|
1061 |
|
|
|
1062 |
public Map<Long,Double> getResult() throws PromotionException, org.apache.thrift.TException {
|
|
|
1063 |
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
|
|
1064 |
throw new IllegalStateException("Method call not finished!");
|
|
|
1065 |
}
|
|
|
1066 |
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
|
|
1067 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
|
|
1068 |
return (new Client(prot)).recv_getEmiDiscount();
|
|
|
1069 |
}
|
|
|
1070 |
}
|
|
|
1071 |
|
| 6433 |
anupam.sin |
1072 |
public void applyRechargeCoupon(String couponCode, long totalAmount, long userId, org.apache.thrift.async.AsyncMethodCallback<applyRechargeCoupon_call> resultHandler) throws org.apache.thrift.TException {
|
|
|
1073 |
checkReady();
|
|
|
1074 |
applyRechargeCoupon_call method_call = new applyRechargeCoupon_call(couponCode, totalAmount, userId, resultHandler, this, ___protocolFactory, ___transport);
|
|
|
1075 |
this.___currentMethod = method_call;
|
|
|
1076 |
___manager.call(method_call);
|
|
|
1077 |
}
|
|
|
1078 |
|
|
|
1079 |
public static class applyRechargeCoupon_call extends org.apache.thrift.async.TAsyncMethodCall {
|
|
|
1080 |
private String couponCode;
|
|
|
1081 |
private long totalAmount;
|
|
|
1082 |
private long userId;
|
|
|
1083 |
public applyRechargeCoupon_call(String couponCode, long totalAmount, long userId, org.apache.thrift.async.AsyncMethodCallback<applyRechargeCoupon_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
|
|
1084 |
super(client, protocolFactory, transport, resultHandler, false);
|
|
|
1085 |
this.couponCode = couponCode;
|
|
|
1086 |
this.totalAmount = totalAmount;
|
|
|
1087 |
this.userId = userId;
|
|
|
1088 |
}
|
|
|
1089 |
|
|
|
1090 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
|
|
1091 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("applyRechargeCoupon", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
|
|
1092 |
applyRechargeCoupon_args args = new applyRechargeCoupon_args();
|
|
|
1093 |
args.setCouponCode(couponCode);
|
|
|
1094 |
args.setTotalAmount(totalAmount);
|
|
|
1095 |
args.setUserId(userId);
|
|
|
1096 |
args.write(prot);
|
|
|
1097 |
prot.writeMessageEnd();
|
|
|
1098 |
}
|
|
|
1099 |
|
|
|
1100 |
public Map<Long,String> getResult() throws PromotionException, org.apache.thrift.TException {
|
|
|
1101 |
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
|
|
1102 |
throw new IllegalStateException("Method call not finished!");
|
|
|
1103 |
}
|
|
|
1104 |
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
|
|
1105 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
|
|
1106 |
return (new Client(prot)).recv_applyRechargeCoupon();
|
|
|
1107 |
}
|
|
|
1108 |
}
|
|
|
1109 |
|
| 3430 |
rajveer |
1110 |
public void trackCouponUsage(String couponCode, long transactionId, long userId, org.apache.thrift.async.AsyncMethodCallback<trackCouponUsage_call> resultHandler) throws org.apache.thrift.TException {
|
|
|
1111 |
checkReady();
|
|
|
1112 |
trackCouponUsage_call method_call = new trackCouponUsage_call(couponCode, transactionId, userId, resultHandler, this, ___protocolFactory, ___transport);
|
|
|
1113 |
this.___currentMethod = method_call;
|
|
|
1114 |
___manager.call(method_call);
|
|
|
1115 |
}
|
| 1982 |
varun.gupt |
1116 |
|
| 3430 |
rajveer |
1117 |
public static class trackCouponUsage_call extends org.apache.thrift.async.TAsyncMethodCall {
|
|
|
1118 |
private String couponCode;
|
|
|
1119 |
private long transactionId;
|
|
|
1120 |
private long userId;
|
|
|
1121 |
public trackCouponUsage_call(String couponCode, long transactionId, long userId, org.apache.thrift.async.AsyncMethodCallback<trackCouponUsage_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
|
|
1122 |
super(client, protocolFactory, transport, resultHandler, false);
|
|
|
1123 |
this.couponCode = couponCode;
|
|
|
1124 |
this.transactionId = transactionId;
|
|
|
1125 |
this.userId = userId;
|
| 1982 |
varun.gupt |
1126 |
}
|
|
|
1127 |
|
| 3430 |
rajveer |
1128 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
|
|
1129 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("trackCouponUsage", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
|
|
1130 |
trackCouponUsage_args args = new trackCouponUsage_args();
|
|
|
1131 |
args.setCouponCode(couponCode);
|
|
|
1132 |
args.setTransactionId(transactionId);
|
|
|
1133 |
args.setUserId(userId);
|
|
|
1134 |
args.write(prot);
|
|
|
1135 |
prot.writeMessageEnd();
|
| 1982 |
varun.gupt |
1136 |
}
|
|
|
1137 |
|
| 3430 |
rajveer |
1138 |
public void getResult() throws PromotionException, org.apache.thrift.TException {
|
|
|
1139 |
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
|
|
1140 |
throw new IllegalStateException("Method call not finished!");
|
|
|
1141 |
}
|
|
|
1142 |
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
|
|
1143 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
|
|
1144 |
(new Client(prot)).recv_trackCouponUsage();
|
| 1982 |
varun.gupt |
1145 |
}
|
|
|
1146 |
}
|
|
|
1147 |
|
| 3430 |
rajveer |
1148 |
public void getCouponUsageCountByUser(String couponCode, long userId, org.apache.thrift.async.AsyncMethodCallback<getCouponUsageCountByUser_call> resultHandler) throws org.apache.thrift.TException {
|
|
|
1149 |
checkReady();
|
|
|
1150 |
getCouponUsageCountByUser_call method_call = new getCouponUsageCountByUser_call(couponCode, userId, resultHandler, this, ___protocolFactory, ___transport);
|
|
|
1151 |
this.___currentMethod = method_call;
|
|
|
1152 |
___manager.call(method_call);
|
| 1982 |
varun.gupt |
1153 |
}
|
|
|
1154 |
|
| 3430 |
rajveer |
1155 |
public static class getCouponUsageCountByUser_call extends org.apache.thrift.async.TAsyncMethodCall {
|
|
|
1156 |
private String couponCode;
|
|
|
1157 |
private long userId;
|
|
|
1158 |
public getCouponUsageCountByUser_call(String couponCode, long userId, org.apache.thrift.async.AsyncMethodCallback<getCouponUsageCountByUser_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
|
|
1159 |
super(client, protocolFactory, transport, resultHandler, false);
|
|
|
1160 |
this.couponCode = couponCode;
|
|
|
1161 |
this.userId = userId;
|
|
|
1162 |
}
|
| 1982 |
varun.gupt |
1163 |
|
| 3430 |
rajveer |
1164 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
|
|
1165 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCouponUsageCountByUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
|
|
1166 |
getCouponUsageCountByUser_args args = new getCouponUsageCountByUser_args();
|
|
|
1167 |
args.setCouponCode(couponCode);
|
|
|
1168 |
args.setUserId(userId);
|
|
|
1169 |
args.write(prot);
|
|
|
1170 |
prot.writeMessageEnd();
|
|
|
1171 |
}
|
| 1982 |
varun.gupt |
1172 |
|
| 3430 |
rajveer |
1173 |
public long getResult() throws PromotionException, org.apache.thrift.TException {
|
|
|
1174 |
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
|
|
1175 |
throw new IllegalStateException("Method call not finished!");
|
|
|
1176 |
}
|
|
|
1177 |
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
|
|
1178 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
|
|
1179 |
return (new Client(prot)).recv_getCouponUsageCountByUser();
|
|
|
1180 |
}
|
| 1982 |
varun.gupt |
1181 |
}
|
|
|
1182 |
|
| 6497 |
amit.gupta |
1183 |
public void getActiveCodes(long promotionId, org.apache.thrift.async.AsyncMethodCallback<getActiveCodes_call> resultHandler) throws org.apache.thrift.TException {
|
|
|
1184 |
checkReady();
|
|
|
1185 |
getActiveCodes_call method_call = new getActiveCodes_call(promotionId, resultHandler, this, ___protocolFactory, ___transport);
|
|
|
1186 |
this.___currentMethod = method_call;
|
|
|
1187 |
___manager.call(method_call);
|
|
|
1188 |
}
|
|
|
1189 |
|
|
|
1190 |
public static class getActiveCodes_call extends org.apache.thrift.async.TAsyncMethodCall {
|
|
|
1191 |
private long promotionId;
|
|
|
1192 |
public getActiveCodes_call(long promotionId, org.apache.thrift.async.AsyncMethodCallback<getActiveCodes_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
|
|
1193 |
super(client, protocolFactory, transport, resultHandler, false);
|
|
|
1194 |
this.promotionId = promotionId;
|
|
|
1195 |
}
|
|
|
1196 |
|
|
|
1197 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
|
|
1198 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getActiveCodes", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
|
|
1199 |
getActiveCodes_args args = new getActiveCodes_args();
|
|
|
1200 |
args.setPromotionId(promotionId);
|
|
|
1201 |
args.write(prot);
|
|
|
1202 |
prot.writeMessageEnd();
|
|
|
1203 |
}
|
|
|
1204 |
|
|
|
1205 |
public List<Coupon> getResult() throws PromotionException, org.apache.thrift.TException {
|
|
|
1206 |
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
|
|
1207 |
throw new IllegalStateException("Method call not finished!");
|
|
|
1208 |
}
|
|
|
1209 |
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
|
|
1210 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
|
|
1211 |
return (new Client(prot)).recv_getActiveCodes();
|
|
|
1212 |
}
|
|
|
1213 |
}
|
|
|
1214 |
|
|
|
1215 |
public void deleteCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<deleteCoupon_call> resultHandler) throws org.apache.thrift.TException {
|
|
|
1216 |
checkReady();
|
|
|
1217 |
deleteCoupon_call method_call = new deleteCoupon_call(couponCode, resultHandler, this, ___protocolFactory, ___transport);
|
|
|
1218 |
this.___currentMethod = method_call;
|
|
|
1219 |
___manager.call(method_call);
|
|
|
1220 |
}
|
|
|
1221 |
|
|
|
1222 |
public static class deleteCoupon_call extends org.apache.thrift.async.TAsyncMethodCall {
|
|
|
1223 |
private String couponCode;
|
|
|
1224 |
public deleteCoupon_call(String couponCode, org.apache.thrift.async.AsyncMethodCallback<deleteCoupon_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
|
|
1225 |
super(client, protocolFactory, transport, resultHandler, false);
|
|
|
1226 |
this.couponCode = couponCode;
|
|
|
1227 |
}
|
|
|
1228 |
|
|
|
1229 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
|
|
1230 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteCoupon", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
|
|
1231 |
deleteCoupon_args args = new deleteCoupon_args();
|
|
|
1232 |
args.setCouponCode(couponCode);
|
|
|
1233 |
args.write(prot);
|
|
|
1234 |
prot.writeMessageEnd();
|
|
|
1235 |
}
|
|
|
1236 |
|
|
|
1237 |
public void getResult() throws PromotionException, org.apache.thrift.TException {
|
|
|
1238 |
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
|
|
1239 |
throw new IllegalStateException("Method call not finished!");
|
|
|
1240 |
}
|
|
|
1241 |
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
|
|
1242 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
|
|
1243 |
(new Client(prot)).recv_deleteCoupon();
|
|
|
1244 |
}
|
|
|
1245 |
}
|
|
|
1246 |
|
| 3430 |
rajveer |
1247 |
public void getActiveCoupons(org.apache.thrift.async.AsyncMethodCallback<getActiveCoupons_call> resultHandler) throws org.apache.thrift.TException {
|
|
|
1248 |
checkReady();
|
|
|
1249 |
getActiveCoupons_call method_call = new getActiveCoupons_call(resultHandler, this, ___protocolFactory, ___transport);
|
|
|
1250 |
this.___currentMethod = method_call;
|
|
|
1251 |
___manager.call(method_call);
|
| 1982 |
varun.gupt |
1252 |
}
|
|
|
1253 |
|
| 3430 |
rajveer |
1254 |
public static class getActiveCoupons_call extends org.apache.thrift.async.TAsyncMethodCall {
|
|
|
1255 |
public getActiveCoupons_call(org.apache.thrift.async.AsyncMethodCallback<getActiveCoupons_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
|
|
1256 |
super(client, protocolFactory, transport, resultHandler, false);
|
| 1982 |
varun.gupt |
1257 |
}
|
|
|
1258 |
|
| 3430 |
rajveer |
1259 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
|
|
1260 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getActiveCoupons", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
|
|
1261 |
getActiveCoupons_args args = new getActiveCoupons_args();
|
|
|
1262 |
args.write(prot);
|
|
|
1263 |
prot.writeMessageEnd();
|
|
|
1264 |
}
|
| 1982 |
varun.gupt |
1265 |
|
| 3430 |
rajveer |
1266 |
public List<Coupon> getResult() throws PromotionException, org.apache.thrift.TException {
|
|
|
1267 |
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
|
|
1268 |
throw new IllegalStateException("Method call not finished!");
|
|
|
1269 |
}
|
|
|
1270 |
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
|
|
1271 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
|
|
1272 |
return (new Client(prot)).recv_getActiveCoupons();
|
| 1982 |
varun.gupt |
1273 |
}
|
|
|
1274 |
}
|
|
|
1275 |
|
| 6730 |
anupam.sin |
1276 |
public void createCoupon(long promotionId, String couponCode, String arguments, boolean isCod, String prefix, org.apache.thrift.async.AsyncMethodCallback<createCoupon_call> resultHandler) throws org.apache.thrift.TException {
|
| 6250 |
amit.gupta |
1277 |
checkReady();
|
| 6730 |
anupam.sin |
1278 |
createCoupon_call method_call = new createCoupon_call(promotionId, couponCode, arguments, isCod, prefix, resultHandler, this, ___protocolFactory, ___transport);
|
| 6250 |
amit.gupta |
1279 |
this.___currentMethod = method_call;
|
|
|
1280 |
___manager.call(method_call);
|
|
|
1281 |
}
|
|
|
1282 |
|
|
|
1283 |
public static class createCoupon_call extends org.apache.thrift.async.TAsyncMethodCall {
|
|
|
1284 |
private long promotionId;
|
| 6730 |
anupam.sin |
1285 |
private String couponCode;
|
| 6679 |
anupam.sin |
1286 |
private String arguments;
|
| 6356 |
amit.gupta |
1287 |
private boolean isCod;
|
| 6561 |
amit.gupta |
1288 |
private String prefix;
|
| 6730 |
anupam.sin |
1289 |
public createCoupon_call(long promotionId, String couponCode, String arguments, boolean isCod, String prefix, org.apache.thrift.async.AsyncMethodCallback<createCoupon_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
| 6250 |
amit.gupta |
1290 |
super(client, protocolFactory, transport, resultHandler, false);
|
|
|
1291 |
this.promotionId = promotionId;
|
| 6730 |
anupam.sin |
1292 |
this.couponCode = couponCode;
|
| 6679 |
anupam.sin |
1293 |
this.arguments = arguments;
|
| 6356 |
amit.gupta |
1294 |
this.isCod = isCod;
|
| 6561 |
amit.gupta |
1295 |
this.prefix = prefix;
|
| 6250 |
amit.gupta |
1296 |
}
|
|
|
1297 |
|
|
|
1298 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
|
|
1299 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createCoupon", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
|
|
1300 |
createCoupon_args args = new createCoupon_args();
|
|
|
1301 |
args.setPromotionId(promotionId);
|
| 6730 |
anupam.sin |
1302 |
args.setCouponCode(couponCode);
|
| 6679 |
anupam.sin |
1303 |
args.setArguments(arguments);
|
| 6356 |
amit.gupta |
1304 |
args.setIsCod(isCod);
|
| 6561 |
amit.gupta |
1305 |
args.setPrefix(prefix);
|
| 6250 |
amit.gupta |
1306 |
args.write(prot);
|
|
|
1307 |
prot.writeMessageEnd();
|
|
|
1308 |
}
|
|
|
1309 |
|
|
|
1310 |
public String getResult() throws PromotionException, org.apache.thrift.TException {
|
|
|
1311 |
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
|
|
1312 |
throw new IllegalStateException("Method call not finished!");
|
|
|
1313 |
}
|
|
|
1314 |
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
|
|
1315 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
|
|
1316 |
return (new Client(prot)).recv_createCoupon();
|
|
|
1317 |
}
|
|
|
1318 |
}
|
|
|
1319 |
|
| 3430 |
rajveer |
1320 |
public void getSuccessfulPaymentCountForCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<getSuccessfulPaymentCountForCoupon_call> resultHandler) throws org.apache.thrift.TException {
|
|
|
1321 |
checkReady();
|
|
|
1322 |
getSuccessfulPaymentCountForCoupon_call method_call = new getSuccessfulPaymentCountForCoupon_call(couponCode, resultHandler, this, ___protocolFactory, ___transport);
|
|
|
1323 |
this.___currentMethod = method_call;
|
|
|
1324 |
___manager.call(method_call);
|
| 1982 |
varun.gupt |
1325 |
}
|
|
|
1326 |
|
| 3430 |
rajveer |
1327 |
public static class getSuccessfulPaymentCountForCoupon_call extends org.apache.thrift.async.TAsyncMethodCall {
|
|
|
1328 |
private String couponCode;
|
|
|
1329 |
public getSuccessfulPaymentCountForCoupon_call(String couponCode, org.apache.thrift.async.AsyncMethodCallback<getSuccessfulPaymentCountForCoupon_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
|
|
1330 |
super(client, protocolFactory, transport, resultHandler, false);
|
|
|
1331 |
this.couponCode = couponCode;
|
| 1982 |
varun.gupt |
1332 |
}
|
|
|
1333 |
|
| 3430 |
rajveer |
1334 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
|
|
1335 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSuccessfulPaymentCountForCoupon", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
|
|
1336 |
getSuccessfulPaymentCountForCoupon_args args = new getSuccessfulPaymentCountForCoupon_args();
|
|
|
1337 |
args.setCouponCode(couponCode);
|
|
|
1338 |
args.write(prot);
|
|
|
1339 |
prot.writeMessageEnd();
|
|
|
1340 |
}
|
| 1982 |
varun.gupt |
1341 |
|
| 3430 |
rajveer |
1342 |
public long getResult() throws PromotionException, org.apache.thrift.TException {
|
|
|
1343 |
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
|
|
1344 |
throw new IllegalStateException("Method call not finished!");
|
|
|
1345 |
}
|
|
|
1346 |
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
|
|
1347 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
|
|
1348 |
return (new Client(prot)).recv_getSuccessfulPaymentCountForCoupon();
|
|
|
1349 |
}
|
| 1982 |
varun.gupt |
1350 |
}
|
|
|
1351 |
|
| 3430 |
rajveer |
1352 |
public void getRuleDocString(String ruleName, org.apache.thrift.async.AsyncMethodCallback<getRuleDocString_call> resultHandler) throws org.apache.thrift.TException {
|
|
|
1353 |
checkReady();
|
|
|
1354 |
getRuleDocString_call method_call = new getRuleDocString_call(ruleName, resultHandler, this, ___protocolFactory, ___transport);
|
|
|
1355 |
this.___currentMethod = method_call;
|
|
|
1356 |
___manager.call(method_call);
|
| 1982 |
varun.gupt |
1357 |
}
|
|
|
1358 |
|
| 3430 |
rajveer |
1359 |
public static class getRuleDocString_call extends org.apache.thrift.async.TAsyncMethodCall {
|
|
|
1360 |
private String ruleName;
|
|
|
1361 |
public getRuleDocString_call(String ruleName, org.apache.thrift.async.AsyncMethodCallback<getRuleDocString_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
|
|
1362 |
super(client, protocolFactory, transport, resultHandler, false);
|
|
|
1363 |
this.ruleName = ruleName;
|
|
|
1364 |
}
|
| 1982 |
varun.gupt |
1365 |
|
| 3430 |
rajveer |
1366 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
|
|
1367 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRuleDocString", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
|
|
1368 |
getRuleDocString_args args = new getRuleDocString_args();
|
|
|
1369 |
args.setRuleName(ruleName);
|
|
|
1370 |
args.write(prot);
|
|
|
1371 |
prot.writeMessageEnd();
|
| 1982 |
varun.gupt |
1372 |
}
|
|
|
1373 |
|
| 3430 |
rajveer |
1374 |
public String getResult() throws org.apache.thrift.TException {
|
|
|
1375 |
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
|
|
1376 |
throw new IllegalStateException("Method call not finished!");
|
| 1982 |
varun.gupt |
1377 |
}
|
| 3430 |
rajveer |
1378 |
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
|
|
1379 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
|
|
1380 |
return (new Client(prot)).recv_getRuleDocString();
|
| 1982 |
varun.gupt |
1381 |
}
|
|
|
1382 |
}
|
|
|
1383 |
|
| 4189 |
varun.gupt |
1384 |
public void getItemDiscountMap(List<Long> itemIds, org.apache.thrift.async.AsyncMethodCallback<getItemDiscountMap_call> resultHandler) throws org.apache.thrift.TException {
|
|
|
1385 |
checkReady();
|
|
|
1386 |
getItemDiscountMap_call method_call = new getItemDiscountMap_call(itemIds, resultHandler, this, ___protocolFactory, ___transport);
|
|
|
1387 |
this.___currentMethod = method_call;
|
|
|
1388 |
___manager.call(method_call);
|
|
|
1389 |
}
|
|
|
1390 |
|
|
|
1391 |
public static class getItemDiscountMap_call extends org.apache.thrift.async.TAsyncMethodCall {
|
|
|
1392 |
private List<Long> itemIds;
|
|
|
1393 |
public getItemDiscountMap_call(List<Long> itemIds, org.apache.thrift.async.AsyncMethodCallback<getItemDiscountMap_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
|
|
1394 |
super(client, protocolFactory, transport, resultHandler, false);
|
|
|
1395 |
this.itemIds = itemIds;
|
|
|
1396 |
}
|
|
|
1397 |
|
|
|
1398 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
|
|
1399 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemDiscountMap", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
|
|
1400 |
getItemDiscountMap_args args = new getItemDiscountMap_args();
|
|
|
1401 |
args.setItemIds(itemIds);
|
|
|
1402 |
args.write(prot);
|
|
|
1403 |
prot.writeMessageEnd();
|
|
|
1404 |
}
|
|
|
1405 |
|
|
|
1406 |
public List<ItemCouponDiscount> getResult() throws PromotionException, org.apache.thrift.TException {
|
|
|
1407 |
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
|
|
1408 |
throw new IllegalStateException("Method call not finished!");
|
|
|
1409 |
}
|
|
|
1410 |
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
|
|
1411 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
|
|
1412 |
return (new Client(prot)).recv_getItemDiscountMap();
|
|
|
1413 |
}
|
|
|
1414 |
}
|
|
|
1415 |
|
| 4494 |
varun.gupt |
1416 |
public void getDiscountsForEntity(long entityId, org.apache.thrift.async.AsyncMethodCallback<getDiscountsForEntity_call> resultHandler) throws org.apache.thrift.TException {
|
|
|
1417 |
checkReady();
|
|
|
1418 |
getDiscountsForEntity_call method_call = new getDiscountsForEntity_call(entityId, resultHandler, this, ___protocolFactory, ___transport);
|
|
|
1419 |
this.___currentMethod = method_call;
|
|
|
1420 |
___manager.call(method_call);
|
|
|
1421 |
}
|
|
|
1422 |
|
|
|
1423 |
public static class getDiscountsForEntity_call extends org.apache.thrift.async.TAsyncMethodCall {
|
|
|
1424 |
private long entityId;
|
|
|
1425 |
public getDiscountsForEntity_call(long entityId, org.apache.thrift.async.AsyncMethodCallback<getDiscountsForEntity_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
|
|
1426 |
super(client, protocolFactory, transport, resultHandler, false);
|
|
|
1427 |
this.entityId = entityId;
|
|
|
1428 |
}
|
|
|
1429 |
|
|
|
1430 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
|
|
1431 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getDiscountsForEntity", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
|
|
1432 |
getDiscountsForEntity_args args = new getDiscountsForEntity_args();
|
|
|
1433 |
args.setEntityId(entityId);
|
|
|
1434 |
args.write(prot);
|
|
|
1435 |
prot.writeMessageEnd();
|
|
|
1436 |
}
|
|
|
1437 |
|
|
|
1438 |
public Map<String,Double> getResult() throws org.apache.thrift.TException {
|
|
|
1439 |
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
|
|
1440 |
throw new IllegalStateException("Method call not finished!");
|
|
|
1441 |
}
|
|
|
1442 |
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
|
|
1443 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
|
|
1444 |
return (new Client(prot)).recv_getDiscountsForEntity();
|
|
|
1445 |
}
|
|
|
1446 |
}
|
|
|
1447 |
|
| 5469 |
rajveer |
1448 |
public void addVoucher(Voucher voucher, org.apache.thrift.async.AsyncMethodCallback<addVoucher_call> resultHandler) throws org.apache.thrift.TException {
|
|
|
1449 |
checkReady();
|
|
|
1450 |
addVoucher_call method_call = new addVoucher_call(voucher, resultHandler, this, ___protocolFactory, ___transport);
|
|
|
1451 |
this.___currentMethod = method_call;
|
|
|
1452 |
___manager.call(method_call);
|
|
|
1453 |
}
|
|
|
1454 |
|
|
|
1455 |
public static class addVoucher_call extends org.apache.thrift.async.TAsyncMethodCall {
|
|
|
1456 |
private Voucher voucher;
|
|
|
1457 |
public addVoucher_call(Voucher voucher, org.apache.thrift.async.AsyncMethodCallback<addVoucher_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
|
|
1458 |
super(client, protocolFactory, transport, resultHandler, false);
|
|
|
1459 |
this.voucher = voucher;
|
|
|
1460 |
}
|
|
|
1461 |
|
|
|
1462 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
|
|
1463 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addVoucher", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
|
|
1464 |
addVoucher_args args = new addVoucher_args();
|
|
|
1465 |
args.setVoucher(voucher);
|
|
|
1466 |
args.write(prot);
|
|
|
1467 |
prot.writeMessageEnd();
|
|
|
1468 |
}
|
|
|
1469 |
|
|
|
1470 |
public void getResult() throws org.apache.thrift.TException {
|
|
|
1471 |
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
|
|
1472 |
throw new IllegalStateException("Method call not finished!");
|
|
|
1473 |
}
|
|
|
1474 |
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
|
|
1475 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
|
|
1476 |
(new Client(prot)).recv_addVoucher();
|
|
|
1477 |
}
|
|
|
1478 |
}
|
|
|
1479 |
|
|
|
1480 |
public void assignVoucher(long userId, String userEmail, VoucherType voucherType, long amount, org.apache.thrift.async.AsyncMethodCallback<assignVoucher_call> resultHandler) throws org.apache.thrift.TException {
|
|
|
1481 |
checkReady();
|
|
|
1482 |
assignVoucher_call method_call = new assignVoucher_call(userId, userEmail, voucherType, amount, resultHandler, this, ___protocolFactory, ___transport);
|
|
|
1483 |
this.___currentMethod = method_call;
|
|
|
1484 |
___manager.call(method_call);
|
|
|
1485 |
}
|
|
|
1486 |
|
|
|
1487 |
public static class assignVoucher_call extends org.apache.thrift.async.TAsyncMethodCall {
|
|
|
1488 |
private long userId;
|
|
|
1489 |
private String userEmail;
|
|
|
1490 |
private VoucherType voucherType;
|
|
|
1491 |
private long amount;
|
|
|
1492 |
public assignVoucher_call(long userId, String userEmail, VoucherType voucherType, long amount, org.apache.thrift.async.AsyncMethodCallback<assignVoucher_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
|
|
1493 |
super(client, protocolFactory, transport, resultHandler, false);
|
|
|
1494 |
this.userId = userId;
|
|
|
1495 |
this.userEmail = userEmail;
|
|
|
1496 |
this.voucherType = voucherType;
|
|
|
1497 |
this.amount = amount;
|
|
|
1498 |
}
|
|
|
1499 |
|
|
|
1500 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
|
|
1501 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("assignVoucher", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
|
|
1502 |
assignVoucher_args args = new assignVoucher_args();
|
|
|
1503 |
args.setUserId(userId);
|
|
|
1504 |
args.setUserEmail(userEmail);
|
|
|
1505 |
args.setVoucherType(voucherType);
|
|
|
1506 |
args.setAmount(amount);
|
|
|
1507 |
args.write(prot);
|
|
|
1508 |
prot.writeMessageEnd();
|
|
|
1509 |
}
|
|
|
1510 |
|
|
|
1511 |
public Voucher getResult() throws org.apache.thrift.TException {
|
|
|
1512 |
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
|
|
1513 |
throw new IllegalStateException("Method call not finished!");
|
|
|
1514 |
}
|
|
|
1515 |
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
|
|
1516 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
|
|
1517 |
return (new Client(prot)).recv_assignVoucher();
|
|
|
1518 |
}
|
|
|
1519 |
}
|
|
|
1520 |
|
|
|
1521 |
public void markVoucherAsRedeemed(String voucherCode, long redeemedOn, org.apache.thrift.async.AsyncMethodCallback<markVoucherAsRedeemed_call> resultHandler) throws org.apache.thrift.TException {
|
|
|
1522 |
checkReady();
|
|
|
1523 |
markVoucherAsRedeemed_call method_call = new markVoucherAsRedeemed_call(voucherCode, redeemedOn, resultHandler, this, ___protocolFactory, ___transport);
|
|
|
1524 |
this.___currentMethod = method_call;
|
|
|
1525 |
___manager.call(method_call);
|
|
|
1526 |
}
|
|
|
1527 |
|
|
|
1528 |
public static class markVoucherAsRedeemed_call extends org.apache.thrift.async.TAsyncMethodCall {
|
|
|
1529 |
private String voucherCode;
|
|
|
1530 |
private long redeemedOn;
|
|
|
1531 |
public markVoucherAsRedeemed_call(String voucherCode, long redeemedOn, org.apache.thrift.async.AsyncMethodCallback<markVoucherAsRedeemed_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
|
|
1532 |
super(client, protocolFactory, transport, resultHandler, false);
|
|
|
1533 |
this.voucherCode = voucherCode;
|
|
|
1534 |
this.redeemedOn = redeemedOn;
|
|
|
1535 |
}
|
|
|
1536 |
|
|
|
1537 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
|
|
1538 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("markVoucherAsRedeemed", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
|
|
1539 |
markVoucherAsRedeemed_args args = new markVoucherAsRedeemed_args();
|
|
|
1540 |
args.setVoucherCode(voucherCode);
|
|
|
1541 |
args.setRedeemedOn(redeemedOn);
|
|
|
1542 |
args.write(prot);
|
|
|
1543 |
prot.writeMessageEnd();
|
|
|
1544 |
}
|
|
|
1545 |
|
|
|
1546 |
public boolean getResult() throws org.apache.thrift.TException {
|
|
|
1547 |
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
|
|
1548 |
throw new IllegalStateException("Method call not finished!");
|
|
|
1549 |
}
|
|
|
1550 |
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
|
|
1551 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
|
|
1552 |
return (new Client(prot)).recv_markVoucherAsRedeemed();
|
|
|
1553 |
}
|
|
|
1554 |
}
|
|
|
1555 |
|
| 3430 |
rajveer |
1556 |
}
|
| 1982 |
varun.gupt |
1557 |
|
| 3430 |
rajveer |
1558 |
public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
|
|
|
1559 |
private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
|
|
|
1560 |
public Processor(I iface) {
|
|
|
1561 |
super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
|
| 1982 |
varun.gupt |
1562 |
}
|
|
|
1563 |
|
| 3430 |
rajveer |
1564 |
protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
|
|
|
1565 |
super(iface, getProcessMap(processMap));
|
| 1982 |
varun.gupt |
1566 |
}
|
|
|
1567 |
|
| 3430 |
rajveer |
1568 |
private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
|
|
|
1569 |
processMap.put("createPromotion", new createPromotion());
|
| 6301 |
amit.gupta |
1570 |
processMap.put("getCoupon", new getCoupon());
|
|
|
1571 |
processMap.put("isGiftVoucher", new isGiftVoucher());
|
| 6356 |
amit.gupta |
1572 |
processMap.put("isCodApplicable", new isCodApplicable());
|
| 3430 |
rajveer |
1573 |
processMap.put("getAllPromotions", new getAllPromotions());
|
|
|
1574 |
processMap.put("getPromotionById", new getPromotionById());
|
|
|
1575 |
processMap.put("generateCouponsForPromotion", new generateCouponsForPromotion());
|
|
|
1576 |
processMap.put("applyCoupon", new applyCoupon());
|
| 6736 |
amit.gupta |
1577 |
processMap.put("getEmiDiscount", new getEmiDiscount());
|
| 6433 |
anupam.sin |
1578 |
processMap.put("applyRechargeCoupon", new applyRechargeCoupon());
|
| 3430 |
rajveer |
1579 |
processMap.put("trackCouponUsage", new trackCouponUsage());
|
|
|
1580 |
processMap.put("getCouponUsageCountByUser", new getCouponUsageCountByUser());
|
| 6497 |
amit.gupta |
1581 |
processMap.put("getActiveCodes", new getActiveCodes());
|
|
|
1582 |
processMap.put("deleteCoupon", new deleteCoupon());
|
| 3430 |
rajveer |
1583 |
processMap.put("getActiveCoupons", new getActiveCoupons());
|
| 6250 |
amit.gupta |
1584 |
processMap.put("createCoupon", new createCoupon());
|
| 3430 |
rajveer |
1585 |
processMap.put("getSuccessfulPaymentCountForCoupon", new getSuccessfulPaymentCountForCoupon());
|
|
|
1586 |
processMap.put("getRuleDocString", new getRuleDocString());
|
| 4189 |
varun.gupt |
1587 |
processMap.put("getItemDiscountMap", new getItemDiscountMap());
|
| 4494 |
varun.gupt |
1588 |
processMap.put("getDiscountsForEntity", new getDiscountsForEntity());
|
| 5469 |
rajveer |
1589 |
processMap.put("addVoucher", new addVoucher());
|
|
|
1590 |
processMap.put("assignVoucher", new assignVoucher());
|
|
|
1591 |
processMap.put("markVoucherAsRedeemed", new markVoucherAsRedeemed());
|
| 3430 |
rajveer |
1592 |
return processMap;
|
| 1982 |
varun.gupt |
1593 |
}
|
|
|
1594 |
|
| 3430 |
rajveer |
1595 |
private static class createPromotion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPromotion_args> {
|
|
|
1596 |
public createPromotion() {
|
|
|
1597 |
super("createPromotion");
|
|
|
1598 |
}
|
| 1982 |
varun.gupt |
1599 |
|
| 3430 |
rajveer |
1600 |
protected createPromotion_args getEmptyArgsInstance() {
|
|
|
1601 |
return new createPromotion_args();
|
|
|
1602 |
}
|
| 1982 |
varun.gupt |
1603 |
|
| 3430 |
rajveer |
1604 |
protected createPromotion_result getResult(I iface, createPromotion_args args) throws org.apache.thrift.TException {
|
|
|
1605 |
createPromotion_result result = new createPromotion_result();
|
|
|
1606 |
try {
|
|
|
1607 |
iface.createPromotion(args.name, args.ruleExecutionSrc, args.startOn, args.endOn);
|
|
|
1608 |
} catch (PromotionException pex) {
|
|
|
1609 |
result.pex = pex;
|
| 1982 |
varun.gupt |
1610 |
}
|
| 3430 |
rajveer |
1611 |
return result;
|
| 1982 |
varun.gupt |
1612 |
}
|
| 3430 |
rajveer |
1613 |
}
|
| 1982 |
varun.gupt |
1614 |
|
| 6301 |
amit.gupta |
1615 |
private static class getCoupon<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCoupon_args> {
|
|
|
1616 |
public getCoupon() {
|
|
|
1617 |
super("getCoupon");
|
|
|
1618 |
}
|
|
|
1619 |
|
|
|
1620 |
protected getCoupon_args getEmptyArgsInstance() {
|
|
|
1621 |
return new getCoupon_args();
|
|
|
1622 |
}
|
|
|
1623 |
|
|
|
1624 |
protected getCoupon_result getResult(I iface, getCoupon_args args) throws org.apache.thrift.TException {
|
|
|
1625 |
getCoupon_result result = new getCoupon_result();
|
|
|
1626 |
try {
|
|
|
1627 |
result.success = iface.getCoupon(args.couponCode);
|
|
|
1628 |
} catch (PromotionException pex) {
|
|
|
1629 |
result.pex = pex;
|
|
|
1630 |
}
|
|
|
1631 |
return result;
|
|
|
1632 |
}
|
|
|
1633 |
}
|
|
|
1634 |
|
|
|
1635 |
private static class isGiftVoucher<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isGiftVoucher_args> {
|
|
|
1636 |
public isGiftVoucher() {
|
|
|
1637 |
super("isGiftVoucher");
|
|
|
1638 |
}
|
|
|
1639 |
|
|
|
1640 |
protected isGiftVoucher_args getEmptyArgsInstance() {
|
|
|
1641 |
return new isGiftVoucher_args();
|
|
|
1642 |
}
|
|
|
1643 |
|
|
|
1644 |
protected isGiftVoucher_result getResult(I iface, isGiftVoucher_args args) throws org.apache.thrift.TException {
|
|
|
1645 |
isGiftVoucher_result result = new isGiftVoucher_result();
|
|
|
1646 |
try {
|
|
|
1647 |
result.success = iface.isGiftVoucher(args.couponCode);
|
|
|
1648 |
result.setSuccessIsSet(true);
|
|
|
1649 |
} catch (PromotionException pex) {
|
|
|
1650 |
result.pex = pex;
|
|
|
1651 |
}
|
|
|
1652 |
return result;
|
|
|
1653 |
}
|
|
|
1654 |
}
|
|
|
1655 |
|
| 6356 |
amit.gupta |
1656 |
private static class isCodApplicable<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isCodApplicable_args> {
|
|
|
1657 |
public isCodApplicable() {
|
|
|
1658 |
super("isCodApplicable");
|
|
|
1659 |
}
|
|
|
1660 |
|
|
|
1661 |
protected isCodApplicable_args getEmptyArgsInstance() {
|
|
|
1662 |
return new isCodApplicable_args();
|
|
|
1663 |
}
|
|
|
1664 |
|
|
|
1665 |
protected isCodApplicable_result getResult(I iface, isCodApplicable_args args) throws org.apache.thrift.TException {
|
|
|
1666 |
isCodApplicable_result result = new isCodApplicable_result();
|
|
|
1667 |
try {
|
|
|
1668 |
result.success = iface.isCodApplicable(args.couponCode);
|
|
|
1669 |
result.setSuccessIsSet(true);
|
|
|
1670 |
} catch (PromotionException pex) {
|
|
|
1671 |
result.pex = pex;
|
|
|
1672 |
}
|
|
|
1673 |
return result;
|
|
|
1674 |
}
|
|
|
1675 |
}
|
|
|
1676 |
|
| 3430 |
rajveer |
1677 |
private static class getAllPromotions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPromotions_args> {
|
|
|
1678 |
public getAllPromotions() {
|
|
|
1679 |
super("getAllPromotions");
|
| 1982 |
varun.gupt |
1680 |
}
|
|
|
1681 |
|
| 3430 |
rajveer |
1682 |
protected getAllPromotions_args getEmptyArgsInstance() {
|
|
|
1683 |
return new getAllPromotions_args();
|
| 1982 |
varun.gupt |
1684 |
}
|
|
|
1685 |
|
| 3430 |
rajveer |
1686 |
protected getAllPromotions_result getResult(I iface, getAllPromotions_args args) throws org.apache.thrift.TException {
|
|
|
1687 |
getAllPromotions_result result = new getAllPromotions_result();
|
|
|
1688 |
try {
|
|
|
1689 |
result.success = iface.getAllPromotions();
|
|
|
1690 |
} catch (PromotionException pex) {
|
|
|
1691 |
result.pex = pex;
|
|
|
1692 |
}
|
|
|
1693 |
return result;
|
| 1982 |
varun.gupt |
1694 |
}
|
| 3430 |
rajveer |
1695 |
}
|
| 1982 |
varun.gupt |
1696 |
|
| 3430 |
rajveer |
1697 |
private static class getPromotionById<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPromotionById_args> {
|
|
|
1698 |
public getPromotionById() {
|
|
|
1699 |
super("getPromotionById");
|
| 1982 |
varun.gupt |
1700 |
}
|
|
|
1701 |
|
| 3430 |
rajveer |
1702 |
protected getPromotionById_args getEmptyArgsInstance() {
|
|
|
1703 |
return new getPromotionById_args();
|
| 1982 |
varun.gupt |
1704 |
}
|
|
|
1705 |
|
| 3430 |
rajveer |
1706 |
protected getPromotionById_result getResult(I iface, getPromotionById_args args) throws org.apache.thrift.TException {
|
|
|
1707 |
getPromotionById_result result = new getPromotionById_result();
|
|
|
1708 |
try {
|
|
|
1709 |
result.success = iface.getPromotionById(args.promotionId);
|
|
|
1710 |
} catch (PromotionException pex) {
|
|
|
1711 |
result.pex = pex;
|
|
|
1712 |
}
|
|
|
1713 |
return result;
|
| 1982 |
varun.gupt |
1714 |
}
|
|
|
1715 |
}
|
|
|
1716 |
|
| 3430 |
rajveer |
1717 |
private static class generateCouponsForPromotion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, generateCouponsForPromotion_args> {
|
|
|
1718 |
public generateCouponsForPromotion() {
|
|
|
1719 |
super("generateCouponsForPromotion");
|
|
|
1720 |
}
|
| 1982 |
varun.gupt |
1721 |
|
| 3430 |
rajveer |
1722 |
protected generateCouponsForPromotion_args getEmptyArgsInstance() {
|
|
|
1723 |
return new generateCouponsForPromotion_args();
|
|
|
1724 |
}
|
| 1982 |
varun.gupt |
1725 |
|
| 3430 |
rajveer |
1726 |
protected generateCouponsForPromotion_result getResult(I iface, generateCouponsForPromotion_args args) throws org.apache.thrift.TException {
|
|
|
1727 |
generateCouponsForPromotion_result result = new generateCouponsForPromotion_result();
|
|
|
1728 |
try {
|
|
|
1729 |
iface.generateCouponsForPromotion(args.promotionId, args.couponCode);
|
|
|
1730 |
} catch (PromotionException pex) {
|
|
|
1731 |
result.pex = pex;
|
|
|
1732 |
}
|
|
|
1733 |
return result;
|
|
|
1734 |
}
|
| 1982 |
varun.gupt |
1735 |
}
|
|
|
1736 |
|
| 3430 |
rajveer |
1737 |
private static class applyCoupon<I extends Iface> extends org.apache.thrift.ProcessFunction<I, applyCoupon_args> {
|
|
|
1738 |
public applyCoupon() {
|
|
|
1739 |
super("applyCoupon");
|
|
|
1740 |
}
|
| 1982 |
varun.gupt |
1741 |
|
| 3430 |
rajveer |
1742 |
protected applyCoupon_args getEmptyArgsInstance() {
|
|
|
1743 |
return new applyCoupon_args();
|
|
|
1744 |
}
|
| 1982 |
varun.gupt |
1745 |
|
| 3430 |
rajveer |
1746 |
protected applyCoupon_result getResult(I iface, applyCoupon_args args) throws org.apache.thrift.TException {
|
|
|
1747 |
applyCoupon_result result = new applyCoupon_result();
|
|
|
1748 |
try {
|
|
|
1749 |
result.success = iface.applyCoupon(args.couponCode, args.cartId);
|
|
|
1750 |
} catch (PromotionException pex) {
|
|
|
1751 |
result.pex = pex;
|
|
|
1752 |
}
|
|
|
1753 |
return result;
|
| 1982 |
varun.gupt |
1754 |
}
|
|
|
1755 |
}
|
|
|
1756 |
|
| 6736 |
amit.gupta |
1757 |
private static class getEmiDiscount<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getEmiDiscount_args> {
|
|
|
1758 |
public getEmiDiscount() {
|
|
|
1759 |
super("getEmiDiscount");
|
|
|
1760 |
}
|
|
|
1761 |
|
|
|
1762 |
protected getEmiDiscount_args getEmptyArgsInstance() {
|
|
|
1763 |
return new getEmiDiscount_args();
|
|
|
1764 |
}
|
|
|
1765 |
|
|
|
1766 |
protected getEmiDiscount_result getResult(I iface, getEmiDiscount_args args) throws org.apache.thrift.TException {
|
|
|
1767 |
getEmiDiscount_result result = new getEmiDiscount_result();
|
|
|
1768 |
try {
|
|
|
1769 |
result.success = iface.getEmiDiscount(args.cartId);
|
|
|
1770 |
} catch (PromotionException pex) {
|
|
|
1771 |
result.pex = pex;
|
|
|
1772 |
}
|
|
|
1773 |
return result;
|
|
|
1774 |
}
|
|
|
1775 |
}
|
|
|
1776 |
|
| 6433 |
anupam.sin |
1777 |
private static class applyRechargeCoupon<I extends Iface> extends org.apache.thrift.ProcessFunction<I, applyRechargeCoupon_args> {
|
|
|
1778 |
public applyRechargeCoupon() {
|
|
|
1779 |
super("applyRechargeCoupon");
|
|
|
1780 |
}
|
|
|
1781 |
|
|
|
1782 |
protected applyRechargeCoupon_args getEmptyArgsInstance() {
|
|
|
1783 |
return new applyRechargeCoupon_args();
|
|
|
1784 |
}
|
|
|
1785 |
|
|
|
1786 |
protected applyRechargeCoupon_result getResult(I iface, applyRechargeCoupon_args args) throws org.apache.thrift.TException {
|
|
|
1787 |
applyRechargeCoupon_result result = new applyRechargeCoupon_result();
|
|
|
1788 |
try {
|
|
|
1789 |
result.success = iface.applyRechargeCoupon(args.couponCode, args.totalAmount, args.userId);
|
|
|
1790 |
} catch (PromotionException pex) {
|
|
|
1791 |
result.pex = pex;
|
|
|
1792 |
}
|
|
|
1793 |
return result;
|
|
|
1794 |
}
|
|
|
1795 |
}
|
|
|
1796 |
|
| 3430 |
rajveer |
1797 |
private static class trackCouponUsage<I extends Iface> extends org.apache.thrift.ProcessFunction<I, trackCouponUsage_args> {
|
|
|
1798 |
public trackCouponUsage() {
|
|
|
1799 |
super("trackCouponUsage");
|
|
|
1800 |
}
|
| 1982 |
varun.gupt |
1801 |
|
| 3430 |
rajveer |
1802 |
protected trackCouponUsage_args getEmptyArgsInstance() {
|
|
|
1803 |
return new trackCouponUsage_args();
|
| 1982 |
varun.gupt |
1804 |
}
|
|
|
1805 |
|
| 3430 |
rajveer |
1806 |
protected trackCouponUsage_result getResult(I iface, trackCouponUsage_args args) throws org.apache.thrift.TException {
|
|
|
1807 |
trackCouponUsage_result result = new trackCouponUsage_result();
|
|
|
1808 |
try {
|
|
|
1809 |
iface.trackCouponUsage(args.couponCode, args.transactionId, args.userId);
|
|
|
1810 |
} catch (PromotionException pex) {
|
|
|
1811 |
result.pex = pex;
|
|
|
1812 |
}
|
|
|
1813 |
return result;
|
|
|
1814 |
}
|
| 1982 |
varun.gupt |
1815 |
}
|
|
|
1816 |
|
| 3430 |
rajveer |
1817 |
private static class getCouponUsageCountByUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCouponUsageCountByUser_args> {
|
|
|
1818 |
public getCouponUsageCountByUser() {
|
|
|
1819 |
super("getCouponUsageCountByUser");
|
| 1982 |
varun.gupt |
1820 |
}
|
|
|
1821 |
|
| 3430 |
rajveer |
1822 |
protected getCouponUsageCountByUser_args getEmptyArgsInstance() {
|
|
|
1823 |
return new getCouponUsageCountByUser_args();
|
|
|
1824 |
}
|
| 1982 |
varun.gupt |
1825 |
|
| 3430 |
rajveer |
1826 |
protected getCouponUsageCountByUser_result getResult(I iface, getCouponUsageCountByUser_args args) throws org.apache.thrift.TException {
|
|
|
1827 |
getCouponUsageCountByUser_result result = new getCouponUsageCountByUser_result();
|
|
|
1828 |
try {
|
|
|
1829 |
result.success = iface.getCouponUsageCountByUser(args.couponCode, args.userId);
|
|
|
1830 |
result.setSuccessIsSet(true);
|
|
|
1831 |
} catch (PromotionException pex) {
|
|
|
1832 |
result.pex = pex;
|
|
|
1833 |
}
|
|
|
1834 |
return result;
|
|
|
1835 |
}
|
| 1982 |
varun.gupt |
1836 |
}
|
|
|
1837 |
|
| 6497 |
amit.gupta |
1838 |
private static class getActiveCodes<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getActiveCodes_args> {
|
|
|
1839 |
public getActiveCodes() {
|
|
|
1840 |
super("getActiveCodes");
|
|
|
1841 |
}
|
|
|
1842 |
|
|
|
1843 |
protected getActiveCodes_args getEmptyArgsInstance() {
|
|
|
1844 |
return new getActiveCodes_args();
|
|
|
1845 |
}
|
|
|
1846 |
|
|
|
1847 |
protected getActiveCodes_result getResult(I iface, getActiveCodes_args args) throws org.apache.thrift.TException {
|
|
|
1848 |
getActiveCodes_result result = new getActiveCodes_result();
|
|
|
1849 |
try {
|
|
|
1850 |
result.success = iface.getActiveCodes(args.promotionId);
|
|
|
1851 |
} catch (PromotionException pex) {
|
|
|
1852 |
result.pex = pex;
|
|
|
1853 |
}
|
|
|
1854 |
return result;
|
|
|
1855 |
}
|
|
|
1856 |
}
|
|
|
1857 |
|
|
|
1858 |
private static class deleteCoupon<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteCoupon_args> {
|
|
|
1859 |
public deleteCoupon() {
|
|
|
1860 |
super("deleteCoupon");
|
|
|
1861 |
}
|
|
|
1862 |
|
|
|
1863 |
protected deleteCoupon_args getEmptyArgsInstance() {
|
|
|
1864 |
return new deleteCoupon_args();
|
|
|
1865 |
}
|
|
|
1866 |
|
|
|
1867 |
protected deleteCoupon_result getResult(I iface, deleteCoupon_args args) throws org.apache.thrift.TException {
|
|
|
1868 |
deleteCoupon_result result = new deleteCoupon_result();
|
|
|
1869 |
try {
|
|
|
1870 |
iface.deleteCoupon(args.couponCode);
|
|
|
1871 |
} catch (PromotionException pex) {
|
|
|
1872 |
result.pex = pex;
|
|
|
1873 |
}
|
|
|
1874 |
return result;
|
|
|
1875 |
}
|
|
|
1876 |
}
|
|
|
1877 |
|
| 3430 |
rajveer |
1878 |
private static class getActiveCoupons<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getActiveCoupons_args> {
|
|
|
1879 |
public getActiveCoupons() {
|
|
|
1880 |
super("getActiveCoupons");
|
|
|
1881 |
}
|
| 1982 |
varun.gupt |
1882 |
|
| 3430 |
rajveer |
1883 |
protected getActiveCoupons_args getEmptyArgsInstance() {
|
|
|
1884 |
return new getActiveCoupons_args();
|
|
|
1885 |
}
|
| 1982 |
varun.gupt |
1886 |
|
| 3430 |
rajveer |
1887 |
protected getActiveCoupons_result getResult(I iface, getActiveCoupons_args args) throws org.apache.thrift.TException {
|
|
|
1888 |
getActiveCoupons_result result = new getActiveCoupons_result();
|
|
|
1889 |
try {
|
|
|
1890 |
result.success = iface.getActiveCoupons();
|
|
|
1891 |
} catch (PromotionException pex) {
|
|
|
1892 |
result.pex = pex;
|
|
|
1893 |
}
|
|
|
1894 |
return result;
|
|
|
1895 |
}
|
| 1982 |
varun.gupt |
1896 |
}
|
|
|
1897 |
|
| 6250 |
amit.gupta |
1898 |
private static class createCoupon<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createCoupon_args> {
|
|
|
1899 |
public createCoupon() {
|
|
|
1900 |
super("createCoupon");
|
|
|
1901 |
}
|
|
|
1902 |
|
|
|
1903 |
protected createCoupon_args getEmptyArgsInstance() {
|
|
|
1904 |
return new createCoupon_args();
|
|
|
1905 |
}
|
|
|
1906 |
|
|
|
1907 |
protected createCoupon_result getResult(I iface, createCoupon_args args) throws org.apache.thrift.TException {
|
|
|
1908 |
createCoupon_result result = new createCoupon_result();
|
|
|
1909 |
try {
|
| 6730 |
anupam.sin |
1910 |
result.success = iface.createCoupon(args.promotionId, args.couponCode, args.arguments, args.isCod, args.prefix);
|
| 6250 |
amit.gupta |
1911 |
} catch (PromotionException pex) {
|
|
|
1912 |
result.pex = pex;
|
|
|
1913 |
}
|
|
|
1914 |
return result;
|
|
|
1915 |
}
|
|
|
1916 |
}
|
|
|
1917 |
|
| 3430 |
rajveer |
1918 |
private static class getSuccessfulPaymentCountForCoupon<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSuccessfulPaymentCountForCoupon_args> {
|
|
|
1919 |
public getSuccessfulPaymentCountForCoupon() {
|
|
|
1920 |
super("getSuccessfulPaymentCountForCoupon");
|
| 1982 |
varun.gupt |
1921 |
}
|
|
|
1922 |
|
| 3430 |
rajveer |
1923 |
protected getSuccessfulPaymentCountForCoupon_args getEmptyArgsInstance() {
|
|
|
1924 |
return new getSuccessfulPaymentCountForCoupon_args();
|
|
|
1925 |
}
|
| 1982 |
varun.gupt |
1926 |
|
| 3430 |
rajveer |
1927 |
protected getSuccessfulPaymentCountForCoupon_result getResult(I iface, getSuccessfulPaymentCountForCoupon_args args) throws org.apache.thrift.TException {
|
|
|
1928 |
getSuccessfulPaymentCountForCoupon_result result = new getSuccessfulPaymentCountForCoupon_result();
|
|
|
1929 |
try {
|
|
|
1930 |
result.success = iface.getSuccessfulPaymentCountForCoupon(args.couponCode);
|
|
|
1931 |
result.setSuccessIsSet(true);
|
|
|
1932 |
} catch (PromotionException pex) {
|
|
|
1933 |
result.pex = pex;
|
| 1982 |
varun.gupt |
1934 |
}
|
| 3430 |
rajveer |
1935 |
return result;
|
| 1982 |
varun.gupt |
1936 |
}
|
|
|
1937 |
}
|
|
|
1938 |
|
| 3430 |
rajveer |
1939 |
private static class getRuleDocString<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getRuleDocString_args> {
|
|
|
1940 |
public getRuleDocString() {
|
|
|
1941 |
super("getRuleDocString");
|
|
|
1942 |
}
|
| 1982 |
varun.gupt |
1943 |
|
| 3430 |
rajveer |
1944 |
protected getRuleDocString_args getEmptyArgsInstance() {
|
|
|
1945 |
return new getRuleDocString_args();
|
|
|
1946 |
}
|
| 1982 |
varun.gupt |
1947 |
|
| 3430 |
rajveer |
1948 |
protected getRuleDocString_result getResult(I iface, getRuleDocString_args args) throws org.apache.thrift.TException {
|
|
|
1949 |
getRuleDocString_result result = new getRuleDocString_result();
|
|
|
1950 |
result.success = iface.getRuleDocString(args.ruleName);
|
|
|
1951 |
return result;
|
|
|
1952 |
}
|
| 1982 |
varun.gupt |
1953 |
}
|
|
|
1954 |
|
| 4189 |
varun.gupt |
1955 |
private static class getItemDiscountMap<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemDiscountMap_args> {
|
|
|
1956 |
public getItemDiscountMap() {
|
|
|
1957 |
super("getItemDiscountMap");
|
|
|
1958 |
}
|
|
|
1959 |
|
|
|
1960 |
protected getItemDiscountMap_args getEmptyArgsInstance() {
|
|
|
1961 |
return new getItemDiscountMap_args();
|
|
|
1962 |
}
|
|
|
1963 |
|
|
|
1964 |
protected getItemDiscountMap_result getResult(I iface, getItemDiscountMap_args args) throws org.apache.thrift.TException {
|
|
|
1965 |
getItemDiscountMap_result result = new getItemDiscountMap_result();
|
|
|
1966 |
try {
|
|
|
1967 |
result.success = iface.getItemDiscountMap(args.itemIds);
|
|
|
1968 |
} catch (PromotionException pex) {
|
|
|
1969 |
result.pex = pex;
|
|
|
1970 |
}
|
|
|
1971 |
return result;
|
|
|
1972 |
}
|
|
|
1973 |
}
|
|
|
1974 |
|
| 4494 |
varun.gupt |
1975 |
private static class getDiscountsForEntity<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getDiscountsForEntity_args> {
|
|
|
1976 |
public getDiscountsForEntity() {
|
|
|
1977 |
super("getDiscountsForEntity");
|
|
|
1978 |
}
|
|
|
1979 |
|
|
|
1980 |
protected getDiscountsForEntity_args getEmptyArgsInstance() {
|
|
|
1981 |
return new getDiscountsForEntity_args();
|
|
|
1982 |
}
|
|
|
1983 |
|
|
|
1984 |
protected getDiscountsForEntity_result getResult(I iface, getDiscountsForEntity_args args) throws org.apache.thrift.TException {
|
|
|
1985 |
getDiscountsForEntity_result result = new getDiscountsForEntity_result();
|
|
|
1986 |
result.success = iface.getDiscountsForEntity(args.entityId);
|
|
|
1987 |
return result;
|
|
|
1988 |
}
|
|
|
1989 |
}
|
|
|
1990 |
|
| 5469 |
rajveer |
1991 |
private static class addVoucher<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addVoucher_args> {
|
|
|
1992 |
public addVoucher() {
|
|
|
1993 |
super("addVoucher");
|
|
|
1994 |
}
|
|
|
1995 |
|
|
|
1996 |
protected addVoucher_args getEmptyArgsInstance() {
|
|
|
1997 |
return new addVoucher_args();
|
|
|
1998 |
}
|
|
|
1999 |
|
|
|
2000 |
protected addVoucher_result getResult(I iface, addVoucher_args args) throws org.apache.thrift.TException {
|
|
|
2001 |
addVoucher_result result = new addVoucher_result();
|
|
|
2002 |
iface.addVoucher(args.voucher);
|
|
|
2003 |
return result;
|
|
|
2004 |
}
|
|
|
2005 |
}
|
|
|
2006 |
|
|
|
2007 |
private static class assignVoucher<I extends Iface> extends org.apache.thrift.ProcessFunction<I, assignVoucher_args> {
|
|
|
2008 |
public assignVoucher() {
|
|
|
2009 |
super("assignVoucher");
|
|
|
2010 |
}
|
|
|
2011 |
|
|
|
2012 |
protected assignVoucher_args getEmptyArgsInstance() {
|
|
|
2013 |
return new assignVoucher_args();
|
|
|
2014 |
}
|
|
|
2015 |
|
|
|
2016 |
protected assignVoucher_result getResult(I iface, assignVoucher_args args) throws org.apache.thrift.TException {
|
|
|
2017 |
assignVoucher_result result = new assignVoucher_result();
|
|
|
2018 |
result.success = iface.assignVoucher(args.userId, args.userEmail, args.voucherType, args.amount);
|
|
|
2019 |
return result;
|
|
|
2020 |
}
|
|
|
2021 |
}
|
|
|
2022 |
|
|
|
2023 |
private static class markVoucherAsRedeemed<I extends Iface> extends org.apache.thrift.ProcessFunction<I, markVoucherAsRedeemed_args> {
|
|
|
2024 |
public markVoucherAsRedeemed() {
|
|
|
2025 |
super("markVoucherAsRedeemed");
|
|
|
2026 |
}
|
|
|
2027 |
|
|
|
2028 |
protected markVoucherAsRedeemed_args getEmptyArgsInstance() {
|
|
|
2029 |
return new markVoucherAsRedeemed_args();
|
|
|
2030 |
}
|
|
|
2031 |
|
|
|
2032 |
protected markVoucherAsRedeemed_result getResult(I iface, markVoucherAsRedeemed_args args) throws org.apache.thrift.TException {
|
|
|
2033 |
markVoucherAsRedeemed_result result = new markVoucherAsRedeemed_result();
|
|
|
2034 |
result.success = iface.markVoucherAsRedeemed(args.voucherCode, args.redeemedOn);
|
|
|
2035 |
result.setSuccessIsSet(true);
|
|
|
2036 |
return result;
|
|
|
2037 |
}
|
|
|
2038 |
}
|
|
|
2039 |
|
| 1982 |
varun.gupt |
2040 |
}
|
|
|
2041 |
|
| 3430 |
rajveer |
2042 |
public static class createPromotion_args implements org.apache.thrift.TBase<createPromotion_args, createPromotion_args._Fields>, java.io.Serializable, Cloneable {
|
|
|
2043 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPromotion_args");
|
| 1982 |
varun.gupt |
2044 |
|
| 3430 |
rajveer |
2045 |
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)1);
|
|
|
2046 |
private static final org.apache.thrift.protocol.TField RULE_EXECUTION_SRC_FIELD_DESC = new org.apache.thrift.protocol.TField("ruleExecutionSrc", org.apache.thrift.protocol.TType.STRING, (short)2);
|
|
|
2047 |
private static final org.apache.thrift.protocol.TField START_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("startOn", org.apache.thrift.protocol.TType.I64, (short)3);
|
|
|
2048 |
private static final org.apache.thrift.protocol.TField END_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("endOn", org.apache.thrift.protocol.TType.I64, (short)4);
|
| 1982 |
varun.gupt |
2049 |
|
| 3430 |
rajveer |
2050 |
private String name; // required
|
|
|
2051 |
private String ruleExecutionSrc; // required
|
|
|
2052 |
private long startOn; // required
|
|
|
2053 |
private long endOn; // required
|
| 1982 |
varun.gupt |
2054 |
|
|
|
2055 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
| 3430 |
rajveer |
2056 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
| 1982 |
varun.gupt |
2057 |
NAME((short)1, "name"),
|
|
|
2058 |
RULE_EXECUTION_SRC((short)2, "ruleExecutionSrc"),
|
|
|
2059 |
START_ON((short)3, "startOn"),
|
|
|
2060 |
END_ON((short)4, "endOn");
|
|
|
2061 |
|
|
|
2062 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
2063 |
|
|
|
2064 |
static {
|
|
|
2065 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
2066 |
byName.put(field.getFieldName(), field);
|
|
|
2067 |
}
|
|
|
2068 |
}
|
|
|
2069 |
|
|
|
2070 |
/**
|
|
|
2071 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
2072 |
*/
|
|
|
2073 |
public static _Fields findByThriftId(int fieldId) {
|
| 3430 |
rajveer |
2074 |
switch(fieldId) {
|
|
|
2075 |
case 1: // NAME
|
|
|
2076 |
return NAME;
|
|
|
2077 |
case 2: // RULE_EXECUTION_SRC
|
|
|
2078 |
return RULE_EXECUTION_SRC;
|
|
|
2079 |
case 3: // START_ON
|
|
|
2080 |
return START_ON;
|
|
|
2081 |
case 4: // END_ON
|
|
|
2082 |
return END_ON;
|
|
|
2083 |
default:
|
|
|
2084 |
return null;
|
|
|
2085 |
}
|
| 1982 |
varun.gupt |
2086 |
}
|
|
|
2087 |
|
|
|
2088 |
/**
|
|
|
2089 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
2090 |
* if it is not found.
|
|
|
2091 |
*/
|
|
|
2092 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
2093 |
_Fields fields = findByThriftId(fieldId);
|
|
|
2094 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
2095 |
return fields;
|
|
|
2096 |
}
|
|
|
2097 |
|
|
|
2098 |
/**
|
|
|
2099 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
2100 |
*/
|
|
|
2101 |
public static _Fields findByName(String name) {
|
|
|
2102 |
return byName.get(name);
|
|
|
2103 |
}
|
|
|
2104 |
|
|
|
2105 |
private final short _thriftId;
|
|
|
2106 |
private final String _fieldName;
|
|
|
2107 |
|
|
|
2108 |
_Fields(short thriftId, String fieldName) {
|
|
|
2109 |
_thriftId = thriftId;
|
|
|
2110 |
_fieldName = fieldName;
|
|
|
2111 |
}
|
|
|
2112 |
|
|
|
2113 |
public short getThriftFieldId() {
|
|
|
2114 |
return _thriftId;
|
|
|
2115 |
}
|
|
|
2116 |
|
|
|
2117 |
public String getFieldName() {
|
|
|
2118 |
return _fieldName;
|
|
|
2119 |
}
|
|
|
2120 |
}
|
|
|
2121 |
|
|
|
2122 |
// isset id assignments
|
|
|
2123 |
private static final int __STARTON_ISSET_ID = 0;
|
|
|
2124 |
private static final int __ENDON_ISSET_ID = 1;
|
|
|
2125 |
private BitSet __isset_bit_vector = new BitSet(2);
|
|
|
2126 |
|
| 3430 |
rajveer |
2127 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
| 1982 |
varun.gupt |
2128 |
static {
|
| 3430 |
rajveer |
2129 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
2130 |
tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
2131 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
2132 |
tmpMap.put(_Fields.RULE_EXECUTION_SRC, new org.apache.thrift.meta_data.FieldMetaData("ruleExecutionSrc", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
2133 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
2134 |
tmpMap.put(_Fields.START_ON, new org.apache.thrift.meta_data.FieldMetaData("startOn", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
2135 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
2136 |
tmpMap.put(_Fields.END_ON, new org.apache.thrift.meta_data.FieldMetaData("endOn", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
2137 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
2138 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
2139 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPromotion_args.class, metaDataMap);
|
| 1982 |
varun.gupt |
2140 |
}
|
|
|
2141 |
|
|
|
2142 |
public createPromotion_args() {
|
|
|
2143 |
}
|
|
|
2144 |
|
|
|
2145 |
public createPromotion_args(
|
|
|
2146 |
String name,
|
|
|
2147 |
String ruleExecutionSrc,
|
|
|
2148 |
long startOn,
|
|
|
2149 |
long endOn)
|
|
|
2150 |
{
|
|
|
2151 |
this();
|
|
|
2152 |
this.name = name;
|
|
|
2153 |
this.ruleExecutionSrc = ruleExecutionSrc;
|
|
|
2154 |
this.startOn = startOn;
|
|
|
2155 |
setStartOnIsSet(true);
|
|
|
2156 |
this.endOn = endOn;
|
|
|
2157 |
setEndOnIsSet(true);
|
|
|
2158 |
}
|
|
|
2159 |
|
|
|
2160 |
/**
|
|
|
2161 |
* Performs a deep copy on <i>other</i>.
|
|
|
2162 |
*/
|
|
|
2163 |
public createPromotion_args(createPromotion_args other) {
|
|
|
2164 |
__isset_bit_vector.clear();
|
|
|
2165 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
2166 |
if (other.isSetName()) {
|
|
|
2167 |
this.name = other.name;
|
|
|
2168 |
}
|
|
|
2169 |
if (other.isSetRuleExecutionSrc()) {
|
|
|
2170 |
this.ruleExecutionSrc = other.ruleExecutionSrc;
|
|
|
2171 |
}
|
|
|
2172 |
this.startOn = other.startOn;
|
|
|
2173 |
this.endOn = other.endOn;
|
|
|
2174 |
}
|
|
|
2175 |
|
|
|
2176 |
public createPromotion_args deepCopy() {
|
|
|
2177 |
return new createPromotion_args(this);
|
|
|
2178 |
}
|
|
|
2179 |
|
| 3430 |
rajveer |
2180 |
@Override
|
|
|
2181 |
public void clear() {
|
|
|
2182 |
this.name = null;
|
|
|
2183 |
this.ruleExecutionSrc = null;
|
|
|
2184 |
setStartOnIsSet(false);
|
|
|
2185 |
this.startOn = 0;
|
|
|
2186 |
setEndOnIsSet(false);
|
|
|
2187 |
this.endOn = 0;
|
| 1982 |
varun.gupt |
2188 |
}
|
|
|
2189 |
|
|
|
2190 |
public String getName() {
|
|
|
2191 |
return this.name;
|
|
|
2192 |
}
|
|
|
2193 |
|
| 3430 |
rajveer |
2194 |
public void setName(String name) {
|
| 1982 |
varun.gupt |
2195 |
this.name = name;
|
|
|
2196 |
}
|
|
|
2197 |
|
|
|
2198 |
public void unsetName() {
|
|
|
2199 |
this.name = null;
|
|
|
2200 |
}
|
|
|
2201 |
|
| 3430 |
rajveer |
2202 |
/** Returns true if field name is set (has been assigned a value) and false otherwise */
|
| 1982 |
varun.gupt |
2203 |
public boolean isSetName() {
|
|
|
2204 |
return this.name != null;
|
|
|
2205 |
}
|
|
|
2206 |
|
|
|
2207 |
public void setNameIsSet(boolean value) {
|
|
|
2208 |
if (!value) {
|
|
|
2209 |
this.name = null;
|
|
|
2210 |
}
|
|
|
2211 |
}
|
|
|
2212 |
|
|
|
2213 |
public String getRuleExecutionSrc() {
|
|
|
2214 |
return this.ruleExecutionSrc;
|
|
|
2215 |
}
|
|
|
2216 |
|
| 3430 |
rajveer |
2217 |
public void setRuleExecutionSrc(String ruleExecutionSrc) {
|
| 1982 |
varun.gupt |
2218 |
this.ruleExecutionSrc = ruleExecutionSrc;
|
|
|
2219 |
}
|
|
|
2220 |
|
|
|
2221 |
public void unsetRuleExecutionSrc() {
|
|
|
2222 |
this.ruleExecutionSrc = null;
|
|
|
2223 |
}
|
|
|
2224 |
|
| 3430 |
rajveer |
2225 |
/** Returns true if field ruleExecutionSrc is set (has been assigned a value) and false otherwise */
|
| 1982 |
varun.gupt |
2226 |
public boolean isSetRuleExecutionSrc() {
|
|
|
2227 |
return this.ruleExecutionSrc != null;
|
|
|
2228 |
}
|
|
|
2229 |
|
|
|
2230 |
public void setRuleExecutionSrcIsSet(boolean value) {
|
|
|
2231 |
if (!value) {
|
|
|
2232 |
this.ruleExecutionSrc = null;
|
|
|
2233 |
}
|
|
|
2234 |
}
|
|
|
2235 |
|
|
|
2236 |
public long getStartOn() {
|
|
|
2237 |
return this.startOn;
|
|
|
2238 |
}
|
|
|
2239 |
|
| 3430 |
rajveer |
2240 |
public void setStartOn(long startOn) {
|
| 1982 |
varun.gupt |
2241 |
this.startOn = startOn;
|
|
|
2242 |
setStartOnIsSet(true);
|
|
|
2243 |
}
|
|
|
2244 |
|
|
|
2245 |
public void unsetStartOn() {
|
|
|
2246 |
__isset_bit_vector.clear(__STARTON_ISSET_ID);
|
|
|
2247 |
}
|
|
|
2248 |
|
| 3430 |
rajveer |
2249 |
/** Returns true if field startOn is set (has been assigned a value) and false otherwise */
|
| 1982 |
varun.gupt |
2250 |
public boolean isSetStartOn() {
|
|
|
2251 |
return __isset_bit_vector.get(__STARTON_ISSET_ID);
|
|
|
2252 |
}
|
|
|
2253 |
|
|
|
2254 |
public void setStartOnIsSet(boolean value) {
|
|
|
2255 |
__isset_bit_vector.set(__STARTON_ISSET_ID, value);
|
|
|
2256 |
}
|
|
|
2257 |
|
|
|
2258 |
public long getEndOn() {
|
|
|
2259 |
return this.endOn;
|
|
|
2260 |
}
|
|
|
2261 |
|
| 3430 |
rajveer |
2262 |
public void setEndOn(long endOn) {
|
| 1982 |
varun.gupt |
2263 |
this.endOn = endOn;
|
|
|
2264 |
setEndOnIsSet(true);
|
|
|
2265 |
}
|
|
|
2266 |
|
|
|
2267 |
public void unsetEndOn() {
|
|
|
2268 |
__isset_bit_vector.clear(__ENDON_ISSET_ID);
|
|
|
2269 |
}
|
|
|
2270 |
|
| 3430 |
rajveer |
2271 |
/** Returns true if field endOn is set (has been assigned a value) and false otherwise */
|
| 1982 |
varun.gupt |
2272 |
public boolean isSetEndOn() {
|
|
|
2273 |
return __isset_bit_vector.get(__ENDON_ISSET_ID);
|
|
|
2274 |
}
|
|
|
2275 |
|
|
|
2276 |
public void setEndOnIsSet(boolean value) {
|
|
|
2277 |
__isset_bit_vector.set(__ENDON_ISSET_ID, value);
|
|
|
2278 |
}
|
|
|
2279 |
|
|
|
2280 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
2281 |
switch (field) {
|
|
|
2282 |
case NAME:
|
|
|
2283 |
if (value == null) {
|
|
|
2284 |
unsetName();
|
|
|
2285 |
} else {
|
|
|
2286 |
setName((String)value);
|
|
|
2287 |
}
|
|
|
2288 |
break;
|
|
|
2289 |
|
|
|
2290 |
case RULE_EXECUTION_SRC:
|
|
|
2291 |
if (value == null) {
|
|
|
2292 |
unsetRuleExecutionSrc();
|
|
|
2293 |
} else {
|
|
|
2294 |
setRuleExecutionSrc((String)value);
|
|
|
2295 |
}
|
|
|
2296 |
break;
|
|
|
2297 |
|
|
|
2298 |
case START_ON:
|
|
|
2299 |
if (value == null) {
|
|
|
2300 |
unsetStartOn();
|
|
|
2301 |
} else {
|
|
|
2302 |
setStartOn((Long)value);
|
|
|
2303 |
}
|
|
|
2304 |
break;
|
|
|
2305 |
|
|
|
2306 |
case END_ON:
|
|
|
2307 |
if (value == null) {
|
|
|
2308 |
unsetEndOn();
|
|
|
2309 |
} else {
|
|
|
2310 |
setEndOn((Long)value);
|
|
|
2311 |
}
|
|
|
2312 |
break;
|
|
|
2313 |
|
|
|
2314 |
}
|
|
|
2315 |
}
|
|
|
2316 |
|
|
|
2317 |
public Object getFieldValue(_Fields field) {
|
|
|
2318 |
switch (field) {
|
|
|
2319 |
case NAME:
|
|
|
2320 |
return getName();
|
|
|
2321 |
|
|
|
2322 |
case RULE_EXECUTION_SRC:
|
|
|
2323 |
return getRuleExecutionSrc();
|
|
|
2324 |
|
|
|
2325 |
case START_ON:
|
| 3430 |
rajveer |
2326 |
return Long.valueOf(getStartOn());
|
| 1982 |
varun.gupt |
2327 |
|
|
|
2328 |
case END_ON:
|
| 3430 |
rajveer |
2329 |
return Long.valueOf(getEndOn());
|
| 1982 |
varun.gupt |
2330 |
|
|
|
2331 |
}
|
|
|
2332 |
throw new IllegalStateException();
|
|
|
2333 |
}
|
|
|
2334 |
|
| 3430 |
rajveer |
2335 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
2336 |
public boolean isSet(_Fields field) {
|
|
|
2337 |
if (field == null) {
|
|
|
2338 |
throw new IllegalArgumentException();
|
|
|
2339 |
}
|
| 1982 |
varun.gupt |
2340 |
|
|
|
2341 |
switch (field) {
|
|
|
2342 |
case NAME:
|
|
|
2343 |
return isSetName();
|
|
|
2344 |
case RULE_EXECUTION_SRC:
|
|
|
2345 |
return isSetRuleExecutionSrc();
|
|
|
2346 |
case START_ON:
|
|
|
2347 |
return isSetStartOn();
|
|
|
2348 |
case END_ON:
|
|
|
2349 |
return isSetEndOn();
|
|
|
2350 |
}
|
|
|
2351 |
throw new IllegalStateException();
|
|
|
2352 |
}
|
|
|
2353 |
|
|
|
2354 |
@Override
|
|
|
2355 |
public boolean equals(Object that) {
|
|
|
2356 |
if (that == null)
|
|
|
2357 |
return false;
|
|
|
2358 |
if (that instanceof createPromotion_args)
|
|
|
2359 |
return this.equals((createPromotion_args)that);
|
|
|
2360 |
return false;
|
|
|
2361 |
}
|
|
|
2362 |
|
|
|
2363 |
public boolean equals(createPromotion_args that) {
|
|
|
2364 |
if (that == null)
|
|
|
2365 |
return false;
|
|
|
2366 |
|
|
|
2367 |
boolean this_present_name = true && this.isSetName();
|
|
|
2368 |
boolean that_present_name = true && that.isSetName();
|
|
|
2369 |
if (this_present_name || that_present_name) {
|
|
|
2370 |
if (!(this_present_name && that_present_name))
|
|
|
2371 |
return false;
|
|
|
2372 |
if (!this.name.equals(that.name))
|
|
|
2373 |
return false;
|
|
|
2374 |
}
|
|
|
2375 |
|
|
|
2376 |
boolean this_present_ruleExecutionSrc = true && this.isSetRuleExecutionSrc();
|
|
|
2377 |
boolean that_present_ruleExecutionSrc = true && that.isSetRuleExecutionSrc();
|
|
|
2378 |
if (this_present_ruleExecutionSrc || that_present_ruleExecutionSrc) {
|
|
|
2379 |
if (!(this_present_ruleExecutionSrc && that_present_ruleExecutionSrc))
|
|
|
2380 |
return false;
|
|
|
2381 |
if (!this.ruleExecutionSrc.equals(that.ruleExecutionSrc))
|
|
|
2382 |
return false;
|
|
|
2383 |
}
|
|
|
2384 |
|
|
|
2385 |
boolean this_present_startOn = true;
|
|
|
2386 |
boolean that_present_startOn = true;
|
|
|
2387 |
if (this_present_startOn || that_present_startOn) {
|
|
|
2388 |
if (!(this_present_startOn && that_present_startOn))
|
|
|
2389 |
return false;
|
|
|
2390 |
if (this.startOn != that.startOn)
|
|
|
2391 |
return false;
|
|
|
2392 |
}
|
|
|
2393 |
|
|
|
2394 |
boolean this_present_endOn = true;
|
|
|
2395 |
boolean that_present_endOn = true;
|
|
|
2396 |
if (this_present_endOn || that_present_endOn) {
|
|
|
2397 |
if (!(this_present_endOn && that_present_endOn))
|
|
|
2398 |
return false;
|
|
|
2399 |
if (this.endOn != that.endOn)
|
|
|
2400 |
return false;
|
|
|
2401 |
}
|
|
|
2402 |
|
|
|
2403 |
return true;
|
|
|
2404 |
}
|
|
|
2405 |
|
|
|
2406 |
@Override
|
|
|
2407 |
public int hashCode() {
|
|
|
2408 |
return 0;
|
|
|
2409 |
}
|
|
|
2410 |
|
|
|
2411 |
public int compareTo(createPromotion_args other) {
|
|
|
2412 |
if (!getClass().equals(other.getClass())) {
|
|
|
2413 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
2414 |
}
|
|
|
2415 |
|
|
|
2416 |
int lastComparison = 0;
|
|
|
2417 |
createPromotion_args typedOther = (createPromotion_args)other;
|
|
|
2418 |
|
| 3430 |
rajveer |
2419 |
lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
|
| 1982 |
varun.gupt |
2420 |
if (lastComparison != 0) {
|
|
|
2421 |
return lastComparison;
|
|
|
2422 |
}
|
| 3430 |
rajveer |
2423 |
if (isSetName()) {
|
|
|
2424 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
|
|
|
2425 |
if (lastComparison != 0) {
|
|
|
2426 |
return lastComparison;
|
|
|
2427 |
}
|
| 1982 |
varun.gupt |
2428 |
}
|
| 3430 |
rajveer |
2429 |
lastComparison = Boolean.valueOf(isSetRuleExecutionSrc()).compareTo(typedOther.isSetRuleExecutionSrc());
|
| 1982 |
varun.gupt |
2430 |
if (lastComparison != 0) {
|
|
|
2431 |
return lastComparison;
|
|
|
2432 |
}
|
| 3430 |
rajveer |
2433 |
if (isSetRuleExecutionSrc()) {
|
|
|
2434 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ruleExecutionSrc, typedOther.ruleExecutionSrc);
|
|
|
2435 |
if (lastComparison != 0) {
|
|
|
2436 |
return lastComparison;
|
|
|
2437 |
}
|
| 1982 |
varun.gupt |
2438 |
}
|
| 3430 |
rajveer |
2439 |
lastComparison = Boolean.valueOf(isSetStartOn()).compareTo(typedOther.isSetStartOn());
|
| 1982 |
varun.gupt |
2440 |
if (lastComparison != 0) {
|
|
|
2441 |
return lastComparison;
|
|
|
2442 |
}
|
| 3430 |
rajveer |
2443 |
if (isSetStartOn()) {
|
|
|
2444 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startOn, typedOther.startOn);
|
|
|
2445 |
if (lastComparison != 0) {
|
|
|
2446 |
return lastComparison;
|
|
|
2447 |
}
|
| 1982 |
varun.gupt |
2448 |
}
|
| 3430 |
rajveer |
2449 |
lastComparison = Boolean.valueOf(isSetEndOn()).compareTo(typedOther.isSetEndOn());
|
| 1982 |
varun.gupt |
2450 |
if (lastComparison != 0) {
|
|
|
2451 |
return lastComparison;
|
|
|
2452 |
}
|
| 3430 |
rajveer |
2453 |
if (isSetEndOn()) {
|
|
|
2454 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endOn, typedOther.endOn);
|
|
|
2455 |
if (lastComparison != 0) {
|
|
|
2456 |
return lastComparison;
|
|
|
2457 |
}
|
| 1982 |
varun.gupt |
2458 |
}
|
|
|
2459 |
return 0;
|
|
|
2460 |
}
|
|
|
2461 |
|
| 3430 |
rajveer |
2462 |
public _Fields fieldForId(int fieldId) {
|
|
|
2463 |
return _Fields.findByThriftId(fieldId);
|
|
|
2464 |
}
|
|
|
2465 |
|
|
|
2466 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
2467 |
org.apache.thrift.protocol.TField field;
|
| 1982 |
varun.gupt |
2468 |
iprot.readStructBegin();
|
|
|
2469 |
while (true)
|
|
|
2470 |
{
|
|
|
2471 |
field = iprot.readFieldBegin();
|
| 3430 |
rajveer |
2472 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
| 1982 |
varun.gupt |
2473 |
break;
|
|
|
2474 |
}
|
| 3430 |
rajveer |
2475 |
switch (field.id) {
|
|
|
2476 |
case 1: // NAME
|
|
|
2477 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
2478 |
this.name = iprot.readString();
|
|
|
2479 |
} else {
|
|
|
2480 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
2481 |
}
|
|
|
2482 |
break;
|
|
|
2483 |
case 2: // RULE_EXECUTION_SRC
|
|
|
2484 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
2485 |
this.ruleExecutionSrc = iprot.readString();
|
|
|
2486 |
} else {
|
|
|
2487 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
2488 |
}
|
|
|
2489 |
break;
|
|
|
2490 |
case 3: // START_ON
|
|
|
2491 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
2492 |
this.startOn = iprot.readI64();
|
|
|
2493 |
setStartOnIsSet(true);
|
|
|
2494 |
} else {
|
|
|
2495 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
2496 |
}
|
|
|
2497 |
break;
|
|
|
2498 |
case 4: // END_ON
|
|
|
2499 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
2500 |
this.endOn = iprot.readI64();
|
|
|
2501 |
setEndOnIsSet(true);
|
|
|
2502 |
} else {
|
|
|
2503 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
2504 |
}
|
|
|
2505 |
break;
|
|
|
2506 |
default:
|
|
|
2507 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| 1982 |
varun.gupt |
2508 |
}
|
| 3430 |
rajveer |
2509 |
iprot.readFieldEnd();
|
| 1982 |
varun.gupt |
2510 |
}
|
|
|
2511 |
iprot.readStructEnd();
|
|
|
2512 |
validate();
|
|
|
2513 |
}
|
|
|
2514 |
|
| 3430 |
rajveer |
2515 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
2516 |
validate();
|
|
|
2517 |
|
|
|
2518 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
2519 |
if (this.name != null) {
|
|
|
2520 |
oprot.writeFieldBegin(NAME_FIELD_DESC);
|
|
|
2521 |
oprot.writeString(this.name);
|
|
|
2522 |
oprot.writeFieldEnd();
|
|
|
2523 |
}
|
|
|
2524 |
if (this.ruleExecutionSrc != null) {
|
|
|
2525 |
oprot.writeFieldBegin(RULE_EXECUTION_SRC_FIELD_DESC);
|
|
|
2526 |
oprot.writeString(this.ruleExecutionSrc);
|
|
|
2527 |
oprot.writeFieldEnd();
|
|
|
2528 |
}
|
|
|
2529 |
oprot.writeFieldBegin(START_ON_FIELD_DESC);
|
|
|
2530 |
oprot.writeI64(this.startOn);
|
|
|
2531 |
oprot.writeFieldEnd();
|
|
|
2532 |
oprot.writeFieldBegin(END_ON_FIELD_DESC);
|
|
|
2533 |
oprot.writeI64(this.endOn);
|
|
|
2534 |
oprot.writeFieldEnd();
|
|
|
2535 |
oprot.writeFieldStop();
|
|
|
2536 |
oprot.writeStructEnd();
|
|
|
2537 |
}
|
|
|
2538 |
|
|
|
2539 |
@Override
|
|
|
2540 |
public String toString() {
|
|
|
2541 |
StringBuilder sb = new StringBuilder("createPromotion_args(");
|
|
|
2542 |
boolean first = true;
|
|
|
2543 |
|
|
|
2544 |
sb.append("name:");
|
|
|
2545 |
if (this.name == null) {
|
|
|
2546 |
sb.append("null");
|
|
|
2547 |
} else {
|
|
|
2548 |
sb.append(this.name);
|
|
|
2549 |
}
|
|
|
2550 |
first = false;
|
|
|
2551 |
if (!first) sb.append(", ");
|
|
|
2552 |
sb.append("ruleExecutionSrc:");
|
|
|
2553 |
if (this.ruleExecutionSrc == null) {
|
|
|
2554 |
sb.append("null");
|
|
|
2555 |
} else {
|
|
|
2556 |
sb.append(this.ruleExecutionSrc);
|
|
|
2557 |
}
|
|
|
2558 |
first = false;
|
|
|
2559 |
if (!first) sb.append(", ");
|
|
|
2560 |
sb.append("startOn:");
|
|
|
2561 |
sb.append(this.startOn);
|
|
|
2562 |
first = false;
|
|
|
2563 |
if (!first) sb.append(", ");
|
|
|
2564 |
sb.append("endOn:");
|
|
|
2565 |
sb.append(this.endOn);
|
|
|
2566 |
first = false;
|
|
|
2567 |
sb.append(")");
|
|
|
2568 |
return sb.toString();
|
|
|
2569 |
}
|
|
|
2570 |
|
| 3430 |
rajveer |
2571 |
public void validate() throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
2572 |
// check for required fields
|
|
|
2573 |
}
|
|
|
2574 |
|
| 3430 |
rajveer |
2575 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
2576 |
try {
|
|
|
2577 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
2578 |
} catch (org.apache.thrift.TException te) {
|
|
|
2579 |
throw new java.io.IOException(te);
|
|
|
2580 |
}
|
|
|
2581 |
}
|
|
|
2582 |
|
|
|
2583 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
2584 |
try {
|
|
|
2585 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
2586 |
__isset_bit_vector = new BitSet(1);
|
|
|
2587 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
2588 |
} catch (org.apache.thrift.TException te) {
|
|
|
2589 |
throw new java.io.IOException(te);
|
|
|
2590 |
}
|
|
|
2591 |
}
|
|
|
2592 |
|
| 1982 |
varun.gupt |
2593 |
}
|
|
|
2594 |
|
| 3430 |
rajveer |
2595 |
public static class createPromotion_result implements org.apache.thrift.TBase<createPromotion_result, createPromotion_result._Fields>, java.io.Serializable, Cloneable {
|
|
|
2596 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPromotion_result");
|
| 1982 |
varun.gupt |
2597 |
|
| 3430 |
rajveer |
2598 |
private static final org.apache.thrift.protocol.TField PEX_FIELD_DESC = new org.apache.thrift.protocol.TField("pex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
|
| 1982 |
varun.gupt |
2599 |
|
| 3430 |
rajveer |
2600 |
private PromotionException pex; // required
|
| 1982 |
varun.gupt |
2601 |
|
|
|
2602 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
| 3430 |
rajveer |
2603 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
| 1982 |
varun.gupt |
2604 |
PEX((short)1, "pex");
|
|
|
2605 |
|
|
|
2606 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
2607 |
|
|
|
2608 |
static {
|
|
|
2609 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
2610 |
byName.put(field.getFieldName(), field);
|
|
|
2611 |
}
|
|
|
2612 |
}
|
|
|
2613 |
|
|
|
2614 |
/**
|
|
|
2615 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
2616 |
*/
|
|
|
2617 |
public static _Fields findByThriftId(int fieldId) {
|
| 3430 |
rajveer |
2618 |
switch(fieldId) {
|
|
|
2619 |
case 1: // PEX
|
|
|
2620 |
return PEX;
|
|
|
2621 |
default:
|
|
|
2622 |
return null;
|
|
|
2623 |
}
|
| 1982 |
varun.gupt |
2624 |
}
|
|
|
2625 |
|
|
|
2626 |
/**
|
|
|
2627 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
2628 |
* if it is not found.
|
|
|
2629 |
*/
|
|
|
2630 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
2631 |
_Fields fields = findByThriftId(fieldId);
|
|
|
2632 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
2633 |
return fields;
|
|
|
2634 |
}
|
|
|
2635 |
|
|
|
2636 |
/**
|
|
|
2637 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
2638 |
*/
|
|
|
2639 |
public static _Fields findByName(String name) {
|
|
|
2640 |
return byName.get(name);
|
|
|
2641 |
}
|
|
|
2642 |
|
|
|
2643 |
private final short _thriftId;
|
|
|
2644 |
private final String _fieldName;
|
|
|
2645 |
|
|
|
2646 |
_Fields(short thriftId, String fieldName) {
|
|
|
2647 |
_thriftId = thriftId;
|
|
|
2648 |
_fieldName = fieldName;
|
|
|
2649 |
}
|
|
|
2650 |
|
|
|
2651 |
public short getThriftFieldId() {
|
|
|
2652 |
return _thriftId;
|
|
|
2653 |
}
|
|
|
2654 |
|
|
|
2655 |
public String getFieldName() {
|
|
|
2656 |
return _fieldName;
|
|
|
2657 |
}
|
|
|
2658 |
}
|
|
|
2659 |
|
|
|
2660 |
// isset id assignments
|
|
|
2661 |
|
| 3430 |
rajveer |
2662 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
| 1982 |
varun.gupt |
2663 |
static {
|
| 3430 |
rajveer |
2664 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
2665 |
tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
2666 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
|
|
|
2667 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
2668 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPromotion_result.class, metaDataMap);
|
| 1982 |
varun.gupt |
2669 |
}
|
|
|
2670 |
|
|
|
2671 |
public createPromotion_result() {
|
|
|
2672 |
}
|
|
|
2673 |
|
|
|
2674 |
public createPromotion_result(
|
|
|
2675 |
PromotionException pex)
|
|
|
2676 |
{
|
|
|
2677 |
this();
|
|
|
2678 |
this.pex = pex;
|
|
|
2679 |
}
|
|
|
2680 |
|
|
|
2681 |
/**
|
|
|
2682 |
* Performs a deep copy on <i>other</i>.
|
|
|
2683 |
*/
|
|
|
2684 |
public createPromotion_result(createPromotion_result other) {
|
|
|
2685 |
if (other.isSetPex()) {
|
|
|
2686 |
this.pex = new PromotionException(other.pex);
|
|
|
2687 |
}
|
|
|
2688 |
}
|
|
|
2689 |
|
|
|
2690 |
public createPromotion_result deepCopy() {
|
|
|
2691 |
return new createPromotion_result(this);
|
|
|
2692 |
}
|
|
|
2693 |
|
| 3430 |
rajveer |
2694 |
@Override
|
|
|
2695 |
public void clear() {
|
|
|
2696 |
this.pex = null;
|
| 1982 |
varun.gupt |
2697 |
}
|
|
|
2698 |
|
|
|
2699 |
public PromotionException getPex() {
|
|
|
2700 |
return this.pex;
|
|
|
2701 |
}
|
|
|
2702 |
|
| 3430 |
rajveer |
2703 |
public void setPex(PromotionException pex) {
|
| 1982 |
varun.gupt |
2704 |
this.pex = pex;
|
|
|
2705 |
}
|
|
|
2706 |
|
|
|
2707 |
public void unsetPex() {
|
|
|
2708 |
this.pex = null;
|
|
|
2709 |
}
|
|
|
2710 |
|
| 3430 |
rajveer |
2711 |
/** Returns true if field pex is set (has been assigned a value) and false otherwise */
|
| 1982 |
varun.gupt |
2712 |
public boolean isSetPex() {
|
|
|
2713 |
return this.pex != null;
|
|
|
2714 |
}
|
|
|
2715 |
|
|
|
2716 |
public void setPexIsSet(boolean value) {
|
|
|
2717 |
if (!value) {
|
|
|
2718 |
this.pex = null;
|
|
|
2719 |
}
|
|
|
2720 |
}
|
|
|
2721 |
|
|
|
2722 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
2723 |
switch (field) {
|
|
|
2724 |
case PEX:
|
|
|
2725 |
if (value == null) {
|
|
|
2726 |
unsetPex();
|
|
|
2727 |
} else {
|
|
|
2728 |
setPex((PromotionException)value);
|
|
|
2729 |
}
|
|
|
2730 |
break;
|
|
|
2731 |
|
|
|
2732 |
}
|
|
|
2733 |
}
|
|
|
2734 |
|
|
|
2735 |
public Object getFieldValue(_Fields field) {
|
|
|
2736 |
switch (field) {
|
|
|
2737 |
case PEX:
|
|
|
2738 |
return getPex();
|
|
|
2739 |
|
|
|
2740 |
}
|
|
|
2741 |
throw new IllegalStateException();
|
|
|
2742 |
}
|
|
|
2743 |
|
| 3430 |
rajveer |
2744 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
2745 |
public boolean isSet(_Fields field) {
|
|
|
2746 |
if (field == null) {
|
|
|
2747 |
throw new IllegalArgumentException();
|
|
|
2748 |
}
|
| 1982 |
varun.gupt |
2749 |
|
|
|
2750 |
switch (field) {
|
|
|
2751 |
case PEX:
|
|
|
2752 |
return isSetPex();
|
|
|
2753 |
}
|
|
|
2754 |
throw new IllegalStateException();
|
|
|
2755 |
}
|
|
|
2756 |
|
|
|
2757 |
@Override
|
|
|
2758 |
public boolean equals(Object that) {
|
|
|
2759 |
if (that == null)
|
|
|
2760 |
return false;
|
|
|
2761 |
if (that instanceof createPromotion_result)
|
|
|
2762 |
return this.equals((createPromotion_result)that);
|
|
|
2763 |
return false;
|
|
|
2764 |
}
|
|
|
2765 |
|
|
|
2766 |
public boolean equals(createPromotion_result that) {
|
|
|
2767 |
if (that == null)
|
|
|
2768 |
return false;
|
|
|
2769 |
|
|
|
2770 |
boolean this_present_pex = true && this.isSetPex();
|
|
|
2771 |
boolean that_present_pex = true && that.isSetPex();
|
|
|
2772 |
if (this_present_pex || that_present_pex) {
|
|
|
2773 |
if (!(this_present_pex && that_present_pex))
|
|
|
2774 |
return false;
|
|
|
2775 |
if (!this.pex.equals(that.pex))
|
|
|
2776 |
return false;
|
|
|
2777 |
}
|
|
|
2778 |
|
|
|
2779 |
return true;
|
|
|
2780 |
}
|
|
|
2781 |
|
|
|
2782 |
@Override
|
|
|
2783 |
public int hashCode() {
|
|
|
2784 |
return 0;
|
|
|
2785 |
}
|
|
|
2786 |
|
|
|
2787 |
public int compareTo(createPromotion_result other) {
|
|
|
2788 |
if (!getClass().equals(other.getClass())) {
|
|
|
2789 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
2790 |
}
|
|
|
2791 |
|
|
|
2792 |
int lastComparison = 0;
|
|
|
2793 |
createPromotion_result typedOther = (createPromotion_result)other;
|
|
|
2794 |
|
| 3430 |
rajveer |
2795 |
lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
|
| 1982 |
varun.gupt |
2796 |
if (lastComparison != 0) {
|
|
|
2797 |
return lastComparison;
|
|
|
2798 |
}
|
| 3430 |
rajveer |
2799 |
if (isSetPex()) {
|
|
|
2800 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
|
|
|
2801 |
if (lastComparison != 0) {
|
|
|
2802 |
return lastComparison;
|
|
|
2803 |
}
|
| 1982 |
varun.gupt |
2804 |
}
|
|
|
2805 |
return 0;
|
|
|
2806 |
}
|
|
|
2807 |
|
| 3430 |
rajveer |
2808 |
public _Fields fieldForId(int fieldId) {
|
|
|
2809 |
return _Fields.findByThriftId(fieldId);
|
|
|
2810 |
}
|
|
|
2811 |
|
|
|
2812 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
2813 |
org.apache.thrift.protocol.TField field;
|
| 1982 |
varun.gupt |
2814 |
iprot.readStructBegin();
|
|
|
2815 |
while (true)
|
|
|
2816 |
{
|
|
|
2817 |
field = iprot.readFieldBegin();
|
| 3430 |
rajveer |
2818 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
| 1982 |
varun.gupt |
2819 |
break;
|
|
|
2820 |
}
|
| 3430 |
rajveer |
2821 |
switch (field.id) {
|
|
|
2822 |
case 1: // PEX
|
|
|
2823 |
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
|
|
2824 |
this.pex = new PromotionException();
|
|
|
2825 |
this.pex.read(iprot);
|
|
|
2826 |
} else {
|
|
|
2827 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
2828 |
}
|
|
|
2829 |
break;
|
|
|
2830 |
default:
|
|
|
2831 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| 1982 |
varun.gupt |
2832 |
}
|
| 3430 |
rajveer |
2833 |
iprot.readFieldEnd();
|
| 1982 |
varun.gupt |
2834 |
}
|
|
|
2835 |
iprot.readStructEnd();
|
|
|
2836 |
validate();
|
|
|
2837 |
}
|
|
|
2838 |
|
| 3430 |
rajveer |
2839 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
2840 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
2841 |
|
|
|
2842 |
if (this.isSetPex()) {
|
|
|
2843 |
oprot.writeFieldBegin(PEX_FIELD_DESC);
|
|
|
2844 |
this.pex.write(oprot);
|
|
|
2845 |
oprot.writeFieldEnd();
|
|
|
2846 |
}
|
|
|
2847 |
oprot.writeFieldStop();
|
|
|
2848 |
oprot.writeStructEnd();
|
|
|
2849 |
}
|
|
|
2850 |
|
|
|
2851 |
@Override
|
|
|
2852 |
public String toString() {
|
|
|
2853 |
StringBuilder sb = new StringBuilder("createPromotion_result(");
|
|
|
2854 |
boolean first = true;
|
|
|
2855 |
|
|
|
2856 |
sb.append("pex:");
|
|
|
2857 |
if (this.pex == null) {
|
|
|
2858 |
sb.append("null");
|
|
|
2859 |
} else {
|
|
|
2860 |
sb.append(this.pex);
|
|
|
2861 |
}
|
|
|
2862 |
first = false;
|
|
|
2863 |
sb.append(")");
|
|
|
2864 |
return sb.toString();
|
|
|
2865 |
}
|
|
|
2866 |
|
| 3430 |
rajveer |
2867 |
public void validate() throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
2868 |
// check for required fields
|
|
|
2869 |
}
|
|
|
2870 |
|
| 3430 |
rajveer |
2871 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
2872 |
try {
|
|
|
2873 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
2874 |
} catch (org.apache.thrift.TException te) {
|
|
|
2875 |
throw new java.io.IOException(te);
|
|
|
2876 |
}
|
|
|
2877 |
}
|
|
|
2878 |
|
|
|
2879 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
2880 |
try {
|
|
|
2881 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
2882 |
} catch (org.apache.thrift.TException te) {
|
|
|
2883 |
throw new java.io.IOException(te);
|
|
|
2884 |
}
|
|
|
2885 |
}
|
|
|
2886 |
|
| 1982 |
varun.gupt |
2887 |
}
|
|
|
2888 |
|
| 6301 |
amit.gupta |
2889 |
public static class getCoupon_args implements org.apache.thrift.TBase<getCoupon_args, getCoupon_args._Fields>, java.io.Serializable, Cloneable {
|
|
|
2890 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCoupon_args");
|
|
|
2891 |
|
|
|
2892 |
private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCode", org.apache.thrift.protocol.TType.STRING, (short)1);
|
|
|
2893 |
|
|
|
2894 |
private String couponCode; // required
|
|
|
2895 |
|
|
|
2896 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
2897 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
2898 |
COUPON_CODE((short)1, "couponCode");
|
|
|
2899 |
|
|
|
2900 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
2901 |
|
|
|
2902 |
static {
|
|
|
2903 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
2904 |
byName.put(field.getFieldName(), field);
|
|
|
2905 |
}
|
|
|
2906 |
}
|
|
|
2907 |
|
|
|
2908 |
/**
|
|
|
2909 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
2910 |
*/
|
|
|
2911 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
2912 |
switch(fieldId) {
|
|
|
2913 |
case 1: // COUPON_CODE
|
|
|
2914 |
return COUPON_CODE;
|
|
|
2915 |
default:
|
|
|
2916 |
return null;
|
|
|
2917 |
}
|
|
|
2918 |
}
|
|
|
2919 |
|
|
|
2920 |
/**
|
|
|
2921 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
2922 |
* if it is not found.
|
|
|
2923 |
*/
|
|
|
2924 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
2925 |
_Fields fields = findByThriftId(fieldId);
|
|
|
2926 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
2927 |
return fields;
|
|
|
2928 |
}
|
|
|
2929 |
|
|
|
2930 |
/**
|
|
|
2931 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
2932 |
*/
|
|
|
2933 |
public static _Fields findByName(String name) {
|
|
|
2934 |
return byName.get(name);
|
|
|
2935 |
}
|
|
|
2936 |
|
|
|
2937 |
private final short _thriftId;
|
|
|
2938 |
private final String _fieldName;
|
|
|
2939 |
|
|
|
2940 |
_Fields(short thriftId, String fieldName) {
|
|
|
2941 |
_thriftId = thriftId;
|
|
|
2942 |
_fieldName = fieldName;
|
|
|
2943 |
}
|
|
|
2944 |
|
|
|
2945 |
public short getThriftFieldId() {
|
|
|
2946 |
return _thriftId;
|
|
|
2947 |
}
|
|
|
2948 |
|
|
|
2949 |
public String getFieldName() {
|
|
|
2950 |
return _fieldName;
|
|
|
2951 |
}
|
|
|
2952 |
}
|
|
|
2953 |
|
|
|
2954 |
// isset id assignments
|
|
|
2955 |
|
|
|
2956 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
2957 |
static {
|
|
|
2958 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
2959 |
tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
2960 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
2961 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
2962 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCoupon_args.class, metaDataMap);
|
|
|
2963 |
}
|
|
|
2964 |
|
|
|
2965 |
public getCoupon_args() {
|
|
|
2966 |
}
|
|
|
2967 |
|
|
|
2968 |
public getCoupon_args(
|
|
|
2969 |
String couponCode)
|
|
|
2970 |
{
|
|
|
2971 |
this();
|
|
|
2972 |
this.couponCode = couponCode;
|
|
|
2973 |
}
|
|
|
2974 |
|
|
|
2975 |
/**
|
|
|
2976 |
* Performs a deep copy on <i>other</i>.
|
|
|
2977 |
*/
|
|
|
2978 |
public getCoupon_args(getCoupon_args other) {
|
|
|
2979 |
if (other.isSetCouponCode()) {
|
|
|
2980 |
this.couponCode = other.couponCode;
|
|
|
2981 |
}
|
|
|
2982 |
}
|
|
|
2983 |
|
|
|
2984 |
public getCoupon_args deepCopy() {
|
|
|
2985 |
return new getCoupon_args(this);
|
|
|
2986 |
}
|
|
|
2987 |
|
|
|
2988 |
@Override
|
|
|
2989 |
public void clear() {
|
|
|
2990 |
this.couponCode = null;
|
|
|
2991 |
}
|
|
|
2992 |
|
|
|
2993 |
public String getCouponCode() {
|
|
|
2994 |
return this.couponCode;
|
|
|
2995 |
}
|
|
|
2996 |
|
|
|
2997 |
public void setCouponCode(String couponCode) {
|
|
|
2998 |
this.couponCode = couponCode;
|
|
|
2999 |
}
|
|
|
3000 |
|
|
|
3001 |
public void unsetCouponCode() {
|
|
|
3002 |
this.couponCode = null;
|
|
|
3003 |
}
|
|
|
3004 |
|
|
|
3005 |
/** Returns true if field couponCode is set (has been assigned a value) and false otherwise */
|
|
|
3006 |
public boolean isSetCouponCode() {
|
|
|
3007 |
return this.couponCode != null;
|
|
|
3008 |
}
|
|
|
3009 |
|
|
|
3010 |
public void setCouponCodeIsSet(boolean value) {
|
|
|
3011 |
if (!value) {
|
|
|
3012 |
this.couponCode = null;
|
|
|
3013 |
}
|
|
|
3014 |
}
|
|
|
3015 |
|
|
|
3016 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
3017 |
switch (field) {
|
|
|
3018 |
case COUPON_CODE:
|
|
|
3019 |
if (value == null) {
|
|
|
3020 |
unsetCouponCode();
|
|
|
3021 |
} else {
|
|
|
3022 |
setCouponCode((String)value);
|
|
|
3023 |
}
|
|
|
3024 |
break;
|
|
|
3025 |
|
|
|
3026 |
}
|
|
|
3027 |
}
|
|
|
3028 |
|
|
|
3029 |
public Object getFieldValue(_Fields field) {
|
|
|
3030 |
switch (field) {
|
|
|
3031 |
case COUPON_CODE:
|
|
|
3032 |
return getCouponCode();
|
|
|
3033 |
|
|
|
3034 |
}
|
|
|
3035 |
throw new IllegalStateException();
|
|
|
3036 |
}
|
|
|
3037 |
|
|
|
3038 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
3039 |
public boolean isSet(_Fields field) {
|
|
|
3040 |
if (field == null) {
|
|
|
3041 |
throw new IllegalArgumentException();
|
|
|
3042 |
}
|
|
|
3043 |
|
|
|
3044 |
switch (field) {
|
|
|
3045 |
case COUPON_CODE:
|
|
|
3046 |
return isSetCouponCode();
|
|
|
3047 |
}
|
|
|
3048 |
throw new IllegalStateException();
|
|
|
3049 |
}
|
|
|
3050 |
|
|
|
3051 |
@Override
|
|
|
3052 |
public boolean equals(Object that) {
|
|
|
3053 |
if (that == null)
|
|
|
3054 |
return false;
|
|
|
3055 |
if (that instanceof getCoupon_args)
|
|
|
3056 |
return this.equals((getCoupon_args)that);
|
|
|
3057 |
return false;
|
|
|
3058 |
}
|
|
|
3059 |
|
|
|
3060 |
public boolean equals(getCoupon_args that) {
|
|
|
3061 |
if (that == null)
|
|
|
3062 |
return false;
|
|
|
3063 |
|
|
|
3064 |
boolean this_present_couponCode = true && this.isSetCouponCode();
|
|
|
3065 |
boolean that_present_couponCode = true && that.isSetCouponCode();
|
|
|
3066 |
if (this_present_couponCode || that_present_couponCode) {
|
|
|
3067 |
if (!(this_present_couponCode && that_present_couponCode))
|
|
|
3068 |
return false;
|
|
|
3069 |
if (!this.couponCode.equals(that.couponCode))
|
|
|
3070 |
return false;
|
|
|
3071 |
}
|
|
|
3072 |
|
|
|
3073 |
return true;
|
|
|
3074 |
}
|
|
|
3075 |
|
|
|
3076 |
@Override
|
|
|
3077 |
public int hashCode() {
|
|
|
3078 |
return 0;
|
|
|
3079 |
}
|
|
|
3080 |
|
|
|
3081 |
public int compareTo(getCoupon_args other) {
|
|
|
3082 |
if (!getClass().equals(other.getClass())) {
|
|
|
3083 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
3084 |
}
|
|
|
3085 |
|
|
|
3086 |
int lastComparison = 0;
|
|
|
3087 |
getCoupon_args typedOther = (getCoupon_args)other;
|
|
|
3088 |
|
|
|
3089 |
lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
|
|
|
3090 |
if (lastComparison != 0) {
|
|
|
3091 |
return lastComparison;
|
|
|
3092 |
}
|
|
|
3093 |
if (isSetCouponCode()) {
|
|
|
3094 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);
|
|
|
3095 |
if (lastComparison != 0) {
|
|
|
3096 |
return lastComparison;
|
|
|
3097 |
}
|
|
|
3098 |
}
|
|
|
3099 |
return 0;
|
|
|
3100 |
}
|
|
|
3101 |
|
|
|
3102 |
public _Fields fieldForId(int fieldId) {
|
|
|
3103 |
return _Fields.findByThriftId(fieldId);
|
|
|
3104 |
}
|
|
|
3105 |
|
|
|
3106 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
3107 |
org.apache.thrift.protocol.TField field;
|
|
|
3108 |
iprot.readStructBegin();
|
|
|
3109 |
while (true)
|
|
|
3110 |
{
|
|
|
3111 |
field = iprot.readFieldBegin();
|
|
|
3112 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
3113 |
break;
|
|
|
3114 |
}
|
|
|
3115 |
switch (field.id) {
|
|
|
3116 |
case 1: // COUPON_CODE
|
|
|
3117 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
3118 |
this.couponCode = iprot.readString();
|
|
|
3119 |
} else {
|
|
|
3120 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
3121 |
}
|
|
|
3122 |
break;
|
|
|
3123 |
default:
|
|
|
3124 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
3125 |
}
|
|
|
3126 |
iprot.readFieldEnd();
|
|
|
3127 |
}
|
|
|
3128 |
iprot.readStructEnd();
|
|
|
3129 |
validate();
|
|
|
3130 |
}
|
|
|
3131 |
|
|
|
3132 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
3133 |
validate();
|
|
|
3134 |
|
|
|
3135 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
3136 |
if (this.couponCode != null) {
|
|
|
3137 |
oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
|
|
|
3138 |
oprot.writeString(this.couponCode);
|
|
|
3139 |
oprot.writeFieldEnd();
|
|
|
3140 |
}
|
|
|
3141 |
oprot.writeFieldStop();
|
|
|
3142 |
oprot.writeStructEnd();
|
|
|
3143 |
}
|
|
|
3144 |
|
|
|
3145 |
@Override
|
|
|
3146 |
public String toString() {
|
|
|
3147 |
StringBuilder sb = new StringBuilder("getCoupon_args(");
|
|
|
3148 |
boolean first = true;
|
|
|
3149 |
|
|
|
3150 |
sb.append("couponCode:");
|
|
|
3151 |
if (this.couponCode == null) {
|
|
|
3152 |
sb.append("null");
|
|
|
3153 |
} else {
|
|
|
3154 |
sb.append(this.couponCode);
|
|
|
3155 |
}
|
|
|
3156 |
first = false;
|
|
|
3157 |
sb.append(")");
|
|
|
3158 |
return sb.toString();
|
|
|
3159 |
}
|
|
|
3160 |
|
|
|
3161 |
public void validate() throws org.apache.thrift.TException {
|
|
|
3162 |
// check for required fields
|
|
|
3163 |
}
|
|
|
3164 |
|
|
|
3165 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
3166 |
try {
|
|
|
3167 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
3168 |
} catch (org.apache.thrift.TException te) {
|
|
|
3169 |
throw new java.io.IOException(te);
|
|
|
3170 |
}
|
|
|
3171 |
}
|
|
|
3172 |
|
|
|
3173 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
3174 |
try {
|
|
|
3175 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
3176 |
} catch (org.apache.thrift.TException te) {
|
|
|
3177 |
throw new java.io.IOException(te);
|
|
|
3178 |
}
|
|
|
3179 |
}
|
|
|
3180 |
|
|
|
3181 |
}
|
|
|
3182 |
|
|
|
3183 |
public static class getCoupon_result implements org.apache.thrift.TBase<getCoupon_result, getCoupon_result._Fields>, java.io.Serializable, Cloneable {
|
|
|
3184 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCoupon_result");
|
|
|
3185 |
|
|
|
3186 |
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
|
|
|
3187 |
private static final org.apache.thrift.protocol.TField PEX_FIELD_DESC = new org.apache.thrift.protocol.TField("pex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
|
|
|
3188 |
|
|
|
3189 |
private Coupon success; // required
|
|
|
3190 |
private PromotionException pex; // required
|
|
|
3191 |
|
|
|
3192 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
3193 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
3194 |
SUCCESS((short)0, "success"),
|
|
|
3195 |
PEX((short)1, "pex");
|
|
|
3196 |
|
|
|
3197 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
3198 |
|
|
|
3199 |
static {
|
|
|
3200 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
3201 |
byName.put(field.getFieldName(), field);
|
|
|
3202 |
}
|
|
|
3203 |
}
|
|
|
3204 |
|
|
|
3205 |
/**
|
|
|
3206 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
3207 |
*/
|
|
|
3208 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
3209 |
switch(fieldId) {
|
|
|
3210 |
case 0: // SUCCESS
|
|
|
3211 |
return SUCCESS;
|
|
|
3212 |
case 1: // PEX
|
|
|
3213 |
return PEX;
|
|
|
3214 |
default:
|
|
|
3215 |
return null;
|
|
|
3216 |
}
|
|
|
3217 |
}
|
|
|
3218 |
|
|
|
3219 |
/**
|
|
|
3220 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
3221 |
* if it is not found.
|
|
|
3222 |
*/
|
|
|
3223 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
3224 |
_Fields fields = findByThriftId(fieldId);
|
|
|
3225 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
3226 |
return fields;
|
|
|
3227 |
}
|
|
|
3228 |
|
|
|
3229 |
/**
|
|
|
3230 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
3231 |
*/
|
|
|
3232 |
public static _Fields findByName(String name) {
|
|
|
3233 |
return byName.get(name);
|
|
|
3234 |
}
|
|
|
3235 |
|
|
|
3236 |
private final short _thriftId;
|
|
|
3237 |
private final String _fieldName;
|
|
|
3238 |
|
|
|
3239 |
_Fields(short thriftId, String fieldName) {
|
|
|
3240 |
_thriftId = thriftId;
|
|
|
3241 |
_fieldName = fieldName;
|
|
|
3242 |
}
|
|
|
3243 |
|
|
|
3244 |
public short getThriftFieldId() {
|
|
|
3245 |
return _thriftId;
|
|
|
3246 |
}
|
|
|
3247 |
|
|
|
3248 |
public String getFieldName() {
|
|
|
3249 |
return _fieldName;
|
|
|
3250 |
}
|
|
|
3251 |
}
|
|
|
3252 |
|
|
|
3253 |
// isset id assignments
|
|
|
3254 |
|
|
|
3255 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
3256 |
static {
|
|
|
3257 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
3258 |
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
3259 |
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Coupon.class)));
|
|
|
3260 |
tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
3261 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
|
|
|
3262 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
3263 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCoupon_result.class, metaDataMap);
|
|
|
3264 |
}
|
|
|
3265 |
|
|
|
3266 |
public getCoupon_result() {
|
|
|
3267 |
}
|
|
|
3268 |
|
|
|
3269 |
public getCoupon_result(
|
|
|
3270 |
Coupon success,
|
|
|
3271 |
PromotionException pex)
|
|
|
3272 |
{
|
|
|
3273 |
this();
|
|
|
3274 |
this.success = success;
|
|
|
3275 |
this.pex = pex;
|
|
|
3276 |
}
|
|
|
3277 |
|
|
|
3278 |
/**
|
|
|
3279 |
* Performs a deep copy on <i>other</i>.
|
|
|
3280 |
*/
|
|
|
3281 |
public getCoupon_result(getCoupon_result other) {
|
|
|
3282 |
if (other.isSetSuccess()) {
|
|
|
3283 |
this.success = new Coupon(other.success);
|
|
|
3284 |
}
|
|
|
3285 |
if (other.isSetPex()) {
|
|
|
3286 |
this.pex = new PromotionException(other.pex);
|
|
|
3287 |
}
|
|
|
3288 |
}
|
|
|
3289 |
|
|
|
3290 |
public getCoupon_result deepCopy() {
|
|
|
3291 |
return new getCoupon_result(this);
|
|
|
3292 |
}
|
|
|
3293 |
|
|
|
3294 |
@Override
|
|
|
3295 |
public void clear() {
|
|
|
3296 |
this.success = null;
|
|
|
3297 |
this.pex = null;
|
|
|
3298 |
}
|
|
|
3299 |
|
|
|
3300 |
public Coupon getSuccess() {
|
|
|
3301 |
return this.success;
|
|
|
3302 |
}
|
|
|
3303 |
|
|
|
3304 |
public void setSuccess(Coupon success) {
|
|
|
3305 |
this.success = success;
|
|
|
3306 |
}
|
|
|
3307 |
|
|
|
3308 |
public void unsetSuccess() {
|
|
|
3309 |
this.success = null;
|
|
|
3310 |
}
|
|
|
3311 |
|
|
|
3312 |
/** Returns true if field success is set (has been assigned a value) and false otherwise */
|
|
|
3313 |
public boolean isSetSuccess() {
|
|
|
3314 |
return this.success != null;
|
|
|
3315 |
}
|
|
|
3316 |
|
|
|
3317 |
public void setSuccessIsSet(boolean value) {
|
|
|
3318 |
if (!value) {
|
|
|
3319 |
this.success = null;
|
|
|
3320 |
}
|
|
|
3321 |
}
|
|
|
3322 |
|
|
|
3323 |
public PromotionException getPex() {
|
|
|
3324 |
return this.pex;
|
|
|
3325 |
}
|
|
|
3326 |
|
|
|
3327 |
public void setPex(PromotionException pex) {
|
|
|
3328 |
this.pex = pex;
|
|
|
3329 |
}
|
|
|
3330 |
|
|
|
3331 |
public void unsetPex() {
|
|
|
3332 |
this.pex = null;
|
|
|
3333 |
}
|
|
|
3334 |
|
|
|
3335 |
/** Returns true if field pex is set (has been assigned a value) and false otherwise */
|
|
|
3336 |
public boolean isSetPex() {
|
|
|
3337 |
return this.pex != null;
|
|
|
3338 |
}
|
|
|
3339 |
|
|
|
3340 |
public void setPexIsSet(boolean value) {
|
|
|
3341 |
if (!value) {
|
|
|
3342 |
this.pex = null;
|
|
|
3343 |
}
|
|
|
3344 |
}
|
|
|
3345 |
|
|
|
3346 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
3347 |
switch (field) {
|
|
|
3348 |
case SUCCESS:
|
|
|
3349 |
if (value == null) {
|
|
|
3350 |
unsetSuccess();
|
|
|
3351 |
} else {
|
|
|
3352 |
setSuccess((Coupon)value);
|
|
|
3353 |
}
|
|
|
3354 |
break;
|
|
|
3355 |
|
|
|
3356 |
case PEX:
|
|
|
3357 |
if (value == null) {
|
|
|
3358 |
unsetPex();
|
|
|
3359 |
} else {
|
|
|
3360 |
setPex((PromotionException)value);
|
|
|
3361 |
}
|
|
|
3362 |
break;
|
|
|
3363 |
|
|
|
3364 |
}
|
|
|
3365 |
}
|
|
|
3366 |
|
|
|
3367 |
public Object getFieldValue(_Fields field) {
|
|
|
3368 |
switch (field) {
|
|
|
3369 |
case SUCCESS:
|
|
|
3370 |
return getSuccess();
|
|
|
3371 |
|
|
|
3372 |
case PEX:
|
|
|
3373 |
return getPex();
|
|
|
3374 |
|
|
|
3375 |
}
|
|
|
3376 |
throw new IllegalStateException();
|
|
|
3377 |
}
|
|
|
3378 |
|
|
|
3379 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
3380 |
public boolean isSet(_Fields field) {
|
|
|
3381 |
if (field == null) {
|
|
|
3382 |
throw new IllegalArgumentException();
|
|
|
3383 |
}
|
|
|
3384 |
|
|
|
3385 |
switch (field) {
|
|
|
3386 |
case SUCCESS:
|
|
|
3387 |
return isSetSuccess();
|
|
|
3388 |
case PEX:
|
|
|
3389 |
return isSetPex();
|
|
|
3390 |
}
|
|
|
3391 |
throw new IllegalStateException();
|
|
|
3392 |
}
|
|
|
3393 |
|
|
|
3394 |
@Override
|
|
|
3395 |
public boolean equals(Object that) {
|
|
|
3396 |
if (that == null)
|
|
|
3397 |
return false;
|
|
|
3398 |
if (that instanceof getCoupon_result)
|
|
|
3399 |
return this.equals((getCoupon_result)that);
|
|
|
3400 |
return false;
|
|
|
3401 |
}
|
|
|
3402 |
|
|
|
3403 |
public boolean equals(getCoupon_result that) {
|
|
|
3404 |
if (that == null)
|
|
|
3405 |
return false;
|
|
|
3406 |
|
|
|
3407 |
boolean this_present_success = true && this.isSetSuccess();
|
|
|
3408 |
boolean that_present_success = true && that.isSetSuccess();
|
|
|
3409 |
if (this_present_success || that_present_success) {
|
|
|
3410 |
if (!(this_present_success && that_present_success))
|
|
|
3411 |
return false;
|
|
|
3412 |
if (!this.success.equals(that.success))
|
|
|
3413 |
return false;
|
|
|
3414 |
}
|
|
|
3415 |
|
|
|
3416 |
boolean this_present_pex = true && this.isSetPex();
|
|
|
3417 |
boolean that_present_pex = true && that.isSetPex();
|
|
|
3418 |
if (this_present_pex || that_present_pex) {
|
|
|
3419 |
if (!(this_present_pex && that_present_pex))
|
|
|
3420 |
return false;
|
|
|
3421 |
if (!this.pex.equals(that.pex))
|
|
|
3422 |
return false;
|
|
|
3423 |
}
|
|
|
3424 |
|
|
|
3425 |
return true;
|
|
|
3426 |
}
|
|
|
3427 |
|
|
|
3428 |
@Override
|
|
|
3429 |
public int hashCode() {
|
|
|
3430 |
return 0;
|
|
|
3431 |
}
|
|
|
3432 |
|
|
|
3433 |
public int compareTo(getCoupon_result other) {
|
|
|
3434 |
if (!getClass().equals(other.getClass())) {
|
|
|
3435 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
3436 |
}
|
|
|
3437 |
|
|
|
3438 |
int lastComparison = 0;
|
|
|
3439 |
getCoupon_result typedOther = (getCoupon_result)other;
|
|
|
3440 |
|
|
|
3441 |
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
|
|
|
3442 |
if (lastComparison != 0) {
|
|
|
3443 |
return lastComparison;
|
|
|
3444 |
}
|
|
|
3445 |
if (isSetSuccess()) {
|
|
|
3446 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
|
|
|
3447 |
if (lastComparison != 0) {
|
|
|
3448 |
return lastComparison;
|
|
|
3449 |
}
|
|
|
3450 |
}
|
|
|
3451 |
lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
|
|
|
3452 |
if (lastComparison != 0) {
|
|
|
3453 |
return lastComparison;
|
|
|
3454 |
}
|
|
|
3455 |
if (isSetPex()) {
|
|
|
3456 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
|
|
|
3457 |
if (lastComparison != 0) {
|
|
|
3458 |
return lastComparison;
|
|
|
3459 |
}
|
|
|
3460 |
}
|
|
|
3461 |
return 0;
|
|
|
3462 |
}
|
|
|
3463 |
|
|
|
3464 |
public _Fields fieldForId(int fieldId) {
|
|
|
3465 |
return _Fields.findByThriftId(fieldId);
|
|
|
3466 |
}
|
|
|
3467 |
|
|
|
3468 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
3469 |
org.apache.thrift.protocol.TField field;
|
|
|
3470 |
iprot.readStructBegin();
|
|
|
3471 |
while (true)
|
|
|
3472 |
{
|
|
|
3473 |
field = iprot.readFieldBegin();
|
|
|
3474 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
3475 |
break;
|
|
|
3476 |
}
|
|
|
3477 |
switch (field.id) {
|
|
|
3478 |
case 0: // SUCCESS
|
|
|
3479 |
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
|
|
3480 |
this.success = new Coupon();
|
|
|
3481 |
this.success.read(iprot);
|
|
|
3482 |
} else {
|
|
|
3483 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
3484 |
}
|
|
|
3485 |
break;
|
|
|
3486 |
case 1: // PEX
|
|
|
3487 |
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
|
|
3488 |
this.pex = new PromotionException();
|
|
|
3489 |
this.pex.read(iprot);
|
|
|
3490 |
} else {
|
|
|
3491 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
3492 |
}
|
|
|
3493 |
break;
|
|
|
3494 |
default:
|
|
|
3495 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
3496 |
}
|
|
|
3497 |
iprot.readFieldEnd();
|
|
|
3498 |
}
|
|
|
3499 |
iprot.readStructEnd();
|
|
|
3500 |
validate();
|
|
|
3501 |
}
|
|
|
3502 |
|
|
|
3503 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
3504 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
3505 |
|
|
|
3506 |
if (this.isSetSuccess()) {
|
|
|
3507 |
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
|
|
3508 |
this.success.write(oprot);
|
|
|
3509 |
oprot.writeFieldEnd();
|
|
|
3510 |
} else if (this.isSetPex()) {
|
|
|
3511 |
oprot.writeFieldBegin(PEX_FIELD_DESC);
|
|
|
3512 |
this.pex.write(oprot);
|
|
|
3513 |
oprot.writeFieldEnd();
|
|
|
3514 |
}
|
|
|
3515 |
oprot.writeFieldStop();
|
|
|
3516 |
oprot.writeStructEnd();
|
|
|
3517 |
}
|
|
|
3518 |
|
|
|
3519 |
@Override
|
|
|
3520 |
public String toString() {
|
|
|
3521 |
StringBuilder sb = new StringBuilder("getCoupon_result(");
|
|
|
3522 |
boolean first = true;
|
|
|
3523 |
|
|
|
3524 |
sb.append("success:");
|
|
|
3525 |
if (this.success == null) {
|
|
|
3526 |
sb.append("null");
|
|
|
3527 |
} else {
|
|
|
3528 |
sb.append(this.success);
|
|
|
3529 |
}
|
|
|
3530 |
first = false;
|
|
|
3531 |
if (!first) sb.append(", ");
|
|
|
3532 |
sb.append("pex:");
|
|
|
3533 |
if (this.pex == null) {
|
|
|
3534 |
sb.append("null");
|
|
|
3535 |
} else {
|
|
|
3536 |
sb.append(this.pex);
|
|
|
3537 |
}
|
|
|
3538 |
first = false;
|
|
|
3539 |
sb.append(")");
|
|
|
3540 |
return sb.toString();
|
|
|
3541 |
}
|
|
|
3542 |
|
|
|
3543 |
public void validate() throws org.apache.thrift.TException {
|
|
|
3544 |
// check for required fields
|
|
|
3545 |
}
|
|
|
3546 |
|
|
|
3547 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
3548 |
try {
|
|
|
3549 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
3550 |
} catch (org.apache.thrift.TException te) {
|
|
|
3551 |
throw new java.io.IOException(te);
|
|
|
3552 |
}
|
|
|
3553 |
}
|
|
|
3554 |
|
|
|
3555 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
3556 |
try {
|
|
|
3557 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
3558 |
} catch (org.apache.thrift.TException te) {
|
|
|
3559 |
throw new java.io.IOException(te);
|
|
|
3560 |
}
|
|
|
3561 |
}
|
|
|
3562 |
|
|
|
3563 |
}
|
|
|
3564 |
|
|
|
3565 |
public static class isGiftVoucher_args implements org.apache.thrift.TBase<isGiftVoucher_args, isGiftVoucher_args._Fields>, java.io.Serializable, Cloneable {
|
|
|
3566 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isGiftVoucher_args");
|
|
|
3567 |
|
|
|
3568 |
private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCode", org.apache.thrift.protocol.TType.STRING, (short)1);
|
|
|
3569 |
|
|
|
3570 |
private String couponCode; // required
|
|
|
3571 |
|
|
|
3572 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
3573 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
3574 |
COUPON_CODE((short)1, "couponCode");
|
|
|
3575 |
|
|
|
3576 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
3577 |
|
|
|
3578 |
static {
|
|
|
3579 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
3580 |
byName.put(field.getFieldName(), field);
|
|
|
3581 |
}
|
|
|
3582 |
}
|
|
|
3583 |
|
|
|
3584 |
/**
|
|
|
3585 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
3586 |
*/
|
|
|
3587 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
3588 |
switch(fieldId) {
|
|
|
3589 |
case 1: // COUPON_CODE
|
|
|
3590 |
return COUPON_CODE;
|
|
|
3591 |
default:
|
|
|
3592 |
return null;
|
|
|
3593 |
}
|
|
|
3594 |
}
|
|
|
3595 |
|
|
|
3596 |
/**
|
|
|
3597 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
3598 |
* if it is not found.
|
|
|
3599 |
*/
|
|
|
3600 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
3601 |
_Fields fields = findByThriftId(fieldId);
|
|
|
3602 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
3603 |
return fields;
|
|
|
3604 |
}
|
|
|
3605 |
|
|
|
3606 |
/**
|
|
|
3607 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
3608 |
*/
|
|
|
3609 |
public static _Fields findByName(String name) {
|
|
|
3610 |
return byName.get(name);
|
|
|
3611 |
}
|
|
|
3612 |
|
|
|
3613 |
private final short _thriftId;
|
|
|
3614 |
private final String _fieldName;
|
|
|
3615 |
|
|
|
3616 |
_Fields(short thriftId, String fieldName) {
|
|
|
3617 |
_thriftId = thriftId;
|
|
|
3618 |
_fieldName = fieldName;
|
|
|
3619 |
}
|
|
|
3620 |
|
|
|
3621 |
public short getThriftFieldId() {
|
|
|
3622 |
return _thriftId;
|
|
|
3623 |
}
|
|
|
3624 |
|
|
|
3625 |
public String getFieldName() {
|
|
|
3626 |
return _fieldName;
|
|
|
3627 |
}
|
|
|
3628 |
}
|
|
|
3629 |
|
|
|
3630 |
// isset id assignments
|
|
|
3631 |
|
|
|
3632 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
3633 |
static {
|
|
|
3634 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
3635 |
tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
3636 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
3637 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
3638 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isGiftVoucher_args.class, metaDataMap);
|
|
|
3639 |
}
|
|
|
3640 |
|
|
|
3641 |
public isGiftVoucher_args() {
|
|
|
3642 |
}
|
|
|
3643 |
|
|
|
3644 |
public isGiftVoucher_args(
|
|
|
3645 |
String couponCode)
|
|
|
3646 |
{
|
|
|
3647 |
this();
|
|
|
3648 |
this.couponCode = couponCode;
|
|
|
3649 |
}
|
|
|
3650 |
|
|
|
3651 |
/**
|
|
|
3652 |
* Performs a deep copy on <i>other</i>.
|
|
|
3653 |
*/
|
|
|
3654 |
public isGiftVoucher_args(isGiftVoucher_args other) {
|
|
|
3655 |
if (other.isSetCouponCode()) {
|
|
|
3656 |
this.couponCode = other.couponCode;
|
|
|
3657 |
}
|
|
|
3658 |
}
|
|
|
3659 |
|
|
|
3660 |
public isGiftVoucher_args deepCopy() {
|
|
|
3661 |
return new isGiftVoucher_args(this);
|
|
|
3662 |
}
|
|
|
3663 |
|
|
|
3664 |
@Override
|
|
|
3665 |
public void clear() {
|
|
|
3666 |
this.couponCode = null;
|
|
|
3667 |
}
|
|
|
3668 |
|
|
|
3669 |
public String getCouponCode() {
|
|
|
3670 |
return this.couponCode;
|
|
|
3671 |
}
|
|
|
3672 |
|
|
|
3673 |
public void setCouponCode(String couponCode) {
|
|
|
3674 |
this.couponCode = couponCode;
|
|
|
3675 |
}
|
|
|
3676 |
|
|
|
3677 |
public void unsetCouponCode() {
|
|
|
3678 |
this.couponCode = null;
|
|
|
3679 |
}
|
|
|
3680 |
|
|
|
3681 |
/** Returns true if field couponCode is set (has been assigned a value) and false otherwise */
|
|
|
3682 |
public boolean isSetCouponCode() {
|
|
|
3683 |
return this.couponCode != null;
|
|
|
3684 |
}
|
|
|
3685 |
|
|
|
3686 |
public void setCouponCodeIsSet(boolean value) {
|
|
|
3687 |
if (!value) {
|
|
|
3688 |
this.couponCode = null;
|
|
|
3689 |
}
|
|
|
3690 |
}
|
|
|
3691 |
|
|
|
3692 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
3693 |
switch (field) {
|
|
|
3694 |
case COUPON_CODE:
|
|
|
3695 |
if (value == null) {
|
|
|
3696 |
unsetCouponCode();
|
|
|
3697 |
} else {
|
|
|
3698 |
setCouponCode((String)value);
|
|
|
3699 |
}
|
|
|
3700 |
break;
|
|
|
3701 |
|
|
|
3702 |
}
|
|
|
3703 |
}
|
|
|
3704 |
|
|
|
3705 |
public Object getFieldValue(_Fields field) {
|
|
|
3706 |
switch (field) {
|
|
|
3707 |
case COUPON_CODE:
|
|
|
3708 |
return getCouponCode();
|
|
|
3709 |
|
|
|
3710 |
}
|
|
|
3711 |
throw new IllegalStateException();
|
|
|
3712 |
}
|
|
|
3713 |
|
|
|
3714 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
3715 |
public boolean isSet(_Fields field) {
|
|
|
3716 |
if (field == null) {
|
|
|
3717 |
throw new IllegalArgumentException();
|
|
|
3718 |
}
|
|
|
3719 |
|
|
|
3720 |
switch (field) {
|
|
|
3721 |
case COUPON_CODE:
|
|
|
3722 |
return isSetCouponCode();
|
|
|
3723 |
}
|
|
|
3724 |
throw new IllegalStateException();
|
|
|
3725 |
}
|
|
|
3726 |
|
|
|
3727 |
@Override
|
|
|
3728 |
public boolean equals(Object that) {
|
|
|
3729 |
if (that == null)
|
|
|
3730 |
return false;
|
|
|
3731 |
if (that instanceof isGiftVoucher_args)
|
|
|
3732 |
return this.equals((isGiftVoucher_args)that);
|
|
|
3733 |
return false;
|
|
|
3734 |
}
|
|
|
3735 |
|
|
|
3736 |
public boolean equals(isGiftVoucher_args that) {
|
|
|
3737 |
if (that == null)
|
|
|
3738 |
return false;
|
|
|
3739 |
|
|
|
3740 |
boolean this_present_couponCode = true && this.isSetCouponCode();
|
|
|
3741 |
boolean that_present_couponCode = true && that.isSetCouponCode();
|
|
|
3742 |
if (this_present_couponCode || that_present_couponCode) {
|
|
|
3743 |
if (!(this_present_couponCode && that_present_couponCode))
|
|
|
3744 |
return false;
|
|
|
3745 |
if (!this.couponCode.equals(that.couponCode))
|
|
|
3746 |
return false;
|
|
|
3747 |
}
|
|
|
3748 |
|
|
|
3749 |
return true;
|
|
|
3750 |
}
|
|
|
3751 |
|
|
|
3752 |
@Override
|
|
|
3753 |
public int hashCode() {
|
|
|
3754 |
return 0;
|
|
|
3755 |
}
|
|
|
3756 |
|
|
|
3757 |
public int compareTo(isGiftVoucher_args other) {
|
|
|
3758 |
if (!getClass().equals(other.getClass())) {
|
|
|
3759 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
3760 |
}
|
|
|
3761 |
|
|
|
3762 |
int lastComparison = 0;
|
|
|
3763 |
isGiftVoucher_args typedOther = (isGiftVoucher_args)other;
|
|
|
3764 |
|
|
|
3765 |
lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
|
|
|
3766 |
if (lastComparison != 0) {
|
|
|
3767 |
return lastComparison;
|
|
|
3768 |
}
|
|
|
3769 |
if (isSetCouponCode()) {
|
|
|
3770 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);
|
|
|
3771 |
if (lastComparison != 0) {
|
|
|
3772 |
return lastComparison;
|
|
|
3773 |
}
|
|
|
3774 |
}
|
|
|
3775 |
return 0;
|
|
|
3776 |
}
|
|
|
3777 |
|
|
|
3778 |
public _Fields fieldForId(int fieldId) {
|
|
|
3779 |
return _Fields.findByThriftId(fieldId);
|
|
|
3780 |
}
|
|
|
3781 |
|
|
|
3782 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
3783 |
org.apache.thrift.protocol.TField field;
|
|
|
3784 |
iprot.readStructBegin();
|
|
|
3785 |
while (true)
|
|
|
3786 |
{
|
|
|
3787 |
field = iprot.readFieldBegin();
|
|
|
3788 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
3789 |
break;
|
|
|
3790 |
}
|
|
|
3791 |
switch (field.id) {
|
|
|
3792 |
case 1: // COUPON_CODE
|
|
|
3793 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
3794 |
this.couponCode = iprot.readString();
|
|
|
3795 |
} else {
|
|
|
3796 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
3797 |
}
|
|
|
3798 |
break;
|
|
|
3799 |
default:
|
|
|
3800 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
3801 |
}
|
|
|
3802 |
iprot.readFieldEnd();
|
|
|
3803 |
}
|
|
|
3804 |
iprot.readStructEnd();
|
|
|
3805 |
validate();
|
|
|
3806 |
}
|
|
|
3807 |
|
|
|
3808 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
3809 |
validate();
|
|
|
3810 |
|
|
|
3811 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
3812 |
if (this.couponCode != null) {
|
|
|
3813 |
oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
|
|
|
3814 |
oprot.writeString(this.couponCode);
|
|
|
3815 |
oprot.writeFieldEnd();
|
|
|
3816 |
}
|
|
|
3817 |
oprot.writeFieldStop();
|
|
|
3818 |
oprot.writeStructEnd();
|
|
|
3819 |
}
|
|
|
3820 |
|
|
|
3821 |
@Override
|
|
|
3822 |
public String toString() {
|
|
|
3823 |
StringBuilder sb = new StringBuilder("isGiftVoucher_args(");
|
|
|
3824 |
boolean first = true;
|
|
|
3825 |
|
|
|
3826 |
sb.append("couponCode:");
|
|
|
3827 |
if (this.couponCode == null) {
|
|
|
3828 |
sb.append("null");
|
|
|
3829 |
} else {
|
|
|
3830 |
sb.append(this.couponCode);
|
|
|
3831 |
}
|
|
|
3832 |
first = false;
|
|
|
3833 |
sb.append(")");
|
|
|
3834 |
return sb.toString();
|
|
|
3835 |
}
|
|
|
3836 |
|
|
|
3837 |
public void validate() throws org.apache.thrift.TException {
|
|
|
3838 |
// check for required fields
|
|
|
3839 |
}
|
|
|
3840 |
|
|
|
3841 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
3842 |
try {
|
|
|
3843 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
3844 |
} catch (org.apache.thrift.TException te) {
|
|
|
3845 |
throw new java.io.IOException(te);
|
|
|
3846 |
}
|
|
|
3847 |
}
|
|
|
3848 |
|
|
|
3849 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
3850 |
try {
|
|
|
3851 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
3852 |
} catch (org.apache.thrift.TException te) {
|
|
|
3853 |
throw new java.io.IOException(te);
|
|
|
3854 |
}
|
|
|
3855 |
}
|
|
|
3856 |
|
|
|
3857 |
}
|
|
|
3858 |
|
|
|
3859 |
public static class isGiftVoucher_result implements org.apache.thrift.TBase<isGiftVoucher_result, isGiftVoucher_result._Fields>, java.io.Serializable, Cloneable {
|
|
|
3860 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isGiftVoucher_result");
|
|
|
3861 |
|
|
|
3862 |
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
|
|
|
3863 |
private static final org.apache.thrift.protocol.TField PEX_FIELD_DESC = new org.apache.thrift.protocol.TField("pex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
|
|
|
3864 |
|
|
|
3865 |
private boolean success; // required
|
|
|
3866 |
private PromotionException pex; // required
|
|
|
3867 |
|
|
|
3868 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
3869 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
3870 |
SUCCESS((short)0, "success"),
|
|
|
3871 |
PEX((short)1, "pex");
|
|
|
3872 |
|
|
|
3873 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
3874 |
|
|
|
3875 |
static {
|
|
|
3876 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
3877 |
byName.put(field.getFieldName(), field);
|
|
|
3878 |
}
|
|
|
3879 |
}
|
|
|
3880 |
|
|
|
3881 |
/**
|
|
|
3882 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
3883 |
*/
|
|
|
3884 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
3885 |
switch(fieldId) {
|
|
|
3886 |
case 0: // SUCCESS
|
|
|
3887 |
return SUCCESS;
|
|
|
3888 |
case 1: // PEX
|
|
|
3889 |
return PEX;
|
|
|
3890 |
default:
|
|
|
3891 |
return null;
|
|
|
3892 |
}
|
|
|
3893 |
}
|
|
|
3894 |
|
|
|
3895 |
/**
|
|
|
3896 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
3897 |
* if it is not found.
|
|
|
3898 |
*/
|
|
|
3899 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
3900 |
_Fields fields = findByThriftId(fieldId);
|
|
|
3901 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
3902 |
return fields;
|
|
|
3903 |
}
|
|
|
3904 |
|
|
|
3905 |
/**
|
|
|
3906 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
3907 |
*/
|
|
|
3908 |
public static _Fields findByName(String name) {
|
|
|
3909 |
return byName.get(name);
|
|
|
3910 |
}
|
|
|
3911 |
|
|
|
3912 |
private final short _thriftId;
|
|
|
3913 |
private final String _fieldName;
|
|
|
3914 |
|
|
|
3915 |
_Fields(short thriftId, String fieldName) {
|
|
|
3916 |
_thriftId = thriftId;
|
|
|
3917 |
_fieldName = fieldName;
|
|
|
3918 |
}
|
|
|
3919 |
|
|
|
3920 |
public short getThriftFieldId() {
|
|
|
3921 |
return _thriftId;
|
|
|
3922 |
}
|
|
|
3923 |
|
|
|
3924 |
public String getFieldName() {
|
|
|
3925 |
return _fieldName;
|
|
|
3926 |
}
|
|
|
3927 |
}
|
|
|
3928 |
|
|
|
3929 |
// isset id assignments
|
|
|
3930 |
private static final int __SUCCESS_ISSET_ID = 0;
|
|
|
3931 |
private BitSet __isset_bit_vector = new BitSet(1);
|
|
|
3932 |
|
|
|
3933 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
3934 |
static {
|
|
|
3935 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
3936 |
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
3937 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
|
|
|
3938 |
tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
3939 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
|
|
|
3940 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
3941 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isGiftVoucher_result.class, metaDataMap);
|
|
|
3942 |
}
|
|
|
3943 |
|
|
|
3944 |
public isGiftVoucher_result() {
|
|
|
3945 |
}
|
|
|
3946 |
|
|
|
3947 |
public isGiftVoucher_result(
|
|
|
3948 |
boolean success,
|
|
|
3949 |
PromotionException pex)
|
|
|
3950 |
{
|
|
|
3951 |
this();
|
|
|
3952 |
this.success = success;
|
|
|
3953 |
setSuccessIsSet(true);
|
|
|
3954 |
this.pex = pex;
|
|
|
3955 |
}
|
|
|
3956 |
|
|
|
3957 |
/**
|
|
|
3958 |
* Performs a deep copy on <i>other</i>.
|
|
|
3959 |
*/
|
|
|
3960 |
public isGiftVoucher_result(isGiftVoucher_result other) {
|
|
|
3961 |
__isset_bit_vector.clear();
|
|
|
3962 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
3963 |
this.success = other.success;
|
|
|
3964 |
if (other.isSetPex()) {
|
|
|
3965 |
this.pex = new PromotionException(other.pex);
|
|
|
3966 |
}
|
|
|
3967 |
}
|
|
|
3968 |
|
|
|
3969 |
public isGiftVoucher_result deepCopy() {
|
|
|
3970 |
return new isGiftVoucher_result(this);
|
|
|
3971 |
}
|
|
|
3972 |
|
|
|
3973 |
@Override
|
|
|
3974 |
public void clear() {
|
|
|
3975 |
setSuccessIsSet(false);
|
|
|
3976 |
this.success = false;
|
|
|
3977 |
this.pex = null;
|
|
|
3978 |
}
|
|
|
3979 |
|
|
|
3980 |
public boolean isSuccess() {
|
|
|
3981 |
return this.success;
|
|
|
3982 |
}
|
|
|
3983 |
|
|
|
3984 |
public void setSuccess(boolean success) {
|
|
|
3985 |
this.success = success;
|
|
|
3986 |
setSuccessIsSet(true);
|
|
|
3987 |
}
|
|
|
3988 |
|
|
|
3989 |
public void unsetSuccess() {
|
|
|
3990 |
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
|
|
|
3991 |
}
|
|
|
3992 |
|
|
|
3993 |
/** Returns true if field success is set (has been assigned a value) and false otherwise */
|
|
|
3994 |
public boolean isSetSuccess() {
|
|
|
3995 |
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
|
|
|
3996 |
}
|
|
|
3997 |
|
|
|
3998 |
public void setSuccessIsSet(boolean value) {
|
|
|
3999 |
__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
|
|
|
4000 |
}
|
|
|
4001 |
|
|
|
4002 |
public PromotionException getPex() {
|
|
|
4003 |
return this.pex;
|
|
|
4004 |
}
|
|
|
4005 |
|
|
|
4006 |
public void setPex(PromotionException pex) {
|
|
|
4007 |
this.pex = pex;
|
|
|
4008 |
}
|
|
|
4009 |
|
|
|
4010 |
public void unsetPex() {
|
|
|
4011 |
this.pex = null;
|
|
|
4012 |
}
|
|
|
4013 |
|
|
|
4014 |
/** Returns true if field pex is set (has been assigned a value) and false otherwise */
|
|
|
4015 |
public boolean isSetPex() {
|
|
|
4016 |
return this.pex != null;
|
|
|
4017 |
}
|
|
|
4018 |
|
|
|
4019 |
public void setPexIsSet(boolean value) {
|
|
|
4020 |
if (!value) {
|
|
|
4021 |
this.pex = null;
|
|
|
4022 |
}
|
|
|
4023 |
}
|
|
|
4024 |
|
|
|
4025 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
4026 |
switch (field) {
|
|
|
4027 |
case SUCCESS:
|
|
|
4028 |
if (value == null) {
|
|
|
4029 |
unsetSuccess();
|
|
|
4030 |
} else {
|
|
|
4031 |
setSuccess((Boolean)value);
|
|
|
4032 |
}
|
|
|
4033 |
break;
|
|
|
4034 |
|
|
|
4035 |
case PEX:
|
|
|
4036 |
if (value == null) {
|
|
|
4037 |
unsetPex();
|
|
|
4038 |
} else {
|
|
|
4039 |
setPex((PromotionException)value);
|
|
|
4040 |
}
|
|
|
4041 |
break;
|
|
|
4042 |
|
|
|
4043 |
}
|
|
|
4044 |
}
|
|
|
4045 |
|
|
|
4046 |
public Object getFieldValue(_Fields field) {
|
|
|
4047 |
switch (field) {
|
|
|
4048 |
case SUCCESS:
|
|
|
4049 |
return Boolean.valueOf(isSuccess());
|
|
|
4050 |
|
|
|
4051 |
case PEX:
|
|
|
4052 |
return getPex();
|
|
|
4053 |
|
|
|
4054 |
}
|
|
|
4055 |
throw new IllegalStateException();
|
|
|
4056 |
}
|
|
|
4057 |
|
|
|
4058 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
4059 |
public boolean isSet(_Fields field) {
|
|
|
4060 |
if (field == null) {
|
|
|
4061 |
throw new IllegalArgumentException();
|
|
|
4062 |
}
|
|
|
4063 |
|
|
|
4064 |
switch (field) {
|
|
|
4065 |
case SUCCESS:
|
|
|
4066 |
return isSetSuccess();
|
|
|
4067 |
case PEX:
|
|
|
4068 |
return isSetPex();
|
|
|
4069 |
}
|
|
|
4070 |
throw new IllegalStateException();
|
|
|
4071 |
}
|
|
|
4072 |
|
|
|
4073 |
@Override
|
|
|
4074 |
public boolean equals(Object that) {
|
|
|
4075 |
if (that == null)
|
|
|
4076 |
return false;
|
|
|
4077 |
if (that instanceof isGiftVoucher_result)
|
|
|
4078 |
return this.equals((isGiftVoucher_result)that);
|
|
|
4079 |
return false;
|
|
|
4080 |
}
|
|
|
4081 |
|
|
|
4082 |
public boolean equals(isGiftVoucher_result that) {
|
|
|
4083 |
if (that == null)
|
|
|
4084 |
return false;
|
|
|
4085 |
|
|
|
4086 |
boolean this_present_success = true;
|
|
|
4087 |
boolean that_present_success = true;
|
|
|
4088 |
if (this_present_success || that_present_success) {
|
|
|
4089 |
if (!(this_present_success && that_present_success))
|
|
|
4090 |
return false;
|
|
|
4091 |
if (this.success != that.success)
|
|
|
4092 |
return false;
|
|
|
4093 |
}
|
|
|
4094 |
|
|
|
4095 |
boolean this_present_pex = true && this.isSetPex();
|
|
|
4096 |
boolean that_present_pex = true && that.isSetPex();
|
|
|
4097 |
if (this_present_pex || that_present_pex) {
|
|
|
4098 |
if (!(this_present_pex && that_present_pex))
|
|
|
4099 |
return false;
|
|
|
4100 |
if (!this.pex.equals(that.pex))
|
|
|
4101 |
return false;
|
|
|
4102 |
}
|
|
|
4103 |
|
|
|
4104 |
return true;
|
|
|
4105 |
}
|
|
|
4106 |
|
|
|
4107 |
@Override
|
|
|
4108 |
public int hashCode() {
|
|
|
4109 |
return 0;
|
|
|
4110 |
}
|
|
|
4111 |
|
|
|
4112 |
public int compareTo(isGiftVoucher_result other) {
|
|
|
4113 |
if (!getClass().equals(other.getClass())) {
|
|
|
4114 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
4115 |
}
|
|
|
4116 |
|
|
|
4117 |
int lastComparison = 0;
|
|
|
4118 |
isGiftVoucher_result typedOther = (isGiftVoucher_result)other;
|
|
|
4119 |
|
|
|
4120 |
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
|
|
|
4121 |
if (lastComparison != 0) {
|
|
|
4122 |
return lastComparison;
|
|
|
4123 |
}
|
|
|
4124 |
if (isSetSuccess()) {
|
|
|
4125 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
|
|
|
4126 |
if (lastComparison != 0) {
|
|
|
4127 |
return lastComparison;
|
|
|
4128 |
}
|
|
|
4129 |
}
|
|
|
4130 |
lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
|
|
|
4131 |
if (lastComparison != 0) {
|
|
|
4132 |
return lastComparison;
|
|
|
4133 |
}
|
|
|
4134 |
if (isSetPex()) {
|
|
|
4135 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
|
|
|
4136 |
if (lastComparison != 0) {
|
|
|
4137 |
return lastComparison;
|
|
|
4138 |
}
|
|
|
4139 |
}
|
|
|
4140 |
return 0;
|
|
|
4141 |
}
|
|
|
4142 |
|
|
|
4143 |
public _Fields fieldForId(int fieldId) {
|
|
|
4144 |
return _Fields.findByThriftId(fieldId);
|
|
|
4145 |
}
|
|
|
4146 |
|
|
|
4147 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
4148 |
org.apache.thrift.protocol.TField field;
|
|
|
4149 |
iprot.readStructBegin();
|
|
|
4150 |
while (true)
|
|
|
4151 |
{
|
|
|
4152 |
field = iprot.readFieldBegin();
|
|
|
4153 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
4154 |
break;
|
|
|
4155 |
}
|
|
|
4156 |
switch (field.id) {
|
|
|
4157 |
case 0: // SUCCESS
|
|
|
4158 |
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
|
|
|
4159 |
this.success = iprot.readBool();
|
|
|
4160 |
setSuccessIsSet(true);
|
|
|
4161 |
} else {
|
|
|
4162 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
4163 |
}
|
|
|
4164 |
break;
|
|
|
4165 |
case 1: // PEX
|
|
|
4166 |
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
|
|
4167 |
this.pex = new PromotionException();
|
|
|
4168 |
this.pex.read(iprot);
|
|
|
4169 |
} else {
|
|
|
4170 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
4171 |
}
|
|
|
4172 |
break;
|
|
|
4173 |
default:
|
|
|
4174 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
4175 |
}
|
|
|
4176 |
iprot.readFieldEnd();
|
|
|
4177 |
}
|
|
|
4178 |
iprot.readStructEnd();
|
|
|
4179 |
validate();
|
|
|
4180 |
}
|
|
|
4181 |
|
|
|
4182 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
4183 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
4184 |
|
|
|
4185 |
if (this.isSetSuccess()) {
|
|
|
4186 |
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
|
|
4187 |
oprot.writeBool(this.success);
|
|
|
4188 |
oprot.writeFieldEnd();
|
|
|
4189 |
} else if (this.isSetPex()) {
|
|
|
4190 |
oprot.writeFieldBegin(PEX_FIELD_DESC);
|
|
|
4191 |
this.pex.write(oprot);
|
|
|
4192 |
oprot.writeFieldEnd();
|
|
|
4193 |
}
|
|
|
4194 |
oprot.writeFieldStop();
|
|
|
4195 |
oprot.writeStructEnd();
|
|
|
4196 |
}
|
|
|
4197 |
|
|
|
4198 |
@Override
|
|
|
4199 |
public String toString() {
|
|
|
4200 |
StringBuilder sb = new StringBuilder("isGiftVoucher_result(");
|
|
|
4201 |
boolean first = true;
|
|
|
4202 |
|
|
|
4203 |
sb.append("success:");
|
|
|
4204 |
sb.append(this.success);
|
|
|
4205 |
first = false;
|
|
|
4206 |
if (!first) sb.append(", ");
|
|
|
4207 |
sb.append("pex:");
|
|
|
4208 |
if (this.pex == null) {
|
|
|
4209 |
sb.append("null");
|
|
|
4210 |
} else {
|
|
|
4211 |
sb.append(this.pex);
|
|
|
4212 |
}
|
|
|
4213 |
first = false;
|
|
|
4214 |
sb.append(")");
|
|
|
4215 |
return sb.toString();
|
|
|
4216 |
}
|
|
|
4217 |
|
|
|
4218 |
public void validate() throws org.apache.thrift.TException {
|
|
|
4219 |
// check for required fields
|
|
|
4220 |
}
|
|
|
4221 |
|
|
|
4222 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
4223 |
try {
|
|
|
4224 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
4225 |
} catch (org.apache.thrift.TException te) {
|
|
|
4226 |
throw new java.io.IOException(te);
|
|
|
4227 |
}
|
|
|
4228 |
}
|
|
|
4229 |
|
|
|
4230 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
4231 |
try {
|
|
|
4232 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
4233 |
} catch (org.apache.thrift.TException te) {
|
|
|
4234 |
throw new java.io.IOException(te);
|
|
|
4235 |
}
|
|
|
4236 |
}
|
|
|
4237 |
|
|
|
4238 |
}
|
|
|
4239 |
|
| 6356 |
amit.gupta |
4240 |
public static class isCodApplicable_args implements org.apache.thrift.TBase<isCodApplicable_args, isCodApplicable_args._Fields>, java.io.Serializable, Cloneable {
|
|
|
4241 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isCodApplicable_args");
|
|
|
4242 |
|
|
|
4243 |
private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCode", org.apache.thrift.protocol.TType.STRING, (short)1);
|
|
|
4244 |
|
|
|
4245 |
private String couponCode; // required
|
|
|
4246 |
|
|
|
4247 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
4248 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
4249 |
COUPON_CODE((short)1, "couponCode");
|
|
|
4250 |
|
|
|
4251 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
4252 |
|
|
|
4253 |
static {
|
|
|
4254 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
4255 |
byName.put(field.getFieldName(), field);
|
|
|
4256 |
}
|
|
|
4257 |
}
|
|
|
4258 |
|
|
|
4259 |
/**
|
|
|
4260 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
4261 |
*/
|
|
|
4262 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
4263 |
switch(fieldId) {
|
|
|
4264 |
case 1: // COUPON_CODE
|
|
|
4265 |
return COUPON_CODE;
|
|
|
4266 |
default:
|
|
|
4267 |
return null;
|
|
|
4268 |
}
|
|
|
4269 |
}
|
|
|
4270 |
|
|
|
4271 |
/**
|
|
|
4272 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
4273 |
* if it is not found.
|
|
|
4274 |
*/
|
|
|
4275 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
4276 |
_Fields fields = findByThriftId(fieldId);
|
|
|
4277 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
4278 |
return fields;
|
|
|
4279 |
}
|
|
|
4280 |
|
|
|
4281 |
/**
|
|
|
4282 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
4283 |
*/
|
|
|
4284 |
public static _Fields findByName(String name) {
|
|
|
4285 |
return byName.get(name);
|
|
|
4286 |
}
|
|
|
4287 |
|
|
|
4288 |
private final short _thriftId;
|
|
|
4289 |
private final String _fieldName;
|
|
|
4290 |
|
|
|
4291 |
_Fields(short thriftId, String fieldName) {
|
|
|
4292 |
_thriftId = thriftId;
|
|
|
4293 |
_fieldName = fieldName;
|
|
|
4294 |
}
|
|
|
4295 |
|
|
|
4296 |
public short getThriftFieldId() {
|
|
|
4297 |
return _thriftId;
|
|
|
4298 |
}
|
|
|
4299 |
|
|
|
4300 |
public String getFieldName() {
|
|
|
4301 |
return _fieldName;
|
|
|
4302 |
}
|
|
|
4303 |
}
|
|
|
4304 |
|
|
|
4305 |
// isset id assignments
|
|
|
4306 |
|
|
|
4307 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
4308 |
static {
|
|
|
4309 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
4310 |
tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
4311 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
4312 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
4313 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isCodApplicable_args.class, metaDataMap);
|
|
|
4314 |
}
|
|
|
4315 |
|
|
|
4316 |
public isCodApplicable_args() {
|
|
|
4317 |
}
|
|
|
4318 |
|
|
|
4319 |
public isCodApplicable_args(
|
|
|
4320 |
String couponCode)
|
|
|
4321 |
{
|
|
|
4322 |
this();
|
|
|
4323 |
this.couponCode = couponCode;
|
|
|
4324 |
}
|
|
|
4325 |
|
|
|
4326 |
/**
|
|
|
4327 |
* Performs a deep copy on <i>other</i>.
|
|
|
4328 |
*/
|
|
|
4329 |
public isCodApplicable_args(isCodApplicable_args other) {
|
|
|
4330 |
if (other.isSetCouponCode()) {
|
|
|
4331 |
this.couponCode = other.couponCode;
|
|
|
4332 |
}
|
|
|
4333 |
}
|
|
|
4334 |
|
|
|
4335 |
public isCodApplicable_args deepCopy() {
|
|
|
4336 |
return new isCodApplicable_args(this);
|
|
|
4337 |
}
|
|
|
4338 |
|
|
|
4339 |
@Override
|
|
|
4340 |
public void clear() {
|
|
|
4341 |
this.couponCode = null;
|
|
|
4342 |
}
|
|
|
4343 |
|
|
|
4344 |
public String getCouponCode() {
|
|
|
4345 |
return this.couponCode;
|
|
|
4346 |
}
|
|
|
4347 |
|
|
|
4348 |
public void setCouponCode(String couponCode) {
|
|
|
4349 |
this.couponCode = couponCode;
|
|
|
4350 |
}
|
|
|
4351 |
|
|
|
4352 |
public void unsetCouponCode() {
|
|
|
4353 |
this.couponCode = null;
|
|
|
4354 |
}
|
|
|
4355 |
|
|
|
4356 |
/** Returns true if field couponCode is set (has been assigned a value) and false otherwise */
|
|
|
4357 |
public boolean isSetCouponCode() {
|
|
|
4358 |
return this.couponCode != null;
|
|
|
4359 |
}
|
|
|
4360 |
|
|
|
4361 |
public void setCouponCodeIsSet(boolean value) {
|
|
|
4362 |
if (!value) {
|
|
|
4363 |
this.couponCode = null;
|
|
|
4364 |
}
|
|
|
4365 |
}
|
|
|
4366 |
|
|
|
4367 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
4368 |
switch (field) {
|
|
|
4369 |
case COUPON_CODE:
|
|
|
4370 |
if (value == null) {
|
|
|
4371 |
unsetCouponCode();
|
|
|
4372 |
} else {
|
|
|
4373 |
setCouponCode((String)value);
|
|
|
4374 |
}
|
|
|
4375 |
break;
|
|
|
4376 |
|
|
|
4377 |
}
|
|
|
4378 |
}
|
|
|
4379 |
|
|
|
4380 |
public Object getFieldValue(_Fields field) {
|
|
|
4381 |
switch (field) {
|
|
|
4382 |
case COUPON_CODE:
|
|
|
4383 |
return getCouponCode();
|
|
|
4384 |
|
|
|
4385 |
}
|
|
|
4386 |
throw new IllegalStateException();
|
|
|
4387 |
}
|
|
|
4388 |
|
|
|
4389 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
4390 |
public boolean isSet(_Fields field) {
|
|
|
4391 |
if (field == null) {
|
|
|
4392 |
throw new IllegalArgumentException();
|
|
|
4393 |
}
|
|
|
4394 |
|
|
|
4395 |
switch (field) {
|
|
|
4396 |
case COUPON_CODE:
|
|
|
4397 |
return isSetCouponCode();
|
|
|
4398 |
}
|
|
|
4399 |
throw new IllegalStateException();
|
|
|
4400 |
}
|
|
|
4401 |
|
|
|
4402 |
@Override
|
|
|
4403 |
public boolean equals(Object that) {
|
|
|
4404 |
if (that == null)
|
|
|
4405 |
return false;
|
|
|
4406 |
if (that instanceof isCodApplicable_args)
|
|
|
4407 |
return this.equals((isCodApplicable_args)that);
|
|
|
4408 |
return false;
|
|
|
4409 |
}
|
|
|
4410 |
|
|
|
4411 |
public boolean equals(isCodApplicable_args that) {
|
|
|
4412 |
if (that == null)
|
|
|
4413 |
return false;
|
|
|
4414 |
|
|
|
4415 |
boolean this_present_couponCode = true && this.isSetCouponCode();
|
|
|
4416 |
boolean that_present_couponCode = true && that.isSetCouponCode();
|
|
|
4417 |
if (this_present_couponCode || that_present_couponCode) {
|
|
|
4418 |
if (!(this_present_couponCode && that_present_couponCode))
|
|
|
4419 |
return false;
|
|
|
4420 |
if (!this.couponCode.equals(that.couponCode))
|
|
|
4421 |
return false;
|
|
|
4422 |
}
|
|
|
4423 |
|
|
|
4424 |
return true;
|
|
|
4425 |
}
|
|
|
4426 |
|
|
|
4427 |
@Override
|
|
|
4428 |
public int hashCode() {
|
|
|
4429 |
return 0;
|
|
|
4430 |
}
|
|
|
4431 |
|
|
|
4432 |
public int compareTo(isCodApplicable_args other) {
|
|
|
4433 |
if (!getClass().equals(other.getClass())) {
|
|
|
4434 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
4435 |
}
|
|
|
4436 |
|
|
|
4437 |
int lastComparison = 0;
|
|
|
4438 |
isCodApplicable_args typedOther = (isCodApplicable_args)other;
|
|
|
4439 |
|
|
|
4440 |
lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
|
|
|
4441 |
if (lastComparison != 0) {
|
|
|
4442 |
return lastComparison;
|
|
|
4443 |
}
|
|
|
4444 |
if (isSetCouponCode()) {
|
|
|
4445 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);
|
|
|
4446 |
if (lastComparison != 0) {
|
|
|
4447 |
return lastComparison;
|
|
|
4448 |
}
|
|
|
4449 |
}
|
|
|
4450 |
return 0;
|
|
|
4451 |
}
|
|
|
4452 |
|
|
|
4453 |
public _Fields fieldForId(int fieldId) {
|
|
|
4454 |
return _Fields.findByThriftId(fieldId);
|
|
|
4455 |
}
|
|
|
4456 |
|
|
|
4457 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
4458 |
org.apache.thrift.protocol.TField field;
|
|
|
4459 |
iprot.readStructBegin();
|
|
|
4460 |
while (true)
|
|
|
4461 |
{
|
|
|
4462 |
field = iprot.readFieldBegin();
|
|
|
4463 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
4464 |
break;
|
|
|
4465 |
}
|
|
|
4466 |
switch (field.id) {
|
|
|
4467 |
case 1: // COUPON_CODE
|
|
|
4468 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
4469 |
this.couponCode = iprot.readString();
|
|
|
4470 |
} else {
|
|
|
4471 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
4472 |
}
|
|
|
4473 |
break;
|
|
|
4474 |
default:
|
|
|
4475 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
4476 |
}
|
|
|
4477 |
iprot.readFieldEnd();
|
|
|
4478 |
}
|
|
|
4479 |
iprot.readStructEnd();
|
|
|
4480 |
validate();
|
|
|
4481 |
}
|
|
|
4482 |
|
|
|
4483 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
4484 |
validate();
|
|
|
4485 |
|
|
|
4486 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
4487 |
if (this.couponCode != null) {
|
|
|
4488 |
oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
|
|
|
4489 |
oprot.writeString(this.couponCode);
|
|
|
4490 |
oprot.writeFieldEnd();
|
|
|
4491 |
}
|
|
|
4492 |
oprot.writeFieldStop();
|
|
|
4493 |
oprot.writeStructEnd();
|
|
|
4494 |
}
|
|
|
4495 |
|
|
|
4496 |
@Override
|
|
|
4497 |
public String toString() {
|
|
|
4498 |
StringBuilder sb = new StringBuilder("isCodApplicable_args(");
|
|
|
4499 |
boolean first = true;
|
|
|
4500 |
|
|
|
4501 |
sb.append("couponCode:");
|
|
|
4502 |
if (this.couponCode == null) {
|
|
|
4503 |
sb.append("null");
|
|
|
4504 |
} else {
|
|
|
4505 |
sb.append(this.couponCode);
|
|
|
4506 |
}
|
|
|
4507 |
first = false;
|
|
|
4508 |
sb.append(")");
|
|
|
4509 |
return sb.toString();
|
|
|
4510 |
}
|
|
|
4511 |
|
|
|
4512 |
public void validate() throws org.apache.thrift.TException {
|
|
|
4513 |
// check for required fields
|
|
|
4514 |
}
|
|
|
4515 |
|
|
|
4516 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
4517 |
try {
|
|
|
4518 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
4519 |
} catch (org.apache.thrift.TException te) {
|
|
|
4520 |
throw new java.io.IOException(te);
|
|
|
4521 |
}
|
|
|
4522 |
}
|
|
|
4523 |
|
|
|
4524 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
4525 |
try {
|
|
|
4526 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
4527 |
} catch (org.apache.thrift.TException te) {
|
|
|
4528 |
throw new java.io.IOException(te);
|
|
|
4529 |
}
|
|
|
4530 |
}
|
|
|
4531 |
|
|
|
4532 |
}
|
|
|
4533 |
|
|
|
4534 |
public static class isCodApplicable_result implements org.apache.thrift.TBase<isCodApplicable_result, isCodApplicable_result._Fields>, java.io.Serializable, Cloneable {
|
|
|
4535 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isCodApplicable_result");
|
|
|
4536 |
|
|
|
4537 |
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
|
|
|
4538 |
private static final org.apache.thrift.protocol.TField PEX_FIELD_DESC = new org.apache.thrift.protocol.TField("pex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
|
|
|
4539 |
|
|
|
4540 |
private boolean success; // required
|
|
|
4541 |
private PromotionException pex; // required
|
|
|
4542 |
|
|
|
4543 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
4544 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
4545 |
SUCCESS((short)0, "success"),
|
|
|
4546 |
PEX((short)1, "pex");
|
|
|
4547 |
|
|
|
4548 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
4549 |
|
|
|
4550 |
static {
|
|
|
4551 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
4552 |
byName.put(field.getFieldName(), field);
|
|
|
4553 |
}
|
|
|
4554 |
}
|
|
|
4555 |
|
|
|
4556 |
/**
|
|
|
4557 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
4558 |
*/
|
|
|
4559 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
4560 |
switch(fieldId) {
|
|
|
4561 |
case 0: // SUCCESS
|
|
|
4562 |
return SUCCESS;
|
|
|
4563 |
case 1: // PEX
|
|
|
4564 |
return PEX;
|
|
|
4565 |
default:
|
|
|
4566 |
return null;
|
|
|
4567 |
}
|
|
|
4568 |
}
|
|
|
4569 |
|
|
|
4570 |
/**
|
|
|
4571 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
4572 |
* if it is not found.
|
|
|
4573 |
*/
|
|
|
4574 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
4575 |
_Fields fields = findByThriftId(fieldId);
|
|
|
4576 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
4577 |
return fields;
|
|
|
4578 |
}
|
|
|
4579 |
|
|
|
4580 |
/**
|
|
|
4581 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
4582 |
*/
|
|
|
4583 |
public static _Fields findByName(String name) {
|
|
|
4584 |
return byName.get(name);
|
|
|
4585 |
}
|
|
|
4586 |
|
|
|
4587 |
private final short _thriftId;
|
|
|
4588 |
private final String _fieldName;
|
|
|
4589 |
|
|
|
4590 |
_Fields(short thriftId, String fieldName) {
|
|
|
4591 |
_thriftId = thriftId;
|
|
|
4592 |
_fieldName = fieldName;
|
|
|
4593 |
}
|
|
|
4594 |
|
|
|
4595 |
public short getThriftFieldId() {
|
|
|
4596 |
return _thriftId;
|
|
|
4597 |
}
|
|
|
4598 |
|
|
|
4599 |
public String getFieldName() {
|
|
|
4600 |
return _fieldName;
|
|
|
4601 |
}
|
|
|
4602 |
}
|
|
|
4603 |
|
|
|
4604 |
// isset id assignments
|
|
|
4605 |
private static final int __SUCCESS_ISSET_ID = 0;
|
|
|
4606 |
private BitSet __isset_bit_vector = new BitSet(1);
|
|
|
4607 |
|
|
|
4608 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
4609 |
static {
|
|
|
4610 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
4611 |
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
4612 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
|
|
|
4613 |
tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
4614 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
|
|
|
4615 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
4616 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isCodApplicable_result.class, metaDataMap);
|
|
|
4617 |
}
|
|
|
4618 |
|
|
|
4619 |
public isCodApplicable_result() {
|
|
|
4620 |
}
|
|
|
4621 |
|
|
|
4622 |
public isCodApplicable_result(
|
|
|
4623 |
boolean success,
|
|
|
4624 |
PromotionException pex)
|
|
|
4625 |
{
|
|
|
4626 |
this();
|
|
|
4627 |
this.success = success;
|
|
|
4628 |
setSuccessIsSet(true);
|
|
|
4629 |
this.pex = pex;
|
|
|
4630 |
}
|
|
|
4631 |
|
|
|
4632 |
/**
|
|
|
4633 |
* Performs a deep copy on <i>other</i>.
|
|
|
4634 |
*/
|
|
|
4635 |
public isCodApplicable_result(isCodApplicable_result other) {
|
|
|
4636 |
__isset_bit_vector.clear();
|
|
|
4637 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
4638 |
this.success = other.success;
|
|
|
4639 |
if (other.isSetPex()) {
|
|
|
4640 |
this.pex = new PromotionException(other.pex);
|
|
|
4641 |
}
|
|
|
4642 |
}
|
|
|
4643 |
|
|
|
4644 |
public isCodApplicable_result deepCopy() {
|
|
|
4645 |
return new isCodApplicable_result(this);
|
|
|
4646 |
}
|
|
|
4647 |
|
|
|
4648 |
@Override
|
|
|
4649 |
public void clear() {
|
|
|
4650 |
setSuccessIsSet(false);
|
|
|
4651 |
this.success = false;
|
|
|
4652 |
this.pex = null;
|
|
|
4653 |
}
|
|
|
4654 |
|
|
|
4655 |
public boolean isSuccess() {
|
|
|
4656 |
return this.success;
|
|
|
4657 |
}
|
|
|
4658 |
|
|
|
4659 |
public void setSuccess(boolean success) {
|
|
|
4660 |
this.success = success;
|
|
|
4661 |
setSuccessIsSet(true);
|
|
|
4662 |
}
|
|
|
4663 |
|
|
|
4664 |
public void unsetSuccess() {
|
|
|
4665 |
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
|
|
|
4666 |
}
|
|
|
4667 |
|
|
|
4668 |
/** Returns true if field success is set (has been assigned a value) and false otherwise */
|
|
|
4669 |
public boolean isSetSuccess() {
|
|
|
4670 |
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
|
|
|
4671 |
}
|
|
|
4672 |
|
|
|
4673 |
public void setSuccessIsSet(boolean value) {
|
|
|
4674 |
__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
|
|
|
4675 |
}
|
|
|
4676 |
|
|
|
4677 |
public PromotionException getPex() {
|
|
|
4678 |
return this.pex;
|
|
|
4679 |
}
|
|
|
4680 |
|
|
|
4681 |
public void setPex(PromotionException pex) {
|
|
|
4682 |
this.pex = pex;
|
|
|
4683 |
}
|
|
|
4684 |
|
|
|
4685 |
public void unsetPex() {
|
|
|
4686 |
this.pex = null;
|
|
|
4687 |
}
|
|
|
4688 |
|
|
|
4689 |
/** Returns true if field pex is set (has been assigned a value) and false otherwise */
|
|
|
4690 |
public boolean isSetPex() {
|
|
|
4691 |
return this.pex != null;
|
|
|
4692 |
}
|
|
|
4693 |
|
|
|
4694 |
public void setPexIsSet(boolean value) {
|
|
|
4695 |
if (!value) {
|
|
|
4696 |
this.pex = null;
|
|
|
4697 |
}
|
|
|
4698 |
}
|
|
|
4699 |
|
|
|
4700 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
4701 |
switch (field) {
|
|
|
4702 |
case SUCCESS:
|
|
|
4703 |
if (value == null) {
|
|
|
4704 |
unsetSuccess();
|
|
|
4705 |
} else {
|
|
|
4706 |
setSuccess((Boolean)value);
|
|
|
4707 |
}
|
|
|
4708 |
break;
|
|
|
4709 |
|
|
|
4710 |
case PEX:
|
|
|
4711 |
if (value == null) {
|
|
|
4712 |
unsetPex();
|
|
|
4713 |
} else {
|
|
|
4714 |
setPex((PromotionException)value);
|
|
|
4715 |
}
|
|
|
4716 |
break;
|
|
|
4717 |
|
|
|
4718 |
}
|
|
|
4719 |
}
|
|
|
4720 |
|
|
|
4721 |
public Object getFieldValue(_Fields field) {
|
|
|
4722 |
switch (field) {
|
|
|
4723 |
case SUCCESS:
|
|
|
4724 |
return Boolean.valueOf(isSuccess());
|
|
|
4725 |
|
|
|
4726 |
case PEX:
|
|
|
4727 |
return getPex();
|
|
|
4728 |
|
|
|
4729 |
}
|
|
|
4730 |
throw new IllegalStateException();
|
|
|
4731 |
}
|
|
|
4732 |
|
|
|
4733 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
4734 |
public boolean isSet(_Fields field) {
|
|
|
4735 |
if (field == null) {
|
|
|
4736 |
throw new IllegalArgumentException();
|
|
|
4737 |
}
|
|
|
4738 |
|
|
|
4739 |
switch (field) {
|
|
|
4740 |
case SUCCESS:
|
|
|
4741 |
return isSetSuccess();
|
|
|
4742 |
case PEX:
|
|
|
4743 |
return isSetPex();
|
|
|
4744 |
}
|
|
|
4745 |
throw new IllegalStateException();
|
|
|
4746 |
}
|
|
|
4747 |
|
|
|
4748 |
@Override
|
|
|
4749 |
public boolean equals(Object that) {
|
|
|
4750 |
if (that == null)
|
|
|
4751 |
return false;
|
|
|
4752 |
if (that instanceof isCodApplicable_result)
|
|
|
4753 |
return this.equals((isCodApplicable_result)that);
|
|
|
4754 |
return false;
|
|
|
4755 |
}
|
|
|
4756 |
|
|
|
4757 |
public boolean equals(isCodApplicable_result that) {
|
|
|
4758 |
if (that == null)
|
|
|
4759 |
return false;
|
|
|
4760 |
|
|
|
4761 |
boolean this_present_success = true;
|
|
|
4762 |
boolean that_present_success = true;
|
|
|
4763 |
if (this_present_success || that_present_success) {
|
|
|
4764 |
if (!(this_present_success && that_present_success))
|
|
|
4765 |
return false;
|
|
|
4766 |
if (this.success != that.success)
|
|
|
4767 |
return false;
|
|
|
4768 |
}
|
|
|
4769 |
|
|
|
4770 |
boolean this_present_pex = true && this.isSetPex();
|
|
|
4771 |
boolean that_present_pex = true && that.isSetPex();
|
|
|
4772 |
if (this_present_pex || that_present_pex) {
|
|
|
4773 |
if (!(this_present_pex && that_present_pex))
|
|
|
4774 |
return false;
|
|
|
4775 |
if (!this.pex.equals(that.pex))
|
|
|
4776 |
return false;
|
|
|
4777 |
}
|
|
|
4778 |
|
|
|
4779 |
return true;
|
|
|
4780 |
}
|
|
|
4781 |
|
|
|
4782 |
@Override
|
|
|
4783 |
public int hashCode() {
|
|
|
4784 |
return 0;
|
|
|
4785 |
}
|
|
|
4786 |
|
|
|
4787 |
public int compareTo(isCodApplicable_result other) {
|
|
|
4788 |
if (!getClass().equals(other.getClass())) {
|
|
|
4789 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
4790 |
}
|
|
|
4791 |
|
|
|
4792 |
int lastComparison = 0;
|
|
|
4793 |
isCodApplicable_result typedOther = (isCodApplicable_result)other;
|
|
|
4794 |
|
|
|
4795 |
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
|
|
|
4796 |
if (lastComparison != 0) {
|
|
|
4797 |
return lastComparison;
|
|
|
4798 |
}
|
|
|
4799 |
if (isSetSuccess()) {
|
|
|
4800 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
|
|
|
4801 |
if (lastComparison != 0) {
|
|
|
4802 |
return lastComparison;
|
|
|
4803 |
}
|
|
|
4804 |
}
|
|
|
4805 |
lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
|
|
|
4806 |
if (lastComparison != 0) {
|
|
|
4807 |
return lastComparison;
|
|
|
4808 |
}
|
|
|
4809 |
if (isSetPex()) {
|
|
|
4810 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
|
|
|
4811 |
if (lastComparison != 0) {
|
|
|
4812 |
return lastComparison;
|
|
|
4813 |
}
|
|
|
4814 |
}
|
|
|
4815 |
return 0;
|
|
|
4816 |
}
|
|
|
4817 |
|
|
|
4818 |
public _Fields fieldForId(int fieldId) {
|
|
|
4819 |
return _Fields.findByThriftId(fieldId);
|
|
|
4820 |
}
|
|
|
4821 |
|
|
|
4822 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
4823 |
org.apache.thrift.protocol.TField field;
|
|
|
4824 |
iprot.readStructBegin();
|
|
|
4825 |
while (true)
|
|
|
4826 |
{
|
|
|
4827 |
field = iprot.readFieldBegin();
|
|
|
4828 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
4829 |
break;
|
|
|
4830 |
}
|
|
|
4831 |
switch (field.id) {
|
|
|
4832 |
case 0: // SUCCESS
|
|
|
4833 |
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
|
|
|
4834 |
this.success = iprot.readBool();
|
|
|
4835 |
setSuccessIsSet(true);
|
|
|
4836 |
} else {
|
|
|
4837 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
4838 |
}
|
|
|
4839 |
break;
|
|
|
4840 |
case 1: // PEX
|
|
|
4841 |
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
|
|
4842 |
this.pex = new PromotionException();
|
|
|
4843 |
this.pex.read(iprot);
|
|
|
4844 |
} else {
|
|
|
4845 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
4846 |
}
|
|
|
4847 |
break;
|
|
|
4848 |
default:
|
|
|
4849 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
4850 |
}
|
|
|
4851 |
iprot.readFieldEnd();
|
|
|
4852 |
}
|
|
|
4853 |
iprot.readStructEnd();
|
|
|
4854 |
validate();
|
|
|
4855 |
}
|
|
|
4856 |
|
|
|
4857 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
4858 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
4859 |
|
|
|
4860 |
if (this.isSetSuccess()) {
|
|
|
4861 |
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
|
|
4862 |
oprot.writeBool(this.success);
|
|
|
4863 |
oprot.writeFieldEnd();
|
|
|
4864 |
} else if (this.isSetPex()) {
|
|
|
4865 |
oprot.writeFieldBegin(PEX_FIELD_DESC);
|
|
|
4866 |
this.pex.write(oprot);
|
|
|
4867 |
oprot.writeFieldEnd();
|
|
|
4868 |
}
|
|
|
4869 |
oprot.writeFieldStop();
|
|
|
4870 |
oprot.writeStructEnd();
|
|
|
4871 |
}
|
|
|
4872 |
|
|
|
4873 |
@Override
|
|
|
4874 |
public String toString() {
|
|
|
4875 |
StringBuilder sb = new StringBuilder("isCodApplicable_result(");
|
|
|
4876 |
boolean first = true;
|
|
|
4877 |
|
|
|
4878 |
sb.append("success:");
|
|
|
4879 |
sb.append(this.success);
|
|
|
4880 |
first = false;
|
|
|
4881 |
if (!first) sb.append(", ");
|
|
|
4882 |
sb.append("pex:");
|
|
|
4883 |
if (this.pex == null) {
|
|
|
4884 |
sb.append("null");
|
|
|
4885 |
} else {
|
|
|
4886 |
sb.append(this.pex);
|
|
|
4887 |
}
|
|
|
4888 |
first = false;
|
|
|
4889 |
sb.append(")");
|
|
|
4890 |
return sb.toString();
|
|
|
4891 |
}
|
|
|
4892 |
|
|
|
4893 |
public void validate() throws org.apache.thrift.TException {
|
|
|
4894 |
// check for required fields
|
|
|
4895 |
}
|
|
|
4896 |
|
|
|
4897 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
4898 |
try {
|
|
|
4899 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
4900 |
} catch (org.apache.thrift.TException te) {
|
|
|
4901 |
throw new java.io.IOException(te);
|
|
|
4902 |
}
|
|
|
4903 |
}
|
|
|
4904 |
|
|
|
4905 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
4906 |
try {
|
|
|
4907 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
4908 |
} catch (org.apache.thrift.TException te) {
|
|
|
4909 |
throw new java.io.IOException(te);
|
|
|
4910 |
}
|
|
|
4911 |
}
|
|
|
4912 |
|
|
|
4913 |
}
|
|
|
4914 |
|
| 3430 |
rajveer |
4915 |
public static class getAllPromotions_args implements org.apache.thrift.TBase<getAllPromotions_args, getAllPromotions_args._Fields>, java.io.Serializable, Cloneable {
|
|
|
4916 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPromotions_args");
|
| 1982 |
varun.gupt |
4917 |
|
|
|
4918 |
|
|
|
4919 |
|
|
|
4920 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
| 3430 |
rajveer |
4921 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
| 1982 |
varun.gupt |
4922 |
;
|
|
|
4923 |
|
|
|
4924 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
4925 |
|
|
|
4926 |
static {
|
|
|
4927 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
4928 |
byName.put(field.getFieldName(), field);
|
|
|
4929 |
}
|
|
|
4930 |
}
|
|
|
4931 |
|
|
|
4932 |
/**
|
|
|
4933 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
4934 |
*/
|
|
|
4935 |
public static _Fields findByThriftId(int fieldId) {
|
| 3430 |
rajveer |
4936 |
switch(fieldId) {
|
|
|
4937 |
default:
|
|
|
4938 |
return null;
|
|
|
4939 |
}
|
| 1982 |
varun.gupt |
4940 |
}
|
|
|
4941 |
|
|
|
4942 |
/**
|
|
|
4943 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
4944 |
* if it is not found.
|
|
|
4945 |
*/
|
|
|
4946 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
4947 |
_Fields fields = findByThriftId(fieldId);
|
|
|
4948 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
4949 |
return fields;
|
|
|
4950 |
}
|
|
|
4951 |
|
|
|
4952 |
/**
|
|
|
4953 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
4954 |
*/
|
|
|
4955 |
public static _Fields findByName(String name) {
|
|
|
4956 |
return byName.get(name);
|
|
|
4957 |
}
|
|
|
4958 |
|
|
|
4959 |
private final short _thriftId;
|
|
|
4960 |
private final String _fieldName;
|
|
|
4961 |
|
|
|
4962 |
_Fields(short thriftId, String fieldName) {
|
|
|
4963 |
_thriftId = thriftId;
|
|
|
4964 |
_fieldName = fieldName;
|
|
|
4965 |
}
|
|
|
4966 |
|
|
|
4967 |
public short getThriftFieldId() {
|
|
|
4968 |
return _thriftId;
|
|
|
4969 |
}
|
|
|
4970 |
|
|
|
4971 |
public String getFieldName() {
|
|
|
4972 |
return _fieldName;
|
|
|
4973 |
}
|
|
|
4974 |
}
|
| 3430 |
rajveer |
4975 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
| 1982 |
varun.gupt |
4976 |
static {
|
| 3430 |
rajveer |
4977 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
4978 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
4979 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPromotions_args.class, metaDataMap);
|
| 1982 |
varun.gupt |
4980 |
}
|
|
|
4981 |
|
|
|
4982 |
public getAllPromotions_args() {
|
|
|
4983 |
}
|
|
|
4984 |
|
|
|
4985 |
/**
|
|
|
4986 |
* Performs a deep copy on <i>other</i>.
|
|
|
4987 |
*/
|
|
|
4988 |
public getAllPromotions_args(getAllPromotions_args other) {
|
|
|
4989 |
}
|
|
|
4990 |
|
|
|
4991 |
public getAllPromotions_args deepCopy() {
|
|
|
4992 |
return new getAllPromotions_args(this);
|
|
|
4993 |
}
|
|
|
4994 |
|
| 3430 |
rajveer |
4995 |
@Override
|
|
|
4996 |
public void clear() {
|
| 1982 |
varun.gupt |
4997 |
}
|
|
|
4998 |
|
|
|
4999 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
5000 |
switch (field) {
|
|
|
5001 |
}
|
|
|
5002 |
}
|
|
|
5003 |
|
|
|
5004 |
public Object getFieldValue(_Fields field) {
|
|
|
5005 |
switch (field) {
|
|
|
5006 |
}
|
|
|
5007 |
throw new IllegalStateException();
|
|
|
5008 |
}
|
|
|
5009 |
|
| 3430 |
rajveer |
5010 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
5011 |
public boolean isSet(_Fields field) {
|
|
|
5012 |
if (field == null) {
|
|
|
5013 |
throw new IllegalArgumentException();
|
|
|
5014 |
}
|
| 1982 |
varun.gupt |
5015 |
|
|
|
5016 |
switch (field) {
|
|
|
5017 |
}
|
|
|
5018 |
throw new IllegalStateException();
|
|
|
5019 |
}
|
|
|
5020 |
|
|
|
5021 |
@Override
|
|
|
5022 |
public boolean equals(Object that) {
|
|
|
5023 |
if (that == null)
|
|
|
5024 |
return false;
|
|
|
5025 |
if (that instanceof getAllPromotions_args)
|
|
|
5026 |
return this.equals((getAllPromotions_args)that);
|
|
|
5027 |
return false;
|
|
|
5028 |
}
|
|
|
5029 |
|
|
|
5030 |
public boolean equals(getAllPromotions_args that) {
|
|
|
5031 |
if (that == null)
|
|
|
5032 |
return false;
|
|
|
5033 |
|
|
|
5034 |
return true;
|
|
|
5035 |
}
|
|
|
5036 |
|
|
|
5037 |
@Override
|
|
|
5038 |
public int hashCode() {
|
|
|
5039 |
return 0;
|
|
|
5040 |
}
|
|
|
5041 |
|
|
|
5042 |
public int compareTo(getAllPromotions_args other) {
|
|
|
5043 |
if (!getClass().equals(other.getClass())) {
|
|
|
5044 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
5045 |
}
|
|
|
5046 |
|
|
|
5047 |
int lastComparison = 0;
|
|
|
5048 |
getAllPromotions_args typedOther = (getAllPromotions_args)other;
|
|
|
5049 |
|
|
|
5050 |
return 0;
|
|
|
5051 |
}
|
|
|
5052 |
|
| 3430 |
rajveer |
5053 |
public _Fields fieldForId(int fieldId) {
|
|
|
5054 |
return _Fields.findByThriftId(fieldId);
|
|
|
5055 |
}
|
|
|
5056 |
|
|
|
5057 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
5058 |
org.apache.thrift.protocol.TField field;
|
| 1982 |
varun.gupt |
5059 |
iprot.readStructBegin();
|
|
|
5060 |
while (true)
|
|
|
5061 |
{
|
|
|
5062 |
field = iprot.readFieldBegin();
|
| 3430 |
rajveer |
5063 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
| 1982 |
varun.gupt |
5064 |
break;
|
|
|
5065 |
}
|
| 3430 |
rajveer |
5066 |
switch (field.id) {
|
|
|
5067 |
default:
|
|
|
5068 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| 1982 |
varun.gupt |
5069 |
}
|
| 3430 |
rajveer |
5070 |
iprot.readFieldEnd();
|
| 1982 |
varun.gupt |
5071 |
}
|
|
|
5072 |
iprot.readStructEnd();
|
|
|
5073 |
validate();
|
|
|
5074 |
}
|
|
|
5075 |
|
| 3430 |
rajveer |
5076 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
5077 |
validate();
|
|
|
5078 |
|
|
|
5079 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
5080 |
oprot.writeFieldStop();
|
|
|
5081 |
oprot.writeStructEnd();
|
|
|
5082 |
}
|
|
|
5083 |
|
|
|
5084 |
@Override
|
|
|
5085 |
public String toString() {
|
|
|
5086 |
StringBuilder sb = new StringBuilder("getAllPromotions_args(");
|
|
|
5087 |
boolean first = true;
|
|
|
5088 |
|
|
|
5089 |
sb.append(")");
|
|
|
5090 |
return sb.toString();
|
|
|
5091 |
}
|
|
|
5092 |
|
| 3430 |
rajveer |
5093 |
public void validate() throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
5094 |
// check for required fields
|
|
|
5095 |
}
|
|
|
5096 |
|
| 3430 |
rajveer |
5097 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
5098 |
try {
|
|
|
5099 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
5100 |
} catch (org.apache.thrift.TException te) {
|
|
|
5101 |
throw new java.io.IOException(te);
|
|
|
5102 |
}
|
|
|
5103 |
}
|
|
|
5104 |
|
|
|
5105 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
5106 |
try {
|
|
|
5107 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
5108 |
} catch (org.apache.thrift.TException te) {
|
|
|
5109 |
throw new java.io.IOException(te);
|
|
|
5110 |
}
|
|
|
5111 |
}
|
|
|
5112 |
|
| 1982 |
varun.gupt |
5113 |
}
|
|
|
5114 |
|
| 3430 |
rajveer |
5115 |
public static class getAllPromotions_result implements org.apache.thrift.TBase<getAllPromotions_result, getAllPromotions_result._Fields>, java.io.Serializable, Cloneable {
|
|
|
5116 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPromotions_result");
|
| 1982 |
varun.gupt |
5117 |
|
| 3430 |
rajveer |
5118 |
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
|
|
|
5119 |
private static final org.apache.thrift.protocol.TField PEX_FIELD_DESC = new org.apache.thrift.protocol.TField("pex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
|
| 1982 |
varun.gupt |
5120 |
|
| 3430 |
rajveer |
5121 |
private List<Promotion> success; // required
|
|
|
5122 |
private PromotionException pex; // required
|
| 1982 |
varun.gupt |
5123 |
|
|
|
5124 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
| 3430 |
rajveer |
5125 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
| 1982 |
varun.gupt |
5126 |
SUCCESS((short)0, "success"),
|
|
|
5127 |
PEX((short)1, "pex");
|
|
|
5128 |
|
|
|
5129 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
5130 |
|
|
|
5131 |
static {
|
|
|
5132 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
5133 |
byName.put(field.getFieldName(), field);
|
|
|
5134 |
}
|
|
|
5135 |
}
|
|
|
5136 |
|
|
|
5137 |
/**
|
|
|
5138 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
5139 |
*/
|
|
|
5140 |
public static _Fields findByThriftId(int fieldId) {
|
| 3430 |
rajveer |
5141 |
switch(fieldId) {
|
|
|
5142 |
case 0: // SUCCESS
|
|
|
5143 |
return SUCCESS;
|
|
|
5144 |
case 1: // PEX
|
|
|
5145 |
return PEX;
|
|
|
5146 |
default:
|
|
|
5147 |
return null;
|
|
|
5148 |
}
|
| 1982 |
varun.gupt |
5149 |
}
|
|
|
5150 |
|
|
|
5151 |
/**
|
|
|
5152 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
5153 |
* if it is not found.
|
|
|
5154 |
*/
|
|
|
5155 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
5156 |
_Fields fields = findByThriftId(fieldId);
|
|
|
5157 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
5158 |
return fields;
|
|
|
5159 |
}
|
|
|
5160 |
|
|
|
5161 |
/**
|
|
|
5162 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
5163 |
*/
|
|
|
5164 |
public static _Fields findByName(String name) {
|
|
|
5165 |
return byName.get(name);
|
|
|
5166 |
}
|
|
|
5167 |
|
|
|
5168 |
private final short _thriftId;
|
|
|
5169 |
private final String _fieldName;
|
|
|
5170 |
|
|
|
5171 |
_Fields(short thriftId, String fieldName) {
|
|
|
5172 |
_thriftId = thriftId;
|
|
|
5173 |
_fieldName = fieldName;
|
|
|
5174 |
}
|
|
|
5175 |
|
|
|
5176 |
public short getThriftFieldId() {
|
|
|
5177 |
return _thriftId;
|
|
|
5178 |
}
|
|
|
5179 |
|
|
|
5180 |
public String getFieldName() {
|
|
|
5181 |
return _fieldName;
|
|
|
5182 |
}
|
|
|
5183 |
}
|
|
|
5184 |
|
|
|
5185 |
// isset id assignments
|
|
|
5186 |
|
| 3430 |
rajveer |
5187 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
| 1982 |
varun.gupt |
5188 |
static {
|
| 3430 |
rajveer |
5189 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
5190 |
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
5191 |
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
|
|
|
5192 |
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Promotion.class))));
|
|
|
5193 |
tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
5194 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
|
|
|
5195 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
5196 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPromotions_result.class, metaDataMap);
|
| 1982 |
varun.gupt |
5197 |
}
|
|
|
5198 |
|
|
|
5199 |
public getAllPromotions_result() {
|
|
|
5200 |
}
|
|
|
5201 |
|
|
|
5202 |
public getAllPromotions_result(
|
|
|
5203 |
List<Promotion> success,
|
|
|
5204 |
PromotionException pex)
|
|
|
5205 |
{
|
|
|
5206 |
this();
|
|
|
5207 |
this.success = success;
|
|
|
5208 |
this.pex = pex;
|
|
|
5209 |
}
|
|
|
5210 |
|
|
|
5211 |
/**
|
|
|
5212 |
* Performs a deep copy on <i>other</i>.
|
|
|
5213 |
*/
|
|
|
5214 |
public getAllPromotions_result(getAllPromotions_result other) {
|
|
|
5215 |
if (other.isSetSuccess()) {
|
|
|
5216 |
List<Promotion> __this__success = new ArrayList<Promotion>();
|
|
|
5217 |
for (Promotion other_element : other.success) {
|
|
|
5218 |
__this__success.add(new Promotion(other_element));
|
|
|
5219 |
}
|
|
|
5220 |
this.success = __this__success;
|
|
|
5221 |
}
|
|
|
5222 |
if (other.isSetPex()) {
|
|
|
5223 |
this.pex = new PromotionException(other.pex);
|
|
|
5224 |
}
|
|
|
5225 |
}
|
|
|
5226 |
|
|
|
5227 |
public getAllPromotions_result deepCopy() {
|
|
|
5228 |
return new getAllPromotions_result(this);
|
|
|
5229 |
}
|
|
|
5230 |
|
| 3430 |
rajveer |
5231 |
@Override
|
|
|
5232 |
public void clear() {
|
|
|
5233 |
this.success = null;
|
|
|
5234 |
this.pex = null;
|
| 1982 |
varun.gupt |
5235 |
}
|
|
|
5236 |
|
|
|
5237 |
public int getSuccessSize() {
|
|
|
5238 |
return (this.success == null) ? 0 : this.success.size();
|
|
|
5239 |
}
|
|
|
5240 |
|
|
|
5241 |
public java.util.Iterator<Promotion> getSuccessIterator() {
|
|
|
5242 |
return (this.success == null) ? null : this.success.iterator();
|
|
|
5243 |
}
|
|
|
5244 |
|
|
|
5245 |
public void addToSuccess(Promotion elem) {
|
|
|
5246 |
if (this.success == null) {
|
|
|
5247 |
this.success = new ArrayList<Promotion>();
|
|
|
5248 |
}
|
|
|
5249 |
this.success.add(elem);
|
|
|
5250 |
}
|
|
|
5251 |
|
|
|
5252 |
public List<Promotion> getSuccess() {
|
|
|
5253 |
return this.success;
|
|
|
5254 |
}
|
|
|
5255 |
|
| 3430 |
rajveer |
5256 |
public void setSuccess(List<Promotion> success) {
|
| 1982 |
varun.gupt |
5257 |
this.success = success;
|
|
|
5258 |
}
|
|
|
5259 |
|
|
|
5260 |
public void unsetSuccess() {
|
|
|
5261 |
this.success = null;
|
|
|
5262 |
}
|
|
|
5263 |
|
| 3430 |
rajveer |
5264 |
/** Returns true if field success is set (has been assigned a value) and false otherwise */
|
| 1982 |
varun.gupt |
5265 |
public boolean isSetSuccess() {
|
|
|
5266 |
return this.success != null;
|
|
|
5267 |
}
|
|
|
5268 |
|
|
|
5269 |
public void setSuccessIsSet(boolean value) {
|
|
|
5270 |
if (!value) {
|
|
|
5271 |
this.success = null;
|
|
|
5272 |
}
|
|
|
5273 |
}
|
|
|
5274 |
|
|
|
5275 |
public PromotionException getPex() {
|
|
|
5276 |
return this.pex;
|
|
|
5277 |
}
|
|
|
5278 |
|
| 3430 |
rajveer |
5279 |
public void setPex(PromotionException pex) {
|
| 1982 |
varun.gupt |
5280 |
this.pex = pex;
|
|
|
5281 |
}
|
|
|
5282 |
|
|
|
5283 |
public void unsetPex() {
|
|
|
5284 |
this.pex = null;
|
|
|
5285 |
}
|
|
|
5286 |
|
| 3430 |
rajveer |
5287 |
/** Returns true if field pex is set (has been assigned a value) and false otherwise */
|
| 1982 |
varun.gupt |
5288 |
public boolean isSetPex() {
|
|
|
5289 |
return this.pex != null;
|
|
|
5290 |
}
|
|
|
5291 |
|
|
|
5292 |
public void setPexIsSet(boolean value) {
|
|
|
5293 |
if (!value) {
|
|
|
5294 |
this.pex = null;
|
|
|
5295 |
}
|
|
|
5296 |
}
|
|
|
5297 |
|
|
|
5298 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
5299 |
switch (field) {
|
|
|
5300 |
case SUCCESS:
|
|
|
5301 |
if (value == null) {
|
|
|
5302 |
unsetSuccess();
|
|
|
5303 |
} else {
|
|
|
5304 |
setSuccess((List<Promotion>)value);
|
|
|
5305 |
}
|
|
|
5306 |
break;
|
|
|
5307 |
|
|
|
5308 |
case PEX:
|
|
|
5309 |
if (value == null) {
|
|
|
5310 |
unsetPex();
|
|
|
5311 |
} else {
|
|
|
5312 |
setPex((PromotionException)value);
|
|
|
5313 |
}
|
|
|
5314 |
break;
|
|
|
5315 |
|
|
|
5316 |
}
|
|
|
5317 |
}
|
|
|
5318 |
|
|
|
5319 |
public Object getFieldValue(_Fields field) {
|
|
|
5320 |
switch (field) {
|
|
|
5321 |
case SUCCESS:
|
|
|
5322 |
return getSuccess();
|
|
|
5323 |
|
|
|
5324 |
case PEX:
|
|
|
5325 |
return getPex();
|
|
|
5326 |
|
|
|
5327 |
}
|
|
|
5328 |
throw new IllegalStateException();
|
|
|
5329 |
}
|
|
|
5330 |
|
| 3430 |
rajveer |
5331 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
5332 |
public boolean isSet(_Fields field) {
|
|
|
5333 |
if (field == null) {
|
|
|
5334 |
throw new IllegalArgumentException();
|
|
|
5335 |
}
|
| 1982 |
varun.gupt |
5336 |
|
|
|
5337 |
switch (field) {
|
|
|
5338 |
case SUCCESS:
|
|
|
5339 |
return isSetSuccess();
|
|
|
5340 |
case PEX:
|
|
|
5341 |
return isSetPex();
|
|
|
5342 |
}
|
|
|
5343 |
throw new IllegalStateException();
|
|
|
5344 |
}
|
|
|
5345 |
|
|
|
5346 |
@Override
|
|
|
5347 |
public boolean equals(Object that) {
|
|
|
5348 |
if (that == null)
|
|
|
5349 |
return false;
|
|
|
5350 |
if (that instanceof getAllPromotions_result)
|
|
|
5351 |
return this.equals((getAllPromotions_result)that);
|
|
|
5352 |
return false;
|
|
|
5353 |
}
|
|
|
5354 |
|
|
|
5355 |
public boolean equals(getAllPromotions_result that) {
|
|
|
5356 |
if (that == null)
|
|
|
5357 |
return false;
|
|
|
5358 |
|
|
|
5359 |
boolean this_present_success = true && this.isSetSuccess();
|
|
|
5360 |
boolean that_present_success = true && that.isSetSuccess();
|
|
|
5361 |
if (this_present_success || that_present_success) {
|
|
|
5362 |
if (!(this_present_success && that_present_success))
|
|
|
5363 |
return false;
|
|
|
5364 |
if (!this.success.equals(that.success))
|
|
|
5365 |
return false;
|
|
|
5366 |
}
|
|
|
5367 |
|
|
|
5368 |
boolean this_present_pex = true && this.isSetPex();
|
|
|
5369 |
boolean that_present_pex = true && that.isSetPex();
|
|
|
5370 |
if (this_present_pex || that_present_pex) {
|
|
|
5371 |
if (!(this_present_pex && that_present_pex))
|
|
|
5372 |
return false;
|
|
|
5373 |
if (!this.pex.equals(that.pex))
|
|
|
5374 |
return false;
|
|
|
5375 |
}
|
|
|
5376 |
|
|
|
5377 |
return true;
|
|
|
5378 |
}
|
|
|
5379 |
|
|
|
5380 |
@Override
|
|
|
5381 |
public int hashCode() {
|
|
|
5382 |
return 0;
|
|
|
5383 |
}
|
|
|
5384 |
|
|
|
5385 |
public int compareTo(getAllPromotions_result other) {
|
|
|
5386 |
if (!getClass().equals(other.getClass())) {
|
|
|
5387 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
5388 |
}
|
|
|
5389 |
|
|
|
5390 |
int lastComparison = 0;
|
|
|
5391 |
getAllPromotions_result typedOther = (getAllPromotions_result)other;
|
|
|
5392 |
|
| 3430 |
rajveer |
5393 |
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
|
| 1982 |
varun.gupt |
5394 |
if (lastComparison != 0) {
|
|
|
5395 |
return lastComparison;
|
|
|
5396 |
}
|
| 3430 |
rajveer |
5397 |
if (isSetSuccess()) {
|
|
|
5398 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
|
|
|
5399 |
if (lastComparison != 0) {
|
|
|
5400 |
return lastComparison;
|
|
|
5401 |
}
|
| 1982 |
varun.gupt |
5402 |
}
|
| 3430 |
rajveer |
5403 |
lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
|
| 1982 |
varun.gupt |
5404 |
if (lastComparison != 0) {
|
|
|
5405 |
return lastComparison;
|
|
|
5406 |
}
|
| 3430 |
rajveer |
5407 |
if (isSetPex()) {
|
|
|
5408 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
|
|
|
5409 |
if (lastComparison != 0) {
|
|
|
5410 |
return lastComparison;
|
|
|
5411 |
}
|
| 1982 |
varun.gupt |
5412 |
}
|
|
|
5413 |
return 0;
|
|
|
5414 |
}
|
|
|
5415 |
|
| 3430 |
rajveer |
5416 |
public _Fields fieldForId(int fieldId) {
|
|
|
5417 |
return _Fields.findByThriftId(fieldId);
|
|
|
5418 |
}
|
|
|
5419 |
|
|
|
5420 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
5421 |
org.apache.thrift.protocol.TField field;
|
| 1982 |
varun.gupt |
5422 |
iprot.readStructBegin();
|
|
|
5423 |
while (true)
|
|
|
5424 |
{
|
|
|
5425 |
field = iprot.readFieldBegin();
|
| 3430 |
rajveer |
5426 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
| 1982 |
varun.gupt |
5427 |
break;
|
|
|
5428 |
}
|
| 3430 |
rajveer |
5429 |
switch (field.id) {
|
|
|
5430 |
case 0: // SUCCESS
|
|
|
5431 |
if (field.type == org.apache.thrift.protocol.TType.LIST) {
|
|
|
5432 |
{
|
| 5327 |
rajveer |
5433 |
org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
|
|
|
5434 |
this.success = new ArrayList<Promotion>(_list12.size);
|
|
|
5435 |
for (int _i13 = 0; _i13 < _list12.size; ++_i13)
|
| 1982 |
varun.gupt |
5436 |
{
|
| 5327 |
rajveer |
5437 |
Promotion _elem14; // required
|
|
|
5438 |
_elem14 = new Promotion();
|
|
|
5439 |
_elem14.read(iprot);
|
|
|
5440 |
this.success.add(_elem14);
|
| 1982 |
varun.gupt |
5441 |
}
|
| 3430 |
rajveer |
5442 |
iprot.readListEnd();
|
| 1982 |
varun.gupt |
5443 |
}
|
| 3430 |
rajveer |
5444 |
} else {
|
|
|
5445 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
5446 |
}
|
|
|
5447 |
break;
|
|
|
5448 |
case 1: // PEX
|
|
|
5449 |
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
|
|
5450 |
this.pex = new PromotionException();
|
|
|
5451 |
this.pex.read(iprot);
|
|
|
5452 |
} else {
|
|
|
5453 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
5454 |
}
|
|
|
5455 |
break;
|
|
|
5456 |
default:
|
|
|
5457 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| 1982 |
varun.gupt |
5458 |
}
|
| 3430 |
rajveer |
5459 |
iprot.readFieldEnd();
|
| 1982 |
varun.gupt |
5460 |
}
|
|
|
5461 |
iprot.readStructEnd();
|
|
|
5462 |
validate();
|
|
|
5463 |
}
|
|
|
5464 |
|
| 3430 |
rajveer |
5465 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
5466 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
5467 |
|
|
|
5468 |
if (this.isSetSuccess()) {
|
|
|
5469 |
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
|
|
5470 |
{
|
| 3430 |
rajveer |
5471 |
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
|
| 5327 |
rajveer |
5472 |
for (Promotion _iter15 : this.success)
|
| 1982 |
varun.gupt |
5473 |
{
|
| 5327 |
rajveer |
5474 |
_iter15.write(oprot);
|
| 1982 |
varun.gupt |
5475 |
}
|
|
|
5476 |
oprot.writeListEnd();
|
|
|
5477 |
}
|
|
|
5478 |
oprot.writeFieldEnd();
|
|
|
5479 |
} else if (this.isSetPex()) {
|
|
|
5480 |
oprot.writeFieldBegin(PEX_FIELD_DESC);
|
|
|
5481 |
this.pex.write(oprot);
|
|
|
5482 |
oprot.writeFieldEnd();
|
|
|
5483 |
}
|
|
|
5484 |
oprot.writeFieldStop();
|
|
|
5485 |
oprot.writeStructEnd();
|
|
|
5486 |
}
|
|
|
5487 |
|
|
|
5488 |
@Override
|
|
|
5489 |
public String toString() {
|
|
|
5490 |
StringBuilder sb = new StringBuilder("getAllPromotions_result(");
|
|
|
5491 |
boolean first = true;
|
|
|
5492 |
|
|
|
5493 |
sb.append("success:");
|
|
|
5494 |
if (this.success == null) {
|
|
|
5495 |
sb.append("null");
|
|
|
5496 |
} else {
|
|
|
5497 |
sb.append(this.success);
|
|
|
5498 |
}
|
|
|
5499 |
first = false;
|
|
|
5500 |
if (!first) sb.append(", ");
|
|
|
5501 |
sb.append("pex:");
|
|
|
5502 |
if (this.pex == null) {
|
|
|
5503 |
sb.append("null");
|
|
|
5504 |
} else {
|
|
|
5505 |
sb.append(this.pex);
|
|
|
5506 |
}
|
|
|
5507 |
first = false;
|
|
|
5508 |
sb.append(")");
|
|
|
5509 |
return sb.toString();
|
|
|
5510 |
}
|
|
|
5511 |
|
| 3430 |
rajveer |
5512 |
public void validate() throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
5513 |
// check for required fields
|
|
|
5514 |
}
|
|
|
5515 |
|
| 3430 |
rajveer |
5516 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
5517 |
try {
|
|
|
5518 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
5519 |
} catch (org.apache.thrift.TException te) {
|
|
|
5520 |
throw new java.io.IOException(te);
|
|
|
5521 |
}
|
|
|
5522 |
}
|
|
|
5523 |
|
|
|
5524 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
5525 |
try {
|
|
|
5526 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
5527 |
} catch (org.apache.thrift.TException te) {
|
|
|
5528 |
throw new java.io.IOException(te);
|
|
|
5529 |
}
|
|
|
5530 |
}
|
|
|
5531 |
|
| 1982 |
varun.gupt |
5532 |
}
|
|
|
5533 |
|
| 3430 |
rajveer |
5534 |
public static class getPromotionById_args implements org.apache.thrift.TBase<getPromotionById_args, getPromotionById_args._Fields>, java.io.Serializable, Cloneable {
|
|
|
5535 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPromotionById_args");
|
| 1982 |
varun.gupt |
5536 |
|
| 3430 |
rajveer |
5537 |
private static final org.apache.thrift.protocol.TField PROMOTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("promotionId", org.apache.thrift.protocol.TType.I64, (short)1);
|
| 1982 |
varun.gupt |
5538 |
|
| 3430 |
rajveer |
5539 |
private long promotionId; // required
|
| 1982 |
varun.gupt |
5540 |
|
|
|
5541 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
| 3430 |
rajveer |
5542 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
| 1982 |
varun.gupt |
5543 |
PROMOTION_ID((short)1, "promotionId");
|
|
|
5544 |
|
|
|
5545 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
5546 |
|
|
|
5547 |
static {
|
|
|
5548 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
5549 |
byName.put(field.getFieldName(), field);
|
|
|
5550 |
}
|
|
|
5551 |
}
|
|
|
5552 |
|
|
|
5553 |
/**
|
|
|
5554 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
5555 |
*/
|
|
|
5556 |
public static _Fields findByThriftId(int fieldId) {
|
| 3430 |
rajveer |
5557 |
switch(fieldId) {
|
|
|
5558 |
case 1: // PROMOTION_ID
|
|
|
5559 |
return PROMOTION_ID;
|
|
|
5560 |
default:
|
|
|
5561 |
return null;
|
|
|
5562 |
}
|
| 1982 |
varun.gupt |
5563 |
}
|
|
|
5564 |
|
|
|
5565 |
/**
|
|
|
5566 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
5567 |
* if it is not found.
|
|
|
5568 |
*/
|
|
|
5569 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
5570 |
_Fields fields = findByThriftId(fieldId);
|
|
|
5571 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
5572 |
return fields;
|
|
|
5573 |
}
|
|
|
5574 |
|
|
|
5575 |
/**
|
|
|
5576 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
5577 |
*/
|
|
|
5578 |
public static _Fields findByName(String name) {
|
|
|
5579 |
return byName.get(name);
|
|
|
5580 |
}
|
|
|
5581 |
|
|
|
5582 |
private final short _thriftId;
|
|
|
5583 |
private final String _fieldName;
|
|
|
5584 |
|
|
|
5585 |
_Fields(short thriftId, String fieldName) {
|
|
|
5586 |
_thriftId = thriftId;
|
|
|
5587 |
_fieldName = fieldName;
|
|
|
5588 |
}
|
|
|
5589 |
|
|
|
5590 |
public short getThriftFieldId() {
|
|
|
5591 |
return _thriftId;
|
|
|
5592 |
}
|
|
|
5593 |
|
|
|
5594 |
public String getFieldName() {
|
|
|
5595 |
return _fieldName;
|
|
|
5596 |
}
|
|
|
5597 |
}
|
|
|
5598 |
|
|
|
5599 |
// isset id assignments
|
|
|
5600 |
private static final int __PROMOTIONID_ISSET_ID = 0;
|
|
|
5601 |
private BitSet __isset_bit_vector = new BitSet(1);
|
|
|
5602 |
|
| 3430 |
rajveer |
5603 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
| 1982 |
varun.gupt |
5604 |
static {
|
| 3430 |
rajveer |
5605 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
5606 |
tmpMap.put(_Fields.PROMOTION_ID, new org.apache.thrift.meta_data.FieldMetaData("promotionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
5607 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
5608 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
5609 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPromotionById_args.class, metaDataMap);
|
| 1982 |
varun.gupt |
5610 |
}
|
|
|
5611 |
|
|
|
5612 |
public getPromotionById_args() {
|
|
|
5613 |
}
|
|
|
5614 |
|
|
|
5615 |
public getPromotionById_args(
|
|
|
5616 |
long promotionId)
|
|
|
5617 |
{
|
|
|
5618 |
this();
|
|
|
5619 |
this.promotionId = promotionId;
|
|
|
5620 |
setPromotionIdIsSet(true);
|
|
|
5621 |
}
|
|
|
5622 |
|
|
|
5623 |
/**
|
|
|
5624 |
* Performs a deep copy on <i>other</i>.
|
|
|
5625 |
*/
|
|
|
5626 |
public getPromotionById_args(getPromotionById_args other) {
|
|
|
5627 |
__isset_bit_vector.clear();
|
|
|
5628 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
5629 |
this.promotionId = other.promotionId;
|
|
|
5630 |
}
|
|
|
5631 |
|
|
|
5632 |
public getPromotionById_args deepCopy() {
|
|
|
5633 |
return new getPromotionById_args(this);
|
|
|
5634 |
}
|
|
|
5635 |
|
| 3430 |
rajveer |
5636 |
@Override
|
|
|
5637 |
public void clear() {
|
|
|
5638 |
setPromotionIdIsSet(false);
|
|
|
5639 |
this.promotionId = 0;
|
| 1982 |
varun.gupt |
5640 |
}
|
|
|
5641 |
|
|
|
5642 |
public long getPromotionId() {
|
|
|
5643 |
return this.promotionId;
|
|
|
5644 |
}
|
|
|
5645 |
|
| 3430 |
rajveer |
5646 |
public void setPromotionId(long promotionId) {
|
| 1982 |
varun.gupt |
5647 |
this.promotionId = promotionId;
|
|
|
5648 |
setPromotionIdIsSet(true);
|
|
|
5649 |
}
|
|
|
5650 |
|
|
|
5651 |
public void unsetPromotionId() {
|
|
|
5652 |
__isset_bit_vector.clear(__PROMOTIONID_ISSET_ID);
|
|
|
5653 |
}
|
|
|
5654 |
|
| 3430 |
rajveer |
5655 |
/** Returns true if field promotionId is set (has been assigned a value) and false otherwise */
|
| 1982 |
varun.gupt |
5656 |
public boolean isSetPromotionId() {
|
|
|
5657 |
return __isset_bit_vector.get(__PROMOTIONID_ISSET_ID);
|
|
|
5658 |
}
|
|
|
5659 |
|
|
|
5660 |
public void setPromotionIdIsSet(boolean value) {
|
|
|
5661 |
__isset_bit_vector.set(__PROMOTIONID_ISSET_ID, value);
|
|
|
5662 |
}
|
|
|
5663 |
|
|
|
5664 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
5665 |
switch (field) {
|
|
|
5666 |
case PROMOTION_ID:
|
|
|
5667 |
if (value == null) {
|
|
|
5668 |
unsetPromotionId();
|
|
|
5669 |
} else {
|
|
|
5670 |
setPromotionId((Long)value);
|
|
|
5671 |
}
|
|
|
5672 |
break;
|
|
|
5673 |
|
|
|
5674 |
}
|
|
|
5675 |
}
|
|
|
5676 |
|
|
|
5677 |
public Object getFieldValue(_Fields field) {
|
|
|
5678 |
switch (field) {
|
|
|
5679 |
case PROMOTION_ID:
|
| 3430 |
rajveer |
5680 |
return Long.valueOf(getPromotionId());
|
| 1982 |
varun.gupt |
5681 |
|
|
|
5682 |
}
|
|
|
5683 |
throw new IllegalStateException();
|
|
|
5684 |
}
|
|
|
5685 |
|
| 3430 |
rajveer |
5686 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
5687 |
public boolean isSet(_Fields field) {
|
|
|
5688 |
if (field == null) {
|
|
|
5689 |
throw new IllegalArgumentException();
|
|
|
5690 |
}
|
| 1982 |
varun.gupt |
5691 |
|
|
|
5692 |
switch (field) {
|
|
|
5693 |
case PROMOTION_ID:
|
|
|
5694 |
return isSetPromotionId();
|
|
|
5695 |
}
|
|
|
5696 |
throw new IllegalStateException();
|
|
|
5697 |
}
|
|
|
5698 |
|
|
|
5699 |
@Override
|
|
|
5700 |
public boolean equals(Object that) {
|
|
|
5701 |
if (that == null)
|
|
|
5702 |
return false;
|
|
|
5703 |
if (that instanceof getPromotionById_args)
|
|
|
5704 |
return this.equals((getPromotionById_args)that);
|
|
|
5705 |
return false;
|
|
|
5706 |
}
|
|
|
5707 |
|
|
|
5708 |
public boolean equals(getPromotionById_args that) {
|
|
|
5709 |
if (that == null)
|
|
|
5710 |
return false;
|
|
|
5711 |
|
|
|
5712 |
boolean this_present_promotionId = true;
|
|
|
5713 |
boolean that_present_promotionId = true;
|
|
|
5714 |
if (this_present_promotionId || that_present_promotionId) {
|
|
|
5715 |
if (!(this_present_promotionId && that_present_promotionId))
|
|
|
5716 |
return false;
|
|
|
5717 |
if (this.promotionId != that.promotionId)
|
|
|
5718 |
return false;
|
|
|
5719 |
}
|
|
|
5720 |
|
|
|
5721 |
return true;
|
|
|
5722 |
}
|
|
|
5723 |
|
|
|
5724 |
@Override
|
|
|
5725 |
public int hashCode() {
|
|
|
5726 |
return 0;
|
|
|
5727 |
}
|
|
|
5728 |
|
|
|
5729 |
public int compareTo(getPromotionById_args other) {
|
|
|
5730 |
if (!getClass().equals(other.getClass())) {
|
|
|
5731 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
5732 |
}
|
|
|
5733 |
|
|
|
5734 |
int lastComparison = 0;
|
|
|
5735 |
getPromotionById_args typedOther = (getPromotionById_args)other;
|
|
|
5736 |
|
| 3430 |
rajveer |
5737 |
lastComparison = Boolean.valueOf(isSetPromotionId()).compareTo(typedOther.isSetPromotionId());
|
| 1982 |
varun.gupt |
5738 |
if (lastComparison != 0) {
|
|
|
5739 |
return lastComparison;
|
|
|
5740 |
}
|
| 3430 |
rajveer |
5741 |
if (isSetPromotionId()) {
|
|
|
5742 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.promotionId, typedOther.promotionId);
|
|
|
5743 |
if (lastComparison != 0) {
|
|
|
5744 |
return lastComparison;
|
|
|
5745 |
}
|
| 1982 |
varun.gupt |
5746 |
}
|
|
|
5747 |
return 0;
|
|
|
5748 |
}
|
|
|
5749 |
|
| 3430 |
rajveer |
5750 |
public _Fields fieldForId(int fieldId) {
|
|
|
5751 |
return _Fields.findByThriftId(fieldId);
|
|
|
5752 |
}
|
|
|
5753 |
|
|
|
5754 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
5755 |
org.apache.thrift.protocol.TField field;
|
| 1982 |
varun.gupt |
5756 |
iprot.readStructBegin();
|
|
|
5757 |
while (true)
|
|
|
5758 |
{
|
|
|
5759 |
field = iprot.readFieldBegin();
|
| 3430 |
rajveer |
5760 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
| 1982 |
varun.gupt |
5761 |
break;
|
|
|
5762 |
}
|
| 3430 |
rajveer |
5763 |
switch (field.id) {
|
|
|
5764 |
case 1: // PROMOTION_ID
|
|
|
5765 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
5766 |
this.promotionId = iprot.readI64();
|
|
|
5767 |
setPromotionIdIsSet(true);
|
|
|
5768 |
} else {
|
|
|
5769 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
5770 |
}
|
|
|
5771 |
break;
|
|
|
5772 |
default:
|
|
|
5773 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| 1982 |
varun.gupt |
5774 |
}
|
| 3430 |
rajveer |
5775 |
iprot.readFieldEnd();
|
| 1982 |
varun.gupt |
5776 |
}
|
|
|
5777 |
iprot.readStructEnd();
|
|
|
5778 |
validate();
|
|
|
5779 |
}
|
|
|
5780 |
|
| 3430 |
rajveer |
5781 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
5782 |
validate();
|
|
|
5783 |
|
|
|
5784 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
5785 |
oprot.writeFieldBegin(PROMOTION_ID_FIELD_DESC);
|
|
|
5786 |
oprot.writeI64(this.promotionId);
|
|
|
5787 |
oprot.writeFieldEnd();
|
|
|
5788 |
oprot.writeFieldStop();
|
|
|
5789 |
oprot.writeStructEnd();
|
|
|
5790 |
}
|
|
|
5791 |
|
|
|
5792 |
@Override
|
|
|
5793 |
public String toString() {
|
|
|
5794 |
StringBuilder sb = new StringBuilder("getPromotionById_args(");
|
|
|
5795 |
boolean first = true;
|
|
|
5796 |
|
|
|
5797 |
sb.append("promotionId:");
|
|
|
5798 |
sb.append(this.promotionId);
|
|
|
5799 |
first = false;
|
|
|
5800 |
sb.append(")");
|
|
|
5801 |
return sb.toString();
|
|
|
5802 |
}
|
|
|
5803 |
|
| 3430 |
rajveer |
5804 |
public void validate() throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
5805 |
// check for required fields
|
|
|
5806 |
}
|
|
|
5807 |
|
| 3430 |
rajveer |
5808 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
5809 |
try {
|
|
|
5810 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
5811 |
} catch (org.apache.thrift.TException te) {
|
|
|
5812 |
throw new java.io.IOException(te);
|
|
|
5813 |
}
|
|
|
5814 |
}
|
|
|
5815 |
|
|
|
5816 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
5817 |
try {
|
|
|
5818 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
5819 |
__isset_bit_vector = new BitSet(1);
|
|
|
5820 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
5821 |
} catch (org.apache.thrift.TException te) {
|
|
|
5822 |
throw new java.io.IOException(te);
|
|
|
5823 |
}
|
|
|
5824 |
}
|
|
|
5825 |
|
| 1982 |
varun.gupt |
5826 |
}
|
|
|
5827 |
|
| 3430 |
rajveer |
5828 |
public static class getPromotionById_result implements org.apache.thrift.TBase<getPromotionById_result, getPromotionById_result._Fields>, java.io.Serializable, Cloneable {
|
|
|
5829 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPromotionById_result");
|
| 1982 |
varun.gupt |
5830 |
|
| 3430 |
rajveer |
5831 |
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
|
|
|
5832 |
private static final org.apache.thrift.protocol.TField PEX_FIELD_DESC = new org.apache.thrift.protocol.TField("pex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
|
| 1982 |
varun.gupt |
5833 |
|
| 3430 |
rajveer |
5834 |
private Promotion success; // required
|
|
|
5835 |
private PromotionException pex; // required
|
| 1982 |
varun.gupt |
5836 |
|
|
|
5837 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
| 3430 |
rajveer |
5838 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
| 1982 |
varun.gupt |
5839 |
SUCCESS((short)0, "success"),
|
|
|
5840 |
PEX((short)1, "pex");
|
|
|
5841 |
|
|
|
5842 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
5843 |
|
|
|
5844 |
static {
|
|
|
5845 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
5846 |
byName.put(field.getFieldName(), field);
|
|
|
5847 |
}
|
|
|
5848 |
}
|
|
|
5849 |
|
|
|
5850 |
/**
|
|
|
5851 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
5852 |
*/
|
|
|
5853 |
public static _Fields findByThriftId(int fieldId) {
|
| 3430 |
rajveer |
5854 |
switch(fieldId) {
|
|
|
5855 |
case 0: // SUCCESS
|
|
|
5856 |
return SUCCESS;
|
|
|
5857 |
case 1: // PEX
|
|
|
5858 |
return PEX;
|
|
|
5859 |
default:
|
|
|
5860 |
return null;
|
|
|
5861 |
}
|
| 1982 |
varun.gupt |
5862 |
}
|
|
|
5863 |
|
|
|
5864 |
/**
|
|
|
5865 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
5866 |
* if it is not found.
|
|
|
5867 |
*/
|
|
|
5868 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
5869 |
_Fields fields = findByThriftId(fieldId);
|
|
|
5870 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
5871 |
return fields;
|
|
|
5872 |
}
|
|
|
5873 |
|
|
|
5874 |
/**
|
|
|
5875 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
5876 |
*/
|
|
|
5877 |
public static _Fields findByName(String name) {
|
|
|
5878 |
return byName.get(name);
|
|
|
5879 |
}
|
|
|
5880 |
|
|
|
5881 |
private final short _thriftId;
|
|
|
5882 |
private final String _fieldName;
|
|
|
5883 |
|
|
|
5884 |
_Fields(short thriftId, String fieldName) {
|
|
|
5885 |
_thriftId = thriftId;
|
|
|
5886 |
_fieldName = fieldName;
|
|
|
5887 |
}
|
|
|
5888 |
|
|
|
5889 |
public short getThriftFieldId() {
|
|
|
5890 |
return _thriftId;
|
|
|
5891 |
}
|
|
|
5892 |
|
|
|
5893 |
public String getFieldName() {
|
|
|
5894 |
return _fieldName;
|
|
|
5895 |
}
|
|
|
5896 |
}
|
|
|
5897 |
|
|
|
5898 |
// isset id assignments
|
|
|
5899 |
|
| 3430 |
rajveer |
5900 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
| 1982 |
varun.gupt |
5901 |
static {
|
| 3430 |
rajveer |
5902 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
5903 |
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
5904 |
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Promotion.class)));
|
|
|
5905 |
tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
5906 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
|
|
|
5907 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
5908 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPromotionById_result.class, metaDataMap);
|
| 1982 |
varun.gupt |
5909 |
}
|
|
|
5910 |
|
|
|
5911 |
public getPromotionById_result() {
|
|
|
5912 |
}
|
|
|
5913 |
|
|
|
5914 |
public getPromotionById_result(
|
|
|
5915 |
Promotion success,
|
|
|
5916 |
PromotionException pex)
|
|
|
5917 |
{
|
|
|
5918 |
this();
|
|
|
5919 |
this.success = success;
|
|
|
5920 |
this.pex = pex;
|
|
|
5921 |
}
|
|
|
5922 |
|
|
|
5923 |
/**
|
|
|
5924 |
* Performs a deep copy on <i>other</i>.
|
|
|
5925 |
*/
|
|
|
5926 |
public getPromotionById_result(getPromotionById_result other) {
|
|
|
5927 |
if (other.isSetSuccess()) {
|
|
|
5928 |
this.success = new Promotion(other.success);
|
|
|
5929 |
}
|
|
|
5930 |
if (other.isSetPex()) {
|
|
|
5931 |
this.pex = new PromotionException(other.pex);
|
|
|
5932 |
}
|
|
|
5933 |
}
|
|
|
5934 |
|
|
|
5935 |
public getPromotionById_result deepCopy() {
|
|
|
5936 |
return new getPromotionById_result(this);
|
|
|
5937 |
}
|
|
|
5938 |
|
| 3430 |
rajveer |
5939 |
@Override
|
|
|
5940 |
public void clear() {
|
|
|
5941 |
this.success = null;
|
|
|
5942 |
this.pex = null;
|
| 1982 |
varun.gupt |
5943 |
}
|
|
|
5944 |
|
|
|
5945 |
public Promotion getSuccess() {
|
|
|
5946 |
return this.success;
|
|
|
5947 |
}
|
|
|
5948 |
|
| 3430 |
rajveer |
5949 |
public void setSuccess(Promotion success) {
|
| 1982 |
varun.gupt |
5950 |
this.success = success;
|
|
|
5951 |
}
|
|
|
5952 |
|
|
|
5953 |
public void unsetSuccess() {
|
|
|
5954 |
this.success = null;
|
|
|
5955 |
}
|
|
|
5956 |
|
| 3430 |
rajveer |
5957 |
/** Returns true if field success is set (has been assigned a value) and false otherwise */
|
| 1982 |
varun.gupt |
5958 |
public boolean isSetSuccess() {
|
|
|
5959 |
return this.success != null;
|
|
|
5960 |
}
|
|
|
5961 |
|
|
|
5962 |
public void setSuccessIsSet(boolean value) {
|
|
|
5963 |
if (!value) {
|
|
|
5964 |
this.success = null;
|
|
|
5965 |
}
|
|
|
5966 |
}
|
|
|
5967 |
|
|
|
5968 |
public PromotionException getPex() {
|
|
|
5969 |
return this.pex;
|
|
|
5970 |
}
|
|
|
5971 |
|
| 3430 |
rajveer |
5972 |
public void setPex(PromotionException pex) {
|
| 1982 |
varun.gupt |
5973 |
this.pex = pex;
|
|
|
5974 |
}
|
|
|
5975 |
|
|
|
5976 |
public void unsetPex() {
|
|
|
5977 |
this.pex = null;
|
|
|
5978 |
}
|
|
|
5979 |
|
| 3430 |
rajveer |
5980 |
/** Returns true if field pex is set (has been assigned a value) and false otherwise */
|
| 1982 |
varun.gupt |
5981 |
public boolean isSetPex() {
|
|
|
5982 |
return this.pex != null;
|
|
|
5983 |
}
|
|
|
5984 |
|
|
|
5985 |
public void setPexIsSet(boolean value) {
|
|
|
5986 |
if (!value) {
|
|
|
5987 |
this.pex = null;
|
|
|
5988 |
}
|
|
|
5989 |
}
|
|
|
5990 |
|
|
|
5991 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
5992 |
switch (field) {
|
|
|
5993 |
case SUCCESS:
|
|
|
5994 |
if (value == null) {
|
|
|
5995 |
unsetSuccess();
|
|
|
5996 |
} else {
|
|
|
5997 |
setSuccess((Promotion)value);
|
|
|
5998 |
}
|
|
|
5999 |
break;
|
|
|
6000 |
|
|
|
6001 |
case PEX:
|
|
|
6002 |
if (value == null) {
|
|
|
6003 |
unsetPex();
|
|
|
6004 |
} else {
|
|
|
6005 |
setPex((PromotionException)value);
|
|
|
6006 |
}
|
|
|
6007 |
break;
|
|
|
6008 |
|
|
|
6009 |
}
|
|
|
6010 |
}
|
|
|
6011 |
|
|
|
6012 |
public Object getFieldValue(_Fields field) {
|
|
|
6013 |
switch (field) {
|
|
|
6014 |
case SUCCESS:
|
|
|
6015 |
return getSuccess();
|
|
|
6016 |
|
|
|
6017 |
case PEX:
|
|
|
6018 |
return getPex();
|
|
|
6019 |
|
|
|
6020 |
}
|
|
|
6021 |
throw new IllegalStateException();
|
|
|
6022 |
}
|
|
|
6023 |
|
| 3430 |
rajveer |
6024 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
6025 |
public boolean isSet(_Fields field) {
|
|
|
6026 |
if (field == null) {
|
|
|
6027 |
throw new IllegalArgumentException();
|
|
|
6028 |
}
|
| 1982 |
varun.gupt |
6029 |
|
|
|
6030 |
switch (field) {
|
|
|
6031 |
case SUCCESS:
|
|
|
6032 |
return isSetSuccess();
|
|
|
6033 |
case PEX:
|
|
|
6034 |
return isSetPex();
|
|
|
6035 |
}
|
|
|
6036 |
throw new IllegalStateException();
|
|
|
6037 |
}
|
|
|
6038 |
|
|
|
6039 |
@Override
|
|
|
6040 |
public boolean equals(Object that) {
|
|
|
6041 |
if (that == null)
|
|
|
6042 |
return false;
|
|
|
6043 |
if (that instanceof getPromotionById_result)
|
|
|
6044 |
return this.equals((getPromotionById_result)that);
|
|
|
6045 |
return false;
|
|
|
6046 |
}
|
|
|
6047 |
|
|
|
6048 |
public boolean equals(getPromotionById_result that) {
|
|
|
6049 |
if (that == null)
|
|
|
6050 |
return false;
|
|
|
6051 |
|
|
|
6052 |
boolean this_present_success = true && this.isSetSuccess();
|
|
|
6053 |
boolean that_present_success = true && that.isSetSuccess();
|
|
|
6054 |
if (this_present_success || that_present_success) {
|
|
|
6055 |
if (!(this_present_success && that_present_success))
|
|
|
6056 |
return false;
|
|
|
6057 |
if (!this.success.equals(that.success))
|
|
|
6058 |
return false;
|
|
|
6059 |
}
|
|
|
6060 |
|
|
|
6061 |
boolean this_present_pex = true && this.isSetPex();
|
|
|
6062 |
boolean that_present_pex = true && that.isSetPex();
|
|
|
6063 |
if (this_present_pex || that_present_pex) {
|
|
|
6064 |
if (!(this_present_pex && that_present_pex))
|
|
|
6065 |
return false;
|
|
|
6066 |
if (!this.pex.equals(that.pex))
|
|
|
6067 |
return false;
|
|
|
6068 |
}
|
|
|
6069 |
|
|
|
6070 |
return true;
|
|
|
6071 |
}
|
|
|
6072 |
|
|
|
6073 |
@Override
|
|
|
6074 |
public int hashCode() {
|
|
|
6075 |
return 0;
|
|
|
6076 |
}
|
|
|
6077 |
|
|
|
6078 |
public int compareTo(getPromotionById_result other) {
|
|
|
6079 |
if (!getClass().equals(other.getClass())) {
|
|
|
6080 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
6081 |
}
|
|
|
6082 |
|
|
|
6083 |
int lastComparison = 0;
|
|
|
6084 |
getPromotionById_result typedOther = (getPromotionById_result)other;
|
|
|
6085 |
|
| 3430 |
rajveer |
6086 |
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
|
| 1982 |
varun.gupt |
6087 |
if (lastComparison != 0) {
|
|
|
6088 |
return lastComparison;
|
|
|
6089 |
}
|
| 3430 |
rajveer |
6090 |
if (isSetSuccess()) {
|
|
|
6091 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
|
|
|
6092 |
if (lastComparison != 0) {
|
|
|
6093 |
return lastComparison;
|
|
|
6094 |
}
|
| 1982 |
varun.gupt |
6095 |
}
|
| 3430 |
rajveer |
6096 |
lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
|
| 1982 |
varun.gupt |
6097 |
if (lastComparison != 0) {
|
|
|
6098 |
return lastComparison;
|
|
|
6099 |
}
|
| 3430 |
rajveer |
6100 |
if (isSetPex()) {
|
|
|
6101 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
|
|
|
6102 |
if (lastComparison != 0) {
|
|
|
6103 |
return lastComparison;
|
|
|
6104 |
}
|
| 1982 |
varun.gupt |
6105 |
}
|
|
|
6106 |
return 0;
|
|
|
6107 |
}
|
|
|
6108 |
|
| 3430 |
rajveer |
6109 |
public _Fields fieldForId(int fieldId) {
|
|
|
6110 |
return _Fields.findByThriftId(fieldId);
|
|
|
6111 |
}
|
|
|
6112 |
|
|
|
6113 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
6114 |
org.apache.thrift.protocol.TField field;
|
| 1982 |
varun.gupt |
6115 |
iprot.readStructBegin();
|
|
|
6116 |
while (true)
|
|
|
6117 |
{
|
|
|
6118 |
field = iprot.readFieldBegin();
|
| 3430 |
rajveer |
6119 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
| 1982 |
varun.gupt |
6120 |
break;
|
|
|
6121 |
}
|
| 3430 |
rajveer |
6122 |
switch (field.id) {
|
|
|
6123 |
case 0: // SUCCESS
|
|
|
6124 |
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
|
|
6125 |
this.success = new Promotion();
|
|
|
6126 |
this.success.read(iprot);
|
|
|
6127 |
} else {
|
|
|
6128 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
6129 |
}
|
|
|
6130 |
break;
|
|
|
6131 |
case 1: // PEX
|
|
|
6132 |
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
|
|
6133 |
this.pex = new PromotionException();
|
|
|
6134 |
this.pex.read(iprot);
|
|
|
6135 |
} else {
|
|
|
6136 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
6137 |
}
|
|
|
6138 |
break;
|
|
|
6139 |
default:
|
|
|
6140 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| 1982 |
varun.gupt |
6141 |
}
|
| 3430 |
rajveer |
6142 |
iprot.readFieldEnd();
|
| 1982 |
varun.gupt |
6143 |
}
|
|
|
6144 |
iprot.readStructEnd();
|
|
|
6145 |
validate();
|
|
|
6146 |
}
|
|
|
6147 |
|
| 3430 |
rajveer |
6148 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
6149 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
6150 |
|
|
|
6151 |
if (this.isSetSuccess()) {
|
|
|
6152 |
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
|
|
6153 |
this.success.write(oprot);
|
|
|
6154 |
oprot.writeFieldEnd();
|
|
|
6155 |
} else if (this.isSetPex()) {
|
|
|
6156 |
oprot.writeFieldBegin(PEX_FIELD_DESC);
|
|
|
6157 |
this.pex.write(oprot);
|
|
|
6158 |
oprot.writeFieldEnd();
|
|
|
6159 |
}
|
|
|
6160 |
oprot.writeFieldStop();
|
|
|
6161 |
oprot.writeStructEnd();
|
|
|
6162 |
}
|
|
|
6163 |
|
|
|
6164 |
@Override
|
|
|
6165 |
public String toString() {
|
|
|
6166 |
StringBuilder sb = new StringBuilder("getPromotionById_result(");
|
|
|
6167 |
boolean first = true;
|
|
|
6168 |
|
|
|
6169 |
sb.append("success:");
|
|
|
6170 |
if (this.success == null) {
|
|
|
6171 |
sb.append("null");
|
|
|
6172 |
} else {
|
|
|
6173 |
sb.append(this.success);
|
|
|
6174 |
}
|
|
|
6175 |
first = false;
|
|
|
6176 |
if (!first) sb.append(", ");
|
|
|
6177 |
sb.append("pex:");
|
|
|
6178 |
if (this.pex == null) {
|
|
|
6179 |
sb.append("null");
|
|
|
6180 |
} else {
|
|
|
6181 |
sb.append(this.pex);
|
|
|
6182 |
}
|
|
|
6183 |
first = false;
|
|
|
6184 |
sb.append(")");
|
|
|
6185 |
return sb.toString();
|
|
|
6186 |
}
|
|
|
6187 |
|
| 3430 |
rajveer |
6188 |
public void validate() throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
6189 |
// check for required fields
|
|
|
6190 |
}
|
|
|
6191 |
|
| 3430 |
rajveer |
6192 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
6193 |
try {
|
|
|
6194 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
6195 |
} catch (org.apache.thrift.TException te) {
|
|
|
6196 |
throw new java.io.IOException(te);
|
|
|
6197 |
}
|
|
|
6198 |
}
|
|
|
6199 |
|
|
|
6200 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
6201 |
try {
|
|
|
6202 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
6203 |
} catch (org.apache.thrift.TException te) {
|
|
|
6204 |
throw new java.io.IOException(te);
|
|
|
6205 |
}
|
|
|
6206 |
}
|
|
|
6207 |
|
| 1982 |
varun.gupt |
6208 |
}
|
|
|
6209 |
|
| 3430 |
rajveer |
6210 |
public static class generateCouponsForPromotion_args implements org.apache.thrift.TBase<generateCouponsForPromotion_args, generateCouponsForPromotion_args._Fields>, java.io.Serializable, Cloneable {
|
|
|
6211 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("generateCouponsForPromotion_args");
|
| 1982 |
varun.gupt |
6212 |
|
| 3430 |
rajveer |
6213 |
private static final org.apache.thrift.protocol.TField PROMOTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("promotionId", org.apache.thrift.protocol.TType.I64, (short)1);
|
|
|
6214 |
private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCode", org.apache.thrift.protocol.TType.STRING, (short)2);
|
| 1982 |
varun.gupt |
6215 |
|
| 3430 |
rajveer |
6216 |
private long promotionId; // required
|
|
|
6217 |
private String couponCode; // required
|
| 1982 |
varun.gupt |
6218 |
|
|
|
6219 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
| 3430 |
rajveer |
6220 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
| 1982 |
varun.gupt |
6221 |
PROMOTION_ID((short)1, "promotionId"),
|
|
|
6222 |
COUPON_CODE((short)2, "couponCode");
|
|
|
6223 |
|
|
|
6224 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
6225 |
|
|
|
6226 |
static {
|
|
|
6227 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
6228 |
byName.put(field.getFieldName(), field);
|
|
|
6229 |
}
|
|
|
6230 |
}
|
|
|
6231 |
|
|
|
6232 |
/**
|
|
|
6233 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
6234 |
*/
|
|
|
6235 |
public static _Fields findByThriftId(int fieldId) {
|
| 3430 |
rajveer |
6236 |
switch(fieldId) {
|
|
|
6237 |
case 1: // PROMOTION_ID
|
|
|
6238 |
return PROMOTION_ID;
|
|
|
6239 |
case 2: // COUPON_CODE
|
|
|
6240 |
return COUPON_CODE;
|
|
|
6241 |
default:
|
|
|
6242 |
return null;
|
|
|
6243 |
}
|
| 1982 |
varun.gupt |
6244 |
}
|
|
|
6245 |
|
|
|
6246 |
/**
|
|
|
6247 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
6248 |
* if it is not found.
|
|
|
6249 |
*/
|
|
|
6250 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
6251 |
_Fields fields = findByThriftId(fieldId);
|
|
|
6252 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
6253 |
return fields;
|
|
|
6254 |
}
|
|
|
6255 |
|
|
|
6256 |
/**
|
|
|
6257 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
6258 |
*/
|
|
|
6259 |
public static _Fields findByName(String name) {
|
|
|
6260 |
return byName.get(name);
|
|
|
6261 |
}
|
|
|
6262 |
|
|
|
6263 |
private final short _thriftId;
|
|
|
6264 |
private final String _fieldName;
|
|
|
6265 |
|
|
|
6266 |
_Fields(short thriftId, String fieldName) {
|
|
|
6267 |
_thriftId = thriftId;
|
|
|
6268 |
_fieldName = fieldName;
|
|
|
6269 |
}
|
|
|
6270 |
|
|
|
6271 |
public short getThriftFieldId() {
|
|
|
6272 |
return _thriftId;
|
|
|
6273 |
}
|
|
|
6274 |
|
|
|
6275 |
public String getFieldName() {
|
|
|
6276 |
return _fieldName;
|
|
|
6277 |
}
|
|
|
6278 |
}
|
|
|
6279 |
|
|
|
6280 |
// isset id assignments
|
|
|
6281 |
private static final int __PROMOTIONID_ISSET_ID = 0;
|
|
|
6282 |
private BitSet __isset_bit_vector = new BitSet(1);
|
|
|
6283 |
|
| 3430 |
rajveer |
6284 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
| 1982 |
varun.gupt |
6285 |
static {
|
| 3430 |
rajveer |
6286 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
6287 |
tmpMap.put(_Fields.PROMOTION_ID, new org.apache.thrift.meta_data.FieldMetaData("promotionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
6288 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
6289 |
tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
6290 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
6291 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
6292 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(generateCouponsForPromotion_args.class, metaDataMap);
|
| 1982 |
varun.gupt |
6293 |
}
|
|
|
6294 |
|
|
|
6295 |
public generateCouponsForPromotion_args() {
|
|
|
6296 |
}
|
|
|
6297 |
|
|
|
6298 |
public generateCouponsForPromotion_args(
|
|
|
6299 |
long promotionId,
|
|
|
6300 |
String couponCode)
|
|
|
6301 |
{
|
|
|
6302 |
this();
|
|
|
6303 |
this.promotionId = promotionId;
|
|
|
6304 |
setPromotionIdIsSet(true);
|
|
|
6305 |
this.couponCode = couponCode;
|
|
|
6306 |
}
|
|
|
6307 |
|
|
|
6308 |
/**
|
|
|
6309 |
* Performs a deep copy on <i>other</i>.
|
|
|
6310 |
*/
|
|
|
6311 |
public generateCouponsForPromotion_args(generateCouponsForPromotion_args other) {
|
|
|
6312 |
__isset_bit_vector.clear();
|
|
|
6313 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
6314 |
this.promotionId = other.promotionId;
|
|
|
6315 |
if (other.isSetCouponCode()) {
|
|
|
6316 |
this.couponCode = other.couponCode;
|
|
|
6317 |
}
|
|
|
6318 |
}
|
|
|
6319 |
|
|
|
6320 |
public generateCouponsForPromotion_args deepCopy() {
|
|
|
6321 |
return new generateCouponsForPromotion_args(this);
|
|
|
6322 |
}
|
|
|
6323 |
|
| 3430 |
rajveer |
6324 |
@Override
|
|
|
6325 |
public void clear() {
|
|
|
6326 |
setPromotionIdIsSet(false);
|
|
|
6327 |
this.promotionId = 0;
|
|
|
6328 |
this.couponCode = null;
|
| 1982 |
varun.gupt |
6329 |
}
|
|
|
6330 |
|
|
|
6331 |
public long getPromotionId() {
|
|
|
6332 |
return this.promotionId;
|
|
|
6333 |
}
|
|
|
6334 |
|
| 3430 |
rajveer |
6335 |
public void setPromotionId(long promotionId) {
|
| 1982 |
varun.gupt |
6336 |
this.promotionId = promotionId;
|
|
|
6337 |
setPromotionIdIsSet(true);
|
|
|
6338 |
}
|
|
|
6339 |
|
|
|
6340 |
public void unsetPromotionId() {
|
|
|
6341 |
__isset_bit_vector.clear(__PROMOTIONID_ISSET_ID);
|
|
|
6342 |
}
|
|
|
6343 |
|
| 3430 |
rajveer |
6344 |
/** Returns true if field promotionId is set (has been assigned a value) and false otherwise */
|
| 1982 |
varun.gupt |
6345 |
public boolean isSetPromotionId() {
|
|
|
6346 |
return __isset_bit_vector.get(__PROMOTIONID_ISSET_ID);
|
|
|
6347 |
}
|
|
|
6348 |
|
|
|
6349 |
public void setPromotionIdIsSet(boolean value) {
|
|
|
6350 |
__isset_bit_vector.set(__PROMOTIONID_ISSET_ID, value);
|
|
|
6351 |
}
|
|
|
6352 |
|
|
|
6353 |
public String getCouponCode() {
|
|
|
6354 |
return this.couponCode;
|
|
|
6355 |
}
|
|
|
6356 |
|
| 3430 |
rajveer |
6357 |
public void setCouponCode(String couponCode) {
|
| 1982 |
varun.gupt |
6358 |
this.couponCode = couponCode;
|
|
|
6359 |
}
|
|
|
6360 |
|
|
|
6361 |
public void unsetCouponCode() {
|
|
|
6362 |
this.couponCode = null;
|
|
|
6363 |
}
|
|
|
6364 |
|
| 3430 |
rajveer |
6365 |
/** Returns true if field couponCode is set (has been assigned a value) and false otherwise */
|
| 1982 |
varun.gupt |
6366 |
public boolean isSetCouponCode() {
|
|
|
6367 |
return this.couponCode != null;
|
|
|
6368 |
}
|
|
|
6369 |
|
|
|
6370 |
public void setCouponCodeIsSet(boolean value) {
|
|
|
6371 |
if (!value) {
|
|
|
6372 |
this.couponCode = null;
|
|
|
6373 |
}
|
|
|
6374 |
}
|
|
|
6375 |
|
|
|
6376 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
6377 |
switch (field) {
|
|
|
6378 |
case PROMOTION_ID:
|
|
|
6379 |
if (value == null) {
|
|
|
6380 |
unsetPromotionId();
|
|
|
6381 |
} else {
|
|
|
6382 |
setPromotionId((Long)value);
|
|
|
6383 |
}
|
|
|
6384 |
break;
|
|
|
6385 |
|
|
|
6386 |
case COUPON_CODE:
|
|
|
6387 |
if (value == null) {
|
|
|
6388 |
unsetCouponCode();
|
|
|
6389 |
} else {
|
|
|
6390 |
setCouponCode((String)value);
|
|
|
6391 |
}
|
|
|
6392 |
break;
|
|
|
6393 |
|
|
|
6394 |
}
|
|
|
6395 |
}
|
|
|
6396 |
|
|
|
6397 |
public Object getFieldValue(_Fields field) {
|
|
|
6398 |
switch (field) {
|
|
|
6399 |
case PROMOTION_ID:
|
| 3430 |
rajveer |
6400 |
return Long.valueOf(getPromotionId());
|
| 1982 |
varun.gupt |
6401 |
|
|
|
6402 |
case COUPON_CODE:
|
|
|
6403 |
return getCouponCode();
|
|
|
6404 |
|
|
|
6405 |
}
|
|
|
6406 |
throw new IllegalStateException();
|
|
|
6407 |
}
|
|
|
6408 |
|
| 3430 |
rajveer |
6409 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
6410 |
public boolean isSet(_Fields field) {
|
|
|
6411 |
if (field == null) {
|
|
|
6412 |
throw new IllegalArgumentException();
|
|
|
6413 |
}
|
| 1982 |
varun.gupt |
6414 |
|
|
|
6415 |
switch (field) {
|
|
|
6416 |
case PROMOTION_ID:
|
|
|
6417 |
return isSetPromotionId();
|
|
|
6418 |
case COUPON_CODE:
|
|
|
6419 |
return isSetCouponCode();
|
|
|
6420 |
}
|
|
|
6421 |
throw new IllegalStateException();
|
|
|
6422 |
}
|
|
|
6423 |
|
|
|
6424 |
@Override
|
|
|
6425 |
public boolean equals(Object that) {
|
|
|
6426 |
if (that == null)
|
|
|
6427 |
return false;
|
|
|
6428 |
if (that instanceof generateCouponsForPromotion_args)
|
|
|
6429 |
return this.equals((generateCouponsForPromotion_args)that);
|
|
|
6430 |
return false;
|
|
|
6431 |
}
|
|
|
6432 |
|
|
|
6433 |
public boolean equals(generateCouponsForPromotion_args that) {
|
|
|
6434 |
if (that == null)
|
|
|
6435 |
return false;
|
|
|
6436 |
|
|
|
6437 |
boolean this_present_promotionId = true;
|
|
|
6438 |
boolean that_present_promotionId = true;
|
|
|
6439 |
if (this_present_promotionId || that_present_promotionId) {
|
|
|
6440 |
if (!(this_present_promotionId && that_present_promotionId))
|
|
|
6441 |
return false;
|
|
|
6442 |
if (this.promotionId != that.promotionId)
|
|
|
6443 |
return false;
|
|
|
6444 |
}
|
|
|
6445 |
|
|
|
6446 |
boolean this_present_couponCode = true && this.isSetCouponCode();
|
|
|
6447 |
boolean that_present_couponCode = true && that.isSetCouponCode();
|
|
|
6448 |
if (this_present_couponCode || that_present_couponCode) {
|
|
|
6449 |
if (!(this_present_couponCode && that_present_couponCode))
|
|
|
6450 |
return false;
|
|
|
6451 |
if (!this.couponCode.equals(that.couponCode))
|
|
|
6452 |
return false;
|
|
|
6453 |
}
|
|
|
6454 |
|
|
|
6455 |
return true;
|
|
|
6456 |
}
|
|
|
6457 |
|
|
|
6458 |
@Override
|
|
|
6459 |
public int hashCode() {
|
|
|
6460 |
return 0;
|
|
|
6461 |
}
|
|
|
6462 |
|
|
|
6463 |
public int compareTo(generateCouponsForPromotion_args other) {
|
|
|
6464 |
if (!getClass().equals(other.getClass())) {
|
|
|
6465 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
6466 |
}
|
|
|
6467 |
|
|
|
6468 |
int lastComparison = 0;
|
|
|
6469 |
generateCouponsForPromotion_args typedOther = (generateCouponsForPromotion_args)other;
|
|
|
6470 |
|
| 3430 |
rajveer |
6471 |
lastComparison = Boolean.valueOf(isSetPromotionId()).compareTo(typedOther.isSetPromotionId());
|
| 1982 |
varun.gupt |
6472 |
if (lastComparison != 0) {
|
|
|
6473 |
return lastComparison;
|
|
|
6474 |
}
|
| 3430 |
rajveer |
6475 |
if (isSetPromotionId()) {
|
|
|
6476 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.promotionId, typedOther.promotionId);
|
|
|
6477 |
if (lastComparison != 0) {
|
|
|
6478 |
return lastComparison;
|
|
|
6479 |
}
|
| 1982 |
varun.gupt |
6480 |
}
|
| 3430 |
rajveer |
6481 |
lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
|
| 1982 |
varun.gupt |
6482 |
if (lastComparison != 0) {
|
|
|
6483 |
return lastComparison;
|
|
|
6484 |
}
|
| 3430 |
rajveer |
6485 |
if (isSetCouponCode()) {
|
|
|
6486 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);
|
|
|
6487 |
if (lastComparison != 0) {
|
|
|
6488 |
return lastComparison;
|
|
|
6489 |
}
|
| 1982 |
varun.gupt |
6490 |
}
|
|
|
6491 |
return 0;
|
|
|
6492 |
}
|
|
|
6493 |
|
| 3430 |
rajveer |
6494 |
public _Fields fieldForId(int fieldId) {
|
|
|
6495 |
return _Fields.findByThriftId(fieldId);
|
|
|
6496 |
}
|
|
|
6497 |
|
|
|
6498 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
6499 |
org.apache.thrift.protocol.TField field;
|
| 1982 |
varun.gupt |
6500 |
iprot.readStructBegin();
|
|
|
6501 |
while (true)
|
|
|
6502 |
{
|
|
|
6503 |
field = iprot.readFieldBegin();
|
| 3430 |
rajveer |
6504 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
| 1982 |
varun.gupt |
6505 |
break;
|
|
|
6506 |
}
|
| 3430 |
rajveer |
6507 |
switch (field.id) {
|
|
|
6508 |
case 1: // PROMOTION_ID
|
|
|
6509 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
6510 |
this.promotionId = iprot.readI64();
|
|
|
6511 |
setPromotionIdIsSet(true);
|
|
|
6512 |
} else {
|
|
|
6513 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
6514 |
}
|
|
|
6515 |
break;
|
|
|
6516 |
case 2: // COUPON_CODE
|
|
|
6517 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
6518 |
this.couponCode = iprot.readString();
|
|
|
6519 |
} else {
|
|
|
6520 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
6521 |
}
|
|
|
6522 |
break;
|
|
|
6523 |
default:
|
|
|
6524 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| 1982 |
varun.gupt |
6525 |
}
|
| 3430 |
rajveer |
6526 |
iprot.readFieldEnd();
|
| 1982 |
varun.gupt |
6527 |
}
|
|
|
6528 |
iprot.readStructEnd();
|
|
|
6529 |
validate();
|
|
|
6530 |
}
|
|
|
6531 |
|
| 3430 |
rajveer |
6532 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
6533 |
validate();
|
|
|
6534 |
|
|
|
6535 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
6536 |
oprot.writeFieldBegin(PROMOTION_ID_FIELD_DESC);
|
|
|
6537 |
oprot.writeI64(this.promotionId);
|
|
|
6538 |
oprot.writeFieldEnd();
|
|
|
6539 |
if (this.couponCode != null) {
|
|
|
6540 |
oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
|
|
|
6541 |
oprot.writeString(this.couponCode);
|
|
|
6542 |
oprot.writeFieldEnd();
|
|
|
6543 |
}
|
|
|
6544 |
oprot.writeFieldStop();
|
|
|
6545 |
oprot.writeStructEnd();
|
|
|
6546 |
}
|
|
|
6547 |
|
|
|
6548 |
@Override
|
|
|
6549 |
public String toString() {
|
|
|
6550 |
StringBuilder sb = new StringBuilder("generateCouponsForPromotion_args(");
|
|
|
6551 |
boolean first = true;
|
|
|
6552 |
|
|
|
6553 |
sb.append("promotionId:");
|
|
|
6554 |
sb.append(this.promotionId);
|
|
|
6555 |
first = false;
|
|
|
6556 |
if (!first) sb.append(", ");
|
|
|
6557 |
sb.append("couponCode:");
|
|
|
6558 |
if (this.couponCode == null) {
|
|
|
6559 |
sb.append("null");
|
|
|
6560 |
} else {
|
|
|
6561 |
sb.append(this.couponCode);
|
|
|
6562 |
}
|
|
|
6563 |
first = false;
|
|
|
6564 |
sb.append(")");
|
|
|
6565 |
return sb.toString();
|
|
|
6566 |
}
|
|
|
6567 |
|
| 3430 |
rajveer |
6568 |
public void validate() throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
6569 |
// check for required fields
|
|
|
6570 |
}
|
|
|
6571 |
|
| 3430 |
rajveer |
6572 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
6573 |
try {
|
|
|
6574 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
6575 |
} catch (org.apache.thrift.TException te) {
|
|
|
6576 |
throw new java.io.IOException(te);
|
|
|
6577 |
}
|
|
|
6578 |
}
|
|
|
6579 |
|
|
|
6580 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
6581 |
try {
|
|
|
6582 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
6583 |
__isset_bit_vector = new BitSet(1);
|
|
|
6584 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
6585 |
} catch (org.apache.thrift.TException te) {
|
|
|
6586 |
throw new java.io.IOException(te);
|
|
|
6587 |
}
|
|
|
6588 |
}
|
|
|
6589 |
|
| 1982 |
varun.gupt |
6590 |
}
|
|
|
6591 |
|
| 3430 |
rajveer |
6592 |
public static class generateCouponsForPromotion_result implements org.apache.thrift.TBase<generateCouponsForPromotion_result, generateCouponsForPromotion_result._Fields>, java.io.Serializable, Cloneable {
|
|
|
6593 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("generateCouponsForPromotion_result");
|
| 1982 |
varun.gupt |
6594 |
|
| 3430 |
rajveer |
6595 |
private static final org.apache.thrift.protocol.TField PEX_FIELD_DESC = new org.apache.thrift.protocol.TField("pex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
|
| 1982 |
varun.gupt |
6596 |
|
| 3430 |
rajveer |
6597 |
private PromotionException pex; // required
|
| 1982 |
varun.gupt |
6598 |
|
|
|
6599 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
| 3430 |
rajveer |
6600 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
| 1982 |
varun.gupt |
6601 |
PEX((short)1, "pex");
|
|
|
6602 |
|
|
|
6603 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
6604 |
|
|
|
6605 |
static {
|
|
|
6606 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
6607 |
byName.put(field.getFieldName(), field);
|
|
|
6608 |
}
|
|
|
6609 |
}
|
|
|
6610 |
|
|
|
6611 |
/**
|
|
|
6612 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
6613 |
*/
|
|
|
6614 |
public static _Fields findByThriftId(int fieldId) {
|
| 3430 |
rajveer |
6615 |
switch(fieldId) {
|
|
|
6616 |
case 1: // PEX
|
|
|
6617 |
return PEX;
|
|
|
6618 |
default:
|
|
|
6619 |
return null;
|
|
|
6620 |
}
|
| 1982 |
varun.gupt |
6621 |
}
|
|
|
6622 |
|
|
|
6623 |
/**
|
|
|
6624 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
6625 |
* if it is not found.
|
|
|
6626 |
*/
|
|
|
6627 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
6628 |
_Fields fields = findByThriftId(fieldId);
|
|
|
6629 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
6630 |
return fields;
|
|
|
6631 |
}
|
|
|
6632 |
|
|
|
6633 |
/**
|
|
|
6634 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
6635 |
*/
|
|
|
6636 |
public static _Fields findByName(String name) {
|
|
|
6637 |
return byName.get(name);
|
|
|
6638 |
}
|
|
|
6639 |
|
|
|
6640 |
private final short _thriftId;
|
|
|
6641 |
private final String _fieldName;
|
|
|
6642 |
|
|
|
6643 |
_Fields(short thriftId, String fieldName) {
|
|
|
6644 |
_thriftId = thriftId;
|
|
|
6645 |
_fieldName = fieldName;
|
|
|
6646 |
}
|
|
|
6647 |
|
|
|
6648 |
public short getThriftFieldId() {
|
|
|
6649 |
return _thriftId;
|
|
|
6650 |
}
|
|
|
6651 |
|
|
|
6652 |
public String getFieldName() {
|
|
|
6653 |
return _fieldName;
|
|
|
6654 |
}
|
|
|
6655 |
}
|
|
|
6656 |
|
|
|
6657 |
// isset id assignments
|
|
|
6658 |
|
| 3430 |
rajveer |
6659 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
| 1982 |
varun.gupt |
6660 |
static {
|
| 3430 |
rajveer |
6661 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
6662 |
tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
6663 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
|
|
|
6664 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
6665 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(generateCouponsForPromotion_result.class, metaDataMap);
|
| 1982 |
varun.gupt |
6666 |
}
|
|
|
6667 |
|
|
|
6668 |
public generateCouponsForPromotion_result() {
|
|
|
6669 |
}
|
|
|
6670 |
|
|
|
6671 |
public generateCouponsForPromotion_result(
|
|
|
6672 |
PromotionException pex)
|
|
|
6673 |
{
|
|
|
6674 |
this();
|
|
|
6675 |
this.pex = pex;
|
|
|
6676 |
}
|
|
|
6677 |
|
|
|
6678 |
/**
|
|
|
6679 |
* Performs a deep copy on <i>other</i>.
|
|
|
6680 |
*/
|
|
|
6681 |
public generateCouponsForPromotion_result(generateCouponsForPromotion_result other) {
|
|
|
6682 |
if (other.isSetPex()) {
|
|
|
6683 |
this.pex = new PromotionException(other.pex);
|
|
|
6684 |
}
|
|
|
6685 |
}
|
|
|
6686 |
|
|
|
6687 |
public generateCouponsForPromotion_result deepCopy() {
|
|
|
6688 |
return new generateCouponsForPromotion_result(this);
|
|
|
6689 |
}
|
|
|
6690 |
|
| 3430 |
rajveer |
6691 |
@Override
|
|
|
6692 |
public void clear() {
|
|
|
6693 |
this.pex = null;
|
| 1982 |
varun.gupt |
6694 |
}
|
|
|
6695 |
|
|
|
6696 |
public PromotionException getPex() {
|
|
|
6697 |
return this.pex;
|
|
|
6698 |
}
|
|
|
6699 |
|
| 3430 |
rajveer |
6700 |
public void setPex(PromotionException pex) {
|
| 1982 |
varun.gupt |
6701 |
this.pex = pex;
|
|
|
6702 |
}
|
|
|
6703 |
|
|
|
6704 |
public void unsetPex() {
|
|
|
6705 |
this.pex = null;
|
|
|
6706 |
}
|
|
|
6707 |
|
| 3430 |
rajveer |
6708 |
/** Returns true if field pex is set (has been assigned a value) and false otherwise */
|
| 1982 |
varun.gupt |
6709 |
public boolean isSetPex() {
|
|
|
6710 |
return this.pex != null;
|
|
|
6711 |
}
|
|
|
6712 |
|
|
|
6713 |
public void setPexIsSet(boolean value) {
|
|
|
6714 |
if (!value) {
|
|
|
6715 |
this.pex = null;
|
|
|
6716 |
}
|
|
|
6717 |
}
|
|
|
6718 |
|
|
|
6719 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
6720 |
switch (field) {
|
|
|
6721 |
case PEX:
|
|
|
6722 |
if (value == null) {
|
|
|
6723 |
unsetPex();
|
|
|
6724 |
} else {
|
|
|
6725 |
setPex((PromotionException)value);
|
|
|
6726 |
}
|
|
|
6727 |
break;
|
|
|
6728 |
|
|
|
6729 |
}
|
|
|
6730 |
}
|
|
|
6731 |
|
|
|
6732 |
public Object getFieldValue(_Fields field) {
|
|
|
6733 |
switch (field) {
|
|
|
6734 |
case PEX:
|
|
|
6735 |
return getPex();
|
|
|
6736 |
|
|
|
6737 |
}
|
|
|
6738 |
throw new IllegalStateException();
|
|
|
6739 |
}
|
|
|
6740 |
|
| 3430 |
rajveer |
6741 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
6742 |
public boolean isSet(_Fields field) {
|
|
|
6743 |
if (field == null) {
|
|
|
6744 |
throw new IllegalArgumentException();
|
|
|
6745 |
}
|
| 1982 |
varun.gupt |
6746 |
|
|
|
6747 |
switch (field) {
|
|
|
6748 |
case PEX:
|
|
|
6749 |
return isSetPex();
|
|
|
6750 |
}
|
|
|
6751 |
throw new IllegalStateException();
|
|
|
6752 |
}
|
|
|
6753 |
|
|
|
6754 |
@Override
|
|
|
6755 |
public boolean equals(Object that) {
|
|
|
6756 |
if (that == null)
|
|
|
6757 |
return false;
|
|
|
6758 |
if (that instanceof generateCouponsForPromotion_result)
|
|
|
6759 |
return this.equals((generateCouponsForPromotion_result)that);
|
|
|
6760 |
return false;
|
|
|
6761 |
}
|
|
|
6762 |
|
|
|
6763 |
public boolean equals(generateCouponsForPromotion_result that) {
|
|
|
6764 |
if (that == null)
|
|
|
6765 |
return false;
|
|
|
6766 |
|
|
|
6767 |
boolean this_present_pex = true && this.isSetPex();
|
|
|
6768 |
boolean that_present_pex = true && that.isSetPex();
|
|
|
6769 |
if (this_present_pex || that_present_pex) {
|
|
|
6770 |
if (!(this_present_pex && that_present_pex))
|
|
|
6771 |
return false;
|
|
|
6772 |
if (!this.pex.equals(that.pex))
|
|
|
6773 |
return false;
|
|
|
6774 |
}
|
|
|
6775 |
|
|
|
6776 |
return true;
|
|
|
6777 |
}
|
|
|
6778 |
|
|
|
6779 |
@Override
|
|
|
6780 |
public int hashCode() {
|
|
|
6781 |
return 0;
|
|
|
6782 |
}
|
|
|
6783 |
|
|
|
6784 |
public int compareTo(generateCouponsForPromotion_result other) {
|
|
|
6785 |
if (!getClass().equals(other.getClass())) {
|
|
|
6786 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
6787 |
}
|
|
|
6788 |
|
|
|
6789 |
int lastComparison = 0;
|
|
|
6790 |
generateCouponsForPromotion_result typedOther = (generateCouponsForPromotion_result)other;
|
|
|
6791 |
|
| 3430 |
rajveer |
6792 |
lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
|
| 1982 |
varun.gupt |
6793 |
if (lastComparison != 0) {
|
|
|
6794 |
return lastComparison;
|
|
|
6795 |
}
|
| 3430 |
rajveer |
6796 |
if (isSetPex()) {
|
|
|
6797 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
|
|
|
6798 |
if (lastComparison != 0) {
|
|
|
6799 |
return lastComparison;
|
|
|
6800 |
}
|
| 1982 |
varun.gupt |
6801 |
}
|
|
|
6802 |
return 0;
|
|
|
6803 |
}
|
|
|
6804 |
|
| 3430 |
rajveer |
6805 |
public _Fields fieldForId(int fieldId) {
|
|
|
6806 |
return _Fields.findByThriftId(fieldId);
|
|
|
6807 |
}
|
|
|
6808 |
|
|
|
6809 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
6810 |
org.apache.thrift.protocol.TField field;
|
| 1982 |
varun.gupt |
6811 |
iprot.readStructBegin();
|
|
|
6812 |
while (true)
|
|
|
6813 |
{
|
|
|
6814 |
field = iprot.readFieldBegin();
|
| 3430 |
rajveer |
6815 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
| 1982 |
varun.gupt |
6816 |
break;
|
|
|
6817 |
}
|
| 3430 |
rajveer |
6818 |
switch (field.id) {
|
|
|
6819 |
case 1: // PEX
|
|
|
6820 |
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
|
|
6821 |
this.pex = new PromotionException();
|
|
|
6822 |
this.pex.read(iprot);
|
|
|
6823 |
} else {
|
|
|
6824 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
6825 |
}
|
|
|
6826 |
break;
|
|
|
6827 |
default:
|
|
|
6828 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| 1982 |
varun.gupt |
6829 |
}
|
| 3430 |
rajveer |
6830 |
iprot.readFieldEnd();
|
| 1982 |
varun.gupt |
6831 |
}
|
|
|
6832 |
iprot.readStructEnd();
|
|
|
6833 |
validate();
|
|
|
6834 |
}
|
|
|
6835 |
|
| 3430 |
rajveer |
6836 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
6837 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
6838 |
|
|
|
6839 |
if (this.isSetPex()) {
|
|
|
6840 |
oprot.writeFieldBegin(PEX_FIELD_DESC);
|
|
|
6841 |
this.pex.write(oprot);
|
|
|
6842 |
oprot.writeFieldEnd();
|
|
|
6843 |
}
|
|
|
6844 |
oprot.writeFieldStop();
|
|
|
6845 |
oprot.writeStructEnd();
|
|
|
6846 |
}
|
|
|
6847 |
|
|
|
6848 |
@Override
|
|
|
6849 |
public String toString() {
|
|
|
6850 |
StringBuilder sb = new StringBuilder("generateCouponsForPromotion_result(");
|
|
|
6851 |
boolean first = true;
|
|
|
6852 |
|
|
|
6853 |
sb.append("pex:");
|
|
|
6854 |
if (this.pex == null) {
|
|
|
6855 |
sb.append("null");
|
|
|
6856 |
} else {
|
|
|
6857 |
sb.append(this.pex);
|
|
|
6858 |
}
|
|
|
6859 |
first = false;
|
|
|
6860 |
sb.append(")");
|
|
|
6861 |
return sb.toString();
|
|
|
6862 |
}
|
|
|
6863 |
|
| 3430 |
rajveer |
6864 |
public void validate() throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
6865 |
// check for required fields
|
|
|
6866 |
}
|
|
|
6867 |
|
| 3430 |
rajveer |
6868 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
6869 |
try {
|
|
|
6870 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
6871 |
} catch (org.apache.thrift.TException te) {
|
|
|
6872 |
throw new java.io.IOException(te);
|
|
|
6873 |
}
|
|
|
6874 |
}
|
|
|
6875 |
|
|
|
6876 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
6877 |
try {
|
|
|
6878 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
6879 |
} catch (org.apache.thrift.TException te) {
|
|
|
6880 |
throw new java.io.IOException(te);
|
|
|
6881 |
}
|
|
|
6882 |
}
|
|
|
6883 |
|
| 1982 |
varun.gupt |
6884 |
}
|
|
|
6885 |
|
| 3430 |
rajveer |
6886 |
public static class applyCoupon_args implements org.apache.thrift.TBase<applyCoupon_args, applyCoupon_args._Fields>, java.io.Serializable, Cloneable {
|
|
|
6887 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("applyCoupon_args");
|
| 1982 |
varun.gupt |
6888 |
|
| 3430 |
rajveer |
6889 |
private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCode", org.apache.thrift.protocol.TType.STRING, (short)1);
|
|
|
6890 |
private static final org.apache.thrift.protocol.TField CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cartId", org.apache.thrift.protocol.TType.I64, (short)2);
|
| 1982 |
varun.gupt |
6891 |
|
| 3430 |
rajveer |
6892 |
private String couponCode; // required
|
|
|
6893 |
private long cartId; // required
|
| 1982 |
varun.gupt |
6894 |
|
|
|
6895 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
| 3430 |
rajveer |
6896 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
| 1982 |
varun.gupt |
6897 |
COUPON_CODE((short)1, "couponCode"),
|
|
|
6898 |
CART_ID((short)2, "cartId");
|
|
|
6899 |
|
|
|
6900 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
6901 |
|
|
|
6902 |
static {
|
|
|
6903 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
6904 |
byName.put(field.getFieldName(), field);
|
|
|
6905 |
}
|
|
|
6906 |
}
|
|
|
6907 |
|
|
|
6908 |
/**
|
|
|
6909 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
6910 |
*/
|
|
|
6911 |
public static _Fields findByThriftId(int fieldId) {
|
| 3430 |
rajveer |
6912 |
switch(fieldId) {
|
|
|
6913 |
case 1: // COUPON_CODE
|
|
|
6914 |
return COUPON_CODE;
|
|
|
6915 |
case 2: // CART_ID
|
|
|
6916 |
return CART_ID;
|
|
|
6917 |
default:
|
|
|
6918 |
return null;
|
|
|
6919 |
}
|
| 1982 |
varun.gupt |
6920 |
}
|
|
|
6921 |
|
|
|
6922 |
/**
|
|
|
6923 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
6924 |
* if it is not found.
|
|
|
6925 |
*/
|
|
|
6926 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
6927 |
_Fields fields = findByThriftId(fieldId);
|
|
|
6928 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
6929 |
return fields;
|
|
|
6930 |
}
|
|
|
6931 |
|
|
|
6932 |
/**
|
|
|
6933 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
6934 |
*/
|
|
|
6935 |
public static _Fields findByName(String name) {
|
|
|
6936 |
return byName.get(name);
|
|
|
6937 |
}
|
|
|
6938 |
|
|
|
6939 |
private final short _thriftId;
|
|
|
6940 |
private final String _fieldName;
|
|
|
6941 |
|
|
|
6942 |
_Fields(short thriftId, String fieldName) {
|
|
|
6943 |
_thriftId = thriftId;
|
|
|
6944 |
_fieldName = fieldName;
|
|
|
6945 |
}
|
|
|
6946 |
|
|
|
6947 |
public short getThriftFieldId() {
|
|
|
6948 |
return _thriftId;
|
|
|
6949 |
}
|
|
|
6950 |
|
|
|
6951 |
public String getFieldName() {
|
|
|
6952 |
return _fieldName;
|
|
|
6953 |
}
|
|
|
6954 |
}
|
|
|
6955 |
|
|
|
6956 |
// isset id assignments
|
|
|
6957 |
private static final int __CARTID_ISSET_ID = 0;
|
|
|
6958 |
private BitSet __isset_bit_vector = new BitSet(1);
|
|
|
6959 |
|
| 3430 |
rajveer |
6960 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
| 1982 |
varun.gupt |
6961 |
static {
|
| 3430 |
rajveer |
6962 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
6963 |
tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
6964 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
6965 |
tmpMap.put(_Fields.CART_ID, new org.apache.thrift.meta_data.FieldMetaData("cartId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
6966 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
6967 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
6968 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(applyCoupon_args.class, metaDataMap);
|
| 1982 |
varun.gupt |
6969 |
}
|
|
|
6970 |
|
|
|
6971 |
public applyCoupon_args() {
|
|
|
6972 |
}
|
|
|
6973 |
|
|
|
6974 |
public applyCoupon_args(
|
|
|
6975 |
String couponCode,
|
|
|
6976 |
long cartId)
|
|
|
6977 |
{
|
|
|
6978 |
this();
|
|
|
6979 |
this.couponCode = couponCode;
|
|
|
6980 |
this.cartId = cartId;
|
|
|
6981 |
setCartIdIsSet(true);
|
|
|
6982 |
}
|
|
|
6983 |
|
|
|
6984 |
/**
|
|
|
6985 |
* Performs a deep copy on <i>other</i>.
|
|
|
6986 |
*/
|
|
|
6987 |
public applyCoupon_args(applyCoupon_args other) {
|
|
|
6988 |
__isset_bit_vector.clear();
|
|
|
6989 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
6990 |
if (other.isSetCouponCode()) {
|
|
|
6991 |
this.couponCode = other.couponCode;
|
|
|
6992 |
}
|
|
|
6993 |
this.cartId = other.cartId;
|
|
|
6994 |
}
|
|
|
6995 |
|
|
|
6996 |
public applyCoupon_args deepCopy() {
|
|
|
6997 |
return new applyCoupon_args(this);
|
|
|
6998 |
}
|
|
|
6999 |
|
| 3430 |
rajveer |
7000 |
@Override
|
|
|
7001 |
public void clear() {
|
|
|
7002 |
this.couponCode = null;
|
|
|
7003 |
setCartIdIsSet(false);
|
|
|
7004 |
this.cartId = 0;
|
| 1982 |
varun.gupt |
7005 |
}
|
|
|
7006 |
|
|
|
7007 |
public String getCouponCode() {
|
|
|
7008 |
return this.couponCode;
|
|
|
7009 |
}
|
|
|
7010 |
|
| 3430 |
rajveer |
7011 |
public void setCouponCode(String couponCode) {
|
| 1982 |
varun.gupt |
7012 |
this.couponCode = couponCode;
|
|
|
7013 |
}
|
|
|
7014 |
|
|
|
7015 |
public void unsetCouponCode() {
|
|
|
7016 |
this.couponCode = null;
|
|
|
7017 |
}
|
|
|
7018 |
|
| 3430 |
rajveer |
7019 |
/** Returns true if field couponCode is set (has been assigned a value) and false otherwise */
|
| 1982 |
varun.gupt |
7020 |
public boolean isSetCouponCode() {
|
|
|
7021 |
return this.couponCode != null;
|
|
|
7022 |
}
|
|
|
7023 |
|
|
|
7024 |
public void setCouponCodeIsSet(boolean value) {
|
|
|
7025 |
if (!value) {
|
|
|
7026 |
this.couponCode = null;
|
|
|
7027 |
}
|
|
|
7028 |
}
|
|
|
7029 |
|
|
|
7030 |
public long getCartId() {
|
|
|
7031 |
return this.cartId;
|
|
|
7032 |
}
|
|
|
7033 |
|
| 3430 |
rajveer |
7034 |
public void setCartId(long cartId) {
|
| 1982 |
varun.gupt |
7035 |
this.cartId = cartId;
|
|
|
7036 |
setCartIdIsSet(true);
|
|
|
7037 |
}
|
|
|
7038 |
|
|
|
7039 |
public void unsetCartId() {
|
|
|
7040 |
__isset_bit_vector.clear(__CARTID_ISSET_ID);
|
|
|
7041 |
}
|
|
|
7042 |
|
| 3430 |
rajveer |
7043 |
/** Returns true if field cartId is set (has been assigned a value) and false otherwise */
|
| 1982 |
varun.gupt |
7044 |
public boolean isSetCartId() {
|
|
|
7045 |
return __isset_bit_vector.get(__CARTID_ISSET_ID);
|
|
|
7046 |
}
|
|
|
7047 |
|
|
|
7048 |
public void setCartIdIsSet(boolean value) {
|
|
|
7049 |
__isset_bit_vector.set(__CARTID_ISSET_ID, value);
|
|
|
7050 |
}
|
|
|
7051 |
|
|
|
7052 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
7053 |
switch (field) {
|
|
|
7054 |
case COUPON_CODE:
|
|
|
7055 |
if (value == null) {
|
|
|
7056 |
unsetCouponCode();
|
|
|
7057 |
} else {
|
|
|
7058 |
setCouponCode((String)value);
|
|
|
7059 |
}
|
|
|
7060 |
break;
|
|
|
7061 |
|
|
|
7062 |
case CART_ID:
|
|
|
7063 |
if (value == null) {
|
|
|
7064 |
unsetCartId();
|
|
|
7065 |
} else {
|
|
|
7066 |
setCartId((Long)value);
|
|
|
7067 |
}
|
|
|
7068 |
break;
|
|
|
7069 |
|
|
|
7070 |
}
|
|
|
7071 |
}
|
|
|
7072 |
|
|
|
7073 |
public Object getFieldValue(_Fields field) {
|
|
|
7074 |
switch (field) {
|
|
|
7075 |
case COUPON_CODE:
|
|
|
7076 |
return getCouponCode();
|
|
|
7077 |
|
|
|
7078 |
case CART_ID:
|
| 3430 |
rajveer |
7079 |
return Long.valueOf(getCartId());
|
| 1982 |
varun.gupt |
7080 |
|
|
|
7081 |
}
|
|
|
7082 |
throw new IllegalStateException();
|
|
|
7083 |
}
|
|
|
7084 |
|
| 3430 |
rajveer |
7085 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
7086 |
public boolean isSet(_Fields field) {
|
|
|
7087 |
if (field == null) {
|
|
|
7088 |
throw new IllegalArgumentException();
|
|
|
7089 |
}
|
| 1982 |
varun.gupt |
7090 |
|
|
|
7091 |
switch (field) {
|
|
|
7092 |
case COUPON_CODE:
|
|
|
7093 |
return isSetCouponCode();
|
|
|
7094 |
case CART_ID:
|
|
|
7095 |
return isSetCartId();
|
|
|
7096 |
}
|
|
|
7097 |
throw new IllegalStateException();
|
|
|
7098 |
}
|
|
|
7099 |
|
|
|
7100 |
@Override
|
|
|
7101 |
public boolean equals(Object that) {
|
|
|
7102 |
if (that == null)
|
|
|
7103 |
return false;
|
|
|
7104 |
if (that instanceof applyCoupon_args)
|
|
|
7105 |
return this.equals((applyCoupon_args)that);
|
|
|
7106 |
return false;
|
|
|
7107 |
}
|
|
|
7108 |
|
|
|
7109 |
public boolean equals(applyCoupon_args that) {
|
|
|
7110 |
if (that == null)
|
|
|
7111 |
return false;
|
|
|
7112 |
|
|
|
7113 |
boolean this_present_couponCode = true && this.isSetCouponCode();
|
|
|
7114 |
boolean that_present_couponCode = true && that.isSetCouponCode();
|
|
|
7115 |
if (this_present_couponCode || that_present_couponCode) {
|
|
|
7116 |
if (!(this_present_couponCode && that_present_couponCode))
|
|
|
7117 |
return false;
|
|
|
7118 |
if (!this.couponCode.equals(that.couponCode))
|
|
|
7119 |
return false;
|
|
|
7120 |
}
|
|
|
7121 |
|
|
|
7122 |
boolean this_present_cartId = true;
|
|
|
7123 |
boolean that_present_cartId = true;
|
|
|
7124 |
if (this_present_cartId || that_present_cartId) {
|
|
|
7125 |
if (!(this_present_cartId && that_present_cartId))
|
|
|
7126 |
return false;
|
|
|
7127 |
if (this.cartId != that.cartId)
|
|
|
7128 |
return false;
|
|
|
7129 |
}
|
|
|
7130 |
|
|
|
7131 |
return true;
|
|
|
7132 |
}
|
|
|
7133 |
|
|
|
7134 |
@Override
|
|
|
7135 |
public int hashCode() {
|
|
|
7136 |
return 0;
|
|
|
7137 |
}
|
|
|
7138 |
|
|
|
7139 |
public int compareTo(applyCoupon_args other) {
|
|
|
7140 |
if (!getClass().equals(other.getClass())) {
|
|
|
7141 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
7142 |
}
|
|
|
7143 |
|
|
|
7144 |
int lastComparison = 0;
|
|
|
7145 |
applyCoupon_args typedOther = (applyCoupon_args)other;
|
|
|
7146 |
|
| 3430 |
rajveer |
7147 |
lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
|
| 1982 |
varun.gupt |
7148 |
if (lastComparison != 0) {
|
|
|
7149 |
return lastComparison;
|
|
|
7150 |
}
|
| 3430 |
rajveer |
7151 |
if (isSetCouponCode()) {
|
|
|
7152 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);
|
|
|
7153 |
if (lastComparison != 0) {
|
|
|
7154 |
return lastComparison;
|
|
|
7155 |
}
|
| 1982 |
varun.gupt |
7156 |
}
|
| 3430 |
rajveer |
7157 |
lastComparison = Boolean.valueOf(isSetCartId()).compareTo(typedOther.isSetCartId());
|
| 1982 |
varun.gupt |
7158 |
if (lastComparison != 0) {
|
|
|
7159 |
return lastComparison;
|
|
|
7160 |
}
|
| 3430 |
rajveer |
7161 |
if (isSetCartId()) {
|
|
|
7162 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cartId, typedOther.cartId);
|
|
|
7163 |
if (lastComparison != 0) {
|
|
|
7164 |
return lastComparison;
|
|
|
7165 |
}
|
| 1982 |
varun.gupt |
7166 |
}
|
|
|
7167 |
return 0;
|
|
|
7168 |
}
|
|
|
7169 |
|
| 3430 |
rajveer |
7170 |
public _Fields fieldForId(int fieldId) {
|
|
|
7171 |
return _Fields.findByThriftId(fieldId);
|
|
|
7172 |
}
|
|
|
7173 |
|
|
|
7174 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
7175 |
org.apache.thrift.protocol.TField field;
|
| 1982 |
varun.gupt |
7176 |
iprot.readStructBegin();
|
|
|
7177 |
while (true)
|
|
|
7178 |
{
|
|
|
7179 |
field = iprot.readFieldBegin();
|
| 3430 |
rajveer |
7180 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
| 1982 |
varun.gupt |
7181 |
break;
|
|
|
7182 |
}
|
| 3430 |
rajveer |
7183 |
switch (field.id) {
|
|
|
7184 |
case 1: // COUPON_CODE
|
|
|
7185 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
7186 |
this.couponCode = iprot.readString();
|
|
|
7187 |
} else {
|
|
|
7188 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
7189 |
}
|
|
|
7190 |
break;
|
|
|
7191 |
case 2: // CART_ID
|
|
|
7192 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
7193 |
this.cartId = iprot.readI64();
|
|
|
7194 |
setCartIdIsSet(true);
|
|
|
7195 |
} else {
|
|
|
7196 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
7197 |
}
|
|
|
7198 |
break;
|
|
|
7199 |
default:
|
|
|
7200 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| 1982 |
varun.gupt |
7201 |
}
|
| 3430 |
rajveer |
7202 |
iprot.readFieldEnd();
|
| 1982 |
varun.gupt |
7203 |
}
|
|
|
7204 |
iprot.readStructEnd();
|
|
|
7205 |
validate();
|
|
|
7206 |
}
|
|
|
7207 |
|
| 3430 |
rajveer |
7208 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
7209 |
validate();
|
|
|
7210 |
|
|
|
7211 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
7212 |
if (this.couponCode != null) {
|
|
|
7213 |
oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
|
|
|
7214 |
oprot.writeString(this.couponCode);
|
|
|
7215 |
oprot.writeFieldEnd();
|
|
|
7216 |
}
|
|
|
7217 |
oprot.writeFieldBegin(CART_ID_FIELD_DESC);
|
|
|
7218 |
oprot.writeI64(this.cartId);
|
|
|
7219 |
oprot.writeFieldEnd();
|
|
|
7220 |
oprot.writeFieldStop();
|
|
|
7221 |
oprot.writeStructEnd();
|
|
|
7222 |
}
|
|
|
7223 |
|
|
|
7224 |
@Override
|
|
|
7225 |
public String toString() {
|
|
|
7226 |
StringBuilder sb = new StringBuilder("applyCoupon_args(");
|
|
|
7227 |
boolean first = true;
|
|
|
7228 |
|
|
|
7229 |
sb.append("couponCode:");
|
|
|
7230 |
if (this.couponCode == null) {
|
|
|
7231 |
sb.append("null");
|
|
|
7232 |
} else {
|
|
|
7233 |
sb.append(this.couponCode);
|
|
|
7234 |
}
|
|
|
7235 |
first = false;
|
|
|
7236 |
if (!first) sb.append(", ");
|
|
|
7237 |
sb.append("cartId:");
|
|
|
7238 |
sb.append(this.cartId);
|
|
|
7239 |
first = false;
|
|
|
7240 |
sb.append(")");
|
|
|
7241 |
return sb.toString();
|
|
|
7242 |
}
|
|
|
7243 |
|
| 3430 |
rajveer |
7244 |
public void validate() throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
7245 |
// check for required fields
|
|
|
7246 |
}
|
|
|
7247 |
|
| 3430 |
rajveer |
7248 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
7249 |
try {
|
|
|
7250 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
7251 |
} catch (org.apache.thrift.TException te) {
|
|
|
7252 |
throw new java.io.IOException(te);
|
|
|
7253 |
}
|
|
|
7254 |
}
|
|
|
7255 |
|
|
|
7256 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
7257 |
try {
|
|
|
7258 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
7259 |
__isset_bit_vector = new BitSet(1);
|
|
|
7260 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
7261 |
} catch (org.apache.thrift.TException te) {
|
|
|
7262 |
throw new java.io.IOException(te);
|
|
|
7263 |
}
|
|
|
7264 |
}
|
|
|
7265 |
|
| 1982 |
varun.gupt |
7266 |
}
|
|
|
7267 |
|
| 3430 |
rajveer |
7268 |
public static class applyCoupon_result implements org.apache.thrift.TBase<applyCoupon_result, applyCoupon_result._Fields>, java.io.Serializable, Cloneable {
|
|
|
7269 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("applyCoupon_result");
|
| 1982 |
varun.gupt |
7270 |
|
| 3430 |
rajveer |
7271 |
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
|
|
|
7272 |
private static final org.apache.thrift.protocol.TField PEX_FIELD_DESC = new org.apache.thrift.protocol.TField("pex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
|
| 1982 |
varun.gupt |
7273 |
|
| 3430 |
rajveer |
7274 |
private Cart success; // required
|
|
|
7275 |
private PromotionException pex; // required
|
| 1982 |
varun.gupt |
7276 |
|
|
|
7277 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
| 3430 |
rajveer |
7278 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
| 1982 |
varun.gupt |
7279 |
SUCCESS((short)0, "success"),
|
|
|
7280 |
PEX((short)1, "pex");
|
|
|
7281 |
|
|
|
7282 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
7283 |
|
|
|
7284 |
static {
|
|
|
7285 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
7286 |
byName.put(field.getFieldName(), field);
|
|
|
7287 |
}
|
|
|
7288 |
}
|
|
|
7289 |
|
|
|
7290 |
/**
|
|
|
7291 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
7292 |
*/
|
|
|
7293 |
public static _Fields findByThriftId(int fieldId) {
|
| 3430 |
rajveer |
7294 |
switch(fieldId) {
|
|
|
7295 |
case 0: // SUCCESS
|
|
|
7296 |
return SUCCESS;
|
|
|
7297 |
case 1: // PEX
|
|
|
7298 |
return PEX;
|
|
|
7299 |
default:
|
|
|
7300 |
return null;
|
|
|
7301 |
}
|
| 1982 |
varun.gupt |
7302 |
}
|
|
|
7303 |
|
|
|
7304 |
/**
|
|
|
7305 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
7306 |
* if it is not found.
|
|
|
7307 |
*/
|
|
|
7308 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
7309 |
_Fields fields = findByThriftId(fieldId);
|
|
|
7310 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
7311 |
return fields;
|
|
|
7312 |
}
|
|
|
7313 |
|
|
|
7314 |
/**
|
|
|
7315 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
7316 |
*/
|
|
|
7317 |
public static _Fields findByName(String name) {
|
|
|
7318 |
return byName.get(name);
|
|
|
7319 |
}
|
|
|
7320 |
|
|
|
7321 |
private final short _thriftId;
|
|
|
7322 |
private final String _fieldName;
|
|
|
7323 |
|
|
|
7324 |
_Fields(short thriftId, String fieldName) {
|
|
|
7325 |
_thriftId = thriftId;
|
|
|
7326 |
_fieldName = fieldName;
|
|
|
7327 |
}
|
|
|
7328 |
|
|
|
7329 |
public short getThriftFieldId() {
|
|
|
7330 |
return _thriftId;
|
|
|
7331 |
}
|
|
|
7332 |
|
|
|
7333 |
public String getFieldName() {
|
|
|
7334 |
return _fieldName;
|
|
|
7335 |
}
|
|
|
7336 |
}
|
|
|
7337 |
|
|
|
7338 |
// isset id assignments
|
|
|
7339 |
|
| 3430 |
rajveer |
7340 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
| 1982 |
varun.gupt |
7341 |
static {
|
| 3430 |
rajveer |
7342 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
7343 |
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
7344 |
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Cart.class)));
|
|
|
7345 |
tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
7346 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
|
|
|
7347 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
7348 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(applyCoupon_result.class, metaDataMap);
|
| 1982 |
varun.gupt |
7349 |
}
|
|
|
7350 |
|
|
|
7351 |
public applyCoupon_result() {
|
|
|
7352 |
}
|
|
|
7353 |
|
|
|
7354 |
public applyCoupon_result(
|
|
|
7355 |
Cart success,
|
|
|
7356 |
PromotionException pex)
|
|
|
7357 |
{
|
|
|
7358 |
this();
|
|
|
7359 |
this.success = success;
|
|
|
7360 |
this.pex = pex;
|
|
|
7361 |
}
|
|
|
7362 |
|
|
|
7363 |
/**
|
|
|
7364 |
* Performs a deep copy on <i>other</i>.
|
|
|
7365 |
*/
|
|
|
7366 |
public applyCoupon_result(applyCoupon_result other) {
|
|
|
7367 |
if (other.isSetSuccess()) {
|
|
|
7368 |
this.success = new Cart(other.success);
|
|
|
7369 |
}
|
|
|
7370 |
if (other.isSetPex()) {
|
|
|
7371 |
this.pex = new PromotionException(other.pex);
|
|
|
7372 |
}
|
|
|
7373 |
}
|
|
|
7374 |
|
|
|
7375 |
public applyCoupon_result deepCopy() {
|
|
|
7376 |
return new applyCoupon_result(this);
|
|
|
7377 |
}
|
|
|
7378 |
|
| 3430 |
rajveer |
7379 |
@Override
|
|
|
7380 |
public void clear() {
|
|
|
7381 |
this.success = null;
|
|
|
7382 |
this.pex = null;
|
| 1982 |
varun.gupt |
7383 |
}
|
|
|
7384 |
|
|
|
7385 |
public Cart getSuccess() {
|
|
|
7386 |
return this.success;
|
|
|
7387 |
}
|
|
|
7388 |
|
| 3430 |
rajveer |
7389 |
public void setSuccess(Cart success) {
|
| 1982 |
varun.gupt |
7390 |
this.success = success;
|
|
|
7391 |
}
|
|
|
7392 |
|
|
|
7393 |
public void unsetSuccess() {
|
|
|
7394 |
this.success = null;
|
|
|
7395 |
}
|
|
|
7396 |
|
| 3430 |
rajveer |
7397 |
/** Returns true if field success is set (has been assigned a value) and false otherwise */
|
| 1982 |
varun.gupt |
7398 |
public boolean isSetSuccess() {
|
|
|
7399 |
return this.success != null;
|
|
|
7400 |
}
|
|
|
7401 |
|
|
|
7402 |
public void setSuccessIsSet(boolean value) {
|
|
|
7403 |
if (!value) {
|
|
|
7404 |
this.success = null;
|
|
|
7405 |
}
|
|
|
7406 |
}
|
|
|
7407 |
|
|
|
7408 |
public PromotionException getPex() {
|
|
|
7409 |
return this.pex;
|
|
|
7410 |
}
|
|
|
7411 |
|
| 3430 |
rajveer |
7412 |
public void setPex(PromotionException pex) {
|
| 1982 |
varun.gupt |
7413 |
this.pex = pex;
|
|
|
7414 |
}
|
|
|
7415 |
|
|
|
7416 |
public void unsetPex() {
|
|
|
7417 |
this.pex = null;
|
|
|
7418 |
}
|
|
|
7419 |
|
| 3430 |
rajveer |
7420 |
/** Returns true if field pex is set (has been assigned a value) and false otherwise */
|
| 1982 |
varun.gupt |
7421 |
public boolean isSetPex() {
|
|
|
7422 |
return this.pex != null;
|
|
|
7423 |
}
|
|
|
7424 |
|
|
|
7425 |
public void setPexIsSet(boolean value) {
|
|
|
7426 |
if (!value) {
|
|
|
7427 |
this.pex = null;
|
|
|
7428 |
}
|
|
|
7429 |
}
|
|
|
7430 |
|
|
|
7431 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
7432 |
switch (field) {
|
|
|
7433 |
case SUCCESS:
|
|
|
7434 |
if (value == null) {
|
|
|
7435 |
unsetSuccess();
|
|
|
7436 |
} else {
|
|
|
7437 |
setSuccess((Cart)value);
|
|
|
7438 |
}
|
|
|
7439 |
break;
|
|
|
7440 |
|
|
|
7441 |
case PEX:
|
|
|
7442 |
if (value == null) {
|
|
|
7443 |
unsetPex();
|
|
|
7444 |
} else {
|
|
|
7445 |
setPex((PromotionException)value);
|
|
|
7446 |
}
|
|
|
7447 |
break;
|
|
|
7448 |
|
|
|
7449 |
}
|
|
|
7450 |
}
|
|
|
7451 |
|
|
|
7452 |
public Object getFieldValue(_Fields field) {
|
|
|
7453 |
switch (field) {
|
|
|
7454 |
case SUCCESS:
|
|
|
7455 |
return getSuccess();
|
|
|
7456 |
|
|
|
7457 |
case PEX:
|
|
|
7458 |
return getPex();
|
|
|
7459 |
|
|
|
7460 |
}
|
|
|
7461 |
throw new IllegalStateException();
|
|
|
7462 |
}
|
|
|
7463 |
|
| 3430 |
rajveer |
7464 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
7465 |
public boolean isSet(_Fields field) {
|
|
|
7466 |
if (field == null) {
|
|
|
7467 |
throw new IllegalArgumentException();
|
|
|
7468 |
}
|
| 1982 |
varun.gupt |
7469 |
|
|
|
7470 |
switch (field) {
|
|
|
7471 |
case SUCCESS:
|
|
|
7472 |
return isSetSuccess();
|
|
|
7473 |
case PEX:
|
|
|
7474 |
return isSetPex();
|
|
|
7475 |
}
|
|
|
7476 |
throw new IllegalStateException();
|
|
|
7477 |
}
|
|
|
7478 |
|
|
|
7479 |
@Override
|
|
|
7480 |
public boolean equals(Object that) {
|
|
|
7481 |
if (that == null)
|
|
|
7482 |
return false;
|
|
|
7483 |
if (that instanceof applyCoupon_result)
|
|
|
7484 |
return this.equals((applyCoupon_result)that);
|
|
|
7485 |
return false;
|
|
|
7486 |
}
|
|
|
7487 |
|
|
|
7488 |
public boolean equals(applyCoupon_result that) {
|
|
|
7489 |
if (that == null)
|
|
|
7490 |
return false;
|
|
|
7491 |
|
|
|
7492 |
boolean this_present_success = true && this.isSetSuccess();
|
|
|
7493 |
boolean that_present_success = true && that.isSetSuccess();
|
|
|
7494 |
if (this_present_success || that_present_success) {
|
|
|
7495 |
if (!(this_present_success && that_present_success))
|
|
|
7496 |
return false;
|
|
|
7497 |
if (!this.success.equals(that.success))
|
|
|
7498 |
return false;
|
|
|
7499 |
}
|
|
|
7500 |
|
|
|
7501 |
boolean this_present_pex = true && this.isSetPex();
|
|
|
7502 |
boolean that_present_pex = true && that.isSetPex();
|
|
|
7503 |
if (this_present_pex || that_present_pex) {
|
|
|
7504 |
if (!(this_present_pex && that_present_pex))
|
|
|
7505 |
return false;
|
|
|
7506 |
if (!this.pex.equals(that.pex))
|
|
|
7507 |
return false;
|
|
|
7508 |
}
|
|
|
7509 |
|
|
|
7510 |
return true;
|
|
|
7511 |
}
|
|
|
7512 |
|
|
|
7513 |
@Override
|
|
|
7514 |
public int hashCode() {
|
|
|
7515 |
return 0;
|
|
|
7516 |
}
|
|
|
7517 |
|
|
|
7518 |
public int compareTo(applyCoupon_result other) {
|
|
|
7519 |
if (!getClass().equals(other.getClass())) {
|
|
|
7520 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
7521 |
}
|
|
|
7522 |
|
|
|
7523 |
int lastComparison = 0;
|
|
|
7524 |
applyCoupon_result typedOther = (applyCoupon_result)other;
|
|
|
7525 |
|
| 3430 |
rajveer |
7526 |
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
|
| 1982 |
varun.gupt |
7527 |
if (lastComparison != 0) {
|
|
|
7528 |
return lastComparison;
|
|
|
7529 |
}
|
| 3430 |
rajveer |
7530 |
if (isSetSuccess()) {
|
|
|
7531 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
|
|
|
7532 |
if (lastComparison != 0) {
|
|
|
7533 |
return lastComparison;
|
|
|
7534 |
}
|
| 1982 |
varun.gupt |
7535 |
}
|
| 3430 |
rajveer |
7536 |
lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
|
| 1982 |
varun.gupt |
7537 |
if (lastComparison != 0) {
|
|
|
7538 |
return lastComparison;
|
|
|
7539 |
}
|
| 3430 |
rajveer |
7540 |
if (isSetPex()) {
|
|
|
7541 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
|
|
|
7542 |
if (lastComparison != 0) {
|
|
|
7543 |
return lastComparison;
|
|
|
7544 |
}
|
| 1982 |
varun.gupt |
7545 |
}
|
|
|
7546 |
return 0;
|
|
|
7547 |
}
|
|
|
7548 |
|
| 3430 |
rajveer |
7549 |
public _Fields fieldForId(int fieldId) {
|
|
|
7550 |
return _Fields.findByThriftId(fieldId);
|
|
|
7551 |
}
|
|
|
7552 |
|
|
|
7553 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
7554 |
org.apache.thrift.protocol.TField field;
|
| 1982 |
varun.gupt |
7555 |
iprot.readStructBegin();
|
|
|
7556 |
while (true)
|
|
|
7557 |
{
|
|
|
7558 |
field = iprot.readFieldBegin();
|
| 3430 |
rajveer |
7559 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
| 1982 |
varun.gupt |
7560 |
break;
|
|
|
7561 |
}
|
| 3430 |
rajveer |
7562 |
switch (field.id) {
|
|
|
7563 |
case 0: // SUCCESS
|
|
|
7564 |
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
|
|
7565 |
this.success = new Cart();
|
|
|
7566 |
this.success.read(iprot);
|
|
|
7567 |
} else {
|
|
|
7568 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
7569 |
}
|
|
|
7570 |
break;
|
|
|
7571 |
case 1: // PEX
|
|
|
7572 |
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
|
|
7573 |
this.pex = new PromotionException();
|
|
|
7574 |
this.pex.read(iprot);
|
|
|
7575 |
} else {
|
|
|
7576 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
7577 |
}
|
|
|
7578 |
break;
|
|
|
7579 |
default:
|
|
|
7580 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| 1982 |
varun.gupt |
7581 |
}
|
| 3430 |
rajveer |
7582 |
iprot.readFieldEnd();
|
| 1982 |
varun.gupt |
7583 |
}
|
|
|
7584 |
iprot.readStructEnd();
|
|
|
7585 |
validate();
|
|
|
7586 |
}
|
|
|
7587 |
|
| 3430 |
rajveer |
7588 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
7589 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
7590 |
|
|
|
7591 |
if (this.isSetSuccess()) {
|
|
|
7592 |
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
|
|
7593 |
this.success.write(oprot);
|
|
|
7594 |
oprot.writeFieldEnd();
|
|
|
7595 |
} else if (this.isSetPex()) {
|
|
|
7596 |
oprot.writeFieldBegin(PEX_FIELD_DESC);
|
|
|
7597 |
this.pex.write(oprot);
|
|
|
7598 |
oprot.writeFieldEnd();
|
|
|
7599 |
}
|
|
|
7600 |
oprot.writeFieldStop();
|
|
|
7601 |
oprot.writeStructEnd();
|
|
|
7602 |
}
|
|
|
7603 |
|
|
|
7604 |
@Override
|
|
|
7605 |
public String toString() {
|
|
|
7606 |
StringBuilder sb = new StringBuilder("applyCoupon_result(");
|
|
|
7607 |
boolean first = true;
|
|
|
7608 |
|
|
|
7609 |
sb.append("success:");
|
|
|
7610 |
if (this.success == null) {
|
|
|
7611 |
sb.append("null");
|
|
|
7612 |
} else {
|
|
|
7613 |
sb.append(this.success);
|
|
|
7614 |
}
|
|
|
7615 |
first = false;
|
|
|
7616 |
if (!first) sb.append(", ");
|
|
|
7617 |
sb.append("pex:");
|
|
|
7618 |
if (this.pex == null) {
|
|
|
7619 |
sb.append("null");
|
|
|
7620 |
} else {
|
|
|
7621 |
sb.append(this.pex);
|
|
|
7622 |
}
|
|
|
7623 |
first = false;
|
|
|
7624 |
sb.append(")");
|
|
|
7625 |
return sb.toString();
|
|
|
7626 |
}
|
|
|
7627 |
|
| 3430 |
rajveer |
7628 |
public void validate() throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
7629 |
// check for required fields
|
|
|
7630 |
}
|
|
|
7631 |
|
| 3430 |
rajveer |
7632 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
7633 |
try {
|
|
|
7634 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
7635 |
} catch (org.apache.thrift.TException te) {
|
|
|
7636 |
throw new java.io.IOException(te);
|
|
|
7637 |
}
|
|
|
7638 |
}
|
|
|
7639 |
|
|
|
7640 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
7641 |
try {
|
|
|
7642 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
7643 |
} catch (org.apache.thrift.TException te) {
|
|
|
7644 |
throw new java.io.IOException(te);
|
|
|
7645 |
}
|
|
|
7646 |
}
|
|
|
7647 |
|
| 1982 |
varun.gupt |
7648 |
}
|
|
|
7649 |
|
| 6736 |
amit.gupta |
7650 |
public static class getEmiDiscount_args implements org.apache.thrift.TBase<getEmiDiscount_args, getEmiDiscount_args._Fields>, java.io.Serializable, Cloneable {
|
|
|
7651 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getEmiDiscount_args");
|
|
|
7652 |
|
|
|
7653 |
private static final org.apache.thrift.protocol.TField CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cartId", org.apache.thrift.protocol.TType.I64, (short)1);
|
|
|
7654 |
|
|
|
7655 |
private long cartId; // required
|
|
|
7656 |
|
|
|
7657 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
7658 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
7659 |
CART_ID((short)1, "cartId");
|
|
|
7660 |
|
|
|
7661 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
7662 |
|
|
|
7663 |
static {
|
|
|
7664 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
7665 |
byName.put(field.getFieldName(), field);
|
|
|
7666 |
}
|
|
|
7667 |
}
|
|
|
7668 |
|
|
|
7669 |
/**
|
|
|
7670 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
7671 |
*/
|
|
|
7672 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
7673 |
switch(fieldId) {
|
|
|
7674 |
case 1: // CART_ID
|
|
|
7675 |
return CART_ID;
|
|
|
7676 |
default:
|
|
|
7677 |
return null;
|
|
|
7678 |
}
|
|
|
7679 |
}
|
|
|
7680 |
|
|
|
7681 |
/**
|
|
|
7682 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
7683 |
* if it is not found.
|
|
|
7684 |
*/
|
|
|
7685 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
7686 |
_Fields fields = findByThriftId(fieldId);
|
|
|
7687 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
7688 |
return fields;
|
|
|
7689 |
}
|
|
|
7690 |
|
|
|
7691 |
/**
|
|
|
7692 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
7693 |
*/
|
|
|
7694 |
public static _Fields findByName(String name) {
|
|
|
7695 |
return byName.get(name);
|
|
|
7696 |
}
|
|
|
7697 |
|
|
|
7698 |
private final short _thriftId;
|
|
|
7699 |
private final String _fieldName;
|
|
|
7700 |
|
|
|
7701 |
_Fields(short thriftId, String fieldName) {
|
|
|
7702 |
_thriftId = thriftId;
|
|
|
7703 |
_fieldName = fieldName;
|
|
|
7704 |
}
|
|
|
7705 |
|
|
|
7706 |
public short getThriftFieldId() {
|
|
|
7707 |
return _thriftId;
|
|
|
7708 |
}
|
|
|
7709 |
|
|
|
7710 |
public String getFieldName() {
|
|
|
7711 |
return _fieldName;
|
|
|
7712 |
}
|
|
|
7713 |
}
|
|
|
7714 |
|
|
|
7715 |
// isset id assignments
|
|
|
7716 |
private static final int __CARTID_ISSET_ID = 0;
|
|
|
7717 |
private BitSet __isset_bit_vector = new BitSet(1);
|
|
|
7718 |
|
|
|
7719 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
7720 |
static {
|
|
|
7721 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
7722 |
tmpMap.put(_Fields.CART_ID, new org.apache.thrift.meta_data.FieldMetaData("cartId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
7723 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
7724 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
7725 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getEmiDiscount_args.class, metaDataMap);
|
|
|
7726 |
}
|
|
|
7727 |
|
|
|
7728 |
public getEmiDiscount_args() {
|
|
|
7729 |
}
|
|
|
7730 |
|
|
|
7731 |
public getEmiDiscount_args(
|
|
|
7732 |
long cartId)
|
|
|
7733 |
{
|
|
|
7734 |
this();
|
|
|
7735 |
this.cartId = cartId;
|
|
|
7736 |
setCartIdIsSet(true);
|
|
|
7737 |
}
|
|
|
7738 |
|
|
|
7739 |
/**
|
|
|
7740 |
* Performs a deep copy on <i>other</i>.
|
|
|
7741 |
*/
|
|
|
7742 |
public getEmiDiscount_args(getEmiDiscount_args other) {
|
|
|
7743 |
__isset_bit_vector.clear();
|
|
|
7744 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
7745 |
this.cartId = other.cartId;
|
|
|
7746 |
}
|
|
|
7747 |
|
|
|
7748 |
public getEmiDiscount_args deepCopy() {
|
|
|
7749 |
return new getEmiDiscount_args(this);
|
|
|
7750 |
}
|
|
|
7751 |
|
|
|
7752 |
@Override
|
|
|
7753 |
public void clear() {
|
|
|
7754 |
setCartIdIsSet(false);
|
|
|
7755 |
this.cartId = 0;
|
|
|
7756 |
}
|
|
|
7757 |
|
|
|
7758 |
public long getCartId() {
|
|
|
7759 |
return this.cartId;
|
|
|
7760 |
}
|
|
|
7761 |
|
|
|
7762 |
public void setCartId(long cartId) {
|
|
|
7763 |
this.cartId = cartId;
|
|
|
7764 |
setCartIdIsSet(true);
|
|
|
7765 |
}
|
|
|
7766 |
|
|
|
7767 |
public void unsetCartId() {
|
|
|
7768 |
__isset_bit_vector.clear(__CARTID_ISSET_ID);
|
|
|
7769 |
}
|
|
|
7770 |
|
|
|
7771 |
/** Returns true if field cartId is set (has been assigned a value) and false otherwise */
|
|
|
7772 |
public boolean isSetCartId() {
|
|
|
7773 |
return __isset_bit_vector.get(__CARTID_ISSET_ID);
|
|
|
7774 |
}
|
|
|
7775 |
|
|
|
7776 |
public void setCartIdIsSet(boolean value) {
|
|
|
7777 |
__isset_bit_vector.set(__CARTID_ISSET_ID, value);
|
|
|
7778 |
}
|
|
|
7779 |
|
|
|
7780 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
7781 |
switch (field) {
|
|
|
7782 |
case CART_ID:
|
|
|
7783 |
if (value == null) {
|
|
|
7784 |
unsetCartId();
|
|
|
7785 |
} else {
|
|
|
7786 |
setCartId((Long)value);
|
|
|
7787 |
}
|
|
|
7788 |
break;
|
|
|
7789 |
|
|
|
7790 |
}
|
|
|
7791 |
}
|
|
|
7792 |
|
|
|
7793 |
public Object getFieldValue(_Fields field) {
|
|
|
7794 |
switch (field) {
|
|
|
7795 |
case CART_ID:
|
|
|
7796 |
return Long.valueOf(getCartId());
|
|
|
7797 |
|
|
|
7798 |
}
|
|
|
7799 |
throw new IllegalStateException();
|
|
|
7800 |
}
|
|
|
7801 |
|
|
|
7802 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
7803 |
public boolean isSet(_Fields field) {
|
|
|
7804 |
if (field == null) {
|
|
|
7805 |
throw new IllegalArgumentException();
|
|
|
7806 |
}
|
|
|
7807 |
|
|
|
7808 |
switch (field) {
|
|
|
7809 |
case CART_ID:
|
|
|
7810 |
return isSetCartId();
|
|
|
7811 |
}
|
|
|
7812 |
throw new IllegalStateException();
|
|
|
7813 |
}
|
|
|
7814 |
|
|
|
7815 |
@Override
|
|
|
7816 |
public boolean equals(Object that) {
|
|
|
7817 |
if (that == null)
|
|
|
7818 |
return false;
|
|
|
7819 |
if (that instanceof getEmiDiscount_args)
|
|
|
7820 |
return this.equals((getEmiDiscount_args)that);
|
|
|
7821 |
return false;
|
|
|
7822 |
}
|
|
|
7823 |
|
|
|
7824 |
public boolean equals(getEmiDiscount_args that) {
|
|
|
7825 |
if (that == null)
|
|
|
7826 |
return false;
|
|
|
7827 |
|
|
|
7828 |
boolean this_present_cartId = true;
|
|
|
7829 |
boolean that_present_cartId = true;
|
|
|
7830 |
if (this_present_cartId || that_present_cartId) {
|
|
|
7831 |
if (!(this_present_cartId && that_present_cartId))
|
|
|
7832 |
return false;
|
|
|
7833 |
if (this.cartId != that.cartId)
|
|
|
7834 |
return false;
|
|
|
7835 |
}
|
|
|
7836 |
|
|
|
7837 |
return true;
|
|
|
7838 |
}
|
|
|
7839 |
|
|
|
7840 |
@Override
|
|
|
7841 |
public int hashCode() {
|
|
|
7842 |
return 0;
|
|
|
7843 |
}
|
|
|
7844 |
|
|
|
7845 |
public int compareTo(getEmiDiscount_args other) {
|
|
|
7846 |
if (!getClass().equals(other.getClass())) {
|
|
|
7847 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
7848 |
}
|
|
|
7849 |
|
|
|
7850 |
int lastComparison = 0;
|
|
|
7851 |
getEmiDiscount_args typedOther = (getEmiDiscount_args)other;
|
|
|
7852 |
|
|
|
7853 |
lastComparison = Boolean.valueOf(isSetCartId()).compareTo(typedOther.isSetCartId());
|
|
|
7854 |
if (lastComparison != 0) {
|
|
|
7855 |
return lastComparison;
|
|
|
7856 |
}
|
|
|
7857 |
if (isSetCartId()) {
|
|
|
7858 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cartId, typedOther.cartId);
|
|
|
7859 |
if (lastComparison != 0) {
|
|
|
7860 |
return lastComparison;
|
|
|
7861 |
}
|
|
|
7862 |
}
|
|
|
7863 |
return 0;
|
|
|
7864 |
}
|
|
|
7865 |
|
|
|
7866 |
public _Fields fieldForId(int fieldId) {
|
|
|
7867 |
return _Fields.findByThriftId(fieldId);
|
|
|
7868 |
}
|
|
|
7869 |
|
|
|
7870 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
7871 |
org.apache.thrift.protocol.TField field;
|
|
|
7872 |
iprot.readStructBegin();
|
|
|
7873 |
while (true)
|
|
|
7874 |
{
|
|
|
7875 |
field = iprot.readFieldBegin();
|
|
|
7876 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
7877 |
break;
|
|
|
7878 |
}
|
|
|
7879 |
switch (field.id) {
|
|
|
7880 |
case 1: // CART_ID
|
|
|
7881 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
7882 |
this.cartId = iprot.readI64();
|
|
|
7883 |
setCartIdIsSet(true);
|
|
|
7884 |
} else {
|
|
|
7885 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
7886 |
}
|
|
|
7887 |
break;
|
|
|
7888 |
default:
|
|
|
7889 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
7890 |
}
|
|
|
7891 |
iprot.readFieldEnd();
|
|
|
7892 |
}
|
|
|
7893 |
iprot.readStructEnd();
|
|
|
7894 |
validate();
|
|
|
7895 |
}
|
|
|
7896 |
|
|
|
7897 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
7898 |
validate();
|
|
|
7899 |
|
|
|
7900 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
7901 |
oprot.writeFieldBegin(CART_ID_FIELD_DESC);
|
|
|
7902 |
oprot.writeI64(this.cartId);
|
|
|
7903 |
oprot.writeFieldEnd();
|
|
|
7904 |
oprot.writeFieldStop();
|
|
|
7905 |
oprot.writeStructEnd();
|
|
|
7906 |
}
|
|
|
7907 |
|
|
|
7908 |
@Override
|
|
|
7909 |
public String toString() {
|
|
|
7910 |
StringBuilder sb = new StringBuilder("getEmiDiscount_args(");
|
|
|
7911 |
boolean first = true;
|
|
|
7912 |
|
|
|
7913 |
sb.append("cartId:");
|
|
|
7914 |
sb.append(this.cartId);
|
|
|
7915 |
first = false;
|
|
|
7916 |
sb.append(")");
|
|
|
7917 |
return sb.toString();
|
|
|
7918 |
}
|
|
|
7919 |
|
|
|
7920 |
public void validate() throws org.apache.thrift.TException {
|
|
|
7921 |
// check for required fields
|
|
|
7922 |
}
|
|
|
7923 |
|
|
|
7924 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
7925 |
try {
|
|
|
7926 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
7927 |
} catch (org.apache.thrift.TException te) {
|
|
|
7928 |
throw new java.io.IOException(te);
|
|
|
7929 |
}
|
|
|
7930 |
}
|
|
|
7931 |
|
|
|
7932 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
7933 |
try {
|
|
|
7934 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
7935 |
__isset_bit_vector = new BitSet(1);
|
|
|
7936 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
7937 |
} catch (org.apache.thrift.TException te) {
|
|
|
7938 |
throw new java.io.IOException(te);
|
|
|
7939 |
}
|
|
|
7940 |
}
|
|
|
7941 |
|
|
|
7942 |
}
|
|
|
7943 |
|
|
|
7944 |
public static class getEmiDiscount_result implements org.apache.thrift.TBase<getEmiDiscount_result, getEmiDiscount_result._Fields>, java.io.Serializable, Cloneable {
|
|
|
7945 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getEmiDiscount_result");
|
|
|
7946 |
|
|
|
7947 |
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0);
|
|
|
7948 |
private static final org.apache.thrift.protocol.TField PEX_FIELD_DESC = new org.apache.thrift.protocol.TField("pex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
|
|
|
7949 |
|
|
|
7950 |
private Map<Long,Double> success; // required
|
|
|
7951 |
private PromotionException pex; // required
|
|
|
7952 |
|
|
|
7953 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
7954 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
7955 |
SUCCESS((short)0, "success"),
|
|
|
7956 |
PEX((short)1, "pex");
|
|
|
7957 |
|
|
|
7958 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
7959 |
|
|
|
7960 |
static {
|
|
|
7961 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
7962 |
byName.put(field.getFieldName(), field);
|
|
|
7963 |
}
|
|
|
7964 |
}
|
|
|
7965 |
|
|
|
7966 |
/**
|
|
|
7967 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
7968 |
*/
|
|
|
7969 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
7970 |
switch(fieldId) {
|
|
|
7971 |
case 0: // SUCCESS
|
|
|
7972 |
return SUCCESS;
|
|
|
7973 |
case 1: // PEX
|
|
|
7974 |
return PEX;
|
|
|
7975 |
default:
|
|
|
7976 |
return null;
|
|
|
7977 |
}
|
|
|
7978 |
}
|
|
|
7979 |
|
|
|
7980 |
/**
|
|
|
7981 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
7982 |
* if it is not found.
|
|
|
7983 |
*/
|
|
|
7984 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
7985 |
_Fields fields = findByThriftId(fieldId);
|
|
|
7986 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
7987 |
return fields;
|
|
|
7988 |
}
|
|
|
7989 |
|
|
|
7990 |
/**
|
|
|
7991 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
7992 |
*/
|
|
|
7993 |
public static _Fields findByName(String name) {
|
|
|
7994 |
return byName.get(name);
|
|
|
7995 |
}
|
|
|
7996 |
|
|
|
7997 |
private final short _thriftId;
|
|
|
7998 |
private final String _fieldName;
|
|
|
7999 |
|
|
|
8000 |
_Fields(short thriftId, String fieldName) {
|
|
|
8001 |
_thriftId = thriftId;
|
|
|
8002 |
_fieldName = fieldName;
|
|
|
8003 |
}
|
|
|
8004 |
|
|
|
8005 |
public short getThriftFieldId() {
|
|
|
8006 |
return _thriftId;
|
|
|
8007 |
}
|
|
|
8008 |
|
|
|
8009 |
public String getFieldName() {
|
|
|
8010 |
return _fieldName;
|
|
|
8011 |
}
|
|
|
8012 |
}
|
|
|
8013 |
|
|
|
8014 |
// isset id assignments
|
|
|
8015 |
|
|
|
8016 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
8017 |
static {
|
|
|
8018 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
8019 |
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
8020 |
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
|
|
|
8021 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64),
|
|
|
8022 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))));
|
|
|
8023 |
tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
8024 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
|
|
|
8025 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
8026 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getEmiDiscount_result.class, metaDataMap);
|
|
|
8027 |
}
|
|
|
8028 |
|
|
|
8029 |
public getEmiDiscount_result() {
|
|
|
8030 |
}
|
|
|
8031 |
|
|
|
8032 |
public getEmiDiscount_result(
|
|
|
8033 |
Map<Long,Double> success,
|
|
|
8034 |
PromotionException pex)
|
|
|
8035 |
{
|
|
|
8036 |
this();
|
|
|
8037 |
this.success = success;
|
|
|
8038 |
this.pex = pex;
|
|
|
8039 |
}
|
|
|
8040 |
|
|
|
8041 |
/**
|
|
|
8042 |
* Performs a deep copy on <i>other</i>.
|
|
|
8043 |
*/
|
|
|
8044 |
public getEmiDiscount_result(getEmiDiscount_result other) {
|
|
|
8045 |
if (other.isSetSuccess()) {
|
|
|
8046 |
Map<Long,Double> __this__success = new HashMap<Long,Double>();
|
|
|
8047 |
for (Map.Entry<Long, Double> other_element : other.success.entrySet()) {
|
|
|
8048 |
|
|
|
8049 |
Long other_element_key = other_element.getKey();
|
|
|
8050 |
Double other_element_value = other_element.getValue();
|
|
|
8051 |
|
|
|
8052 |
Long __this__success_copy_key = other_element_key;
|
|
|
8053 |
|
|
|
8054 |
Double __this__success_copy_value = other_element_value;
|
|
|
8055 |
|
|
|
8056 |
__this__success.put(__this__success_copy_key, __this__success_copy_value);
|
|
|
8057 |
}
|
|
|
8058 |
this.success = __this__success;
|
|
|
8059 |
}
|
|
|
8060 |
if (other.isSetPex()) {
|
|
|
8061 |
this.pex = new PromotionException(other.pex);
|
|
|
8062 |
}
|
|
|
8063 |
}
|
|
|
8064 |
|
|
|
8065 |
public getEmiDiscount_result deepCopy() {
|
|
|
8066 |
return new getEmiDiscount_result(this);
|
|
|
8067 |
}
|
|
|
8068 |
|
|
|
8069 |
@Override
|
|
|
8070 |
public void clear() {
|
|
|
8071 |
this.success = null;
|
|
|
8072 |
this.pex = null;
|
|
|
8073 |
}
|
|
|
8074 |
|
|
|
8075 |
public int getSuccessSize() {
|
|
|
8076 |
return (this.success == null) ? 0 : this.success.size();
|
|
|
8077 |
}
|
|
|
8078 |
|
|
|
8079 |
public void putToSuccess(long key, double val) {
|
|
|
8080 |
if (this.success == null) {
|
|
|
8081 |
this.success = new HashMap<Long,Double>();
|
|
|
8082 |
}
|
|
|
8083 |
this.success.put(key, val);
|
|
|
8084 |
}
|
|
|
8085 |
|
|
|
8086 |
public Map<Long,Double> getSuccess() {
|
|
|
8087 |
return this.success;
|
|
|
8088 |
}
|
|
|
8089 |
|
|
|
8090 |
public void setSuccess(Map<Long,Double> success) {
|
|
|
8091 |
this.success = success;
|
|
|
8092 |
}
|
|
|
8093 |
|
|
|
8094 |
public void unsetSuccess() {
|
|
|
8095 |
this.success = null;
|
|
|
8096 |
}
|
|
|
8097 |
|
|
|
8098 |
/** Returns true if field success is set (has been assigned a value) and false otherwise */
|
|
|
8099 |
public boolean isSetSuccess() {
|
|
|
8100 |
return this.success != null;
|
|
|
8101 |
}
|
|
|
8102 |
|
|
|
8103 |
public void setSuccessIsSet(boolean value) {
|
|
|
8104 |
if (!value) {
|
|
|
8105 |
this.success = null;
|
|
|
8106 |
}
|
|
|
8107 |
}
|
|
|
8108 |
|
|
|
8109 |
public PromotionException getPex() {
|
|
|
8110 |
return this.pex;
|
|
|
8111 |
}
|
|
|
8112 |
|
|
|
8113 |
public void setPex(PromotionException pex) {
|
|
|
8114 |
this.pex = pex;
|
|
|
8115 |
}
|
|
|
8116 |
|
|
|
8117 |
public void unsetPex() {
|
|
|
8118 |
this.pex = null;
|
|
|
8119 |
}
|
|
|
8120 |
|
|
|
8121 |
/** Returns true if field pex is set (has been assigned a value) and false otherwise */
|
|
|
8122 |
public boolean isSetPex() {
|
|
|
8123 |
return this.pex != null;
|
|
|
8124 |
}
|
|
|
8125 |
|
|
|
8126 |
public void setPexIsSet(boolean value) {
|
|
|
8127 |
if (!value) {
|
|
|
8128 |
this.pex = null;
|
|
|
8129 |
}
|
|
|
8130 |
}
|
|
|
8131 |
|
|
|
8132 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
8133 |
switch (field) {
|
|
|
8134 |
case SUCCESS:
|
|
|
8135 |
if (value == null) {
|
|
|
8136 |
unsetSuccess();
|
|
|
8137 |
} else {
|
|
|
8138 |
setSuccess((Map<Long,Double>)value);
|
|
|
8139 |
}
|
|
|
8140 |
break;
|
|
|
8141 |
|
|
|
8142 |
case PEX:
|
|
|
8143 |
if (value == null) {
|
|
|
8144 |
unsetPex();
|
|
|
8145 |
} else {
|
|
|
8146 |
setPex((PromotionException)value);
|
|
|
8147 |
}
|
|
|
8148 |
break;
|
|
|
8149 |
|
|
|
8150 |
}
|
|
|
8151 |
}
|
|
|
8152 |
|
|
|
8153 |
public Object getFieldValue(_Fields field) {
|
|
|
8154 |
switch (field) {
|
|
|
8155 |
case SUCCESS:
|
|
|
8156 |
return getSuccess();
|
|
|
8157 |
|
|
|
8158 |
case PEX:
|
|
|
8159 |
return getPex();
|
|
|
8160 |
|
|
|
8161 |
}
|
|
|
8162 |
throw new IllegalStateException();
|
|
|
8163 |
}
|
|
|
8164 |
|
|
|
8165 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
8166 |
public boolean isSet(_Fields field) {
|
|
|
8167 |
if (field == null) {
|
|
|
8168 |
throw new IllegalArgumentException();
|
|
|
8169 |
}
|
|
|
8170 |
|
|
|
8171 |
switch (field) {
|
|
|
8172 |
case SUCCESS:
|
|
|
8173 |
return isSetSuccess();
|
|
|
8174 |
case PEX:
|
|
|
8175 |
return isSetPex();
|
|
|
8176 |
}
|
|
|
8177 |
throw new IllegalStateException();
|
|
|
8178 |
}
|
|
|
8179 |
|
|
|
8180 |
@Override
|
|
|
8181 |
public boolean equals(Object that) {
|
|
|
8182 |
if (that == null)
|
|
|
8183 |
return false;
|
|
|
8184 |
if (that instanceof getEmiDiscount_result)
|
|
|
8185 |
return this.equals((getEmiDiscount_result)that);
|
|
|
8186 |
return false;
|
|
|
8187 |
}
|
|
|
8188 |
|
|
|
8189 |
public boolean equals(getEmiDiscount_result that) {
|
|
|
8190 |
if (that == null)
|
|
|
8191 |
return false;
|
|
|
8192 |
|
|
|
8193 |
boolean this_present_success = true && this.isSetSuccess();
|
|
|
8194 |
boolean that_present_success = true && that.isSetSuccess();
|
|
|
8195 |
if (this_present_success || that_present_success) {
|
|
|
8196 |
if (!(this_present_success && that_present_success))
|
|
|
8197 |
return false;
|
|
|
8198 |
if (!this.success.equals(that.success))
|
|
|
8199 |
return false;
|
|
|
8200 |
}
|
|
|
8201 |
|
|
|
8202 |
boolean this_present_pex = true && this.isSetPex();
|
|
|
8203 |
boolean that_present_pex = true && that.isSetPex();
|
|
|
8204 |
if (this_present_pex || that_present_pex) {
|
|
|
8205 |
if (!(this_present_pex && that_present_pex))
|
|
|
8206 |
return false;
|
|
|
8207 |
if (!this.pex.equals(that.pex))
|
|
|
8208 |
return false;
|
|
|
8209 |
}
|
|
|
8210 |
|
|
|
8211 |
return true;
|
|
|
8212 |
}
|
|
|
8213 |
|
|
|
8214 |
@Override
|
|
|
8215 |
public int hashCode() {
|
|
|
8216 |
return 0;
|
|
|
8217 |
}
|
|
|
8218 |
|
|
|
8219 |
public int compareTo(getEmiDiscount_result other) {
|
|
|
8220 |
if (!getClass().equals(other.getClass())) {
|
|
|
8221 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
8222 |
}
|
|
|
8223 |
|
|
|
8224 |
int lastComparison = 0;
|
|
|
8225 |
getEmiDiscount_result typedOther = (getEmiDiscount_result)other;
|
|
|
8226 |
|
|
|
8227 |
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
|
|
|
8228 |
if (lastComparison != 0) {
|
|
|
8229 |
return lastComparison;
|
|
|
8230 |
}
|
|
|
8231 |
if (isSetSuccess()) {
|
|
|
8232 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
|
|
|
8233 |
if (lastComparison != 0) {
|
|
|
8234 |
return lastComparison;
|
|
|
8235 |
}
|
|
|
8236 |
}
|
|
|
8237 |
lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
|
|
|
8238 |
if (lastComparison != 0) {
|
|
|
8239 |
return lastComparison;
|
|
|
8240 |
}
|
|
|
8241 |
if (isSetPex()) {
|
|
|
8242 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
|
|
|
8243 |
if (lastComparison != 0) {
|
|
|
8244 |
return lastComparison;
|
|
|
8245 |
}
|
|
|
8246 |
}
|
|
|
8247 |
return 0;
|
|
|
8248 |
}
|
|
|
8249 |
|
|
|
8250 |
public _Fields fieldForId(int fieldId) {
|
|
|
8251 |
return _Fields.findByThriftId(fieldId);
|
|
|
8252 |
}
|
|
|
8253 |
|
|
|
8254 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
8255 |
org.apache.thrift.protocol.TField field;
|
|
|
8256 |
iprot.readStructBegin();
|
|
|
8257 |
while (true)
|
|
|
8258 |
{
|
|
|
8259 |
field = iprot.readFieldBegin();
|
|
|
8260 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
8261 |
break;
|
|
|
8262 |
}
|
|
|
8263 |
switch (field.id) {
|
|
|
8264 |
case 0: // SUCCESS
|
|
|
8265 |
if (field.type == org.apache.thrift.protocol.TType.MAP) {
|
|
|
8266 |
{
|
|
|
8267 |
org.apache.thrift.protocol.TMap _map16 = iprot.readMapBegin();
|
|
|
8268 |
this.success = new HashMap<Long,Double>(2*_map16.size);
|
|
|
8269 |
for (int _i17 = 0; _i17 < _map16.size; ++_i17)
|
|
|
8270 |
{
|
|
|
8271 |
long _key18; // required
|
|
|
8272 |
double _val19; // required
|
|
|
8273 |
_key18 = iprot.readI64();
|
|
|
8274 |
_val19 = iprot.readDouble();
|
|
|
8275 |
this.success.put(_key18, _val19);
|
|
|
8276 |
}
|
|
|
8277 |
iprot.readMapEnd();
|
|
|
8278 |
}
|
|
|
8279 |
} else {
|
|
|
8280 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
8281 |
}
|
|
|
8282 |
break;
|
|
|
8283 |
case 1: // PEX
|
|
|
8284 |
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
|
|
8285 |
this.pex = new PromotionException();
|
|
|
8286 |
this.pex.read(iprot);
|
|
|
8287 |
} else {
|
|
|
8288 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
8289 |
}
|
|
|
8290 |
break;
|
|
|
8291 |
default:
|
|
|
8292 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
8293 |
}
|
|
|
8294 |
iprot.readFieldEnd();
|
|
|
8295 |
}
|
|
|
8296 |
iprot.readStructEnd();
|
|
|
8297 |
validate();
|
|
|
8298 |
}
|
|
|
8299 |
|
|
|
8300 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
8301 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
8302 |
|
|
|
8303 |
if (this.isSetSuccess()) {
|
|
|
8304 |
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
|
|
8305 |
{
|
|
|
8306 |
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.DOUBLE, this.success.size()));
|
|
|
8307 |
for (Map.Entry<Long, Double> _iter20 : this.success.entrySet())
|
|
|
8308 |
{
|
|
|
8309 |
oprot.writeI64(_iter20.getKey());
|
|
|
8310 |
oprot.writeDouble(_iter20.getValue());
|
|
|
8311 |
}
|
|
|
8312 |
oprot.writeMapEnd();
|
|
|
8313 |
}
|
|
|
8314 |
oprot.writeFieldEnd();
|
|
|
8315 |
} else if (this.isSetPex()) {
|
|
|
8316 |
oprot.writeFieldBegin(PEX_FIELD_DESC);
|
|
|
8317 |
this.pex.write(oprot);
|
|
|
8318 |
oprot.writeFieldEnd();
|
|
|
8319 |
}
|
|
|
8320 |
oprot.writeFieldStop();
|
|
|
8321 |
oprot.writeStructEnd();
|
|
|
8322 |
}
|
|
|
8323 |
|
|
|
8324 |
@Override
|
|
|
8325 |
public String toString() {
|
|
|
8326 |
StringBuilder sb = new StringBuilder("getEmiDiscount_result(");
|
|
|
8327 |
boolean first = true;
|
|
|
8328 |
|
|
|
8329 |
sb.append("success:");
|
|
|
8330 |
if (this.success == null) {
|
|
|
8331 |
sb.append("null");
|
|
|
8332 |
} else {
|
|
|
8333 |
sb.append(this.success);
|
|
|
8334 |
}
|
|
|
8335 |
first = false;
|
|
|
8336 |
if (!first) sb.append(", ");
|
|
|
8337 |
sb.append("pex:");
|
|
|
8338 |
if (this.pex == null) {
|
|
|
8339 |
sb.append("null");
|
|
|
8340 |
} else {
|
|
|
8341 |
sb.append(this.pex);
|
|
|
8342 |
}
|
|
|
8343 |
first = false;
|
|
|
8344 |
sb.append(")");
|
|
|
8345 |
return sb.toString();
|
|
|
8346 |
}
|
|
|
8347 |
|
|
|
8348 |
public void validate() throws org.apache.thrift.TException {
|
|
|
8349 |
// check for required fields
|
|
|
8350 |
}
|
|
|
8351 |
|
|
|
8352 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
8353 |
try {
|
|
|
8354 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
8355 |
} catch (org.apache.thrift.TException te) {
|
|
|
8356 |
throw new java.io.IOException(te);
|
|
|
8357 |
}
|
|
|
8358 |
}
|
|
|
8359 |
|
|
|
8360 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
8361 |
try {
|
|
|
8362 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
8363 |
} catch (org.apache.thrift.TException te) {
|
|
|
8364 |
throw new java.io.IOException(te);
|
|
|
8365 |
}
|
|
|
8366 |
}
|
|
|
8367 |
|
|
|
8368 |
}
|
|
|
8369 |
|
| 6433 |
anupam.sin |
8370 |
public static class applyRechargeCoupon_args implements org.apache.thrift.TBase<applyRechargeCoupon_args, applyRechargeCoupon_args._Fields>, java.io.Serializable, Cloneable {
|
|
|
8371 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("applyRechargeCoupon_args");
|
|
|
8372 |
|
|
|
8373 |
private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCode", org.apache.thrift.protocol.TType.STRING, (short)1);
|
|
|
8374 |
private static final org.apache.thrift.protocol.TField TOTAL_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("totalAmount", org.apache.thrift.protocol.TType.I64, (short)2);
|
|
|
8375 |
private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)3);
|
|
|
8376 |
|
|
|
8377 |
private String couponCode; // required
|
|
|
8378 |
private long totalAmount; // required
|
|
|
8379 |
private long userId; // required
|
|
|
8380 |
|
|
|
8381 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
8382 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
8383 |
COUPON_CODE((short)1, "couponCode"),
|
|
|
8384 |
TOTAL_AMOUNT((short)2, "totalAmount"),
|
|
|
8385 |
USER_ID((short)3, "userId");
|
|
|
8386 |
|
|
|
8387 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
8388 |
|
|
|
8389 |
static {
|
|
|
8390 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
8391 |
byName.put(field.getFieldName(), field);
|
|
|
8392 |
}
|
|
|
8393 |
}
|
|
|
8394 |
|
|
|
8395 |
/**
|
|
|
8396 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
8397 |
*/
|
|
|
8398 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
8399 |
switch(fieldId) {
|
|
|
8400 |
case 1: // COUPON_CODE
|
|
|
8401 |
return COUPON_CODE;
|
|
|
8402 |
case 2: // TOTAL_AMOUNT
|
|
|
8403 |
return TOTAL_AMOUNT;
|
|
|
8404 |
case 3: // USER_ID
|
|
|
8405 |
return USER_ID;
|
|
|
8406 |
default:
|
|
|
8407 |
return null;
|
|
|
8408 |
}
|
|
|
8409 |
}
|
|
|
8410 |
|
|
|
8411 |
/**
|
|
|
8412 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
8413 |
* if it is not found.
|
|
|
8414 |
*/
|
|
|
8415 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
8416 |
_Fields fields = findByThriftId(fieldId);
|
|
|
8417 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
8418 |
return fields;
|
|
|
8419 |
}
|
|
|
8420 |
|
|
|
8421 |
/**
|
|
|
8422 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
8423 |
*/
|
|
|
8424 |
public static _Fields findByName(String name) {
|
|
|
8425 |
return byName.get(name);
|
|
|
8426 |
}
|
|
|
8427 |
|
|
|
8428 |
private final short _thriftId;
|
|
|
8429 |
private final String _fieldName;
|
|
|
8430 |
|
|
|
8431 |
_Fields(short thriftId, String fieldName) {
|
|
|
8432 |
_thriftId = thriftId;
|
|
|
8433 |
_fieldName = fieldName;
|
|
|
8434 |
}
|
|
|
8435 |
|
|
|
8436 |
public short getThriftFieldId() {
|
|
|
8437 |
return _thriftId;
|
|
|
8438 |
}
|
|
|
8439 |
|
|
|
8440 |
public String getFieldName() {
|
|
|
8441 |
return _fieldName;
|
|
|
8442 |
}
|
|
|
8443 |
}
|
|
|
8444 |
|
|
|
8445 |
// isset id assignments
|
|
|
8446 |
private static final int __TOTALAMOUNT_ISSET_ID = 0;
|
|
|
8447 |
private static final int __USERID_ISSET_ID = 1;
|
|
|
8448 |
private BitSet __isset_bit_vector = new BitSet(2);
|
|
|
8449 |
|
|
|
8450 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
8451 |
static {
|
|
|
8452 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
8453 |
tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
8454 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
8455 |
tmpMap.put(_Fields.TOTAL_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("totalAmount", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
8456 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
8457 |
tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
8458 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
8459 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
8460 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(applyRechargeCoupon_args.class, metaDataMap);
|
|
|
8461 |
}
|
|
|
8462 |
|
|
|
8463 |
public applyRechargeCoupon_args() {
|
|
|
8464 |
}
|
|
|
8465 |
|
|
|
8466 |
public applyRechargeCoupon_args(
|
|
|
8467 |
String couponCode,
|
|
|
8468 |
long totalAmount,
|
|
|
8469 |
long userId)
|
|
|
8470 |
{
|
|
|
8471 |
this();
|
|
|
8472 |
this.couponCode = couponCode;
|
|
|
8473 |
this.totalAmount = totalAmount;
|
|
|
8474 |
setTotalAmountIsSet(true);
|
|
|
8475 |
this.userId = userId;
|
|
|
8476 |
setUserIdIsSet(true);
|
|
|
8477 |
}
|
|
|
8478 |
|
|
|
8479 |
/**
|
|
|
8480 |
* Performs a deep copy on <i>other</i>.
|
|
|
8481 |
*/
|
|
|
8482 |
public applyRechargeCoupon_args(applyRechargeCoupon_args other) {
|
|
|
8483 |
__isset_bit_vector.clear();
|
|
|
8484 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
8485 |
if (other.isSetCouponCode()) {
|
|
|
8486 |
this.couponCode = other.couponCode;
|
|
|
8487 |
}
|
|
|
8488 |
this.totalAmount = other.totalAmount;
|
|
|
8489 |
this.userId = other.userId;
|
|
|
8490 |
}
|
|
|
8491 |
|
|
|
8492 |
public applyRechargeCoupon_args deepCopy() {
|
|
|
8493 |
return new applyRechargeCoupon_args(this);
|
|
|
8494 |
}
|
|
|
8495 |
|
|
|
8496 |
@Override
|
|
|
8497 |
public void clear() {
|
|
|
8498 |
this.couponCode = null;
|
|
|
8499 |
setTotalAmountIsSet(false);
|
|
|
8500 |
this.totalAmount = 0;
|
|
|
8501 |
setUserIdIsSet(false);
|
|
|
8502 |
this.userId = 0;
|
|
|
8503 |
}
|
|
|
8504 |
|
|
|
8505 |
public String getCouponCode() {
|
|
|
8506 |
return this.couponCode;
|
|
|
8507 |
}
|
|
|
8508 |
|
|
|
8509 |
public void setCouponCode(String couponCode) {
|
|
|
8510 |
this.couponCode = couponCode;
|
|
|
8511 |
}
|
|
|
8512 |
|
|
|
8513 |
public void unsetCouponCode() {
|
|
|
8514 |
this.couponCode = null;
|
|
|
8515 |
}
|
|
|
8516 |
|
|
|
8517 |
/** Returns true if field couponCode is set (has been assigned a value) and false otherwise */
|
|
|
8518 |
public boolean isSetCouponCode() {
|
|
|
8519 |
return this.couponCode != null;
|
|
|
8520 |
}
|
|
|
8521 |
|
|
|
8522 |
public void setCouponCodeIsSet(boolean value) {
|
|
|
8523 |
if (!value) {
|
|
|
8524 |
this.couponCode = null;
|
|
|
8525 |
}
|
|
|
8526 |
}
|
|
|
8527 |
|
|
|
8528 |
public long getTotalAmount() {
|
|
|
8529 |
return this.totalAmount;
|
|
|
8530 |
}
|
|
|
8531 |
|
|
|
8532 |
public void setTotalAmount(long totalAmount) {
|
|
|
8533 |
this.totalAmount = totalAmount;
|
|
|
8534 |
setTotalAmountIsSet(true);
|
|
|
8535 |
}
|
|
|
8536 |
|
|
|
8537 |
public void unsetTotalAmount() {
|
|
|
8538 |
__isset_bit_vector.clear(__TOTALAMOUNT_ISSET_ID);
|
|
|
8539 |
}
|
|
|
8540 |
|
|
|
8541 |
/** Returns true if field totalAmount is set (has been assigned a value) and false otherwise */
|
|
|
8542 |
public boolean isSetTotalAmount() {
|
|
|
8543 |
return __isset_bit_vector.get(__TOTALAMOUNT_ISSET_ID);
|
|
|
8544 |
}
|
|
|
8545 |
|
|
|
8546 |
public void setTotalAmountIsSet(boolean value) {
|
|
|
8547 |
__isset_bit_vector.set(__TOTALAMOUNT_ISSET_ID, value);
|
|
|
8548 |
}
|
|
|
8549 |
|
|
|
8550 |
public long getUserId() {
|
|
|
8551 |
return this.userId;
|
|
|
8552 |
}
|
|
|
8553 |
|
|
|
8554 |
public void setUserId(long userId) {
|
|
|
8555 |
this.userId = userId;
|
|
|
8556 |
setUserIdIsSet(true);
|
|
|
8557 |
}
|
|
|
8558 |
|
|
|
8559 |
public void unsetUserId() {
|
|
|
8560 |
__isset_bit_vector.clear(__USERID_ISSET_ID);
|
|
|
8561 |
}
|
|
|
8562 |
|
|
|
8563 |
/** Returns true if field userId is set (has been assigned a value) and false otherwise */
|
|
|
8564 |
public boolean isSetUserId() {
|
|
|
8565 |
return __isset_bit_vector.get(__USERID_ISSET_ID);
|
|
|
8566 |
}
|
|
|
8567 |
|
|
|
8568 |
public void setUserIdIsSet(boolean value) {
|
|
|
8569 |
__isset_bit_vector.set(__USERID_ISSET_ID, value);
|
|
|
8570 |
}
|
|
|
8571 |
|
|
|
8572 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
8573 |
switch (field) {
|
|
|
8574 |
case COUPON_CODE:
|
|
|
8575 |
if (value == null) {
|
|
|
8576 |
unsetCouponCode();
|
|
|
8577 |
} else {
|
|
|
8578 |
setCouponCode((String)value);
|
|
|
8579 |
}
|
|
|
8580 |
break;
|
|
|
8581 |
|
|
|
8582 |
case TOTAL_AMOUNT:
|
|
|
8583 |
if (value == null) {
|
|
|
8584 |
unsetTotalAmount();
|
|
|
8585 |
} else {
|
|
|
8586 |
setTotalAmount((Long)value);
|
|
|
8587 |
}
|
|
|
8588 |
break;
|
|
|
8589 |
|
|
|
8590 |
case USER_ID:
|
|
|
8591 |
if (value == null) {
|
|
|
8592 |
unsetUserId();
|
|
|
8593 |
} else {
|
|
|
8594 |
setUserId((Long)value);
|
|
|
8595 |
}
|
|
|
8596 |
break;
|
|
|
8597 |
|
|
|
8598 |
}
|
|
|
8599 |
}
|
|
|
8600 |
|
|
|
8601 |
public Object getFieldValue(_Fields field) {
|
|
|
8602 |
switch (field) {
|
|
|
8603 |
case COUPON_CODE:
|
|
|
8604 |
return getCouponCode();
|
|
|
8605 |
|
|
|
8606 |
case TOTAL_AMOUNT:
|
|
|
8607 |
return Long.valueOf(getTotalAmount());
|
|
|
8608 |
|
|
|
8609 |
case USER_ID:
|
|
|
8610 |
return Long.valueOf(getUserId());
|
|
|
8611 |
|
|
|
8612 |
}
|
|
|
8613 |
throw new IllegalStateException();
|
|
|
8614 |
}
|
|
|
8615 |
|
|
|
8616 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
8617 |
public boolean isSet(_Fields field) {
|
|
|
8618 |
if (field == null) {
|
|
|
8619 |
throw new IllegalArgumentException();
|
|
|
8620 |
}
|
|
|
8621 |
|
|
|
8622 |
switch (field) {
|
|
|
8623 |
case COUPON_CODE:
|
|
|
8624 |
return isSetCouponCode();
|
|
|
8625 |
case TOTAL_AMOUNT:
|
|
|
8626 |
return isSetTotalAmount();
|
|
|
8627 |
case USER_ID:
|
|
|
8628 |
return isSetUserId();
|
|
|
8629 |
}
|
|
|
8630 |
throw new IllegalStateException();
|
|
|
8631 |
}
|
|
|
8632 |
|
|
|
8633 |
@Override
|
|
|
8634 |
public boolean equals(Object that) {
|
|
|
8635 |
if (that == null)
|
|
|
8636 |
return false;
|
|
|
8637 |
if (that instanceof applyRechargeCoupon_args)
|
|
|
8638 |
return this.equals((applyRechargeCoupon_args)that);
|
|
|
8639 |
return false;
|
|
|
8640 |
}
|
|
|
8641 |
|
|
|
8642 |
public boolean equals(applyRechargeCoupon_args that) {
|
|
|
8643 |
if (that == null)
|
|
|
8644 |
return false;
|
|
|
8645 |
|
|
|
8646 |
boolean this_present_couponCode = true && this.isSetCouponCode();
|
|
|
8647 |
boolean that_present_couponCode = true && that.isSetCouponCode();
|
|
|
8648 |
if (this_present_couponCode || that_present_couponCode) {
|
|
|
8649 |
if (!(this_present_couponCode && that_present_couponCode))
|
|
|
8650 |
return false;
|
|
|
8651 |
if (!this.couponCode.equals(that.couponCode))
|
|
|
8652 |
return false;
|
|
|
8653 |
}
|
|
|
8654 |
|
|
|
8655 |
boolean this_present_totalAmount = true;
|
|
|
8656 |
boolean that_present_totalAmount = true;
|
|
|
8657 |
if (this_present_totalAmount || that_present_totalAmount) {
|
|
|
8658 |
if (!(this_present_totalAmount && that_present_totalAmount))
|
|
|
8659 |
return false;
|
|
|
8660 |
if (this.totalAmount != that.totalAmount)
|
|
|
8661 |
return false;
|
|
|
8662 |
}
|
|
|
8663 |
|
|
|
8664 |
boolean this_present_userId = true;
|
|
|
8665 |
boolean that_present_userId = true;
|
|
|
8666 |
if (this_present_userId || that_present_userId) {
|
|
|
8667 |
if (!(this_present_userId && that_present_userId))
|
|
|
8668 |
return false;
|
|
|
8669 |
if (this.userId != that.userId)
|
|
|
8670 |
return false;
|
|
|
8671 |
}
|
|
|
8672 |
|
|
|
8673 |
return true;
|
|
|
8674 |
}
|
|
|
8675 |
|
|
|
8676 |
@Override
|
|
|
8677 |
public int hashCode() {
|
|
|
8678 |
return 0;
|
|
|
8679 |
}
|
|
|
8680 |
|
|
|
8681 |
public int compareTo(applyRechargeCoupon_args other) {
|
|
|
8682 |
if (!getClass().equals(other.getClass())) {
|
|
|
8683 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
8684 |
}
|
|
|
8685 |
|
|
|
8686 |
int lastComparison = 0;
|
|
|
8687 |
applyRechargeCoupon_args typedOther = (applyRechargeCoupon_args)other;
|
|
|
8688 |
|
|
|
8689 |
lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
|
|
|
8690 |
if (lastComparison != 0) {
|
|
|
8691 |
return lastComparison;
|
|
|
8692 |
}
|
|
|
8693 |
if (isSetCouponCode()) {
|
|
|
8694 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);
|
|
|
8695 |
if (lastComparison != 0) {
|
|
|
8696 |
return lastComparison;
|
|
|
8697 |
}
|
|
|
8698 |
}
|
|
|
8699 |
lastComparison = Boolean.valueOf(isSetTotalAmount()).compareTo(typedOther.isSetTotalAmount());
|
|
|
8700 |
if (lastComparison != 0) {
|
|
|
8701 |
return lastComparison;
|
|
|
8702 |
}
|
|
|
8703 |
if (isSetTotalAmount()) {
|
|
|
8704 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalAmount, typedOther.totalAmount);
|
|
|
8705 |
if (lastComparison != 0) {
|
|
|
8706 |
return lastComparison;
|
|
|
8707 |
}
|
|
|
8708 |
}
|
|
|
8709 |
lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
|
|
|
8710 |
if (lastComparison != 0) {
|
|
|
8711 |
return lastComparison;
|
|
|
8712 |
}
|
|
|
8713 |
if (isSetUserId()) {
|
|
|
8714 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
|
|
|
8715 |
if (lastComparison != 0) {
|
|
|
8716 |
return lastComparison;
|
|
|
8717 |
}
|
|
|
8718 |
}
|
|
|
8719 |
return 0;
|
|
|
8720 |
}
|
|
|
8721 |
|
|
|
8722 |
public _Fields fieldForId(int fieldId) {
|
|
|
8723 |
return _Fields.findByThriftId(fieldId);
|
|
|
8724 |
}
|
|
|
8725 |
|
|
|
8726 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
8727 |
org.apache.thrift.protocol.TField field;
|
|
|
8728 |
iprot.readStructBegin();
|
|
|
8729 |
while (true)
|
|
|
8730 |
{
|
|
|
8731 |
field = iprot.readFieldBegin();
|
|
|
8732 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
8733 |
break;
|
|
|
8734 |
}
|
|
|
8735 |
switch (field.id) {
|
|
|
8736 |
case 1: // COUPON_CODE
|
|
|
8737 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
8738 |
this.couponCode = iprot.readString();
|
|
|
8739 |
} else {
|
|
|
8740 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
8741 |
}
|
|
|
8742 |
break;
|
|
|
8743 |
case 2: // TOTAL_AMOUNT
|
|
|
8744 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
8745 |
this.totalAmount = iprot.readI64();
|
|
|
8746 |
setTotalAmountIsSet(true);
|
|
|
8747 |
} else {
|
|
|
8748 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
8749 |
}
|
|
|
8750 |
break;
|
|
|
8751 |
case 3: // USER_ID
|
|
|
8752 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
8753 |
this.userId = iprot.readI64();
|
|
|
8754 |
setUserIdIsSet(true);
|
|
|
8755 |
} else {
|
|
|
8756 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
8757 |
}
|
|
|
8758 |
break;
|
|
|
8759 |
default:
|
|
|
8760 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
8761 |
}
|
|
|
8762 |
iprot.readFieldEnd();
|
|
|
8763 |
}
|
|
|
8764 |
iprot.readStructEnd();
|
|
|
8765 |
validate();
|
|
|
8766 |
}
|
|
|
8767 |
|
|
|
8768 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
8769 |
validate();
|
|
|
8770 |
|
|
|
8771 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
8772 |
if (this.couponCode != null) {
|
|
|
8773 |
oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
|
|
|
8774 |
oprot.writeString(this.couponCode);
|
|
|
8775 |
oprot.writeFieldEnd();
|
|
|
8776 |
}
|
|
|
8777 |
oprot.writeFieldBegin(TOTAL_AMOUNT_FIELD_DESC);
|
|
|
8778 |
oprot.writeI64(this.totalAmount);
|
|
|
8779 |
oprot.writeFieldEnd();
|
|
|
8780 |
oprot.writeFieldBegin(USER_ID_FIELD_DESC);
|
|
|
8781 |
oprot.writeI64(this.userId);
|
|
|
8782 |
oprot.writeFieldEnd();
|
|
|
8783 |
oprot.writeFieldStop();
|
|
|
8784 |
oprot.writeStructEnd();
|
|
|
8785 |
}
|
|
|
8786 |
|
|
|
8787 |
@Override
|
|
|
8788 |
public String toString() {
|
|
|
8789 |
StringBuilder sb = new StringBuilder("applyRechargeCoupon_args(");
|
|
|
8790 |
boolean first = true;
|
|
|
8791 |
|
|
|
8792 |
sb.append("couponCode:");
|
|
|
8793 |
if (this.couponCode == null) {
|
|
|
8794 |
sb.append("null");
|
|
|
8795 |
} else {
|
|
|
8796 |
sb.append(this.couponCode);
|
|
|
8797 |
}
|
|
|
8798 |
first = false;
|
|
|
8799 |
if (!first) sb.append(", ");
|
|
|
8800 |
sb.append("totalAmount:");
|
|
|
8801 |
sb.append(this.totalAmount);
|
|
|
8802 |
first = false;
|
|
|
8803 |
if (!first) sb.append(", ");
|
|
|
8804 |
sb.append("userId:");
|
|
|
8805 |
sb.append(this.userId);
|
|
|
8806 |
first = false;
|
|
|
8807 |
sb.append(")");
|
|
|
8808 |
return sb.toString();
|
|
|
8809 |
}
|
|
|
8810 |
|
|
|
8811 |
public void validate() throws org.apache.thrift.TException {
|
|
|
8812 |
// check for required fields
|
|
|
8813 |
}
|
|
|
8814 |
|
|
|
8815 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
8816 |
try {
|
|
|
8817 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
8818 |
} catch (org.apache.thrift.TException te) {
|
|
|
8819 |
throw new java.io.IOException(te);
|
|
|
8820 |
}
|
|
|
8821 |
}
|
|
|
8822 |
|
|
|
8823 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
8824 |
try {
|
|
|
8825 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
8826 |
__isset_bit_vector = new BitSet(1);
|
|
|
8827 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
8828 |
} catch (org.apache.thrift.TException te) {
|
|
|
8829 |
throw new java.io.IOException(te);
|
|
|
8830 |
}
|
|
|
8831 |
}
|
|
|
8832 |
|
|
|
8833 |
}
|
|
|
8834 |
|
|
|
8835 |
public static class applyRechargeCoupon_result implements org.apache.thrift.TBase<applyRechargeCoupon_result, applyRechargeCoupon_result._Fields>, java.io.Serializable, Cloneable {
|
|
|
8836 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("applyRechargeCoupon_result");
|
|
|
8837 |
|
|
|
8838 |
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0);
|
|
|
8839 |
private static final org.apache.thrift.protocol.TField PEX_FIELD_DESC = new org.apache.thrift.protocol.TField("pex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
|
|
|
8840 |
|
|
|
8841 |
private Map<Long,String> success; // required
|
|
|
8842 |
private PromotionException pex; // required
|
|
|
8843 |
|
|
|
8844 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
8845 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
8846 |
SUCCESS((short)0, "success"),
|
|
|
8847 |
PEX((short)1, "pex");
|
|
|
8848 |
|
|
|
8849 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
8850 |
|
|
|
8851 |
static {
|
|
|
8852 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
8853 |
byName.put(field.getFieldName(), field);
|
|
|
8854 |
}
|
|
|
8855 |
}
|
|
|
8856 |
|
|
|
8857 |
/**
|
|
|
8858 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
8859 |
*/
|
|
|
8860 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
8861 |
switch(fieldId) {
|
|
|
8862 |
case 0: // SUCCESS
|
|
|
8863 |
return SUCCESS;
|
|
|
8864 |
case 1: // PEX
|
|
|
8865 |
return PEX;
|
|
|
8866 |
default:
|
|
|
8867 |
return null;
|
|
|
8868 |
}
|
|
|
8869 |
}
|
|
|
8870 |
|
|
|
8871 |
/**
|
|
|
8872 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
8873 |
* if it is not found.
|
|
|
8874 |
*/
|
|
|
8875 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
8876 |
_Fields fields = findByThriftId(fieldId);
|
|
|
8877 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
8878 |
return fields;
|
|
|
8879 |
}
|
|
|
8880 |
|
|
|
8881 |
/**
|
|
|
8882 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
8883 |
*/
|
|
|
8884 |
public static _Fields findByName(String name) {
|
|
|
8885 |
return byName.get(name);
|
|
|
8886 |
}
|
|
|
8887 |
|
|
|
8888 |
private final short _thriftId;
|
|
|
8889 |
private final String _fieldName;
|
|
|
8890 |
|
|
|
8891 |
_Fields(short thriftId, String fieldName) {
|
|
|
8892 |
_thriftId = thriftId;
|
|
|
8893 |
_fieldName = fieldName;
|
|
|
8894 |
}
|
|
|
8895 |
|
|
|
8896 |
public short getThriftFieldId() {
|
|
|
8897 |
return _thriftId;
|
|
|
8898 |
}
|
|
|
8899 |
|
|
|
8900 |
public String getFieldName() {
|
|
|
8901 |
return _fieldName;
|
|
|
8902 |
}
|
|
|
8903 |
}
|
|
|
8904 |
|
|
|
8905 |
// isset id assignments
|
|
|
8906 |
|
|
|
8907 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
8908 |
static {
|
|
|
8909 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
8910 |
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
8911 |
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
|
|
|
8912 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64),
|
|
|
8913 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
|
|
|
8914 |
tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
8915 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
|
|
|
8916 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
8917 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(applyRechargeCoupon_result.class, metaDataMap);
|
|
|
8918 |
}
|
|
|
8919 |
|
|
|
8920 |
public applyRechargeCoupon_result() {
|
|
|
8921 |
}
|
|
|
8922 |
|
|
|
8923 |
public applyRechargeCoupon_result(
|
|
|
8924 |
Map<Long,String> success,
|
|
|
8925 |
PromotionException pex)
|
|
|
8926 |
{
|
|
|
8927 |
this();
|
|
|
8928 |
this.success = success;
|
|
|
8929 |
this.pex = pex;
|
|
|
8930 |
}
|
|
|
8931 |
|
|
|
8932 |
/**
|
|
|
8933 |
* Performs a deep copy on <i>other</i>.
|
|
|
8934 |
*/
|
|
|
8935 |
public applyRechargeCoupon_result(applyRechargeCoupon_result other) {
|
|
|
8936 |
if (other.isSetSuccess()) {
|
|
|
8937 |
Map<Long,String> __this__success = new HashMap<Long,String>();
|
|
|
8938 |
for (Map.Entry<Long, String> other_element : other.success.entrySet()) {
|
|
|
8939 |
|
|
|
8940 |
Long other_element_key = other_element.getKey();
|
|
|
8941 |
String other_element_value = other_element.getValue();
|
|
|
8942 |
|
|
|
8943 |
Long __this__success_copy_key = other_element_key;
|
|
|
8944 |
|
|
|
8945 |
String __this__success_copy_value = other_element_value;
|
|
|
8946 |
|
|
|
8947 |
__this__success.put(__this__success_copy_key, __this__success_copy_value);
|
|
|
8948 |
}
|
|
|
8949 |
this.success = __this__success;
|
|
|
8950 |
}
|
|
|
8951 |
if (other.isSetPex()) {
|
|
|
8952 |
this.pex = new PromotionException(other.pex);
|
|
|
8953 |
}
|
|
|
8954 |
}
|
|
|
8955 |
|
|
|
8956 |
public applyRechargeCoupon_result deepCopy() {
|
|
|
8957 |
return new applyRechargeCoupon_result(this);
|
|
|
8958 |
}
|
|
|
8959 |
|
|
|
8960 |
@Override
|
|
|
8961 |
public void clear() {
|
|
|
8962 |
this.success = null;
|
|
|
8963 |
this.pex = null;
|
|
|
8964 |
}
|
|
|
8965 |
|
|
|
8966 |
public int getSuccessSize() {
|
|
|
8967 |
return (this.success == null) ? 0 : this.success.size();
|
|
|
8968 |
}
|
|
|
8969 |
|
|
|
8970 |
public void putToSuccess(long key, String val) {
|
|
|
8971 |
if (this.success == null) {
|
|
|
8972 |
this.success = new HashMap<Long,String>();
|
|
|
8973 |
}
|
|
|
8974 |
this.success.put(key, val);
|
|
|
8975 |
}
|
|
|
8976 |
|
|
|
8977 |
public Map<Long,String> getSuccess() {
|
|
|
8978 |
return this.success;
|
|
|
8979 |
}
|
|
|
8980 |
|
|
|
8981 |
public void setSuccess(Map<Long,String> success) {
|
|
|
8982 |
this.success = success;
|
|
|
8983 |
}
|
|
|
8984 |
|
|
|
8985 |
public void unsetSuccess() {
|
|
|
8986 |
this.success = null;
|
|
|
8987 |
}
|
|
|
8988 |
|
|
|
8989 |
/** Returns true if field success is set (has been assigned a value) and false otherwise */
|
|
|
8990 |
public boolean isSetSuccess() {
|
|
|
8991 |
return this.success != null;
|
|
|
8992 |
}
|
|
|
8993 |
|
|
|
8994 |
public void setSuccessIsSet(boolean value) {
|
|
|
8995 |
if (!value) {
|
|
|
8996 |
this.success = null;
|
|
|
8997 |
}
|
|
|
8998 |
}
|
|
|
8999 |
|
|
|
9000 |
public PromotionException getPex() {
|
|
|
9001 |
return this.pex;
|
|
|
9002 |
}
|
|
|
9003 |
|
|
|
9004 |
public void setPex(PromotionException pex) {
|
|
|
9005 |
this.pex = pex;
|
|
|
9006 |
}
|
|
|
9007 |
|
|
|
9008 |
public void unsetPex() {
|
|
|
9009 |
this.pex = null;
|
|
|
9010 |
}
|
|
|
9011 |
|
|
|
9012 |
/** Returns true if field pex is set (has been assigned a value) and false otherwise */
|
|
|
9013 |
public boolean isSetPex() {
|
|
|
9014 |
return this.pex != null;
|
|
|
9015 |
}
|
|
|
9016 |
|
|
|
9017 |
public void setPexIsSet(boolean value) {
|
|
|
9018 |
if (!value) {
|
|
|
9019 |
this.pex = null;
|
|
|
9020 |
}
|
|
|
9021 |
}
|
|
|
9022 |
|
|
|
9023 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
9024 |
switch (field) {
|
|
|
9025 |
case SUCCESS:
|
|
|
9026 |
if (value == null) {
|
|
|
9027 |
unsetSuccess();
|
|
|
9028 |
} else {
|
|
|
9029 |
setSuccess((Map<Long,String>)value);
|
|
|
9030 |
}
|
|
|
9031 |
break;
|
|
|
9032 |
|
|
|
9033 |
case PEX:
|
|
|
9034 |
if (value == null) {
|
|
|
9035 |
unsetPex();
|
|
|
9036 |
} else {
|
|
|
9037 |
setPex((PromotionException)value);
|
|
|
9038 |
}
|
|
|
9039 |
break;
|
|
|
9040 |
|
|
|
9041 |
}
|
|
|
9042 |
}
|
|
|
9043 |
|
|
|
9044 |
public Object getFieldValue(_Fields field) {
|
|
|
9045 |
switch (field) {
|
|
|
9046 |
case SUCCESS:
|
|
|
9047 |
return getSuccess();
|
|
|
9048 |
|
|
|
9049 |
case PEX:
|
|
|
9050 |
return getPex();
|
|
|
9051 |
|
|
|
9052 |
}
|
|
|
9053 |
throw new IllegalStateException();
|
|
|
9054 |
}
|
|
|
9055 |
|
|
|
9056 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
9057 |
public boolean isSet(_Fields field) {
|
|
|
9058 |
if (field == null) {
|
|
|
9059 |
throw new IllegalArgumentException();
|
|
|
9060 |
}
|
|
|
9061 |
|
|
|
9062 |
switch (field) {
|
|
|
9063 |
case SUCCESS:
|
|
|
9064 |
return isSetSuccess();
|
|
|
9065 |
case PEX:
|
|
|
9066 |
return isSetPex();
|
|
|
9067 |
}
|
|
|
9068 |
throw new IllegalStateException();
|
|
|
9069 |
}
|
|
|
9070 |
|
|
|
9071 |
@Override
|
|
|
9072 |
public boolean equals(Object that) {
|
|
|
9073 |
if (that == null)
|
|
|
9074 |
return false;
|
|
|
9075 |
if (that instanceof applyRechargeCoupon_result)
|
|
|
9076 |
return this.equals((applyRechargeCoupon_result)that);
|
|
|
9077 |
return false;
|
|
|
9078 |
}
|
|
|
9079 |
|
|
|
9080 |
public boolean equals(applyRechargeCoupon_result that) {
|
|
|
9081 |
if (that == null)
|
|
|
9082 |
return false;
|
|
|
9083 |
|
|
|
9084 |
boolean this_present_success = true && this.isSetSuccess();
|
|
|
9085 |
boolean that_present_success = true && that.isSetSuccess();
|
|
|
9086 |
if (this_present_success || that_present_success) {
|
|
|
9087 |
if (!(this_present_success && that_present_success))
|
|
|
9088 |
return false;
|
|
|
9089 |
if (!this.success.equals(that.success))
|
|
|
9090 |
return false;
|
|
|
9091 |
}
|
|
|
9092 |
|
|
|
9093 |
boolean this_present_pex = true && this.isSetPex();
|
|
|
9094 |
boolean that_present_pex = true && that.isSetPex();
|
|
|
9095 |
if (this_present_pex || that_present_pex) {
|
|
|
9096 |
if (!(this_present_pex && that_present_pex))
|
|
|
9097 |
return false;
|
|
|
9098 |
if (!this.pex.equals(that.pex))
|
|
|
9099 |
return false;
|
|
|
9100 |
}
|
|
|
9101 |
|
|
|
9102 |
return true;
|
|
|
9103 |
}
|
|
|
9104 |
|
|
|
9105 |
@Override
|
|
|
9106 |
public int hashCode() {
|
|
|
9107 |
return 0;
|
|
|
9108 |
}
|
|
|
9109 |
|
|
|
9110 |
public int compareTo(applyRechargeCoupon_result other) {
|
|
|
9111 |
if (!getClass().equals(other.getClass())) {
|
|
|
9112 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
9113 |
}
|
|
|
9114 |
|
|
|
9115 |
int lastComparison = 0;
|
|
|
9116 |
applyRechargeCoupon_result typedOther = (applyRechargeCoupon_result)other;
|
|
|
9117 |
|
|
|
9118 |
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
|
|
|
9119 |
if (lastComparison != 0) {
|
|
|
9120 |
return lastComparison;
|
|
|
9121 |
}
|
|
|
9122 |
if (isSetSuccess()) {
|
|
|
9123 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
|
|
|
9124 |
if (lastComparison != 0) {
|
|
|
9125 |
return lastComparison;
|
|
|
9126 |
}
|
|
|
9127 |
}
|
|
|
9128 |
lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
|
|
|
9129 |
if (lastComparison != 0) {
|
|
|
9130 |
return lastComparison;
|
|
|
9131 |
}
|
|
|
9132 |
if (isSetPex()) {
|
|
|
9133 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
|
|
|
9134 |
if (lastComparison != 0) {
|
|
|
9135 |
return lastComparison;
|
|
|
9136 |
}
|
|
|
9137 |
}
|
|
|
9138 |
return 0;
|
|
|
9139 |
}
|
|
|
9140 |
|
|
|
9141 |
public _Fields fieldForId(int fieldId) {
|
|
|
9142 |
return _Fields.findByThriftId(fieldId);
|
|
|
9143 |
}
|
|
|
9144 |
|
|
|
9145 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
9146 |
org.apache.thrift.protocol.TField field;
|
|
|
9147 |
iprot.readStructBegin();
|
|
|
9148 |
while (true)
|
|
|
9149 |
{
|
|
|
9150 |
field = iprot.readFieldBegin();
|
|
|
9151 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
9152 |
break;
|
|
|
9153 |
}
|
|
|
9154 |
switch (field.id) {
|
|
|
9155 |
case 0: // SUCCESS
|
|
|
9156 |
if (field.type == org.apache.thrift.protocol.TType.MAP) {
|
|
|
9157 |
{
|
| 6736 |
amit.gupta |
9158 |
org.apache.thrift.protocol.TMap _map21 = iprot.readMapBegin();
|
|
|
9159 |
this.success = new HashMap<Long,String>(2*_map21.size);
|
|
|
9160 |
for (int _i22 = 0; _i22 < _map21.size; ++_i22)
|
| 6433 |
anupam.sin |
9161 |
{
|
| 6736 |
amit.gupta |
9162 |
long _key23; // required
|
|
|
9163 |
String _val24; // required
|
|
|
9164 |
_key23 = iprot.readI64();
|
|
|
9165 |
_val24 = iprot.readString();
|
|
|
9166 |
this.success.put(_key23, _val24);
|
| 6433 |
anupam.sin |
9167 |
}
|
|
|
9168 |
iprot.readMapEnd();
|
|
|
9169 |
}
|
|
|
9170 |
} else {
|
|
|
9171 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
9172 |
}
|
|
|
9173 |
break;
|
|
|
9174 |
case 1: // PEX
|
|
|
9175 |
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
|
|
9176 |
this.pex = new PromotionException();
|
|
|
9177 |
this.pex.read(iprot);
|
|
|
9178 |
} else {
|
|
|
9179 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
9180 |
}
|
|
|
9181 |
break;
|
|
|
9182 |
default:
|
|
|
9183 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
9184 |
}
|
|
|
9185 |
iprot.readFieldEnd();
|
|
|
9186 |
}
|
|
|
9187 |
iprot.readStructEnd();
|
|
|
9188 |
validate();
|
|
|
9189 |
}
|
|
|
9190 |
|
|
|
9191 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
9192 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
9193 |
|
|
|
9194 |
if (this.isSetSuccess()) {
|
|
|
9195 |
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
|
|
9196 |
{
|
|
|
9197 |
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRING, this.success.size()));
|
| 6736 |
amit.gupta |
9198 |
for (Map.Entry<Long, String> _iter25 : this.success.entrySet())
|
| 6433 |
anupam.sin |
9199 |
{
|
| 6736 |
amit.gupta |
9200 |
oprot.writeI64(_iter25.getKey());
|
|
|
9201 |
oprot.writeString(_iter25.getValue());
|
| 6433 |
anupam.sin |
9202 |
}
|
|
|
9203 |
oprot.writeMapEnd();
|
|
|
9204 |
}
|
|
|
9205 |
oprot.writeFieldEnd();
|
|
|
9206 |
} else if (this.isSetPex()) {
|
|
|
9207 |
oprot.writeFieldBegin(PEX_FIELD_DESC);
|
|
|
9208 |
this.pex.write(oprot);
|
|
|
9209 |
oprot.writeFieldEnd();
|
|
|
9210 |
}
|
|
|
9211 |
oprot.writeFieldStop();
|
|
|
9212 |
oprot.writeStructEnd();
|
|
|
9213 |
}
|
|
|
9214 |
|
|
|
9215 |
@Override
|
|
|
9216 |
public String toString() {
|
|
|
9217 |
StringBuilder sb = new StringBuilder("applyRechargeCoupon_result(");
|
|
|
9218 |
boolean first = true;
|
|
|
9219 |
|
|
|
9220 |
sb.append("success:");
|
|
|
9221 |
if (this.success == null) {
|
|
|
9222 |
sb.append("null");
|
|
|
9223 |
} else {
|
|
|
9224 |
sb.append(this.success);
|
|
|
9225 |
}
|
|
|
9226 |
first = false;
|
|
|
9227 |
if (!first) sb.append(", ");
|
|
|
9228 |
sb.append("pex:");
|
|
|
9229 |
if (this.pex == null) {
|
|
|
9230 |
sb.append("null");
|
|
|
9231 |
} else {
|
|
|
9232 |
sb.append(this.pex);
|
|
|
9233 |
}
|
|
|
9234 |
first = false;
|
|
|
9235 |
sb.append(")");
|
|
|
9236 |
return sb.toString();
|
|
|
9237 |
}
|
|
|
9238 |
|
|
|
9239 |
public void validate() throws org.apache.thrift.TException {
|
|
|
9240 |
// check for required fields
|
|
|
9241 |
}
|
|
|
9242 |
|
|
|
9243 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
9244 |
try {
|
|
|
9245 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
9246 |
} catch (org.apache.thrift.TException te) {
|
|
|
9247 |
throw new java.io.IOException(te);
|
|
|
9248 |
}
|
|
|
9249 |
}
|
|
|
9250 |
|
|
|
9251 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
9252 |
try {
|
|
|
9253 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
9254 |
} catch (org.apache.thrift.TException te) {
|
|
|
9255 |
throw new java.io.IOException(te);
|
|
|
9256 |
}
|
|
|
9257 |
}
|
|
|
9258 |
|
|
|
9259 |
}
|
|
|
9260 |
|
| 3430 |
rajveer |
9261 |
public static class trackCouponUsage_args implements org.apache.thrift.TBase<trackCouponUsage_args, trackCouponUsage_args._Fields>, java.io.Serializable, Cloneable {
|
|
|
9262 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("trackCouponUsage_args");
|
| 1982 |
varun.gupt |
9263 |
|
| 3430 |
rajveer |
9264 |
private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCode", org.apache.thrift.protocol.TType.STRING, (short)1);
|
|
|
9265 |
private static final org.apache.thrift.protocol.TField TRANSACTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionId", org.apache.thrift.protocol.TType.I64, (short)2);
|
|
|
9266 |
private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)3);
|
| 1982 |
varun.gupt |
9267 |
|
| 3430 |
rajveer |
9268 |
private String couponCode; // required
|
|
|
9269 |
private long transactionId; // required
|
|
|
9270 |
private long userId; // required
|
| 1982 |
varun.gupt |
9271 |
|
|
|
9272 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
| 3430 |
rajveer |
9273 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
| 1982 |
varun.gupt |
9274 |
COUPON_CODE((short)1, "couponCode"),
|
|
|
9275 |
TRANSACTION_ID((short)2, "transactionId"),
|
|
|
9276 |
USER_ID((short)3, "userId");
|
|
|
9277 |
|
|
|
9278 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
9279 |
|
|
|
9280 |
static {
|
|
|
9281 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
9282 |
byName.put(field.getFieldName(), field);
|
|
|
9283 |
}
|
|
|
9284 |
}
|
|
|
9285 |
|
|
|
9286 |
/**
|
|
|
9287 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
9288 |
*/
|
|
|
9289 |
public static _Fields findByThriftId(int fieldId) {
|
| 3430 |
rajveer |
9290 |
switch(fieldId) {
|
|
|
9291 |
case 1: // COUPON_CODE
|
|
|
9292 |
return COUPON_CODE;
|
|
|
9293 |
case 2: // TRANSACTION_ID
|
|
|
9294 |
return TRANSACTION_ID;
|
|
|
9295 |
case 3: // USER_ID
|
|
|
9296 |
return USER_ID;
|
|
|
9297 |
default:
|
|
|
9298 |
return null;
|
|
|
9299 |
}
|
| 1982 |
varun.gupt |
9300 |
}
|
|
|
9301 |
|
|
|
9302 |
/**
|
|
|
9303 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
9304 |
* if it is not found.
|
|
|
9305 |
*/
|
|
|
9306 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
9307 |
_Fields fields = findByThriftId(fieldId);
|
|
|
9308 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
9309 |
return fields;
|
|
|
9310 |
}
|
|
|
9311 |
|
|
|
9312 |
/**
|
|
|
9313 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
9314 |
*/
|
|
|
9315 |
public static _Fields findByName(String name) {
|
|
|
9316 |
return byName.get(name);
|
|
|
9317 |
}
|
|
|
9318 |
|
|
|
9319 |
private final short _thriftId;
|
|
|
9320 |
private final String _fieldName;
|
|
|
9321 |
|
|
|
9322 |
_Fields(short thriftId, String fieldName) {
|
|
|
9323 |
_thriftId = thriftId;
|
|
|
9324 |
_fieldName = fieldName;
|
|
|
9325 |
}
|
|
|
9326 |
|
|
|
9327 |
public short getThriftFieldId() {
|
|
|
9328 |
return _thriftId;
|
|
|
9329 |
}
|
|
|
9330 |
|
|
|
9331 |
public String getFieldName() {
|
|
|
9332 |
return _fieldName;
|
|
|
9333 |
}
|
|
|
9334 |
}
|
|
|
9335 |
|
|
|
9336 |
// isset id assignments
|
|
|
9337 |
private static final int __TRANSACTIONID_ISSET_ID = 0;
|
|
|
9338 |
private static final int __USERID_ISSET_ID = 1;
|
|
|
9339 |
private BitSet __isset_bit_vector = new BitSet(2);
|
|
|
9340 |
|
| 3430 |
rajveer |
9341 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
| 1982 |
varun.gupt |
9342 |
static {
|
| 3430 |
rajveer |
9343 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
9344 |
tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
9345 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
9346 |
tmpMap.put(_Fields.TRANSACTION_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
9347 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
9348 |
tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
9349 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
9350 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
9351 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(trackCouponUsage_args.class, metaDataMap);
|
| 1982 |
varun.gupt |
9352 |
}
|
|
|
9353 |
|
|
|
9354 |
public trackCouponUsage_args() {
|
|
|
9355 |
}
|
|
|
9356 |
|
|
|
9357 |
public trackCouponUsage_args(
|
|
|
9358 |
String couponCode,
|
|
|
9359 |
long transactionId,
|
|
|
9360 |
long userId)
|
|
|
9361 |
{
|
|
|
9362 |
this();
|
|
|
9363 |
this.couponCode = couponCode;
|
|
|
9364 |
this.transactionId = transactionId;
|
|
|
9365 |
setTransactionIdIsSet(true);
|
|
|
9366 |
this.userId = userId;
|
|
|
9367 |
setUserIdIsSet(true);
|
|
|
9368 |
}
|
|
|
9369 |
|
|
|
9370 |
/**
|
|
|
9371 |
* Performs a deep copy on <i>other</i>.
|
|
|
9372 |
*/
|
|
|
9373 |
public trackCouponUsage_args(trackCouponUsage_args other) {
|
|
|
9374 |
__isset_bit_vector.clear();
|
|
|
9375 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
9376 |
if (other.isSetCouponCode()) {
|
|
|
9377 |
this.couponCode = other.couponCode;
|
|
|
9378 |
}
|
|
|
9379 |
this.transactionId = other.transactionId;
|
|
|
9380 |
this.userId = other.userId;
|
|
|
9381 |
}
|
|
|
9382 |
|
|
|
9383 |
public trackCouponUsage_args deepCopy() {
|
|
|
9384 |
return new trackCouponUsage_args(this);
|
|
|
9385 |
}
|
|
|
9386 |
|
| 3430 |
rajveer |
9387 |
@Override
|
|
|
9388 |
public void clear() {
|
|
|
9389 |
this.couponCode = null;
|
|
|
9390 |
setTransactionIdIsSet(false);
|
|
|
9391 |
this.transactionId = 0;
|
|
|
9392 |
setUserIdIsSet(false);
|
|
|
9393 |
this.userId = 0;
|
| 1982 |
varun.gupt |
9394 |
}
|
|
|
9395 |
|
|
|
9396 |
public String getCouponCode() {
|
|
|
9397 |
return this.couponCode;
|
|
|
9398 |
}
|
|
|
9399 |
|
| 3430 |
rajveer |
9400 |
public void setCouponCode(String couponCode) {
|
| 1982 |
varun.gupt |
9401 |
this.couponCode = couponCode;
|
|
|
9402 |
}
|
|
|
9403 |
|
|
|
9404 |
public void unsetCouponCode() {
|
|
|
9405 |
this.couponCode = null;
|
|
|
9406 |
}
|
|
|
9407 |
|
| 3430 |
rajveer |
9408 |
/** Returns true if field couponCode is set (has been assigned a value) and false otherwise */
|
| 1982 |
varun.gupt |
9409 |
public boolean isSetCouponCode() {
|
|
|
9410 |
return this.couponCode != null;
|
|
|
9411 |
}
|
|
|
9412 |
|
|
|
9413 |
public void setCouponCodeIsSet(boolean value) {
|
|
|
9414 |
if (!value) {
|
|
|
9415 |
this.couponCode = null;
|
|
|
9416 |
}
|
|
|
9417 |
}
|
|
|
9418 |
|
|
|
9419 |
public long getTransactionId() {
|
|
|
9420 |
return this.transactionId;
|
|
|
9421 |
}
|
|
|
9422 |
|
| 3430 |
rajveer |
9423 |
public void setTransactionId(long transactionId) {
|
| 1982 |
varun.gupt |
9424 |
this.transactionId = transactionId;
|
|
|
9425 |
setTransactionIdIsSet(true);
|
|
|
9426 |
}
|
|
|
9427 |
|
|
|
9428 |
public void unsetTransactionId() {
|
|
|
9429 |
__isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
|
|
|
9430 |
}
|
|
|
9431 |
|
| 3430 |
rajveer |
9432 |
/** Returns true if field transactionId is set (has been assigned a value) and false otherwise */
|
| 1982 |
varun.gupt |
9433 |
public boolean isSetTransactionId() {
|
|
|
9434 |
return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
|
|
|
9435 |
}
|
|
|
9436 |
|
|
|
9437 |
public void setTransactionIdIsSet(boolean value) {
|
|
|
9438 |
__isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
|
|
|
9439 |
}
|
|
|
9440 |
|
|
|
9441 |
public long getUserId() {
|
|
|
9442 |
return this.userId;
|
|
|
9443 |
}
|
|
|
9444 |
|
| 3430 |
rajveer |
9445 |
public void setUserId(long userId) {
|
| 1982 |
varun.gupt |
9446 |
this.userId = userId;
|
|
|
9447 |
setUserIdIsSet(true);
|
|
|
9448 |
}
|
|
|
9449 |
|
|
|
9450 |
public void unsetUserId() {
|
|
|
9451 |
__isset_bit_vector.clear(__USERID_ISSET_ID);
|
|
|
9452 |
}
|
|
|
9453 |
|
| 3430 |
rajveer |
9454 |
/** Returns true if field userId is set (has been assigned a value) and false otherwise */
|
| 1982 |
varun.gupt |
9455 |
public boolean isSetUserId() {
|
|
|
9456 |
return __isset_bit_vector.get(__USERID_ISSET_ID);
|
|
|
9457 |
}
|
|
|
9458 |
|
|
|
9459 |
public void setUserIdIsSet(boolean value) {
|
|
|
9460 |
__isset_bit_vector.set(__USERID_ISSET_ID, value);
|
|
|
9461 |
}
|
|
|
9462 |
|
|
|
9463 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
9464 |
switch (field) {
|
|
|
9465 |
case COUPON_CODE:
|
|
|
9466 |
if (value == null) {
|
|
|
9467 |
unsetCouponCode();
|
|
|
9468 |
} else {
|
|
|
9469 |
setCouponCode((String)value);
|
|
|
9470 |
}
|
|
|
9471 |
break;
|
|
|
9472 |
|
|
|
9473 |
case TRANSACTION_ID:
|
|
|
9474 |
if (value == null) {
|
|
|
9475 |
unsetTransactionId();
|
|
|
9476 |
} else {
|
|
|
9477 |
setTransactionId((Long)value);
|
|
|
9478 |
}
|
|
|
9479 |
break;
|
|
|
9480 |
|
|
|
9481 |
case USER_ID:
|
|
|
9482 |
if (value == null) {
|
|
|
9483 |
unsetUserId();
|
|
|
9484 |
} else {
|
|
|
9485 |
setUserId((Long)value);
|
|
|
9486 |
}
|
|
|
9487 |
break;
|
|
|
9488 |
|
|
|
9489 |
}
|
|
|
9490 |
}
|
|
|
9491 |
|
|
|
9492 |
public Object getFieldValue(_Fields field) {
|
|
|
9493 |
switch (field) {
|
|
|
9494 |
case COUPON_CODE:
|
|
|
9495 |
return getCouponCode();
|
|
|
9496 |
|
|
|
9497 |
case TRANSACTION_ID:
|
| 3430 |
rajveer |
9498 |
return Long.valueOf(getTransactionId());
|
| 1982 |
varun.gupt |
9499 |
|
|
|
9500 |
case USER_ID:
|
| 3430 |
rajveer |
9501 |
return Long.valueOf(getUserId());
|
| 1982 |
varun.gupt |
9502 |
|
|
|
9503 |
}
|
|
|
9504 |
throw new IllegalStateException();
|
|
|
9505 |
}
|
|
|
9506 |
|
| 3430 |
rajveer |
9507 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
9508 |
public boolean isSet(_Fields field) {
|
|
|
9509 |
if (field == null) {
|
|
|
9510 |
throw new IllegalArgumentException();
|
|
|
9511 |
}
|
| 1982 |
varun.gupt |
9512 |
|
|
|
9513 |
switch (field) {
|
|
|
9514 |
case COUPON_CODE:
|
|
|
9515 |
return isSetCouponCode();
|
|
|
9516 |
case TRANSACTION_ID:
|
|
|
9517 |
return isSetTransactionId();
|
|
|
9518 |
case USER_ID:
|
|
|
9519 |
return isSetUserId();
|
|
|
9520 |
}
|
|
|
9521 |
throw new IllegalStateException();
|
|
|
9522 |
}
|
|
|
9523 |
|
|
|
9524 |
@Override
|
|
|
9525 |
public boolean equals(Object that) {
|
|
|
9526 |
if (that == null)
|
|
|
9527 |
return false;
|
|
|
9528 |
if (that instanceof trackCouponUsage_args)
|
|
|
9529 |
return this.equals((trackCouponUsage_args)that);
|
|
|
9530 |
return false;
|
|
|
9531 |
}
|
|
|
9532 |
|
|
|
9533 |
public boolean equals(trackCouponUsage_args that) {
|
|
|
9534 |
if (that == null)
|
|
|
9535 |
return false;
|
|
|
9536 |
|
|
|
9537 |
boolean this_present_couponCode = true && this.isSetCouponCode();
|
|
|
9538 |
boolean that_present_couponCode = true && that.isSetCouponCode();
|
|
|
9539 |
if (this_present_couponCode || that_present_couponCode) {
|
|
|
9540 |
if (!(this_present_couponCode && that_present_couponCode))
|
|
|
9541 |
return false;
|
|
|
9542 |
if (!this.couponCode.equals(that.couponCode))
|
|
|
9543 |
return false;
|
|
|
9544 |
}
|
|
|
9545 |
|
|
|
9546 |
boolean this_present_transactionId = true;
|
|
|
9547 |
boolean that_present_transactionId = true;
|
|
|
9548 |
if (this_present_transactionId || that_present_transactionId) {
|
|
|
9549 |
if (!(this_present_transactionId && that_present_transactionId))
|
|
|
9550 |
return false;
|
|
|
9551 |
if (this.transactionId != that.transactionId)
|
|
|
9552 |
return false;
|
|
|
9553 |
}
|
|
|
9554 |
|
|
|
9555 |
boolean this_present_userId = true;
|
|
|
9556 |
boolean that_present_userId = true;
|
|
|
9557 |
if (this_present_userId || that_present_userId) {
|
|
|
9558 |
if (!(this_present_userId && that_present_userId))
|
|
|
9559 |
return false;
|
|
|
9560 |
if (this.userId != that.userId)
|
|
|
9561 |
return false;
|
|
|
9562 |
}
|
|
|
9563 |
|
|
|
9564 |
return true;
|
|
|
9565 |
}
|
|
|
9566 |
|
|
|
9567 |
@Override
|
|
|
9568 |
public int hashCode() {
|
|
|
9569 |
return 0;
|
|
|
9570 |
}
|
|
|
9571 |
|
|
|
9572 |
public int compareTo(trackCouponUsage_args other) {
|
|
|
9573 |
if (!getClass().equals(other.getClass())) {
|
|
|
9574 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
9575 |
}
|
|
|
9576 |
|
|
|
9577 |
int lastComparison = 0;
|
|
|
9578 |
trackCouponUsage_args typedOther = (trackCouponUsage_args)other;
|
|
|
9579 |
|
| 3430 |
rajveer |
9580 |
lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
|
| 1982 |
varun.gupt |
9581 |
if (lastComparison != 0) {
|
|
|
9582 |
return lastComparison;
|
|
|
9583 |
}
|
| 3430 |
rajveer |
9584 |
if (isSetCouponCode()) {
|
|
|
9585 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);
|
|
|
9586 |
if (lastComparison != 0) {
|
|
|
9587 |
return lastComparison;
|
|
|
9588 |
}
|
| 1982 |
varun.gupt |
9589 |
}
|
| 3430 |
rajveer |
9590 |
lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(typedOther.isSetTransactionId());
|
| 1982 |
varun.gupt |
9591 |
if (lastComparison != 0) {
|
|
|
9592 |
return lastComparison;
|
|
|
9593 |
}
|
| 3430 |
rajveer |
9594 |
if (isSetTransactionId()) {
|
|
|
9595 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionId, typedOther.transactionId);
|
|
|
9596 |
if (lastComparison != 0) {
|
|
|
9597 |
return lastComparison;
|
|
|
9598 |
}
|
| 1982 |
varun.gupt |
9599 |
}
|
| 3430 |
rajveer |
9600 |
lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
|
| 1982 |
varun.gupt |
9601 |
if (lastComparison != 0) {
|
|
|
9602 |
return lastComparison;
|
|
|
9603 |
}
|
| 3430 |
rajveer |
9604 |
if (isSetUserId()) {
|
|
|
9605 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
|
|
|
9606 |
if (lastComparison != 0) {
|
|
|
9607 |
return lastComparison;
|
|
|
9608 |
}
|
| 1982 |
varun.gupt |
9609 |
}
|
|
|
9610 |
return 0;
|
|
|
9611 |
}
|
|
|
9612 |
|
| 3430 |
rajveer |
9613 |
public _Fields fieldForId(int fieldId) {
|
|
|
9614 |
return _Fields.findByThriftId(fieldId);
|
|
|
9615 |
}
|
|
|
9616 |
|
|
|
9617 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
9618 |
org.apache.thrift.protocol.TField field;
|
| 1982 |
varun.gupt |
9619 |
iprot.readStructBegin();
|
|
|
9620 |
while (true)
|
|
|
9621 |
{
|
|
|
9622 |
field = iprot.readFieldBegin();
|
| 3430 |
rajveer |
9623 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
| 1982 |
varun.gupt |
9624 |
break;
|
|
|
9625 |
}
|
| 3430 |
rajveer |
9626 |
switch (field.id) {
|
|
|
9627 |
case 1: // COUPON_CODE
|
|
|
9628 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
9629 |
this.couponCode = iprot.readString();
|
|
|
9630 |
} else {
|
|
|
9631 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
9632 |
}
|
|
|
9633 |
break;
|
|
|
9634 |
case 2: // TRANSACTION_ID
|
|
|
9635 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
9636 |
this.transactionId = iprot.readI64();
|
|
|
9637 |
setTransactionIdIsSet(true);
|
|
|
9638 |
} else {
|
|
|
9639 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
9640 |
}
|
|
|
9641 |
break;
|
|
|
9642 |
case 3: // USER_ID
|
|
|
9643 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
9644 |
this.userId = iprot.readI64();
|
|
|
9645 |
setUserIdIsSet(true);
|
|
|
9646 |
} else {
|
|
|
9647 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
9648 |
}
|
|
|
9649 |
break;
|
|
|
9650 |
default:
|
|
|
9651 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| 1982 |
varun.gupt |
9652 |
}
|
| 3430 |
rajveer |
9653 |
iprot.readFieldEnd();
|
| 1982 |
varun.gupt |
9654 |
}
|
|
|
9655 |
iprot.readStructEnd();
|
|
|
9656 |
validate();
|
|
|
9657 |
}
|
|
|
9658 |
|
| 3430 |
rajveer |
9659 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
9660 |
validate();
|
|
|
9661 |
|
|
|
9662 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
9663 |
if (this.couponCode != null) {
|
|
|
9664 |
oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
|
|
|
9665 |
oprot.writeString(this.couponCode);
|
|
|
9666 |
oprot.writeFieldEnd();
|
|
|
9667 |
}
|
|
|
9668 |
oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
|
|
|
9669 |
oprot.writeI64(this.transactionId);
|
|
|
9670 |
oprot.writeFieldEnd();
|
|
|
9671 |
oprot.writeFieldBegin(USER_ID_FIELD_DESC);
|
|
|
9672 |
oprot.writeI64(this.userId);
|
|
|
9673 |
oprot.writeFieldEnd();
|
|
|
9674 |
oprot.writeFieldStop();
|
|
|
9675 |
oprot.writeStructEnd();
|
|
|
9676 |
}
|
|
|
9677 |
|
|
|
9678 |
@Override
|
|
|
9679 |
public String toString() {
|
|
|
9680 |
StringBuilder sb = new StringBuilder("trackCouponUsage_args(");
|
|
|
9681 |
boolean first = true;
|
|
|
9682 |
|
|
|
9683 |
sb.append("couponCode:");
|
|
|
9684 |
if (this.couponCode == null) {
|
|
|
9685 |
sb.append("null");
|
|
|
9686 |
} else {
|
|
|
9687 |
sb.append(this.couponCode);
|
|
|
9688 |
}
|
|
|
9689 |
first = false;
|
|
|
9690 |
if (!first) sb.append(", ");
|
|
|
9691 |
sb.append("transactionId:");
|
|
|
9692 |
sb.append(this.transactionId);
|
|
|
9693 |
first = false;
|
|
|
9694 |
if (!first) sb.append(", ");
|
|
|
9695 |
sb.append("userId:");
|
|
|
9696 |
sb.append(this.userId);
|
|
|
9697 |
first = false;
|
|
|
9698 |
sb.append(")");
|
|
|
9699 |
return sb.toString();
|
|
|
9700 |
}
|
|
|
9701 |
|
| 3430 |
rajveer |
9702 |
public void validate() throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
9703 |
// check for required fields
|
|
|
9704 |
}
|
|
|
9705 |
|
| 3430 |
rajveer |
9706 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
9707 |
try {
|
|
|
9708 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
9709 |
} catch (org.apache.thrift.TException te) {
|
|
|
9710 |
throw new java.io.IOException(te);
|
|
|
9711 |
}
|
|
|
9712 |
}
|
|
|
9713 |
|
|
|
9714 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
9715 |
try {
|
|
|
9716 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
9717 |
__isset_bit_vector = new BitSet(1);
|
|
|
9718 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
9719 |
} catch (org.apache.thrift.TException te) {
|
|
|
9720 |
throw new java.io.IOException(te);
|
|
|
9721 |
}
|
|
|
9722 |
}
|
|
|
9723 |
|
| 1982 |
varun.gupt |
9724 |
}
|
|
|
9725 |
|
| 3430 |
rajveer |
9726 |
public static class trackCouponUsage_result implements org.apache.thrift.TBase<trackCouponUsage_result, trackCouponUsage_result._Fields>, java.io.Serializable, Cloneable {
|
|
|
9727 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("trackCouponUsage_result");
|
| 1982 |
varun.gupt |
9728 |
|
| 3430 |
rajveer |
9729 |
private static final org.apache.thrift.protocol.TField PEX_FIELD_DESC = new org.apache.thrift.protocol.TField("pex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
|
| 1982 |
varun.gupt |
9730 |
|
| 3430 |
rajveer |
9731 |
private PromotionException pex; // required
|
| 1982 |
varun.gupt |
9732 |
|
|
|
9733 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
| 3430 |
rajveer |
9734 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
| 1982 |
varun.gupt |
9735 |
PEX((short)1, "pex");
|
|
|
9736 |
|
|
|
9737 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
9738 |
|
|
|
9739 |
static {
|
|
|
9740 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
9741 |
byName.put(field.getFieldName(), field);
|
|
|
9742 |
}
|
|
|
9743 |
}
|
|
|
9744 |
|
|
|
9745 |
/**
|
|
|
9746 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
9747 |
*/
|
|
|
9748 |
public static _Fields findByThriftId(int fieldId) {
|
| 3430 |
rajveer |
9749 |
switch(fieldId) {
|
|
|
9750 |
case 1: // PEX
|
|
|
9751 |
return PEX;
|
|
|
9752 |
default:
|
|
|
9753 |
return null;
|
|
|
9754 |
}
|
| 1982 |
varun.gupt |
9755 |
}
|
|
|
9756 |
|
|
|
9757 |
/**
|
|
|
9758 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
9759 |
* if it is not found.
|
|
|
9760 |
*/
|
|
|
9761 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
9762 |
_Fields fields = findByThriftId(fieldId);
|
|
|
9763 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
9764 |
return fields;
|
|
|
9765 |
}
|
|
|
9766 |
|
|
|
9767 |
/**
|
|
|
9768 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
9769 |
*/
|
|
|
9770 |
public static _Fields findByName(String name) {
|
|
|
9771 |
return byName.get(name);
|
|
|
9772 |
}
|
|
|
9773 |
|
|
|
9774 |
private final short _thriftId;
|
|
|
9775 |
private final String _fieldName;
|
|
|
9776 |
|
|
|
9777 |
_Fields(short thriftId, String fieldName) {
|
|
|
9778 |
_thriftId = thriftId;
|
|
|
9779 |
_fieldName = fieldName;
|
|
|
9780 |
}
|
|
|
9781 |
|
|
|
9782 |
public short getThriftFieldId() {
|
|
|
9783 |
return _thriftId;
|
|
|
9784 |
}
|
|
|
9785 |
|
|
|
9786 |
public String getFieldName() {
|
|
|
9787 |
return _fieldName;
|
|
|
9788 |
}
|
|
|
9789 |
}
|
|
|
9790 |
|
|
|
9791 |
// isset id assignments
|
|
|
9792 |
|
| 3430 |
rajveer |
9793 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
| 1982 |
varun.gupt |
9794 |
static {
|
| 3430 |
rajveer |
9795 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
9796 |
tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
9797 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
|
|
|
9798 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
9799 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(trackCouponUsage_result.class, metaDataMap);
|
| 1982 |
varun.gupt |
9800 |
}
|
|
|
9801 |
|
|
|
9802 |
public trackCouponUsage_result() {
|
|
|
9803 |
}
|
|
|
9804 |
|
|
|
9805 |
public trackCouponUsage_result(
|
|
|
9806 |
PromotionException pex)
|
|
|
9807 |
{
|
|
|
9808 |
this();
|
|
|
9809 |
this.pex = pex;
|
|
|
9810 |
}
|
|
|
9811 |
|
|
|
9812 |
/**
|
|
|
9813 |
* Performs a deep copy on <i>other</i>.
|
|
|
9814 |
*/
|
|
|
9815 |
public trackCouponUsage_result(trackCouponUsage_result other) {
|
|
|
9816 |
if (other.isSetPex()) {
|
|
|
9817 |
this.pex = new PromotionException(other.pex);
|
|
|
9818 |
}
|
|
|
9819 |
}
|
|
|
9820 |
|
|
|
9821 |
public trackCouponUsage_result deepCopy() {
|
|
|
9822 |
return new trackCouponUsage_result(this);
|
|
|
9823 |
}
|
|
|
9824 |
|
| 3430 |
rajveer |
9825 |
@Override
|
|
|
9826 |
public void clear() {
|
|
|
9827 |
this.pex = null;
|
| 1982 |
varun.gupt |
9828 |
}
|
|
|
9829 |
|
|
|
9830 |
public PromotionException getPex() {
|
|
|
9831 |
return this.pex;
|
|
|
9832 |
}
|
|
|
9833 |
|
| 3430 |
rajveer |
9834 |
public void setPex(PromotionException pex) {
|
| 1982 |
varun.gupt |
9835 |
this.pex = pex;
|
|
|
9836 |
}
|
|
|
9837 |
|
|
|
9838 |
public void unsetPex() {
|
|
|
9839 |
this.pex = null;
|
|
|
9840 |
}
|
|
|
9841 |
|
| 3430 |
rajveer |
9842 |
/** Returns true if field pex is set (has been assigned a value) and false otherwise */
|
| 1982 |
varun.gupt |
9843 |
public boolean isSetPex() {
|
|
|
9844 |
return this.pex != null;
|
|
|
9845 |
}
|
|
|
9846 |
|
|
|
9847 |
public void setPexIsSet(boolean value) {
|
|
|
9848 |
if (!value) {
|
|
|
9849 |
this.pex = null;
|
|
|
9850 |
}
|
|
|
9851 |
}
|
|
|
9852 |
|
|
|
9853 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
9854 |
switch (field) {
|
|
|
9855 |
case PEX:
|
|
|
9856 |
if (value == null) {
|
|
|
9857 |
unsetPex();
|
|
|
9858 |
} else {
|
|
|
9859 |
setPex((PromotionException)value);
|
|
|
9860 |
}
|
|
|
9861 |
break;
|
|
|
9862 |
|
|
|
9863 |
}
|
|
|
9864 |
}
|
|
|
9865 |
|
|
|
9866 |
public Object getFieldValue(_Fields field) {
|
|
|
9867 |
switch (field) {
|
|
|
9868 |
case PEX:
|
|
|
9869 |
return getPex();
|
|
|
9870 |
|
|
|
9871 |
}
|
|
|
9872 |
throw new IllegalStateException();
|
|
|
9873 |
}
|
|
|
9874 |
|
| 3430 |
rajveer |
9875 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
9876 |
public boolean isSet(_Fields field) {
|
|
|
9877 |
if (field == null) {
|
|
|
9878 |
throw new IllegalArgumentException();
|
|
|
9879 |
}
|
| 1982 |
varun.gupt |
9880 |
|
|
|
9881 |
switch (field) {
|
|
|
9882 |
case PEX:
|
|
|
9883 |
return isSetPex();
|
|
|
9884 |
}
|
|
|
9885 |
throw new IllegalStateException();
|
|
|
9886 |
}
|
|
|
9887 |
|
|
|
9888 |
@Override
|
|
|
9889 |
public boolean equals(Object that) {
|
|
|
9890 |
if (that == null)
|
|
|
9891 |
return false;
|
|
|
9892 |
if (that instanceof trackCouponUsage_result)
|
|
|
9893 |
return this.equals((trackCouponUsage_result)that);
|
|
|
9894 |
return false;
|
|
|
9895 |
}
|
|
|
9896 |
|
|
|
9897 |
public boolean equals(trackCouponUsage_result that) {
|
|
|
9898 |
if (that == null)
|
|
|
9899 |
return false;
|
|
|
9900 |
|
|
|
9901 |
boolean this_present_pex = true && this.isSetPex();
|
|
|
9902 |
boolean that_present_pex = true && that.isSetPex();
|
|
|
9903 |
if (this_present_pex || that_present_pex) {
|
|
|
9904 |
if (!(this_present_pex && that_present_pex))
|
|
|
9905 |
return false;
|
|
|
9906 |
if (!this.pex.equals(that.pex))
|
|
|
9907 |
return false;
|
|
|
9908 |
}
|
|
|
9909 |
|
|
|
9910 |
return true;
|
|
|
9911 |
}
|
|
|
9912 |
|
|
|
9913 |
@Override
|
|
|
9914 |
public int hashCode() {
|
|
|
9915 |
return 0;
|
|
|
9916 |
}
|
|
|
9917 |
|
|
|
9918 |
public int compareTo(trackCouponUsage_result other) {
|
|
|
9919 |
if (!getClass().equals(other.getClass())) {
|
|
|
9920 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
9921 |
}
|
|
|
9922 |
|
|
|
9923 |
int lastComparison = 0;
|
|
|
9924 |
trackCouponUsage_result typedOther = (trackCouponUsage_result)other;
|
|
|
9925 |
|
| 3430 |
rajveer |
9926 |
lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
|
| 1982 |
varun.gupt |
9927 |
if (lastComparison != 0) {
|
|
|
9928 |
return lastComparison;
|
|
|
9929 |
}
|
| 3430 |
rajveer |
9930 |
if (isSetPex()) {
|
|
|
9931 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
|
|
|
9932 |
if (lastComparison != 0) {
|
|
|
9933 |
return lastComparison;
|
|
|
9934 |
}
|
| 1982 |
varun.gupt |
9935 |
}
|
|
|
9936 |
return 0;
|
|
|
9937 |
}
|
|
|
9938 |
|
| 3430 |
rajveer |
9939 |
public _Fields fieldForId(int fieldId) {
|
|
|
9940 |
return _Fields.findByThriftId(fieldId);
|
|
|
9941 |
}
|
|
|
9942 |
|
|
|
9943 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
9944 |
org.apache.thrift.protocol.TField field;
|
| 1982 |
varun.gupt |
9945 |
iprot.readStructBegin();
|
|
|
9946 |
while (true)
|
|
|
9947 |
{
|
|
|
9948 |
field = iprot.readFieldBegin();
|
| 3430 |
rajveer |
9949 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
| 1982 |
varun.gupt |
9950 |
break;
|
|
|
9951 |
}
|
| 3430 |
rajveer |
9952 |
switch (field.id) {
|
|
|
9953 |
case 1: // PEX
|
|
|
9954 |
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
|
|
9955 |
this.pex = new PromotionException();
|
|
|
9956 |
this.pex.read(iprot);
|
|
|
9957 |
} else {
|
|
|
9958 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
9959 |
}
|
|
|
9960 |
break;
|
|
|
9961 |
default:
|
|
|
9962 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| 1982 |
varun.gupt |
9963 |
}
|
| 3430 |
rajveer |
9964 |
iprot.readFieldEnd();
|
| 1982 |
varun.gupt |
9965 |
}
|
|
|
9966 |
iprot.readStructEnd();
|
|
|
9967 |
validate();
|
|
|
9968 |
}
|
|
|
9969 |
|
| 3430 |
rajveer |
9970 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
9971 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
9972 |
|
|
|
9973 |
if (this.isSetPex()) {
|
|
|
9974 |
oprot.writeFieldBegin(PEX_FIELD_DESC);
|
|
|
9975 |
this.pex.write(oprot);
|
|
|
9976 |
oprot.writeFieldEnd();
|
|
|
9977 |
}
|
|
|
9978 |
oprot.writeFieldStop();
|
|
|
9979 |
oprot.writeStructEnd();
|
|
|
9980 |
}
|
|
|
9981 |
|
|
|
9982 |
@Override
|
|
|
9983 |
public String toString() {
|
|
|
9984 |
StringBuilder sb = new StringBuilder("trackCouponUsage_result(");
|
|
|
9985 |
boolean first = true;
|
|
|
9986 |
|
|
|
9987 |
sb.append("pex:");
|
|
|
9988 |
if (this.pex == null) {
|
|
|
9989 |
sb.append("null");
|
|
|
9990 |
} else {
|
|
|
9991 |
sb.append(this.pex);
|
|
|
9992 |
}
|
|
|
9993 |
first = false;
|
|
|
9994 |
sb.append(")");
|
|
|
9995 |
return sb.toString();
|
|
|
9996 |
}
|
|
|
9997 |
|
| 3430 |
rajveer |
9998 |
public void validate() throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
9999 |
// check for required fields
|
|
|
10000 |
}
|
|
|
10001 |
|
| 3430 |
rajveer |
10002 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
10003 |
try {
|
|
|
10004 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
10005 |
} catch (org.apache.thrift.TException te) {
|
|
|
10006 |
throw new java.io.IOException(te);
|
|
|
10007 |
}
|
|
|
10008 |
}
|
|
|
10009 |
|
|
|
10010 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
10011 |
try {
|
|
|
10012 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
10013 |
} catch (org.apache.thrift.TException te) {
|
|
|
10014 |
throw new java.io.IOException(te);
|
|
|
10015 |
}
|
|
|
10016 |
}
|
|
|
10017 |
|
| 1982 |
varun.gupt |
10018 |
}
|
|
|
10019 |
|
| 3430 |
rajveer |
10020 |
public static class getCouponUsageCountByUser_args implements org.apache.thrift.TBase<getCouponUsageCountByUser_args, getCouponUsageCountByUser_args._Fields>, java.io.Serializable, Cloneable {
|
|
|
10021 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCouponUsageCountByUser_args");
|
| 1982 |
varun.gupt |
10022 |
|
| 3430 |
rajveer |
10023 |
private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCode", org.apache.thrift.protocol.TType.STRING, (short)1);
|
|
|
10024 |
private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)2);
|
| 1982 |
varun.gupt |
10025 |
|
| 3430 |
rajveer |
10026 |
private String couponCode; // required
|
|
|
10027 |
private long userId; // required
|
| 1982 |
varun.gupt |
10028 |
|
|
|
10029 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
| 3430 |
rajveer |
10030 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
| 1982 |
varun.gupt |
10031 |
COUPON_CODE((short)1, "couponCode"),
|
|
|
10032 |
USER_ID((short)2, "userId");
|
|
|
10033 |
|
|
|
10034 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
10035 |
|
|
|
10036 |
static {
|
|
|
10037 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
10038 |
byName.put(field.getFieldName(), field);
|
|
|
10039 |
}
|
|
|
10040 |
}
|
|
|
10041 |
|
|
|
10042 |
/**
|
|
|
10043 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
10044 |
*/
|
|
|
10045 |
public static _Fields findByThriftId(int fieldId) {
|
| 3430 |
rajveer |
10046 |
switch(fieldId) {
|
|
|
10047 |
case 1: // COUPON_CODE
|
|
|
10048 |
return COUPON_CODE;
|
|
|
10049 |
case 2: // USER_ID
|
|
|
10050 |
return USER_ID;
|
|
|
10051 |
default:
|
|
|
10052 |
return null;
|
|
|
10053 |
}
|
| 1982 |
varun.gupt |
10054 |
}
|
|
|
10055 |
|
|
|
10056 |
/**
|
|
|
10057 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
10058 |
* if it is not found.
|
|
|
10059 |
*/
|
|
|
10060 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
10061 |
_Fields fields = findByThriftId(fieldId);
|
|
|
10062 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
10063 |
return fields;
|
|
|
10064 |
}
|
|
|
10065 |
|
|
|
10066 |
/**
|
|
|
10067 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
10068 |
*/
|
|
|
10069 |
public static _Fields findByName(String name) {
|
|
|
10070 |
return byName.get(name);
|
|
|
10071 |
}
|
|
|
10072 |
|
|
|
10073 |
private final short _thriftId;
|
|
|
10074 |
private final String _fieldName;
|
|
|
10075 |
|
|
|
10076 |
_Fields(short thriftId, String fieldName) {
|
|
|
10077 |
_thriftId = thriftId;
|
|
|
10078 |
_fieldName = fieldName;
|
|
|
10079 |
}
|
|
|
10080 |
|
|
|
10081 |
public short getThriftFieldId() {
|
|
|
10082 |
return _thriftId;
|
|
|
10083 |
}
|
|
|
10084 |
|
|
|
10085 |
public String getFieldName() {
|
|
|
10086 |
return _fieldName;
|
|
|
10087 |
}
|
|
|
10088 |
}
|
|
|
10089 |
|
|
|
10090 |
// isset id assignments
|
|
|
10091 |
private static final int __USERID_ISSET_ID = 0;
|
|
|
10092 |
private BitSet __isset_bit_vector = new BitSet(1);
|
|
|
10093 |
|
| 3430 |
rajveer |
10094 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
| 1982 |
varun.gupt |
10095 |
static {
|
| 3430 |
rajveer |
10096 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
10097 |
tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
10098 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
10099 |
tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
10100 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
10101 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
10102 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCouponUsageCountByUser_args.class, metaDataMap);
|
| 1982 |
varun.gupt |
10103 |
}
|
|
|
10104 |
|
|
|
10105 |
public getCouponUsageCountByUser_args() {
|
|
|
10106 |
}
|
|
|
10107 |
|
|
|
10108 |
public getCouponUsageCountByUser_args(
|
|
|
10109 |
String couponCode,
|
|
|
10110 |
long userId)
|
|
|
10111 |
{
|
|
|
10112 |
this();
|
|
|
10113 |
this.couponCode = couponCode;
|
|
|
10114 |
this.userId = userId;
|
|
|
10115 |
setUserIdIsSet(true);
|
|
|
10116 |
}
|
|
|
10117 |
|
|
|
10118 |
/**
|
|
|
10119 |
* Performs a deep copy on <i>other</i>.
|
|
|
10120 |
*/
|
|
|
10121 |
public getCouponUsageCountByUser_args(getCouponUsageCountByUser_args other) {
|
|
|
10122 |
__isset_bit_vector.clear();
|
|
|
10123 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
10124 |
if (other.isSetCouponCode()) {
|
|
|
10125 |
this.couponCode = other.couponCode;
|
|
|
10126 |
}
|
|
|
10127 |
this.userId = other.userId;
|
|
|
10128 |
}
|
|
|
10129 |
|
|
|
10130 |
public getCouponUsageCountByUser_args deepCopy() {
|
|
|
10131 |
return new getCouponUsageCountByUser_args(this);
|
|
|
10132 |
}
|
|
|
10133 |
|
| 3430 |
rajveer |
10134 |
@Override
|
|
|
10135 |
public void clear() {
|
|
|
10136 |
this.couponCode = null;
|
|
|
10137 |
setUserIdIsSet(false);
|
|
|
10138 |
this.userId = 0;
|
| 1982 |
varun.gupt |
10139 |
}
|
|
|
10140 |
|
|
|
10141 |
public String getCouponCode() {
|
|
|
10142 |
return this.couponCode;
|
|
|
10143 |
}
|
|
|
10144 |
|
| 3430 |
rajveer |
10145 |
public void setCouponCode(String couponCode) {
|
| 1982 |
varun.gupt |
10146 |
this.couponCode = couponCode;
|
|
|
10147 |
}
|
|
|
10148 |
|
|
|
10149 |
public void unsetCouponCode() {
|
|
|
10150 |
this.couponCode = null;
|
|
|
10151 |
}
|
|
|
10152 |
|
| 3430 |
rajveer |
10153 |
/** Returns true if field couponCode is set (has been assigned a value) and false otherwise */
|
| 1982 |
varun.gupt |
10154 |
public boolean isSetCouponCode() {
|
|
|
10155 |
return this.couponCode != null;
|
|
|
10156 |
}
|
|
|
10157 |
|
|
|
10158 |
public void setCouponCodeIsSet(boolean value) {
|
|
|
10159 |
if (!value) {
|
|
|
10160 |
this.couponCode = null;
|
|
|
10161 |
}
|
|
|
10162 |
}
|
|
|
10163 |
|
|
|
10164 |
public long getUserId() {
|
|
|
10165 |
return this.userId;
|
|
|
10166 |
}
|
|
|
10167 |
|
| 3430 |
rajveer |
10168 |
public void setUserId(long userId) {
|
| 1982 |
varun.gupt |
10169 |
this.userId = userId;
|
|
|
10170 |
setUserIdIsSet(true);
|
|
|
10171 |
}
|
|
|
10172 |
|
|
|
10173 |
public void unsetUserId() {
|
|
|
10174 |
__isset_bit_vector.clear(__USERID_ISSET_ID);
|
|
|
10175 |
}
|
|
|
10176 |
|
| 3430 |
rajveer |
10177 |
/** Returns true if field userId is set (has been assigned a value) and false otherwise */
|
| 1982 |
varun.gupt |
10178 |
public boolean isSetUserId() {
|
|
|
10179 |
return __isset_bit_vector.get(__USERID_ISSET_ID);
|
|
|
10180 |
}
|
|
|
10181 |
|
|
|
10182 |
public void setUserIdIsSet(boolean value) {
|
|
|
10183 |
__isset_bit_vector.set(__USERID_ISSET_ID, value);
|
|
|
10184 |
}
|
|
|
10185 |
|
|
|
10186 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
10187 |
switch (field) {
|
|
|
10188 |
case COUPON_CODE:
|
|
|
10189 |
if (value == null) {
|
|
|
10190 |
unsetCouponCode();
|
|
|
10191 |
} else {
|
|
|
10192 |
setCouponCode((String)value);
|
|
|
10193 |
}
|
|
|
10194 |
break;
|
|
|
10195 |
|
|
|
10196 |
case USER_ID:
|
|
|
10197 |
if (value == null) {
|
|
|
10198 |
unsetUserId();
|
|
|
10199 |
} else {
|
|
|
10200 |
setUserId((Long)value);
|
|
|
10201 |
}
|
|
|
10202 |
break;
|
|
|
10203 |
|
|
|
10204 |
}
|
|
|
10205 |
}
|
|
|
10206 |
|
|
|
10207 |
public Object getFieldValue(_Fields field) {
|
|
|
10208 |
switch (field) {
|
|
|
10209 |
case COUPON_CODE:
|
|
|
10210 |
return getCouponCode();
|
|
|
10211 |
|
|
|
10212 |
case USER_ID:
|
| 3430 |
rajveer |
10213 |
return Long.valueOf(getUserId());
|
| 1982 |
varun.gupt |
10214 |
|
|
|
10215 |
}
|
|
|
10216 |
throw new IllegalStateException();
|
|
|
10217 |
}
|
|
|
10218 |
|
| 3430 |
rajveer |
10219 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
10220 |
public boolean isSet(_Fields field) {
|
|
|
10221 |
if (field == null) {
|
|
|
10222 |
throw new IllegalArgumentException();
|
|
|
10223 |
}
|
| 1982 |
varun.gupt |
10224 |
|
|
|
10225 |
switch (field) {
|
|
|
10226 |
case COUPON_CODE:
|
|
|
10227 |
return isSetCouponCode();
|
|
|
10228 |
case USER_ID:
|
|
|
10229 |
return isSetUserId();
|
|
|
10230 |
}
|
|
|
10231 |
throw new IllegalStateException();
|
|
|
10232 |
}
|
|
|
10233 |
|
|
|
10234 |
@Override
|
|
|
10235 |
public boolean equals(Object that) {
|
|
|
10236 |
if (that == null)
|
|
|
10237 |
return false;
|
|
|
10238 |
if (that instanceof getCouponUsageCountByUser_args)
|
|
|
10239 |
return this.equals((getCouponUsageCountByUser_args)that);
|
|
|
10240 |
return false;
|
|
|
10241 |
}
|
|
|
10242 |
|
|
|
10243 |
public boolean equals(getCouponUsageCountByUser_args that) {
|
|
|
10244 |
if (that == null)
|
|
|
10245 |
return false;
|
|
|
10246 |
|
|
|
10247 |
boolean this_present_couponCode = true && this.isSetCouponCode();
|
|
|
10248 |
boolean that_present_couponCode = true && that.isSetCouponCode();
|
|
|
10249 |
if (this_present_couponCode || that_present_couponCode) {
|
|
|
10250 |
if (!(this_present_couponCode && that_present_couponCode))
|
|
|
10251 |
return false;
|
|
|
10252 |
if (!this.couponCode.equals(that.couponCode))
|
|
|
10253 |
return false;
|
|
|
10254 |
}
|
|
|
10255 |
|
|
|
10256 |
boolean this_present_userId = true;
|
|
|
10257 |
boolean that_present_userId = true;
|
|
|
10258 |
if (this_present_userId || that_present_userId) {
|
|
|
10259 |
if (!(this_present_userId && that_present_userId))
|
|
|
10260 |
return false;
|
|
|
10261 |
if (this.userId != that.userId)
|
|
|
10262 |
return false;
|
|
|
10263 |
}
|
|
|
10264 |
|
|
|
10265 |
return true;
|
|
|
10266 |
}
|
|
|
10267 |
|
|
|
10268 |
@Override
|
|
|
10269 |
public int hashCode() {
|
|
|
10270 |
return 0;
|
|
|
10271 |
}
|
|
|
10272 |
|
|
|
10273 |
public int compareTo(getCouponUsageCountByUser_args other) {
|
|
|
10274 |
if (!getClass().equals(other.getClass())) {
|
|
|
10275 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
10276 |
}
|
|
|
10277 |
|
|
|
10278 |
int lastComparison = 0;
|
|
|
10279 |
getCouponUsageCountByUser_args typedOther = (getCouponUsageCountByUser_args)other;
|
|
|
10280 |
|
| 3430 |
rajveer |
10281 |
lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
|
| 1982 |
varun.gupt |
10282 |
if (lastComparison != 0) {
|
|
|
10283 |
return lastComparison;
|
|
|
10284 |
}
|
| 3430 |
rajveer |
10285 |
if (isSetCouponCode()) {
|
|
|
10286 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);
|
|
|
10287 |
if (lastComparison != 0) {
|
|
|
10288 |
return lastComparison;
|
|
|
10289 |
}
|
| 1982 |
varun.gupt |
10290 |
}
|
| 3430 |
rajveer |
10291 |
lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
|
| 1982 |
varun.gupt |
10292 |
if (lastComparison != 0) {
|
|
|
10293 |
return lastComparison;
|
|
|
10294 |
}
|
| 3430 |
rajveer |
10295 |
if (isSetUserId()) {
|
|
|
10296 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
|
|
|
10297 |
if (lastComparison != 0) {
|
|
|
10298 |
return lastComparison;
|
|
|
10299 |
}
|
| 1982 |
varun.gupt |
10300 |
}
|
|
|
10301 |
return 0;
|
|
|
10302 |
}
|
|
|
10303 |
|
| 3430 |
rajveer |
10304 |
public _Fields fieldForId(int fieldId) {
|
|
|
10305 |
return _Fields.findByThriftId(fieldId);
|
|
|
10306 |
}
|
|
|
10307 |
|
|
|
10308 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
10309 |
org.apache.thrift.protocol.TField field;
|
| 1982 |
varun.gupt |
10310 |
iprot.readStructBegin();
|
|
|
10311 |
while (true)
|
|
|
10312 |
{
|
|
|
10313 |
field = iprot.readFieldBegin();
|
| 3430 |
rajveer |
10314 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
| 1982 |
varun.gupt |
10315 |
break;
|
|
|
10316 |
}
|
| 3430 |
rajveer |
10317 |
switch (field.id) {
|
|
|
10318 |
case 1: // COUPON_CODE
|
|
|
10319 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
10320 |
this.couponCode = iprot.readString();
|
|
|
10321 |
} else {
|
|
|
10322 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
10323 |
}
|
|
|
10324 |
break;
|
|
|
10325 |
case 2: // USER_ID
|
|
|
10326 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
10327 |
this.userId = iprot.readI64();
|
|
|
10328 |
setUserIdIsSet(true);
|
|
|
10329 |
} else {
|
|
|
10330 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
10331 |
}
|
|
|
10332 |
break;
|
|
|
10333 |
default:
|
|
|
10334 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| 1982 |
varun.gupt |
10335 |
}
|
| 3430 |
rajveer |
10336 |
iprot.readFieldEnd();
|
| 1982 |
varun.gupt |
10337 |
}
|
|
|
10338 |
iprot.readStructEnd();
|
|
|
10339 |
validate();
|
|
|
10340 |
}
|
|
|
10341 |
|
| 3430 |
rajveer |
10342 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
10343 |
validate();
|
|
|
10344 |
|
|
|
10345 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
10346 |
if (this.couponCode != null) {
|
|
|
10347 |
oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
|
|
|
10348 |
oprot.writeString(this.couponCode);
|
|
|
10349 |
oprot.writeFieldEnd();
|
|
|
10350 |
}
|
|
|
10351 |
oprot.writeFieldBegin(USER_ID_FIELD_DESC);
|
|
|
10352 |
oprot.writeI64(this.userId);
|
|
|
10353 |
oprot.writeFieldEnd();
|
|
|
10354 |
oprot.writeFieldStop();
|
|
|
10355 |
oprot.writeStructEnd();
|
|
|
10356 |
}
|
|
|
10357 |
|
|
|
10358 |
@Override
|
|
|
10359 |
public String toString() {
|
|
|
10360 |
StringBuilder sb = new StringBuilder("getCouponUsageCountByUser_args(");
|
|
|
10361 |
boolean first = true;
|
|
|
10362 |
|
|
|
10363 |
sb.append("couponCode:");
|
|
|
10364 |
if (this.couponCode == null) {
|
|
|
10365 |
sb.append("null");
|
|
|
10366 |
} else {
|
|
|
10367 |
sb.append(this.couponCode);
|
|
|
10368 |
}
|
|
|
10369 |
first = false;
|
|
|
10370 |
if (!first) sb.append(", ");
|
|
|
10371 |
sb.append("userId:");
|
|
|
10372 |
sb.append(this.userId);
|
|
|
10373 |
first = false;
|
|
|
10374 |
sb.append(")");
|
|
|
10375 |
return sb.toString();
|
|
|
10376 |
}
|
|
|
10377 |
|
| 3430 |
rajveer |
10378 |
public void validate() throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
10379 |
// check for required fields
|
|
|
10380 |
}
|
|
|
10381 |
|
| 3430 |
rajveer |
10382 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
10383 |
try {
|
|
|
10384 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
10385 |
} catch (org.apache.thrift.TException te) {
|
|
|
10386 |
throw new java.io.IOException(te);
|
|
|
10387 |
}
|
|
|
10388 |
}
|
|
|
10389 |
|
|
|
10390 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
10391 |
try {
|
|
|
10392 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
10393 |
__isset_bit_vector = new BitSet(1);
|
|
|
10394 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
10395 |
} catch (org.apache.thrift.TException te) {
|
|
|
10396 |
throw new java.io.IOException(te);
|
|
|
10397 |
}
|
|
|
10398 |
}
|
|
|
10399 |
|
| 1982 |
varun.gupt |
10400 |
}
|
|
|
10401 |
|
| 3430 |
rajveer |
10402 |
public static class getCouponUsageCountByUser_result implements org.apache.thrift.TBase<getCouponUsageCountByUser_result, getCouponUsageCountByUser_result._Fields>, java.io.Serializable, Cloneable {
|
|
|
10403 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCouponUsageCountByUser_result");
|
| 1982 |
varun.gupt |
10404 |
|
| 3430 |
rajveer |
10405 |
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);
|
|
|
10406 |
private static final org.apache.thrift.protocol.TField PEX_FIELD_DESC = new org.apache.thrift.protocol.TField("pex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
|
| 1982 |
varun.gupt |
10407 |
|
| 3430 |
rajveer |
10408 |
private long success; // required
|
|
|
10409 |
private PromotionException pex; // required
|
| 1982 |
varun.gupt |
10410 |
|
|
|
10411 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
| 3430 |
rajveer |
10412 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
| 1982 |
varun.gupt |
10413 |
SUCCESS((short)0, "success"),
|
|
|
10414 |
PEX((short)1, "pex");
|
|
|
10415 |
|
|
|
10416 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
10417 |
|
|
|
10418 |
static {
|
|
|
10419 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
10420 |
byName.put(field.getFieldName(), field);
|
|
|
10421 |
}
|
|
|
10422 |
}
|
|
|
10423 |
|
|
|
10424 |
/**
|
|
|
10425 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
10426 |
*/
|
|
|
10427 |
public static _Fields findByThriftId(int fieldId) {
|
| 3430 |
rajveer |
10428 |
switch(fieldId) {
|
|
|
10429 |
case 0: // SUCCESS
|
|
|
10430 |
return SUCCESS;
|
|
|
10431 |
case 1: // PEX
|
|
|
10432 |
return PEX;
|
|
|
10433 |
default:
|
|
|
10434 |
return null;
|
|
|
10435 |
}
|
| 1982 |
varun.gupt |
10436 |
}
|
|
|
10437 |
|
|
|
10438 |
/**
|
|
|
10439 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
10440 |
* if it is not found.
|
|
|
10441 |
*/
|
|
|
10442 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
10443 |
_Fields fields = findByThriftId(fieldId);
|
|
|
10444 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
10445 |
return fields;
|
|
|
10446 |
}
|
|
|
10447 |
|
|
|
10448 |
/**
|
|
|
10449 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
10450 |
*/
|
|
|
10451 |
public static _Fields findByName(String name) {
|
|
|
10452 |
return byName.get(name);
|
|
|
10453 |
}
|
|
|
10454 |
|
|
|
10455 |
private final short _thriftId;
|
|
|
10456 |
private final String _fieldName;
|
|
|
10457 |
|
|
|
10458 |
_Fields(short thriftId, String fieldName) {
|
|
|
10459 |
_thriftId = thriftId;
|
|
|
10460 |
_fieldName = fieldName;
|
|
|
10461 |
}
|
|
|
10462 |
|
|
|
10463 |
public short getThriftFieldId() {
|
|
|
10464 |
return _thriftId;
|
|
|
10465 |
}
|
|
|
10466 |
|
|
|
10467 |
public String getFieldName() {
|
|
|
10468 |
return _fieldName;
|
|
|
10469 |
}
|
|
|
10470 |
}
|
|
|
10471 |
|
|
|
10472 |
// isset id assignments
|
|
|
10473 |
private static final int __SUCCESS_ISSET_ID = 0;
|
|
|
10474 |
private BitSet __isset_bit_vector = new BitSet(1);
|
|
|
10475 |
|
| 3430 |
rajveer |
10476 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
| 1982 |
varun.gupt |
10477 |
static {
|
| 3430 |
rajveer |
10478 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
10479 |
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
10480 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
10481 |
tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
10482 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
|
|
|
10483 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
10484 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCouponUsageCountByUser_result.class, metaDataMap);
|
| 1982 |
varun.gupt |
10485 |
}
|
|
|
10486 |
|
|
|
10487 |
public getCouponUsageCountByUser_result() {
|
|
|
10488 |
}
|
|
|
10489 |
|
|
|
10490 |
public getCouponUsageCountByUser_result(
|
|
|
10491 |
long success,
|
|
|
10492 |
PromotionException pex)
|
|
|
10493 |
{
|
|
|
10494 |
this();
|
|
|
10495 |
this.success = success;
|
|
|
10496 |
setSuccessIsSet(true);
|
|
|
10497 |
this.pex = pex;
|
|
|
10498 |
}
|
|
|
10499 |
|
|
|
10500 |
/**
|
|
|
10501 |
* Performs a deep copy on <i>other</i>.
|
|
|
10502 |
*/
|
|
|
10503 |
public getCouponUsageCountByUser_result(getCouponUsageCountByUser_result other) {
|
|
|
10504 |
__isset_bit_vector.clear();
|
|
|
10505 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
10506 |
this.success = other.success;
|
|
|
10507 |
if (other.isSetPex()) {
|
|
|
10508 |
this.pex = new PromotionException(other.pex);
|
|
|
10509 |
}
|
|
|
10510 |
}
|
|
|
10511 |
|
|
|
10512 |
public getCouponUsageCountByUser_result deepCopy() {
|
|
|
10513 |
return new getCouponUsageCountByUser_result(this);
|
|
|
10514 |
}
|
|
|
10515 |
|
| 3430 |
rajveer |
10516 |
@Override
|
|
|
10517 |
public void clear() {
|
|
|
10518 |
setSuccessIsSet(false);
|
|
|
10519 |
this.success = 0;
|
|
|
10520 |
this.pex = null;
|
| 1982 |
varun.gupt |
10521 |
}
|
|
|
10522 |
|
|
|
10523 |
public long getSuccess() {
|
|
|
10524 |
return this.success;
|
|
|
10525 |
}
|
|
|
10526 |
|
| 3430 |
rajveer |
10527 |
public void setSuccess(long success) {
|
| 1982 |
varun.gupt |
10528 |
this.success = success;
|
|
|
10529 |
setSuccessIsSet(true);
|
|
|
10530 |
}
|
|
|
10531 |
|
|
|
10532 |
public void unsetSuccess() {
|
|
|
10533 |
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
|
|
|
10534 |
}
|
|
|
10535 |
|
| 3430 |
rajveer |
10536 |
/** Returns true if field success is set (has been assigned a value) and false otherwise */
|
| 1982 |
varun.gupt |
10537 |
public boolean isSetSuccess() {
|
|
|
10538 |
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
|
|
|
10539 |
}
|
|
|
10540 |
|
|
|
10541 |
public void setSuccessIsSet(boolean value) {
|
|
|
10542 |
__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
|
|
|
10543 |
}
|
|
|
10544 |
|
|
|
10545 |
public PromotionException getPex() {
|
|
|
10546 |
return this.pex;
|
|
|
10547 |
}
|
|
|
10548 |
|
| 3430 |
rajveer |
10549 |
public void setPex(PromotionException pex) {
|
| 1982 |
varun.gupt |
10550 |
this.pex = pex;
|
|
|
10551 |
}
|
|
|
10552 |
|
|
|
10553 |
public void unsetPex() {
|
|
|
10554 |
this.pex = null;
|
|
|
10555 |
}
|
|
|
10556 |
|
| 3430 |
rajveer |
10557 |
/** Returns true if field pex is set (has been assigned a value) and false otherwise */
|
| 1982 |
varun.gupt |
10558 |
public boolean isSetPex() {
|
|
|
10559 |
return this.pex != null;
|
|
|
10560 |
}
|
|
|
10561 |
|
|
|
10562 |
public void setPexIsSet(boolean value) {
|
|
|
10563 |
if (!value) {
|
|
|
10564 |
this.pex = null;
|
|
|
10565 |
}
|
|
|
10566 |
}
|
|
|
10567 |
|
|
|
10568 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
10569 |
switch (field) {
|
|
|
10570 |
case SUCCESS:
|
|
|
10571 |
if (value == null) {
|
|
|
10572 |
unsetSuccess();
|
|
|
10573 |
} else {
|
|
|
10574 |
setSuccess((Long)value);
|
|
|
10575 |
}
|
|
|
10576 |
break;
|
|
|
10577 |
|
|
|
10578 |
case PEX:
|
|
|
10579 |
if (value == null) {
|
|
|
10580 |
unsetPex();
|
|
|
10581 |
} else {
|
|
|
10582 |
setPex((PromotionException)value);
|
|
|
10583 |
}
|
|
|
10584 |
break;
|
|
|
10585 |
|
|
|
10586 |
}
|
|
|
10587 |
}
|
|
|
10588 |
|
|
|
10589 |
public Object getFieldValue(_Fields field) {
|
|
|
10590 |
switch (field) {
|
|
|
10591 |
case SUCCESS:
|
| 3430 |
rajveer |
10592 |
return Long.valueOf(getSuccess());
|
| 1982 |
varun.gupt |
10593 |
|
|
|
10594 |
case PEX:
|
|
|
10595 |
return getPex();
|
|
|
10596 |
|
|
|
10597 |
}
|
|
|
10598 |
throw new IllegalStateException();
|
|
|
10599 |
}
|
|
|
10600 |
|
| 3430 |
rajveer |
10601 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
10602 |
public boolean isSet(_Fields field) {
|
|
|
10603 |
if (field == null) {
|
|
|
10604 |
throw new IllegalArgumentException();
|
|
|
10605 |
}
|
| 1982 |
varun.gupt |
10606 |
|
|
|
10607 |
switch (field) {
|
|
|
10608 |
case SUCCESS:
|
|
|
10609 |
return isSetSuccess();
|
|
|
10610 |
case PEX:
|
|
|
10611 |
return isSetPex();
|
|
|
10612 |
}
|
|
|
10613 |
throw new IllegalStateException();
|
|
|
10614 |
}
|
|
|
10615 |
|
|
|
10616 |
@Override
|
|
|
10617 |
public boolean equals(Object that) {
|
|
|
10618 |
if (that == null)
|
|
|
10619 |
return false;
|
|
|
10620 |
if (that instanceof getCouponUsageCountByUser_result)
|
|
|
10621 |
return this.equals((getCouponUsageCountByUser_result)that);
|
|
|
10622 |
return false;
|
|
|
10623 |
}
|
|
|
10624 |
|
|
|
10625 |
public boolean equals(getCouponUsageCountByUser_result that) {
|
|
|
10626 |
if (that == null)
|
|
|
10627 |
return false;
|
|
|
10628 |
|
|
|
10629 |
boolean this_present_success = true;
|
|
|
10630 |
boolean that_present_success = true;
|
|
|
10631 |
if (this_present_success || that_present_success) {
|
|
|
10632 |
if (!(this_present_success && that_present_success))
|
|
|
10633 |
return false;
|
|
|
10634 |
if (this.success != that.success)
|
|
|
10635 |
return false;
|
|
|
10636 |
}
|
|
|
10637 |
|
|
|
10638 |
boolean this_present_pex = true && this.isSetPex();
|
|
|
10639 |
boolean that_present_pex = true && that.isSetPex();
|
|
|
10640 |
if (this_present_pex || that_present_pex) {
|
|
|
10641 |
if (!(this_present_pex && that_present_pex))
|
|
|
10642 |
return false;
|
|
|
10643 |
if (!this.pex.equals(that.pex))
|
|
|
10644 |
return false;
|
|
|
10645 |
}
|
|
|
10646 |
|
|
|
10647 |
return true;
|
|
|
10648 |
}
|
|
|
10649 |
|
|
|
10650 |
@Override
|
|
|
10651 |
public int hashCode() {
|
|
|
10652 |
return 0;
|
|
|
10653 |
}
|
|
|
10654 |
|
|
|
10655 |
public int compareTo(getCouponUsageCountByUser_result other) {
|
|
|
10656 |
if (!getClass().equals(other.getClass())) {
|
|
|
10657 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
10658 |
}
|
|
|
10659 |
|
|
|
10660 |
int lastComparison = 0;
|
|
|
10661 |
getCouponUsageCountByUser_result typedOther = (getCouponUsageCountByUser_result)other;
|
|
|
10662 |
|
| 3430 |
rajveer |
10663 |
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
|
| 1982 |
varun.gupt |
10664 |
if (lastComparison != 0) {
|
|
|
10665 |
return lastComparison;
|
|
|
10666 |
}
|
| 3430 |
rajveer |
10667 |
if (isSetSuccess()) {
|
|
|
10668 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
|
|
|
10669 |
if (lastComparison != 0) {
|
|
|
10670 |
return lastComparison;
|
|
|
10671 |
}
|
| 1982 |
varun.gupt |
10672 |
}
|
| 3430 |
rajveer |
10673 |
lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
|
| 1982 |
varun.gupt |
10674 |
if (lastComparison != 0) {
|
|
|
10675 |
return lastComparison;
|
|
|
10676 |
}
|
| 3430 |
rajveer |
10677 |
if (isSetPex()) {
|
|
|
10678 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
|
|
|
10679 |
if (lastComparison != 0) {
|
|
|
10680 |
return lastComparison;
|
|
|
10681 |
}
|
| 1982 |
varun.gupt |
10682 |
}
|
|
|
10683 |
return 0;
|
|
|
10684 |
}
|
|
|
10685 |
|
| 3430 |
rajveer |
10686 |
public _Fields fieldForId(int fieldId) {
|
|
|
10687 |
return _Fields.findByThriftId(fieldId);
|
|
|
10688 |
}
|
|
|
10689 |
|
|
|
10690 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
10691 |
org.apache.thrift.protocol.TField field;
|
| 1982 |
varun.gupt |
10692 |
iprot.readStructBegin();
|
|
|
10693 |
while (true)
|
|
|
10694 |
{
|
|
|
10695 |
field = iprot.readFieldBegin();
|
| 3430 |
rajveer |
10696 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
| 1982 |
varun.gupt |
10697 |
break;
|
|
|
10698 |
}
|
| 3430 |
rajveer |
10699 |
switch (field.id) {
|
|
|
10700 |
case 0: // SUCCESS
|
|
|
10701 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
10702 |
this.success = iprot.readI64();
|
|
|
10703 |
setSuccessIsSet(true);
|
|
|
10704 |
} else {
|
|
|
10705 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
10706 |
}
|
|
|
10707 |
break;
|
|
|
10708 |
case 1: // PEX
|
|
|
10709 |
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
|
|
10710 |
this.pex = new PromotionException();
|
|
|
10711 |
this.pex.read(iprot);
|
|
|
10712 |
} else {
|
|
|
10713 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
10714 |
}
|
|
|
10715 |
break;
|
|
|
10716 |
default:
|
|
|
10717 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| 1982 |
varun.gupt |
10718 |
}
|
| 3430 |
rajveer |
10719 |
iprot.readFieldEnd();
|
| 1982 |
varun.gupt |
10720 |
}
|
|
|
10721 |
iprot.readStructEnd();
|
|
|
10722 |
validate();
|
|
|
10723 |
}
|
|
|
10724 |
|
| 3430 |
rajveer |
10725 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
10726 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
10727 |
|
|
|
10728 |
if (this.isSetSuccess()) {
|
|
|
10729 |
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
|
|
10730 |
oprot.writeI64(this.success);
|
|
|
10731 |
oprot.writeFieldEnd();
|
|
|
10732 |
} else if (this.isSetPex()) {
|
|
|
10733 |
oprot.writeFieldBegin(PEX_FIELD_DESC);
|
|
|
10734 |
this.pex.write(oprot);
|
|
|
10735 |
oprot.writeFieldEnd();
|
|
|
10736 |
}
|
|
|
10737 |
oprot.writeFieldStop();
|
|
|
10738 |
oprot.writeStructEnd();
|
|
|
10739 |
}
|
|
|
10740 |
|
|
|
10741 |
@Override
|
|
|
10742 |
public String toString() {
|
|
|
10743 |
StringBuilder sb = new StringBuilder("getCouponUsageCountByUser_result(");
|
|
|
10744 |
boolean first = true;
|
|
|
10745 |
|
|
|
10746 |
sb.append("success:");
|
|
|
10747 |
sb.append(this.success);
|
|
|
10748 |
first = false;
|
|
|
10749 |
if (!first) sb.append(", ");
|
|
|
10750 |
sb.append("pex:");
|
|
|
10751 |
if (this.pex == null) {
|
|
|
10752 |
sb.append("null");
|
|
|
10753 |
} else {
|
|
|
10754 |
sb.append(this.pex);
|
|
|
10755 |
}
|
|
|
10756 |
first = false;
|
|
|
10757 |
sb.append(")");
|
|
|
10758 |
return sb.toString();
|
|
|
10759 |
}
|
|
|
10760 |
|
| 3430 |
rajveer |
10761 |
public void validate() throws org.apache.thrift.TException {
|
| 1982 |
varun.gupt |
10762 |
// check for required fields
|
|
|
10763 |
}
|
|
|
10764 |
|
| 3430 |
rajveer |
10765 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
10766 |
try {
|
|
|
10767 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
10768 |
} catch (org.apache.thrift.TException te) {
|
|
|
10769 |
throw new java.io.IOException(te);
|
|
|
10770 |
}
|
|
|
10771 |
}
|
|
|
10772 |
|
|
|
10773 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
10774 |
try {
|
|
|
10775 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
10776 |
} catch (org.apache.thrift.TException te) {
|
|
|
10777 |
throw new java.io.IOException(te);
|
|
|
10778 |
}
|
|
|
10779 |
}
|
|
|
10780 |
|
| 1982 |
varun.gupt |
10781 |
}
|
|
|
10782 |
|
| 6497 |
amit.gupta |
10783 |
public static class getActiveCodes_args implements org.apache.thrift.TBase<getActiveCodes_args, getActiveCodes_args._Fields>, java.io.Serializable, Cloneable {
|
|
|
10784 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getActiveCodes_args");
|
|
|
10785 |
|
|
|
10786 |
private static final org.apache.thrift.protocol.TField PROMOTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("promotionId", org.apache.thrift.protocol.TType.I64, (short)1);
|
|
|
10787 |
|
|
|
10788 |
private long promotionId; // required
|
|
|
10789 |
|
|
|
10790 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
10791 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
10792 |
PROMOTION_ID((short)1, "promotionId");
|
|
|
10793 |
|
|
|
10794 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
10795 |
|
|
|
10796 |
static {
|
|
|
10797 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
10798 |
byName.put(field.getFieldName(), field);
|
|
|
10799 |
}
|
|
|
10800 |
}
|
|
|
10801 |
|
|
|
10802 |
/**
|
|
|
10803 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
10804 |
*/
|
|
|
10805 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
10806 |
switch(fieldId) {
|
|
|
10807 |
case 1: // PROMOTION_ID
|
|
|
10808 |
return PROMOTION_ID;
|
|
|
10809 |
default:
|
|
|
10810 |
return null;
|
|
|
10811 |
}
|
|
|
10812 |
}
|
|
|
10813 |
|
|
|
10814 |
/**
|
|
|
10815 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
10816 |
* if it is not found.
|
|
|
10817 |
*/
|
|
|
10818 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
10819 |
_Fields fields = findByThriftId(fieldId);
|
|
|
10820 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
10821 |
return fields;
|
|
|
10822 |
}
|
|
|
10823 |
|
|
|
10824 |
/**
|
|
|
10825 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
10826 |
*/
|
|
|
10827 |
public static _Fields findByName(String name) {
|
|
|
10828 |
return byName.get(name);
|
|
|
10829 |
}
|
|
|
10830 |
|
|
|
10831 |
private final short _thriftId;
|
|
|
10832 |
private final String _fieldName;
|
|
|
10833 |
|
|
|
10834 |
_Fields(short thriftId, String fieldName) {
|
|
|
10835 |
_thriftId = thriftId;
|
|
|
10836 |
_fieldName = fieldName;
|
|
|
10837 |
}
|
|
|
10838 |
|
|
|
10839 |
public short getThriftFieldId() {
|
|
|
10840 |
return _thriftId;
|
|
|
10841 |
}
|
|
|
10842 |
|
|
|
10843 |
public String getFieldName() {
|
|
|
10844 |
return _fieldName;
|
|
|
10845 |
}
|
|
|
10846 |
}
|
|
|
10847 |
|
|
|
10848 |
// isset id assignments
|
|
|
10849 |
private static final int __PROMOTIONID_ISSET_ID = 0;
|
|
|
10850 |
private BitSet __isset_bit_vector = new BitSet(1);
|
|
|
10851 |
|
|
|
10852 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
10853 |
static {
|
|
|
10854 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
10855 |
tmpMap.put(_Fields.PROMOTION_ID, new org.apache.thrift.meta_data.FieldMetaData("promotionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
10856 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
10857 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
10858 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getActiveCodes_args.class, metaDataMap);
|
|
|
10859 |
}
|
|
|
10860 |
|
|
|
10861 |
public getActiveCodes_args() {
|
|
|
10862 |
}
|
|
|
10863 |
|
|
|
10864 |
public getActiveCodes_args(
|
|
|
10865 |
long promotionId)
|
|
|
10866 |
{
|
|
|
10867 |
this();
|
|
|
10868 |
this.promotionId = promotionId;
|
|
|
10869 |
setPromotionIdIsSet(true);
|
|
|
10870 |
}
|
|
|
10871 |
|
|
|
10872 |
/**
|
|
|
10873 |
* Performs a deep copy on <i>other</i>.
|
|
|
10874 |
*/
|
|
|
10875 |
public getActiveCodes_args(getActiveCodes_args other) {
|
|
|
10876 |
__isset_bit_vector.clear();
|
|
|
10877 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
10878 |
this.promotionId = other.promotionId;
|
|
|
10879 |
}
|
|
|
10880 |
|
|
|
10881 |
public getActiveCodes_args deepCopy() {
|
|
|
10882 |
return new getActiveCodes_args(this);
|
|
|
10883 |
}
|
|
|
10884 |
|
|
|
10885 |
@Override
|
|
|
10886 |
public void clear() {
|
|
|
10887 |
setPromotionIdIsSet(false);
|
|
|
10888 |
this.promotionId = 0;
|
|
|
10889 |
}
|
|
|
10890 |
|
|
|
10891 |
public long getPromotionId() {
|
|
|
10892 |
return this.promotionId;
|
|
|
10893 |
}
|
|
|
10894 |
|
|
|
10895 |
public void setPromotionId(long promotionId) {
|
|
|
10896 |
this.promotionId = promotionId;
|
|
|
10897 |
setPromotionIdIsSet(true);
|
|
|
10898 |
}
|
|
|
10899 |
|
|
|
10900 |
public void unsetPromotionId() {
|
|
|
10901 |
__isset_bit_vector.clear(__PROMOTIONID_ISSET_ID);
|
|
|
10902 |
}
|
|
|
10903 |
|
|
|
10904 |
/** Returns true if field promotionId is set (has been assigned a value) and false otherwise */
|
|
|
10905 |
public boolean isSetPromotionId() {
|
|
|
10906 |
return __isset_bit_vector.get(__PROMOTIONID_ISSET_ID);
|
|
|
10907 |
}
|
|
|
10908 |
|
|
|
10909 |
public void setPromotionIdIsSet(boolean value) {
|
|
|
10910 |
__isset_bit_vector.set(__PROMOTIONID_ISSET_ID, value);
|
|
|
10911 |
}
|
|
|
10912 |
|
|
|
10913 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
10914 |
switch (field) {
|
|
|
10915 |
case PROMOTION_ID:
|
|
|
10916 |
if (value == null) {
|
|
|
10917 |
unsetPromotionId();
|
|
|
10918 |
} else {
|
|
|
10919 |
setPromotionId((Long)value);
|
|
|
10920 |
}
|
|
|
10921 |
break;
|
|
|
10922 |
|
|
|
10923 |
}
|
|
|
10924 |
}
|
|
|
10925 |
|
|
|
10926 |
public Object getFieldValue(_Fields field) {
|
|
|
10927 |
switch (field) {
|
|
|
10928 |
case PROMOTION_ID:
|
|
|
10929 |
return Long.valueOf(getPromotionId());
|
|
|
10930 |
|
|
|
10931 |
}
|
|
|
10932 |
throw new IllegalStateException();
|
|
|
10933 |
}
|
|
|
10934 |
|
|
|
10935 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
10936 |
public boolean isSet(_Fields field) {
|
|
|
10937 |
if (field == null) {
|
|
|
10938 |
throw new IllegalArgumentException();
|
|
|
10939 |
}
|
|
|
10940 |
|
|
|
10941 |
switch (field) {
|
|
|
10942 |
case PROMOTION_ID:
|
|
|
10943 |
return isSetPromotionId();
|
|
|
10944 |
}
|
|
|
10945 |
throw new IllegalStateException();
|
|
|
10946 |
}
|
|
|
10947 |
|
|
|
10948 |
@Override
|
|
|
10949 |
public boolean equals(Object that) {
|
|
|
10950 |
if (that == null)
|
|
|
10951 |
return false;
|
|
|
10952 |
if (that instanceof getActiveCodes_args)
|
|
|
10953 |
return this.equals((getActiveCodes_args)that);
|
|
|
10954 |
return false;
|
|
|
10955 |
}
|
|
|
10956 |
|
|
|
10957 |
public boolean equals(getActiveCodes_args that) {
|
|
|
10958 |
if (that == null)
|
|
|
10959 |
return false;
|
|
|
10960 |
|
|
|
10961 |
boolean this_present_promotionId = true;
|
|
|
10962 |
boolean that_present_promotionId = true;
|
|
|
10963 |
if (this_present_promotionId || that_present_promotionId) {
|
|
|
10964 |
if (!(this_present_promotionId && that_present_promotionId))
|
|
|
10965 |
return false;
|
|
|
10966 |
if (this.promotionId != that.promotionId)
|
|
|
10967 |
return false;
|
|
|
10968 |
}
|
|
|
10969 |
|
|
|
10970 |
return true;
|
|
|
10971 |
}
|
|
|
10972 |
|
|
|
10973 |
@Override
|
|
|
10974 |
public int hashCode() {
|
|
|
10975 |
return 0;
|
|
|
10976 |
}
|
|
|
10977 |
|
|
|
10978 |
public int compareTo(getActiveCodes_args other) {
|
|
|
10979 |
if (!getClass().equals(other.getClass())) {
|
|
|
10980 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
10981 |
}
|
|
|
10982 |
|
|
|
10983 |
int lastComparison = 0;
|
|
|
10984 |
getActiveCodes_args typedOther = (getActiveCodes_args)other;
|
|
|
10985 |
|
|
|
10986 |
lastComparison = Boolean.valueOf(isSetPromotionId()).compareTo(typedOther.isSetPromotionId());
|
|
|
10987 |
if (lastComparison != 0) {
|
|
|
10988 |
return lastComparison;
|
|
|
10989 |
}
|
|
|
10990 |
if (isSetPromotionId()) {
|
|
|
10991 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.promotionId, typedOther.promotionId);
|
|
|
10992 |
if (lastComparison != 0) {
|
|
|
10993 |
return lastComparison;
|
|
|
10994 |
}
|
|
|
10995 |
}
|
|
|
10996 |
return 0;
|
|
|
10997 |
}
|
|
|
10998 |
|
|
|
10999 |
public _Fields fieldForId(int fieldId) {
|
|
|
11000 |
return _Fields.findByThriftId(fieldId);
|
|
|
11001 |
}
|
|
|
11002 |
|
|
|
11003 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
11004 |
org.apache.thrift.protocol.TField field;
|
|
|
11005 |
iprot.readStructBegin();
|
|
|
11006 |
while (true)
|
|
|
11007 |
{
|
|
|
11008 |
field = iprot.readFieldBegin();
|
|
|
11009 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
11010 |
break;
|
|
|
11011 |
}
|
|
|
11012 |
switch (field.id) {
|
|
|
11013 |
case 1: // PROMOTION_ID
|
|
|
11014 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
11015 |
this.promotionId = iprot.readI64();
|
|
|
11016 |
setPromotionIdIsSet(true);
|
|
|
11017 |
} else {
|
|
|
11018 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
11019 |
}
|
|
|
11020 |
break;
|
|
|
11021 |
default:
|
|
|
11022 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
11023 |
}
|
|
|
11024 |
iprot.readFieldEnd();
|
|
|
11025 |
}
|
|
|
11026 |
iprot.readStructEnd();
|
|
|
11027 |
validate();
|
|
|
11028 |
}
|
|
|
11029 |
|
|
|
11030 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
11031 |
validate();
|
|
|
11032 |
|
|
|
11033 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
11034 |
oprot.writeFieldBegin(PROMOTION_ID_FIELD_DESC);
|
|
|
11035 |
oprot.writeI64(this.promotionId);
|
|
|
11036 |
oprot.writeFieldEnd();
|
|
|
11037 |
oprot.writeFieldStop();
|
|
|
11038 |
oprot.writeStructEnd();
|
|
|
11039 |
}
|
|
|
11040 |
|
|
|
11041 |
@Override
|
|
|
11042 |
public String toString() {
|
|
|
11043 |
StringBuilder sb = new StringBuilder("getActiveCodes_args(");
|
|
|
11044 |
boolean first = true;
|
|
|
11045 |
|
|
|
11046 |
sb.append("promotionId:");
|
|
|
11047 |
sb.append(this.promotionId);
|
|
|
11048 |
first = false;
|
|
|
11049 |
sb.append(")");
|
|
|
11050 |
return sb.toString();
|
|
|
11051 |
}
|
|
|
11052 |
|
|
|
11053 |
public void validate() throws org.apache.thrift.TException {
|
|
|
11054 |
// check for required fields
|
|
|
11055 |
}
|
|
|
11056 |
|
|
|
11057 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
11058 |
try {
|
|
|
11059 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
11060 |
} catch (org.apache.thrift.TException te) {
|
|
|
11061 |
throw new java.io.IOException(te);
|
|
|
11062 |
}
|
|
|
11063 |
}
|
|
|
11064 |
|
|
|
11065 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
11066 |
try {
|
|
|
11067 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
11068 |
__isset_bit_vector = new BitSet(1);
|
|
|
11069 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
11070 |
} catch (org.apache.thrift.TException te) {
|
|
|
11071 |
throw new java.io.IOException(te);
|
|
|
11072 |
}
|
|
|
11073 |
}
|
|
|
11074 |
|
|
|
11075 |
}
|
|
|
11076 |
|
|
|
11077 |
public static class getActiveCodes_result implements org.apache.thrift.TBase<getActiveCodes_result, getActiveCodes_result._Fields>, java.io.Serializable, Cloneable {
|
|
|
11078 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getActiveCodes_result");
|
|
|
11079 |
|
|
|
11080 |
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
|
|
|
11081 |
private static final org.apache.thrift.protocol.TField PEX_FIELD_DESC = new org.apache.thrift.protocol.TField("pex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
|
|
|
11082 |
|
|
|
11083 |
private List<Coupon> success; // required
|
|
|
11084 |
private PromotionException pex; // required
|
|
|
11085 |
|
|
|
11086 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
11087 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
11088 |
SUCCESS((short)0, "success"),
|
|
|
11089 |
PEX((short)1, "pex");
|
|
|
11090 |
|
|
|
11091 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
11092 |
|
|
|
11093 |
static {
|
|
|
11094 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
11095 |
byName.put(field.getFieldName(), field);
|
|
|
11096 |
}
|
|
|
11097 |
}
|
|
|
11098 |
|
|
|
11099 |
/**
|
|
|
11100 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
11101 |
*/
|
|
|
11102 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
11103 |
switch(fieldId) {
|
|
|
11104 |
case 0: // SUCCESS
|
|
|
11105 |
return SUCCESS;
|
|
|
11106 |
case 1: // PEX
|
|
|
11107 |
return PEX;
|
|
|
11108 |
default:
|
|
|
11109 |
return null;
|
|
|
11110 |
}
|
|
|
11111 |
}
|
|
|
11112 |
|
|
|
11113 |
/**
|
|
|
11114 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
11115 |
* if it is not found.
|
|
|
11116 |
*/
|
|
|
11117 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
11118 |
_Fields fields = findByThriftId(fieldId);
|
|
|
11119 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
11120 |
return fields;
|
|
|
11121 |
}
|
|
|
11122 |
|
|
|
11123 |
/**
|
|
|
11124 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
11125 |
*/
|
|
|
11126 |
public static _Fields findByName(String name) {
|
|
|
11127 |
return byName.get(name);
|
|
|
11128 |
}
|
|
|
11129 |
|
|
|
11130 |
private final short _thriftId;
|
|
|
11131 |
private final String _fieldName;
|
|
|
11132 |
|
|
|
11133 |
_Fields(short thriftId, String fieldName) {
|
|
|
11134 |
_thriftId = thriftId;
|
|
|
11135 |
_fieldName = fieldName;
|
|
|
11136 |
}
|
|
|
11137 |
|
|
|
11138 |
public short getThriftFieldId() {
|
|
|
11139 |
return _thriftId;
|
|
|
11140 |
}
|
|
|
11141 |
|
|
|
11142 |
public String getFieldName() {
|
|
|
11143 |
return _fieldName;
|
|
|
11144 |
}
|
|
|
11145 |
}
|
|
|
11146 |
|
|
|
11147 |
// isset id assignments
|
|
|
11148 |
|
|
|
11149 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
11150 |
static {
|
|
|
11151 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
11152 |
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
11153 |
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
|
|
|
11154 |
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Coupon.class))));
|
|
|
11155 |
tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
11156 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
|
|
|
11157 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
11158 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getActiveCodes_result.class, metaDataMap);
|
|
|
11159 |
}
|
|
|
11160 |
|
|
|
11161 |
public getActiveCodes_result() {
|
|
|
11162 |
}
|
|
|
11163 |
|
|
|
11164 |
public getActiveCodes_result(
|
|
|
11165 |
List<Coupon> success,
|
|
|
11166 |
PromotionException pex)
|
|
|
11167 |
{
|
|
|
11168 |
this();
|
|
|
11169 |
this.success = success;
|
|
|
11170 |
this.pex = pex;
|
|
|
11171 |
}
|
|
|
11172 |
|
|
|
11173 |
/**
|
|
|
11174 |
* Performs a deep copy on <i>other</i>.
|
|
|
11175 |
*/
|
|
|
11176 |
public getActiveCodes_result(getActiveCodes_result other) {
|
|
|
11177 |
if (other.isSetSuccess()) {
|
|
|
11178 |
List<Coupon> __this__success = new ArrayList<Coupon>();
|
|
|
11179 |
for (Coupon other_element : other.success) {
|
|
|
11180 |
__this__success.add(new Coupon(other_element));
|
|
|
11181 |
}
|
|
|
11182 |
this.success = __this__success;
|
|
|
11183 |
}
|
|
|
11184 |
if (other.isSetPex()) {
|
|
|
11185 |
this.pex = new PromotionException(other.pex);
|
|
|
11186 |
}
|
|
|
11187 |
}
|
|
|
11188 |
|
|
|
11189 |
public getActiveCodes_result deepCopy() {
|
|
|
11190 |
return new getActiveCodes_result(this);
|
|
|
11191 |
}
|
|
|
11192 |
|
|
|
11193 |
@Override
|
|
|
11194 |
public void clear() {
|
|
|
11195 |
this.success = null;
|
|
|
11196 |
this.pex = null;
|
|
|
11197 |
}
|
|
|
11198 |
|
|
|
11199 |
public int getSuccessSize() {
|
|
|
11200 |
return (this.success == null) ? 0 : this.success.size();
|
|
|
11201 |
}
|
|
|
11202 |
|
|
|
11203 |
public java.util.Iterator<Coupon> getSuccessIterator() {
|
|
|
11204 |
return (this.success == null) ? null : this.success.iterator();
|
|
|
11205 |
}
|
|
|
11206 |
|
|
|
11207 |
public void addToSuccess(Coupon elem) {
|
|
|
11208 |
if (this.success == null) {
|
|
|
11209 |
this.success = new ArrayList<Coupon>();
|
|
|
11210 |
}
|
|
|
11211 |
this.success.add(elem);
|
|
|
11212 |
}
|
|
|
11213 |
|
|
|
11214 |
public List<Coupon> getSuccess() {
|
|
|
11215 |
return this.success;
|
|
|
11216 |
}
|
|
|
11217 |
|
|
|
11218 |
public void setSuccess(List<Coupon> success) {
|
|
|
11219 |
this.success = success;
|
|
|
11220 |
}
|
|
|
11221 |
|
|
|
11222 |
public void unsetSuccess() {
|
|
|
11223 |
this.success = null;
|
|
|
11224 |
}
|
|
|
11225 |
|
|
|
11226 |
/** Returns true if field success is set (has been assigned a value) and false otherwise */
|
|
|
11227 |
public boolean isSetSuccess() {
|
|
|
11228 |
return this.success != null;
|
|
|
11229 |
}
|
|
|
11230 |
|
|
|
11231 |
public void setSuccessIsSet(boolean value) {
|
|
|
11232 |
if (!value) {
|
|
|
11233 |
this.success = null;
|
|
|
11234 |
}
|
|
|
11235 |
}
|
|
|
11236 |
|
|
|
11237 |
public PromotionException getPex() {
|
|
|
11238 |
return this.pex;
|
|
|
11239 |
}
|
|
|
11240 |
|
|
|
11241 |
public void setPex(PromotionException pex) {
|
|
|
11242 |
this.pex = pex;
|
|
|
11243 |
}
|
|
|
11244 |
|
|
|
11245 |
public void unsetPex() {
|
|
|
11246 |
this.pex = null;
|
|
|
11247 |
}
|
|
|
11248 |
|
|
|
11249 |
/** Returns true if field pex is set (has been assigned a value) and false otherwise */
|
|
|
11250 |
public boolean isSetPex() {
|
|
|
11251 |
return this.pex != null;
|
|
|
11252 |
}
|
|
|
11253 |
|
|
|
11254 |
public void setPexIsSet(boolean value) {
|
|
|
11255 |
if (!value) {
|
|
|
11256 |
this.pex = null;
|
|
|
11257 |
}
|
|
|
11258 |
}
|
|
|
11259 |
|
|
|
11260 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
11261 |
switch (field) {
|
|
|
11262 |
case SUCCESS:
|
|
|
11263 |
if (value == null) {
|
|
|
11264 |
unsetSuccess();
|
|
|
11265 |
} else {
|
|
|
11266 |
setSuccess((List<Coupon>)value);
|
|
|
11267 |
}
|
|
|
11268 |
break;
|
|
|
11269 |
|
|
|
11270 |
case PEX:
|
|
|
11271 |
if (value == null) {
|
|
|
11272 |
unsetPex();
|
|
|
11273 |
} else {
|
|
|
11274 |
setPex((PromotionException)value);
|
|
|
11275 |
}
|
|
|
11276 |
break;
|
|
|
11277 |
|
|
|
11278 |
}
|
|
|
11279 |
}
|
|
|
11280 |
|
|
|
11281 |
public Object getFieldValue(_Fields field) {
|
|
|
11282 |
switch (field) {
|
|
|
11283 |
case SUCCESS:
|
|
|
11284 |
return getSuccess();
|
|
|
11285 |
|
|
|
11286 |
case PEX:
|
|
|
11287 |
return getPex();
|
|
|
11288 |
|
|
|
11289 |
}
|
|
|
11290 |
throw new IllegalStateException();
|
|
|
11291 |
}
|
|
|
11292 |
|
|
|
11293 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
11294 |
public boolean isSet(_Fields field) {
|
|
|
11295 |
if (field == null) {
|
|
|
11296 |
throw new IllegalArgumentException();
|
|
|
11297 |
}
|
|
|
11298 |
|
|
|
11299 |
switch (field) {
|
|
|
11300 |
case SUCCESS:
|
|
|
11301 |
return isSetSuccess();
|
|
|
11302 |
case PEX:
|
|
|
11303 |
return isSetPex();
|
|
|
11304 |
}
|
|
|
11305 |
throw new IllegalStateException();
|
|
|
11306 |
}
|
|
|
11307 |
|
|
|
11308 |
@Override
|
|
|
11309 |
public boolean equals(Object that) {
|
|
|
11310 |
if (that == null)
|
|
|
11311 |
return false;
|
|
|
11312 |
if (that instanceof getActiveCodes_result)
|
|
|
11313 |
return this.equals((getActiveCodes_result)that);
|
|
|
11314 |
return false;
|
|
|
11315 |
}
|
|
|
11316 |
|
|
|
11317 |
public boolean equals(getActiveCodes_result that) {
|
|
|
11318 |
if (that == null)
|
|
|
11319 |
return false;
|
|
|
11320 |
|
|
|
11321 |
boolean this_present_success = true && this.isSetSuccess();
|
|
|
11322 |
boolean that_present_success = true && that.isSetSuccess();
|
|
|
11323 |
if (this_present_success || that_present_success) {
|
|
|
11324 |
if (!(this_present_success && that_present_success))
|
|
|
11325 |
return false;
|
|
|
11326 |
if (!this.success.equals(that.success))
|
|
|
11327 |
return false;
|
|
|
11328 |
}
|
|
|
11329 |
|
|
|
11330 |
boolean this_present_pex = true && this.isSetPex();
|
|
|
11331 |
boolean that_present_pex = true && that.isSetPex();
|
|
|
11332 |
if (this_present_pex || that_present_pex) {
|
|
|
11333 |
if (!(this_present_pex && that_present_pex))
|
|
|
11334 |
return false;
|
|
|
11335 |
if (!this.pex.equals(that.pex))
|
|
|
11336 |
return false;
|
|
|
11337 |
}
|
|
|
11338 |
|
|
|
11339 |
return true;
|
|
|
11340 |
}
|
|
|
11341 |
|
|
|
11342 |
@Override
|
|
|
11343 |
public int hashCode() {
|
|
|
11344 |
return 0;
|
|
|
11345 |
}
|
|
|
11346 |
|
|
|
11347 |
public int compareTo(getActiveCodes_result other) {
|
|
|
11348 |
if (!getClass().equals(other.getClass())) {
|
|
|
11349 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
11350 |
}
|
|
|
11351 |
|
|
|
11352 |
int lastComparison = 0;
|
|
|
11353 |
getActiveCodes_result typedOther = (getActiveCodes_result)other;
|
|
|
11354 |
|
|
|
11355 |
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
|
|
|
11356 |
if (lastComparison != 0) {
|
|
|
11357 |
return lastComparison;
|
|
|
11358 |
}
|
|
|
11359 |
if (isSetSuccess()) {
|
|
|
11360 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
|
|
|
11361 |
if (lastComparison != 0) {
|
|
|
11362 |
return lastComparison;
|
|
|
11363 |
}
|
|
|
11364 |
}
|
|
|
11365 |
lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
|
|
|
11366 |
if (lastComparison != 0) {
|
|
|
11367 |
return lastComparison;
|
|
|
11368 |
}
|
|
|
11369 |
if (isSetPex()) {
|
|
|
11370 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
|
|
|
11371 |
if (lastComparison != 0) {
|
|
|
11372 |
return lastComparison;
|
|
|
11373 |
}
|
|
|
11374 |
}
|
|
|
11375 |
return 0;
|
|
|
11376 |
}
|
|
|
11377 |
|
|
|
11378 |
public _Fields fieldForId(int fieldId) {
|
|
|
11379 |
return _Fields.findByThriftId(fieldId);
|
|
|
11380 |
}
|
|
|
11381 |
|
|
|
11382 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
11383 |
org.apache.thrift.protocol.TField field;
|
|
|
11384 |
iprot.readStructBegin();
|
|
|
11385 |
while (true)
|
|
|
11386 |
{
|
|
|
11387 |
field = iprot.readFieldBegin();
|
|
|
11388 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
11389 |
break;
|
|
|
11390 |
}
|
|
|
11391 |
switch (field.id) {
|
|
|
11392 |
case 0: // SUCCESS
|
|
|
11393 |
if (field.type == org.apache.thrift.protocol.TType.LIST) {
|
|
|
11394 |
{
|
| 6736 |
amit.gupta |
11395 |
org.apache.thrift.protocol.TList _list26 = iprot.readListBegin();
|
|
|
11396 |
this.success = new ArrayList<Coupon>(_list26.size);
|
|
|
11397 |
for (int _i27 = 0; _i27 < _list26.size; ++_i27)
|
| 6497 |
amit.gupta |
11398 |
{
|
| 6736 |
amit.gupta |
11399 |
Coupon _elem28; // required
|
|
|
11400 |
_elem28 = new Coupon();
|
|
|
11401 |
_elem28.read(iprot);
|
|
|
11402 |
this.success.add(_elem28);
|
| 6497 |
amit.gupta |
11403 |
}
|
|
|
11404 |
iprot.readListEnd();
|
|
|
11405 |
}
|
|
|
11406 |
} else {
|
|
|
11407 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
11408 |
}
|
|
|
11409 |
break;
|
|
|
11410 |
case 1: // PEX
|
|
|
11411 |
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
|
|
11412 |
this.pex = new PromotionException();
|
|
|
11413 |
this.pex.read(iprot);
|
|
|
11414 |
} else {
|
|
|
11415 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
11416 |
}
|
|
|
11417 |
break;
|
|
|
11418 |
default:
|
|
|
11419 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
11420 |
}
|
|
|
11421 |
iprot.readFieldEnd();
|
|
|
11422 |
}
|
|
|
11423 |
iprot.readStructEnd();
|
|
|
11424 |
validate();
|
|
|
11425 |
}
|
|
|
11426 |
|
|
|
11427 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
11428 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
11429 |
|
|
|
11430 |
if (this.isSetSuccess()) {
|
|
|
11431 |
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
|
|
11432 |
{
|
|
|
11433 |
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
|
| 6736 |
amit.gupta |
11434 |
for (Coupon _iter29 : this.success)
|
| 6497 |
amit.gupta |
11435 |
{
|
| 6736 |
amit.gupta |
11436 |
_iter29.write(oprot);
|
| 6497 |
amit.gupta |
11437 |
}
|
|
|
11438 |
oprot.writeListEnd();
|
|
|
11439 |
}
|
|
|
11440 |
oprot.writeFieldEnd();
|
|
|
11441 |
} else if (this.isSetPex()) {
|
|
|
11442 |
oprot.writeFieldBegin(PEX_FIELD_DESC);
|
|
|
11443 |
this.pex.write(oprot);
|
|
|
11444 |
oprot.writeFieldEnd();
|
|
|
11445 |
}
|
|
|
11446 |
oprot.writeFieldStop();
|
|
|
11447 |
oprot.writeStructEnd();
|
|
|
11448 |
}
|
|
|
11449 |
|
|
|
11450 |
@Override
|
|
|
11451 |
public String toString() {
|
|
|
11452 |
StringBuilder sb = new StringBuilder("getActiveCodes_result(");
|
|
|
11453 |
boolean first = true;
|
|
|
11454 |
|
|
|
11455 |
sb.append("success:");
|
|
|
11456 |
if (this.success == null) {
|
|
|
11457 |
sb.append("null");
|
|
|
11458 |
} else {
|
|
|
11459 |
sb.append(this.success);
|
|
|
11460 |
}
|
|
|
11461 |
first = false;
|
|
|
11462 |
if (!first) sb.append(", ");
|
|
|
11463 |
sb.append("pex:");
|
|
|
11464 |
if (this.pex == null) {
|
|
|
11465 |
sb.append("null");
|
|
|
11466 |
} else {
|
|
|
11467 |
sb.append(this.pex);
|
|
|
11468 |
}
|
|
|
11469 |
first = false;
|
|
|
11470 |
sb.append(")");
|
|
|
11471 |
return sb.toString();
|
|
|
11472 |
}
|
|
|
11473 |
|
|
|
11474 |
public void validate() throws org.apache.thrift.TException {
|
|
|
11475 |
// check for required fields
|
|
|
11476 |
}
|
|
|
11477 |
|
|
|
11478 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
11479 |
try {
|
|
|
11480 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
11481 |
} catch (org.apache.thrift.TException te) {
|
|
|
11482 |
throw new java.io.IOException(te);
|
|
|
11483 |
}
|
|
|
11484 |
}
|
|
|
11485 |
|
|
|
11486 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
11487 |
try {
|
|
|
11488 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
11489 |
} catch (org.apache.thrift.TException te) {
|
|
|
11490 |
throw new java.io.IOException(te);
|
|
|
11491 |
}
|
|
|
11492 |
}
|
|
|
11493 |
|
|
|
11494 |
}
|
|
|
11495 |
|
|
|
11496 |
public static class deleteCoupon_args implements org.apache.thrift.TBase<deleteCoupon_args, deleteCoupon_args._Fields>, java.io.Serializable, Cloneable {
|
|
|
11497 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteCoupon_args");
|
|
|
11498 |
|
|
|
11499 |
private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCode", org.apache.thrift.protocol.TType.STRING, (short)1);
|
|
|
11500 |
|
|
|
11501 |
private String couponCode; // required
|
|
|
11502 |
|
|
|
11503 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
11504 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
11505 |
COUPON_CODE((short)1, "couponCode");
|
|
|
11506 |
|
|
|
11507 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
11508 |
|
|
|
11509 |
static {
|
|
|
11510 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
11511 |
byName.put(field.getFieldName(), field);
|
|
|
11512 |
}
|
|
|
11513 |
}
|
|
|
11514 |
|
|
|
11515 |
/**
|
|
|
11516 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
11517 |
*/
|
|
|
11518 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
11519 |
switch(fieldId) {
|
|
|
11520 |
case 1: // COUPON_CODE
|
|
|
11521 |
return COUPON_CODE;
|
|
|
11522 |
default:
|
|
|
11523 |
return null;
|
|
|
11524 |
}
|
|
|
11525 |
}
|
|
|
11526 |
|
|
|
11527 |
/**
|
|
|
11528 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
11529 |
* if it is not found.
|
|
|
11530 |
*/
|
|
|
11531 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
11532 |
_Fields fields = findByThriftId(fieldId);
|
|
|
11533 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
11534 |
return fields;
|
|
|
11535 |
}
|
|
|
11536 |
|
|
|
11537 |
/**
|
|
|
11538 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
11539 |
*/
|
|
|
11540 |
public static _Fields findByName(String name) {
|
|
|
11541 |
return byName.get(name);
|
|
|
11542 |
}
|
|
|
11543 |
|
|
|
11544 |
private final short _thriftId;
|
|
|
11545 |
private final String _fieldName;
|
|
|
11546 |
|
|
|
11547 |
_Fields(short thriftId, String fieldName) {
|
|
|
11548 |
_thriftId = thriftId;
|
|
|
11549 |
_fieldName = fieldName;
|
|
|
11550 |
}
|
|
|
11551 |
|
|
|
11552 |
public short getThriftFieldId() {
|
|
|
11553 |
return _thriftId;
|
|
|
11554 |
}
|
|
|
11555 |
|
|
|
11556 |
public String getFieldName() {
|
|
|
11557 |
return _fieldName;
|
|
|
11558 |
}
|
|
|
11559 |
}
|
|
|
11560 |
|
|
|
11561 |
// isset id assignments
|
|
|
11562 |
|
|
|
11563 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
11564 |
static {
|
|
|
11565 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
11566 |
tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
11567 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
11568 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
11569 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteCoupon_args.class, metaDataMap);
|
|
|
11570 |
}
|
|
|
11571 |
|
|
|
11572 |
public deleteCoupon_args() {
|
|
|
11573 |
}
|
|
|
11574 |
|
|
|
11575 |
public deleteCoupon_args(
|
|
|
11576 |
String couponCode)
|
|
|
11577 |
{
|
|
|
11578 |
this();
|
|
|
11579 |
this.couponCode = couponCode;
|
|
|
11580 |
}
|
|
|
11581 |
|
|
|
11582 |
/**
|
|
|
11583 |
* Performs a deep copy on <i>other</i>.
|
|
|
11584 |
*/
|
|
|
11585 |
public deleteCoupon_args(deleteCoupon_args other) {
|
|
|
11586 |
if (other.isSetCouponCode()) {
|
|
|
11587 |
this.couponCode = other.couponCode;
|
|
|
11588 |
}
|
|
|
11589 |
}
|
|
|
11590 |
|
|
|
11591 |
public deleteCoupon_args deepCopy() {
|
|
|
11592 |
return new deleteCoupon_args(this);
|
|
|
11593 |
}
|
|
|
11594 |
|
|
|
11595 |
@Override
|
|
|
11596 |
public void clear() {
|
|
|
11597 |
this.couponCode = null;
|
|
|
11598 |
}
|
|
|
11599 |
|
|
|
11600 |
public String getCouponCode() {
|
|
|
11601 |
return this.couponCode;
|
|
|
11602 |
}
|
|
|
11603 |
|
|
|
11604 |
public void setCouponCode(String couponCode) {
|
|
|
11605 |
this.couponCode = couponCode;
|
|
|
11606 |
}
|
|
|
11607 |
|
|
|
11608 |
public void unsetCouponCode() {
|
|
|
11609 |
this.couponCode = null;
|
|
|
11610 |
}
|
|
|
11611 |
|
|
|
11612 |
/** Returns true if field couponCode is set (has been assigned a value) and false otherwise */
|
|
|
11613 |
public boolean isSetCouponCode() {
|
|
|
11614 |
return this.couponCode != null;
|
|
|
11615 |
}
|
|
|
11616 |
|
|
|
11617 |
public void setCouponCodeIsSet(boolean value) {
|
|
|
11618 |
if (!value) {
|
|
|
11619 |
this.couponCode = null;
|
|
|
11620 |
}
|
|
|
11621 |
}
|
|
|
11622 |
|
|
|
11623 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
11624 |
switch (field) {
|
|
|
11625 |
case COUPON_CODE:
|
|
|
11626 |
if (value == null) {
|
|
|
11627 |
unsetCouponCode();
|
|
|
11628 |
} else {
|
|
|
11629 |
setCouponCode((String)value);
|
|
|
11630 |
}
|
|
|
11631 |
break;
|
|
|
11632 |
|
|
|
11633 |
}
|
|
|
11634 |
}
|
|
|
11635 |
|
|
|
11636 |
public Object getFieldValue(_Fields field) {
|
|
|
11637 |
switch (field) {
|
|
|
11638 |
case COUPON_CODE:
|
|
|
11639 |
return getCouponCode();
|
|
|
11640 |
|
|
|
11641 |
}
|
|
|
11642 |
throw new IllegalStateException();
|
|
|
11643 |
}
|
|
|
11644 |
|
|
|
11645 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
11646 |
public boolean isSet(_Fields field) {
|
|
|
11647 |
if (field == null) {
|
|
|
11648 |
throw new IllegalArgumentException();
|
|
|
11649 |
}
|
|
|
11650 |
|
|
|
11651 |
switch (field) {
|
|
|
11652 |
case COUPON_CODE:
|
|
|
11653 |
return isSetCouponCode();
|
|
|
11654 |
}
|
|
|
11655 |
throw new IllegalStateException();
|
|
|
11656 |
}
|
|
|
11657 |
|
|
|
11658 |
@Override
|
|
|
11659 |
public boolean equals(Object that) {
|
|
|
11660 |
if (that == null)
|
|
|
11661 |
return false;
|
|
|
11662 |
if (that instanceof deleteCoupon_args)
|
|
|
11663 |
return this.equals((deleteCoupon_args)that);
|
|
|
11664 |
return false;
|
|
|
11665 |
}
|
|
|
11666 |
|
|
|
11667 |
public boolean equals(deleteCoupon_args that) {
|
|
|
11668 |
if (that == null)
|
|
|
11669 |
return false;
|
|
|
11670 |
|
|
|
11671 |
boolean this_present_couponCode = true && this.isSetCouponCode();
|
|
|
11672 |
boolean that_present_couponCode = true && that.isSetCouponCode();
|
|
|
11673 |
if (this_present_couponCode || that_present_couponCode) {
|
|
|
11674 |
if (!(this_present_couponCode && that_present_couponCode))
|
|
|
11675 |
return false;
|
|
|
11676 |
if (!this.couponCode.equals(that.couponCode))
|
|
|
11677 |
return false;
|
|
|
11678 |
}
|
|
|
11679 |
|
|
|
11680 |
return true;
|
|
|
11681 |
}
|
|
|
11682 |
|
|
|
11683 |
@Override
|
|
|
11684 |
public int hashCode() {
|
|
|
11685 |
return 0;
|
|
|
11686 |
}
|
|
|
11687 |
|
|
|
11688 |
public int compareTo(deleteCoupon_args other) {
|
|
|
11689 |
if (!getClass().equals(other.getClass())) {
|
|
|
11690 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
11691 |
}
|
|
|
11692 |
|
|
|
11693 |
int lastComparison = 0;
|
|
|
11694 |
deleteCoupon_args typedOther = (deleteCoupon_args)other;
|
|
|
11695 |
|
|
|
11696 |
lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
|
|
|
11697 |
if (lastComparison != 0) {
|
|
|
11698 |
return lastComparison;
|
|
|
11699 |
}
|
|
|
11700 |
if (isSetCouponCode()) {
|
|
|
11701 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);
|
|
|
11702 |
if (lastComparison != 0) {
|
|
|
11703 |
return lastComparison;
|
|
|
11704 |
}
|
|
|
11705 |
}
|
|
|
11706 |
return 0;
|
|
|
11707 |
}
|
|
|
11708 |
|
|
|
11709 |
public _Fields fieldForId(int fieldId) {
|
|
|
11710 |
return _Fields.findByThriftId(fieldId);
|
|
|
11711 |
}
|
|
|
11712 |
|
|
|
11713 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
11714 |
org.apache.thrift.protocol.TField field;
|
|
|
11715 |
iprot.readStructBegin();
|
|
|
11716 |
while (true)
|
|
|
11717 |
{
|
|
|
11718 |
field = iprot.readFieldBegin();
|
|
|
11719 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
11720 |
break;
|
|
|
11721 |
}
|
|
|
11722 |
switch (field.id) {
|
|
|
11723 |
case 1: // COUPON_CODE
|
|
|
11724 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
11725 |
this.couponCode = iprot.readString();
|
|
|
11726 |
} else {
|
|
|
11727 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
11728 |
}
|
|
|
11729 |
break;
|
|
|
11730 |
default:
|
|
|
11731 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
11732 |
}
|
|
|
11733 |
iprot.readFieldEnd();
|
|
|
11734 |
}
|
|
|
11735 |
iprot.readStructEnd();
|
|
|
11736 |
validate();
|
|
|
11737 |
}
|
|
|
11738 |
|
|
|
11739 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
11740 |
validate();
|
|
|
11741 |
|
|
|
11742 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
11743 |
if (this.couponCode != null) {
|
|
|
11744 |
oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
|
|
|
11745 |
oprot.writeString(this.couponCode);
|
|
|
11746 |
oprot.writeFieldEnd();
|
|
|
11747 |
}
|
|
|
11748 |
oprot.writeFieldStop();
|
|
|
11749 |
oprot.writeStructEnd();
|
|
|
11750 |
}
|
|
|
11751 |
|
|
|
11752 |
@Override
|
|
|
11753 |
public String toString() {
|
|
|
11754 |
StringBuilder sb = new StringBuilder("deleteCoupon_args(");
|
|
|
11755 |
boolean first = true;
|
|
|
11756 |
|
|
|
11757 |
sb.append("couponCode:");
|
|
|
11758 |
if (this.couponCode == null) {
|
|
|
11759 |
sb.append("null");
|
|
|
11760 |
} else {
|
|
|
11761 |
sb.append(this.couponCode);
|
|
|
11762 |
}
|
|
|
11763 |
first = false;
|
|
|
11764 |
sb.append(")");
|
|
|
11765 |
return sb.toString();
|
|
|
11766 |
}
|
|
|
11767 |
|
|
|
11768 |
public void validate() throws org.apache.thrift.TException {
|
|
|
11769 |
// check for required fields
|
|
|
11770 |
}
|
|
|
11771 |
|
|
|
11772 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
11773 |
try {
|
|
|
11774 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
11775 |
} catch (org.apache.thrift.TException te) {
|
|
|
11776 |
throw new java.io.IOException(te);
|
|
|
11777 |
}
|
|
|
11778 |
}
|
|
|
11779 |
|
|
|
11780 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
11781 |
try {
|
|
|
11782 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
11783 |
} catch (org.apache.thrift.TException te) {
|
|
|
11784 |
throw new java.io.IOException(te);
|
|
|
11785 |
}
|
|
|
11786 |
}
|
|
|
11787 |
|
|
|
11788 |
}
|
|
|
11789 |
|
|
|
11790 |
public static class deleteCoupon_result implements org.apache.thrift.TBase<deleteCoupon_result, deleteCoupon_result._Fields>, java.io.Serializable, Cloneable {
|
|
|
11791 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteCoupon_result");
|
|
|
11792 |
|
|
|
11793 |
private static final org.apache.thrift.protocol.TField PEX_FIELD_DESC = new org.apache.thrift.protocol.TField("pex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
|
|
|
11794 |
|
|
|
11795 |
private PromotionException pex; // required
|
|
|
11796 |
|
|
|
11797 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
11798 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
11799 |
PEX((short)1, "pex");
|
|
|
11800 |
|
|
|
11801 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
11802 |
|
|
|
11803 |
static {
|
|
|
11804 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
11805 |
byName.put(field.getFieldName(), field);
|
|
|
11806 |
}
|
|
|
11807 |
}
|
|
|
11808 |
|
|
|
11809 |
/**
|
|
|
11810 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
11811 |
*/
|
|
|
11812 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
11813 |
switch(fieldId) {
|
|
|
11814 |
case 1: // PEX
|
|
|
11815 |
return PEX;
|
|
|
11816 |
default:
|
|
|
11817 |
return null;
|
|
|
11818 |
}
|
|
|
11819 |
}
|
|
|
11820 |
|
|
|
11821 |
/**
|
|
|
11822 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
11823 |
* if it is not found.
|
|
|
11824 |
*/
|
|
|
11825 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
11826 |
_Fields fields = findByThriftId(fieldId);
|
|
|
11827 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
11828 |
return fields;
|
|
|
11829 |
}
|
|
|
11830 |
|
|
|
11831 |
/**
|
|
|
11832 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
11833 |
*/
|
|
|
11834 |
public static _Fields findByName(String name) {
|
|
|
11835 |
return byName.get(name);
|
|
|
11836 |
}
|
|
|
11837 |
|
|
|
11838 |
private final short _thriftId;
|
|
|
11839 |
private final String _fieldName;
|
|
|
11840 |
|
|
|
11841 |
_Fields(short thriftId, String fieldName) {
|
|
|
11842 |
_thriftId = thriftId;
|
|
|
11843 |
_fieldName = fieldName;
|
|
|
11844 |
}
|
|
|
11845 |
|
|
|
11846 |
public short getThriftFieldId() {
|
|
|
11847 |
return _thriftId;
|
|
|
11848 |
}
|
|
|
11849 |
|
|
|
11850 |
public String getFieldName() {
|
|
|
11851 |
return _fieldName;
|
|
|
11852 |
}
|
|
|
11853 |
}
|
|
|
11854 |
|
|
|
11855 |
// isset id assignments
|
|
|
11856 |
|
|
|
11857 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
11858 |
static {
|
|
|
11859 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
11860 |
tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
11861 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
|
|
|
11862 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
11863 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteCoupon_result.class, metaDataMap);
|
|
|
11864 |
}
|
|
|
11865 |
|
|
|
11866 |
public deleteCoupon_result() {
|
|
|
11867 |
}
|
|
|
11868 |
|
|
|
11869 |
public deleteCoupon_result(
|
|
|
11870 |
PromotionException pex)
|
|
|
11871 |
{
|
|
|
11872 |
this();
|
|
|
11873 |
this.pex = pex;
|
|
|
11874 |
}
|
|
|
11875 |
|
|
|
11876 |
/**
|
|
|
11877 |
* Performs a deep copy on <i>other</i>.
|
|
|
11878 |
*/
|
|
|
11879 |
public deleteCoupon_result(deleteCoupon_result other) {
|
|
|
11880 |
if (other.isSetPex()) {
|
|
|
11881 |
this.pex = new PromotionException(other.pex);
|
|
|
11882 |
}
|
|
|
11883 |
}
|
|
|
11884 |
|
|
|
11885 |
public deleteCoupon_result deepCopy() {
|
|
|
11886 |
return new deleteCoupon_result(this);
|
|
|
11887 |
}
|
|
|
11888 |
|
|
|
11889 |
@Override
|
|
|
11890 |
public void clear() {
|
|
|
11891 |
this.pex = null;
|
|
|
11892 |
}
|
|
|
11893 |
|
|
|
11894 |
public PromotionException getPex() {
|
|
|
11895 |
return this.pex;
|
|
|
11896 |
}
|
|
|
11897 |
|
|
|
11898 |
public void setPex(PromotionException pex) {
|
|
|
11899 |
this.pex = pex;
|
|
|
11900 |
}
|
|
|
11901 |
|
|
|
11902 |
public void unsetPex() {
|
|
|
11903 |
this.pex = null;
|
|
|
11904 |
}
|
|
|
11905 |
|
|
|
11906 |
/** Returns true if field pex is set (has been assigned a value) and false otherwise */
|
|
|
11907 |
public boolean isSetPex() {
|
|
|
11908 |
return this.pex != null;
|
|
|
11909 |
}
|
|
|
11910 |
|
|
|
11911 |
public void setPexIsSet(boolean value) {
|
|
|
11912 |
if (!value) {
|
|
|
11913 |
this.pex = null;
|
|
|
11914 |
}
|
|
|
11915 |
}
|
|
|
11916 |
|
|
|
11917 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
11918 |
switch (field) {
|
|
|
11919 |
case PEX:
|
|
|
11920 |
if (value == null) {
|
|
|
11921 |
unsetPex();
|
|
|
11922 |
} else {
|
|
|
11923 |
setPex((PromotionException)value);
|
|
|
11924 |
}
|
|
|
11925 |
break;
|
|
|
11926 |
|
|
|
11927 |
}
|
|
|
11928 |
}
|
|
|
11929 |
|
|
|
11930 |
public Object getFieldValue(_Fields field) {
|
|
|
11931 |
switch (field) {
|
|
|
11932 |
case PEX:
|
|
|
11933 |
return getPex();
|
|
|
11934 |
|
|
|
11935 |
}
|
|
|
11936 |
throw new IllegalStateException();
|
|
|
11937 |
}
|
|
|
11938 |
|
|
|
11939 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
11940 |
public boolean isSet(_Fields field) {
|
|
|
11941 |
if (field == null) {
|
|
|
11942 |
throw new IllegalArgumentException();
|
|
|
11943 |
}
|
|
|
11944 |
|
|
|
11945 |
switch (field) {
|
|
|
11946 |
case PEX:
|
|
|
11947 |
return isSetPex();
|
|
|
11948 |
}
|
|
|
11949 |
throw new IllegalStateException();
|
|
|
11950 |
}
|
|
|
11951 |
|
|
|
11952 |
@Override
|
|
|
11953 |
public boolean equals(Object that) {
|
|
|
11954 |
if (that == null)
|
|
|
11955 |
return false;
|
|
|
11956 |
if (that instanceof deleteCoupon_result)
|
|
|
11957 |
return this.equals((deleteCoupon_result)that);
|
|
|
11958 |
return false;
|
|
|
11959 |
}
|
|
|
11960 |
|
|
|
11961 |
public boolean equals(deleteCoupon_result that) {
|
|
|
11962 |
if (that == null)
|
|
|
11963 |
return false;
|
|
|
11964 |
|
|
|
11965 |
boolean this_present_pex = true && this.isSetPex();
|
|
|
11966 |
boolean that_present_pex = true && that.isSetPex();
|
|
|
11967 |
if (this_present_pex || that_present_pex) {
|
|
|
11968 |
if (!(this_present_pex && that_present_pex))
|
|
|
11969 |
return false;
|
|
|
11970 |
if (!this.pex.equals(that.pex))
|
|
|
11971 |
return false;
|
|
|
11972 |
}
|
|
|
11973 |
|
|
|
11974 |
return true;
|
|
|
11975 |
}
|
|
|
11976 |
|
|
|
11977 |
@Override
|
|
|
11978 |
public int hashCode() {
|
|
|
11979 |
return 0;
|
|
|
11980 |
}
|
|
|
11981 |
|
|
|
11982 |
public int compareTo(deleteCoupon_result other) {
|
|
|
11983 |
if (!getClass().equals(other.getClass())) {
|
|
|
11984 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
11985 |
}
|
|
|
11986 |
|
|
|
11987 |
int lastComparison = 0;
|
|
|
11988 |
deleteCoupon_result typedOther = (deleteCoupon_result)other;
|
|
|
11989 |
|
|
|
11990 |
lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
|
|
|
11991 |
if (lastComparison != 0) {
|
|
|
11992 |
return lastComparison;
|
|
|
11993 |
}
|
|
|
11994 |
if (isSetPex()) {
|
|
|
11995 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
|
|
|
11996 |
if (lastComparison != 0) {
|
|
|
11997 |
return lastComparison;
|
|
|
11998 |
}
|
|
|
11999 |
}
|
|
|
12000 |
return 0;
|
|
|
12001 |
}
|
|
|
12002 |
|
|
|
12003 |
public _Fields fieldForId(int fieldId) {
|
|
|
12004 |
return _Fields.findByThriftId(fieldId);
|
|
|
12005 |
}
|
|
|
12006 |
|
|
|
12007 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
12008 |
org.apache.thrift.protocol.TField field;
|
|
|
12009 |
iprot.readStructBegin();
|
|
|
12010 |
while (true)
|
|
|
12011 |
{
|
|
|
12012 |
field = iprot.readFieldBegin();
|
|
|
12013 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
12014 |
break;
|
|
|
12015 |
}
|
|
|
12016 |
switch (field.id) {
|
|
|
12017 |
case 1: // PEX
|
|
|
12018 |
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
|
|
12019 |
this.pex = new PromotionException();
|
|
|
12020 |
this.pex.read(iprot);
|
|
|
12021 |
} else {
|
|
|
12022 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
12023 |
}
|
|
|
12024 |
break;
|
|
|
12025 |
default:
|
|
|
12026 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
12027 |
}
|
|
|
12028 |
iprot.readFieldEnd();
|
|
|
12029 |
}
|
|
|
12030 |
iprot.readStructEnd();
|
|
|
12031 |
validate();
|
|
|
12032 |
}
|
|
|
12033 |
|
|
|
12034 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
12035 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
12036 |
|
|
|
12037 |
if (this.isSetPex()) {
|
|
|
12038 |
oprot.writeFieldBegin(PEX_FIELD_DESC);
|
|
|
12039 |
this.pex.write(oprot);
|
|
|
12040 |
oprot.writeFieldEnd();
|
|
|
12041 |
}
|
|
|
12042 |
oprot.writeFieldStop();
|
|
|
12043 |
oprot.writeStructEnd();
|
|
|
12044 |
}
|
|
|
12045 |
|
|
|
12046 |
@Override
|
|
|
12047 |
public String toString() {
|
|
|
12048 |
StringBuilder sb = new StringBuilder("deleteCoupon_result(");
|
|
|
12049 |
boolean first = true;
|
|
|
12050 |
|
|
|
12051 |
sb.append("pex:");
|
|
|
12052 |
if (this.pex == null) {
|
|
|
12053 |
sb.append("null");
|
|
|
12054 |
} else {
|
|
|
12055 |
sb.append(this.pex);
|
|
|
12056 |
}
|
|
|
12057 |
first = false;
|
|
|
12058 |
sb.append(")");
|
|
|
12059 |
return sb.toString();
|
|
|
12060 |
}
|
|
|
12061 |
|
|
|
12062 |
public void validate() throws org.apache.thrift.TException {
|
|
|
12063 |
// check for required fields
|
|
|
12064 |
}
|
|
|
12065 |
|
|
|
12066 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
12067 |
try {
|
|
|
12068 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
12069 |
} catch (org.apache.thrift.TException te) {
|
|
|
12070 |
throw new java.io.IOException(te);
|
|
|
12071 |
}
|
|
|
12072 |
}
|
|
|
12073 |
|
|
|
12074 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
12075 |
try {
|
|
|
12076 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
12077 |
} catch (org.apache.thrift.TException te) {
|
|
|
12078 |
throw new java.io.IOException(te);
|
|
|
12079 |
}
|
|
|
12080 |
}
|
|
|
12081 |
|
|
|
12082 |
}
|
|
|
12083 |
|
| 3430 |
rajveer |
12084 |
public static class getActiveCoupons_args implements org.apache.thrift.TBase<getActiveCoupons_args, getActiveCoupons_args._Fields>, java.io.Serializable, Cloneable {
|
|
|
12085 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getActiveCoupons_args");
|
| 3385 |
varun.gupt |
12086 |
|
|
|
12087 |
|
|
|
12088 |
|
|
|
12089 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
| 3430 |
rajveer |
12090 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
| 3385 |
varun.gupt |
12091 |
;
|
|
|
12092 |
|
|
|
12093 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
12094 |
|
|
|
12095 |
static {
|
|
|
12096 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
12097 |
byName.put(field.getFieldName(), field);
|
|
|
12098 |
}
|
|
|
12099 |
}
|
|
|
12100 |
|
|
|
12101 |
/**
|
|
|
12102 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
12103 |
*/
|
|
|
12104 |
public static _Fields findByThriftId(int fieldId) {
|
| 3430 |
rajveer |
12105 |
switch(fieldId) {
|
|
|
12106 |
default:
|
|
|
12107 |
return null;
|
|
|
12108 |
}
|
| 3385 |
varun.gupt |
12109 |
}
|
|
|
12110 |
|
|
|
12111 |
/**
|
|
|
12112 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
12113 |
* if it is not found.
|
|
|
12114 |
*/
|
|
|
12115 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
12116 |
_Fields fields = findByThriftId(fieldId);
|
|
|
12117 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
12118 |
return fields;
|
|
|
12119 |
}
|
|
|
12120 |
|
|
|
12121 |
/**
|
|
|
12122 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
12123 |
*/
|
|
|
12124 |
public static _Fields findByName(String name) {
|
|
|
12125 |
return byName.get(name);
|
|
|
12126 |
}
|
|
|
12127 |
|
|
|
12128 |
private final short _thriftId;
|
|
|
12129 |
private final String _fieldName;
|
|
|
12130 |
|
|
|
12131 |
_Fields(short thriftId, String fieldName) {
|
|
|
12132 |
_thriftId = thriftId;
|
|
|
12133 |
_fieldName = fieldName;
|
|
|
12134 |
}
|
|
|
12135 |
|
|
|
12136 |
public short getThriftFieldId() {
|
|
|
12137 |
return _thriftId;
|
|
|
12138 |
}
|
|
|
12139 |
|
|
|
12140 |
public String getFieldName() {
|
|
|
12141 |
return _fieldName;
|
|
|
12142 |
}
|
|
|
12143 |
}
|
| 3430 |
rajveer |
12144 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
| 3385 |
varun.gupt |
12145 |
static {
|
| 3430 |
rajveer |
12146 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
12147 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
12148 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getActiveCoupons_args.class, metaDataMap);
|
| 3385 |
varun.gupt |
12149 |
}
|
|
|
12150 |
|
|
|
12151 |
public getActiveCoupons_args() {
|
|
|
12152 |
}
|
|
|
12153 |
|
|
|
12154 |
/**
|
|
|
12155 |
* Performs a deep copy on <i>other</i>.
|
|
|
12156 |
*/
|
|
|
12157 |
public getActiveCoupons_args(getActiveCoupons_args other) {
|
|
|
12158 |
}
|
|
|
12159 |
|
|
|
12160 |
public getActiveCoupons_args deepCopy() {
|
|
|
12161 |
return new getActiveCoupons_args(this);
|
|
|
12162 |
}
|
|
|
12163 |
|
| 3430 |
rajveer |
12164 |
@Override
|
|
|
12165 |
public void clear() {
|
| 3385 |
varun.gupt |
12166 |
}
|
|
|
12167 |
|
|
|
12168 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
12169 |
switch (field) {
|
|
|
12170 |
}
|
|
|
12171 |
}
|
|
|
12172 |
|
|
|
12173 |
public Object getFieldValue(_Fields field) {
|
|
|
12174 |
switch (field) {
|
|
|
12175 |
}
|
|
|
12176 |
throw new IllegalStateException();
|
|
|
12177 |
}
|
|
|
12178 |
|
| 3430 |
rajveer |
12179 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
12180 |
public boolean isSet(_Fields field) {
|
|
|
12181 |
if (field == null) {
|
|
|
12182 |
throw new IllegalArgumentException();
|
|
|
12183 |
}
|
| 3385 |
varun.gupt |
12184 |
|
|
|
12185 |
switch (field) {
|
|
|
12186 |
}
|
|
|
12187 |
throw new IllegalStateException();
|
|
|
12188 |
}
|
|
|
12189 |
|
|
|
12190 |
@Override
|
|
|
12191 |
public boolean equals(Object that) {
|
|
|
12192 |
if (that == null)
|
|
|
12193 |
return false;
|
|
|
12194 |
if (that instanceof getActiveCoupons_args)
|
|
|
12195 |
return this.equals((getActiveCoupons_args)that);
|
|
|
12196 |
return false;
|
|
|
12197 |
}
|
|
|
12198 |
|
|
|
12199 |
public boolean equals(getActiveCoupons_args that) {
|
|
|
12200 |
if (that == null)
|
|
|
12201 |
return false;
|
|
|
12202 |
|
|
|
12203 |
return true;
|
|
|
12204 |
}
|
|
|
12205 |
|
|
|
12206 |
@Override
|
|
|
12207 |
public int hashCode() {
|
|
|
12208 |
return 0;
|
|
|
12209 |
}
|
|
|
12210 |
|
|
|
12211 |
public int compareTo(getActiveCoupons_args other) {
|
|
|
12212 |
if (!getClass().equals(other.getClass())) {
|
|
|
12213 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
12214 |
}
|
|
|
12215 |
|
|
|
12216 |
int lastComparison = 0;
|
|
|
12217 |
getActiveCoupons_args typedOther = (getActiveCoupons_args)other;
|
|
|
12218 |
|
|
|
12219 |
return 0;
|
|
|
12220 |
}
|
|
|
12221 |
|
| 3430 |
rajveer |
12222 |
public _Fields fieldForId(int fieldId) {
|
|
|
12223 |
return _Fields.findByThriftId(fieldId);
|
|
|
12224 |
}
|
|
|
12225 |
|
|
|
12226 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
12227 |
org.apache.thrift.protocol.TField field;
|
| 3385 |
varun.gupt |
12228 |
iprot.readStructBegin();
|
|
|
12229 |
while (true)
|
|
|
12230 |
{
|
|
|
12231 |
field = iprot.readFieldBegin();
|
| 3430 |
rajveer |
12232 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
| 3385 |
varun.gupt |
12233 |
break;
|
|
|
12234 |
}
|
| 3430 |
rajveer |
12235 |
switch (field.id) {
|
|
|
12236 |
default:
|
|
|
12237 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| 3385 |
varun.gupt |
12238 |
}
|
| 3430 |
rajveer |
12239 |
iprot.readFieldEnd();
|
| 3385 |
varun.gupt |
12240 |
}
|
|
|
12241 |
iprot.readStructEnd();
|
|
|
12242 |
validate();
|
|
|
12243 |
}
|
|
|
12244 |
|
| 3430 |
rajveer |
12245 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
| 3385 |
varun.gupt |
12246 |
validate();
|
|
|
12247 |
|
|
|
12248 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
12249 |
oprot.writeFieldStop();
|
|
|
12250 |
oprot.writeStructEnd();
|
|
|
12251 |
}
|
|
|
12252 |
|
|
|
12253 |
@Override
|
|
|
12254 |
public String toString() {
|
|
|
12255 |
StringBuilder sb = new StringBuilder("getActiveCoupons_args(");
|
|
|
12256 |
boolean first = true;
|
|
|
12257 |
|
|
|
12258 |
sb.append(")");
|
|
|
12259 |
return sb.toString();
|
|
|
12260 |
}
|
|
|
12261 |
|
| 3430 |
rajveer |
12262 |
public void validate() throws org.apache.thrift.TException {
|
| 3385 |
varun.gupt |
12263 |
// check for required fields
|
|
|
12264 |
}
|
|
|
12265 |
|
| 3430 |
rajveer |
12266 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
12267 |
try {
|
|
|
12268 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
12269 |
} catch (org.apache.thrift.TException te) {
|
|
|
12270 |
throw new java.io.IOException(te);
|
|
|
12271 |
}
|
|
|
12272 |
}
|
|
|
12273 |
|
|
|
12274 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
12275 |
try {
|
|
|
12276 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
12277 |
} catch (org.apache.thrift.TException te) {
|
|
|
12278 |
throw new java.io.IOException(te);
|
|
|
12279 |
}
|
|
|
12280 |
}
|
|
|
12281 |
|
| 3385 |
varun.gupt |
12282 |
}
|
|
|
12283 |
|
| 3430 |
rajveer |
12284 |
public static class getActiveCoupons_result implements org.apache.thrift.TBase<getActiveCoupons_result, getActiveCoupons_result._Fields>, java.io.Serializable, Cloneable {
|
|
|
12285 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getActiveCoupons_result");
|
| 3385 |
varun.gupt |
12286 |
|
| 3430 |
rajveer |
12287 |
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
|
|
|
12288 |
private static final org.apache.thrift.protocol.TField PEX_FIELD_DESC = new org.apache.thrift.protocol.TField("pex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
|
| 3385 |
varun.gupt |
12289 |
|
| 3430 |
rajveer |
12290 |
private List<Coupon> success; // required
|
|
|
12291 |
private PromotionException pex; // required
|
| 3385 |
varun.gupt |
12292 |
|
|
|
12293 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
| 3430 |
rajveer |
12294 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
| 3385 |
varun.gupt |
12295 |
SUCCESS((short)0, "success"),
|
|
|
12296 |
PEX((short)1, "pex");
|
|
|
12297 |
|
|
|
12298 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
12299 |
|
|
|
12300 |
static {
|
|
|
12301 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
12302 |
byName.put(field.getFieldName(), field);
|
|
|
12303 |
}
|
|
|
12304 |
}
|
|
|
12305 |
|
|
|
12306 |
/**
|
|
|
12307 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
12308 |
*/
|
|
|
12309 |
public static _Fields findByThriftId(int fieldId) {
|
| 3430 |
rajveer |
12310 |
switch(fieldId) {
|
|
|
12311 |
case 0: // SUCCESS
|
|
|
12312 |
return SUCCESS;
|
|
|
12313 |
case 1: // PEX
|
|
|
12314 |
return PEX;
|
|
|
12315 |
default:
|
|
|
12316 |
return null;
|
|
|
12317 |
}
|
| 3385 |
varun.gupt |
12318 |
}
|
|
|
12319 |
|
|
|
12320 |
/**
|
|
|
12321 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
12322 |
* if it is not found.
|
|
|
12323 |
*/
|
|
|
12324 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
12325 |
_Fields fields = findByThriftId(fieldId);
|
|
|
12326 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
12327 |
return fields;
|
|
|
12328 |
}
|
|
|
12329 |
|
|
|
12330 |
/**
|
|
|
12331 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
12332 |
*/
|
|
|
12333 |
public static _Fields findByName(String name) {
|
|
|
12334 |
return byName.get(name);
|
|
|
12335 |
}
|
|
|
12336 |
|
|
|
12337 |
private final short _thriftId;
|
|
|
12338 |
private final String _fieldName;
|
|
|
12339 |
|
|
|
12340 |
_Fields(short thriftId, String fieldName) {
|
|
|
12341 |
_thriftId = thriftId;
|
|
|
12342 |
_fieldName = fieldName;
|
|
|
12343 |
}
|
|
|
12344 |
|
|
|
12345 |
public short getThriftFieldId() {
|
|
|
12346 |
return _thriftId;
|
|
|
12347 |
}
|
|
|
12348 |
|
|
|
12349 |
public String getFieldName() {
|
|
|
12350 |
return _fieldName;
|
|
|
12351 |
}
|
|
|
12352 |
}
|
|
|
12353 |
|
|
|
12354 |
// isset id assignments
|
|
|
12355 |
|
| 3430 |
rajveer |
12356 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
| 3385 |
varun.gupt |
12357 |
static {
|
| 3430 |
rajveer |
12358 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
12359 |
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
12360 |
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
|
|
|
12361 |
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Coupon.class))));
|
|
|
12362 |
tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
12363 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
|
|
|
12364 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
12365 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getActiveCoupons_result.class, metaDataMap);
|
| 3385 |
varun.gupt |
12366 |
}
|
|
|
12367 |
|
|
|
12368 |
public getActiveCoupons_result() {
|
|
|
12369 |
}
|
|
|
12370 |
|
|
|
12371 |
public getActiveCoupons_result(
|
|
|
12372 |
List<Coupon> success,
|
|
|
12373 |
PromotionException pex)
|
|
|
12374 |
{
|
|
|
12375 |
this();
|
|
|
12376 |
this.success = success;
|
|
|
12377 |
this.pex = pex;
|
|
|
12378 |
}
|
|
|
12379 |
|
|
|
12380 |
/**
|
|
|
12381 |
* Performs a deep copy on <i>other</i>.
|
|
|
12382 |
*/
|
|
|
12383 |
public getActiveCoupons_result(getActiveCoupons_result other) {
|
|
|
12384 |
if (other.isSetSuccess()) {
|
|
|
12385 |
List<Coupon> __this__success = new ArrayList<Coupon>();
|
|
|
12386 |
for (Coupon other_element : other.success) {
|
|
|
12387 |
__this__success.add(new Coupon(other_element));
|
|
|
12388 |
}
|
|
|
12389 |
this.success = __this__success;
|
|
|
12390 |
}
|
|
|
12391 |
if (other.isSetPex()) {
|
|
|
12392 |
this.pex = new PromotionException(other.pex);
|
|
|
12393 |
}
|
|
|
12394 |
}
|
|
|
12395 |
|
|
|
12396 |
public getActiveCoupons_result deepCopy() {
|
|
|
12397 |
return new getActiveCoupons_result(this);
|
|
|
12398 |
}
|
|
|
12399 |
|
| 3430 |
rajveer |
12400 |
@Override
|
|
|
12401 |
public void clear() {
|
|
|
12402 |
this.success = null;
|
|
|
12403 |
this.pex = null;
|
| 3385 |
varun.gupt |
12404 |
}
|
|
|
12405 |
|
|
|
12406 |
public int getSuccessSize() {
|
|
|
12407 |
return (this.success == null) ? 0 : this.success.size();
|
|
|
12408 |
}
|
|
|
12409 |
|
|
|
12410 |
public java.util.Iterator<Coupon> getSuccessIterator() {
|
|
|
12411 |
return (this.success == null) ? null : this.success.iterator();
|
|
|
12412 |
}
|
|
|
12413 |
|
|
|
12414 |
public void addToSuccess(Coupon elem) {
|
|
|
12415 |
if (this.success == null) {
|
|
|
12416 |
this.success = new ArrayList<Coupon>();
|
|
|
12417 |
}
|
|
|
12418 |
this.success.add(elem);
|
|
|
12419 |
}
|
|
|
12420 |
|
|
|
12421 |
public List<Coupon> getSuccess() {
|
|
|
12422 |
return this.success;
|
|
|
12423 |
}
|
|
|
12424 |
|
| 3430 |
rajveer |
12425 |
public void setSuccess(List<Coupon> success) {
|
| 3385 |
varun.gupt |
12426 |
this.success = success;
|
|
|
12427 |
}
|
|
|
12428 |
|
|
|
12429 |
public void unsetSuccess() {
|
|
|
12430 |
this.success = null;
|
|
|
12431 |
}
|
|
|
12432 |
|
| 3430 |
rajveer |
12433 |
/** Returns true if field success is set (has been assigned a value) and false otherwise */
|
| 3385 |
varun.gupt |
12434 |
public boolean isSetSuccess() {
|
|
|
12435 |
return this.success != null;
|
|
|
12436 |
}
|
|
|
12437 |
|
|
|
12438 |
public void setSuccessIsSet(boolean value) {
|
|
|
12439 |
if (!value) {
|
|
|
12440 |
this.success = null;
|
|
|
12441 |
}
|
|
|
12442 |
}
|
|
|
12443 |
|
|
|
12444 |
public PromotionException getPex() {
|
|
|
12445 |
return this.pex;
|
|
|
12446 |
}
|
|
|
12447 |
|
| 3430 |
rajveer |
12448 |
public void setPex(PromotionException pex) {
|
| 3385 |
varun.gupt |
12449 |
this.pex = pex;
|
|
|
12450 |
}
|
|
|
12451 |
|
|
|
12452 |
public void unsetPex() {
|
|
|
12453 |
this.pex = null;
|
|
|
12454 |
}
|
|
|
12455 |
|
| 3430 |
rajveer |
12456 |
/** Returns true if field pex is set (has been assigned a value) and false otherwise */
|
| 3385 |
varun.gupt |
12457 |
public boolean isSetPex() {
|
|
|
12458 |
return this.pex != null;
|
|
|
12459 |
}
|
|
|
12460 |
|
|
|
12461 |
public void setPexIsSet(boolean value) {
|
|
|
12462 |
if (!value) {
|
|
|
12463 |
this.pex = null;
|
|
|
12464 |
}
|
|
|
12465 |
}
|
|
|
12466 |
|
|
|
12467 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
12468 |
switch (field) {
|
|
|
12469 |
case SUCCESS:
|
|
|
12470 |
if (value == null) {
|
|
|
12471 |
unsetSuccess();
|
|
|
12472 |
} else {
|
|
|
12473 |
setSuccess((List<Coupon>)value);
|
|
|
12474 |
}
|
|
|
12475 |
break;
|
|
|
12476 |
|
|
|
12477 |
case PEX:
|
|
|
12478 |
if (value == null) {
|
|
|
12479 |
unsetPex();
|
|
|
12480 |
} else {
|
|
|
12481 |
setPex((PromotionException)value);
|
|
|
12482 |
}
|
|
|
12483 |
break;
|
|
|
12484 |
|
|
|
12485 |
}
|
|
|
12486 |
}
|
|
|
12487 |
|
|
|
12488 |
public Object getFieldValue(_Fields field) {
|
|
|
12489 |
switch (field) {
|
|
|
12490 |
case SUCCESS:
|
|
|
12491 |
return getSuccess();
|
|
|
12492 |
|
|
|
12493 |
case PEX:
|
|
|
12494 |
return getPex();
|
|
|
12495 |
|
|
|
12496 |
}
|
|
|
12497 |
throw new IllegalStateException();
|
|
|
12498 |
}
|
|
|
12499 |
|
| 3430 |
rajveer |
12500 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
12501 |
public boolean isSet(_Fields field) {
|
|
|
12502 |
if (field == null) {
|
|
|
12503 |
throw new IllegalArgumentException();
|
|
|
12504 |
}
|
| 3385 |
varun.gupt |
12505 |
|
|
|
12506 |
switch (field) {
|
|
|
12507 |
case SUCCESS:
|
|
|
12508 |
return isSetSuccess();
|
|
|
12509 |
case PEX:
|
|
|
12510 |
return isSetPex();
|
|
|
12511 |
}
|
|
|
12512 |
throw new IllegalStateException();
|
|
|
12513 |
}
|
|
|
12514 |
|
|
|
12515 |
@Override
|
|
|
12516 |
public boolean equals(Object that) {
|
|
|
12517 |
if (that == null)
|
|
|
12518 |
return false;
|
|
|
12519 |
if (that instanceof getActiveCoupons_result)
|
|
|
12520 |
return this.equals((getActiveCoupons_result)that);
|
|
|
12521 |
return false;
|
|
|
12522 |
}
|
|
|
12523 |
|
|
|
12524 |
public boolean equals(getActiveCoupons_result that) {
|
|
|
12525 |
if (that == null)
|
|
|
12526 |
return false;
|
|
|
12527 |
|
|
|
12528 |
boolean this_present_success = true && this.isSetSuccess();
|
|
|
12529 |
boolean that_present_success = true && that.isSetSuccess();
|
|
|
12530 |
if (this_present_success || that_present_success) {
|
|
|
12531 |
if (!(this_present_success && that_present_success))
|
|
|
12532 |
return false;
|
|
|
12533 |
if (!this.success.equals(that.success))
|
|
|
12534 |
return false;
|
|
|
12535 |
}
|
|
|
12536 |
|
|
|
12537 |
boolean this_present_pex = true && this.isSetPex();
|
|
|
12538 |
boolean that_present_pex = true && that.isSetPex();
|
|
|
12539 |
if (this_present_pex || that_present_pex) {
|
|
|
12540 |
if (!(this_present_pex && that_present_pex))
|
|
|
12541 |
return false;
|
|
|
12542 |
if (!this.pex.equals(that.pex))
|
|
|
12543 |
return false;
|
|
|
12544 |
}
|
|
|
12545 |
|
|
|
12546 |
return true;
|
|
|
12547 |
}
|
|
|
12548 |
|
|
|
12549 |
@Override
|
|
|
12550 |
public int hashCode() {
|
|
|
12551 |
return 0;
|
|
|
12552 |
}
|
|
|
12553 |
|
|
|
12554 |
public int compareTo(getActiveCoupons_result other) {
|
|
|
12555 |
if (!getClass().equals(other.getClass())) {
|
|
|
12556 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
12557 |
}
|
|
|
12558 |
|
|
|
12559 |
int lastComparison = 0;
|
|
|
12560 |
getActiveCoupons_result typedOther = (getActiveCoupons_result)other;
|
|
|
12561 |
|
| 3430 |
rajveer |
12562 |
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
|
| 3385 |
varun.gupt |
12563 |
if (lastComparison != 0) {
|
|
|
12564 |
return lastComparison;
|
|
|
12565 |
}
|
| 3430 |
rajveer |
12566 |
if (isSetSuccess()) {
|
|
|
12567 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
|
|
|
12568 |
if (lastComparison != 0) {
|
|
|
12569 |
return lastComparison;
|
|
|
12570 |
}
|
| 3385 |
varun.gupt |
12571 |
}
|
| 3430 |
rajveer |
12572 |
lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
|
| 3385 |
varun.gupt |
12573 |
if (lastComparison != 0) {
|
|
|
12574 |
return lastComparison;
|
|
|
12575 |
}
|
| 3430 |
rajveer |
12576 |
if (isSetPex()) {
|
|
|
12577 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
|
|
|
12578 |
if (lastComparison != 0) {
|
|
|
12579 |
return lastComparison;
|
|
|
12580 |
}
|
| 3385 |
varun.gupt |
12581 |
}
|
|
|
12582 |
return 0;
|
|
|
12583 |
}
|
|
|
12584 |
|
| 3430 |
rajveer |
12585 |
public _Fields fieldForId(int fieldId) {
|
|
|
12586 |
return _Fields.findByThriftId(fieldId);
|
|
|
12587 |
}
|
|
|
12588 |
|
|
|
12589 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
12590 |
org.apache.thrift.protocol.TField field;
|
| 3385 |
varun.gupt |
12591 |
iprot.readStructBegin();
|
|
|
12592 |
while (true)
|
|
|
12593 |
{
|
|
|
12594 |
field = iprot.readFieldBegin();
|
| 3430 |
rajveer |
12595 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
| 3385 |
varun.gupt |
12596 |
break;
|
|
|
12597 |
}
|
| 3430 |
rajveer |
12598 |
switch (field.id) {
|
|
|
12599 |
case 0: // SUCCESS
|
|
|
12600 |
if (field.type == org.apache.thrift.protocol.TType.LIST) {
|
|
|
12601 |
{
|
| 6736 |
amit.gupta |
12602 |
org.apache.thrift.protocol.TList _list30 = iprot.readListBegin();
|
|
|
12603 |
this.success = new ArrayList<Coupon>(_list30.size);
|
|
|
12604 |
for (int _i31 = 0; _i31 < _list30.size; ++_i31)
|
| 3385 |
varun.gupt |
12605 |
{
|
| 6736 |
amit.gupta |
12606 |
Coupon _elem32; // required
|
|
|
12607 |
_elem32 = new Coupon();
|
|
|
12608 |
_elem32.read(iprot);
|
|
|
12609 |
this.success.add(_elem32);
|
| 3385 |
varun.gupt |
12610 |
}
|
| 3430 |
rajveer |
12611 |
iprot.readListEnd();
|
| 3385 |
varun.gupt |
12612 |
}
|
| 3430 |
rajveer |
12613 |
} else {
|
|
|
12614 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
12615 |
}
|
|
|
12616 |
break;
|
|
|
12617 |
case 1: // PEX
|
|
|
12618 |
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
|
|
12619 |
this.pex = new PromotionException();
|
|
|
12620 |
this.pex.read(iprot);
|
|
|
12621 |
} else {
|
|
|
12622 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
12623 |
}
|
|
|
12624 |
break;
|
|
|
12625 |
default:
|
|
|
12626 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| 3385 |
varun.gupt |
12627 |
}
|
| 3430 |
rajveer |
12628 |
iprot.readFieldEnd();
|
| 3385 |
varun.gupt |
12629 |
}
|
|
|
12630 |
iprot.readStructEnd();
|
|
|
12631 |
validate();
|
|
|
12632 |
}
|
|
|
12633 |
|
| 3430 |
rajveer |
12634 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
| 3385 |
varun.gupt |
12635 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
12636 |
|
|
|
12637 |
if (this.isSetSuccess()) {
|
|
|
12638 |
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
|
|
12639 |
{
|
| 3430 |
rajveer |
12640 |
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
|
| 6736 |
amit.gupta |
12641 |
for (Coupon _iter33 : this.success)
|
| 3385 |
varun.gupt |
12642 |
{
|
| 6736 |
amit.gupta |
12643 |
_iter33.write(oprot);
|
| 3385 |
varun.gupt |
12644 |
}
|
|
|
12645 |
oprot.writeListEnd();
|
|
|
12646 |
}
|
|
|
12647 |
oprot.writeFieldEnd();
|
|
|
12648 |
} else if (this.isSetPex()) {
|
|
|
12649 |
oprot.writeFieldBegin(PEX_FIELD_DESC);
|
|
|
12650 |
this.pex.write(oprot);
|
|
|
12651 |
oprot.writeFieldEnd();
|
|
|
12652 |
}
|
|
|
12653 |
oprot.writeFieldStop();
|
|
|
12654 |
oprot.writeStructEnd();
|
|
|
12655 |
}
|
|
|
12656 |
|
|
|
12657 |
@Override
|
|
|
12658 |
public String toString() {
|
|
|
12659 |
StringBuilder sb = new StringBuilder("getActiveCoupons_result(");
|
|
|
12660 |
boolean first = true;
|
|
|
12661 |
|
|
|
12662 |
sb.append("success:");
|
|
|
12663 |
if (this.success == null) {
|
|
|
12664 |
sb.append("null");
|
|
|
12665 |
} else {
|
|
|
12666 |
sb.append(this.success);
|
|
|
12667 |
}
|
|
|
12668 |
first = false;
|
|
|
12669 |
if (!first) sb.append(", ");
|
|
|
12670 |
sb.append("pex:");
|
|
|
12671 |
if (this.pex == null) {
|
|
|
12672 |
sb.append("null");
|
|
|
12673 |
} else {
|
|
|
12674 |
sb.append(this.pex);
|
|
|
12675 |
}
|
|
|
12676 |
first = false;
|
|
|
12677 |
sb.append(")");
|
|
|
12678 |
return sb.toString();
|
|
|
12679 |
}
|
|
|
12680 |
|
| 3430 |
rajveer |
12681 |
public void validate() throws org.apache.thrift.TException {
|
| 3385 |
varun.gupt |
12682 |
// check for required fields
|
|
|
12683 |
}
|
|
|
12684 |
|
| 3430 |
rajveer |
12685 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
12686 |
try {
|
|
|
12687 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
12688 |
} catch (org.apache.thrift.TException te) {
|
|
|
12689 |
throw new java.io.IOException(te);
|
|
|
12690 |
}
|
|
|
12691 |
}
|
|
|
12692 |
|
|
|
12693 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
12694 |
try {
|
|
|
12695 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
12696 |
} catch (org.apache.thrift.TException te) {
|
|
|
12697 |
throw new java.io.IOException(te);
|
|
|
12698 |
}
|
|
|
12699 |
}
|
|
|
12700 |
|
| 3385 |
varun.gupt |
12701 |
}
|
|
|
12702 |
|
| 6250 |
amit.gupta |
12703 |
public static class createCoupon_args implements org.apache.thrift.TBase<createCoupon_args, createCoupon_args._Fields>, java.io.Serializable, Cloneable {
|
|
|
12704 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createCoupon_args");
|
|
|
12705 |
|
|
|
12706 |
private static final org.apache.thrift.protocol.TField PROMOTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("promotionId", org.apache.thrift.protocol.TType.I64, (short)1);
|
| 6730 |
anupam.sin |
12707 |
private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCode", org.apache.thrift.protocol.TType.STRING, (short)2);
|
|
|
12708 |
private static final org.apache.thrift.protocol.TField ARGUMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("arguments", org.apache.thrift.protocol.TType.STRING, (short)3);
|
|
|
12709 |
private static final org.apache.thrift.protocol.TField IS_COD_FIELD_DESC = new org.apache.thrift.protocol.TField("isCod", org.apache.thrift.protocol.TType.BOOL, (short)4);
|
|
|
12710 |
private static final org.apache.thrift.protocol.TField PREFIX_FIELD_DESC = new org.apache.thrift.protocol.TField("prefix", org.apache.thrift.protocol.TType.STRING, (short)5);
|
| 6250 |
amit.gupta |
12711 |
|
|
|
12712 |
private long promotionId; // required
|
| 6730 |
anupam.sin |
12713 |
private String couponCode; // required
|
| 6679 |
anupam.sin |
12714 |
private String arguments; // required
|
| 6356 |
amit.gupta |
12715 |
private boolean isCod; // required
|
| 6561 |
amit.gupta |
12716 |
private String prefix; // required
|
| 6250 |
amit.gupta |
12717 |
|
|
|
12718 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
12719 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
12720 |
PROMOTION_ID((short)1, "promotionId"),
|
| 6730 |
anupam.sin |
12721 |
COUPON_CODE((short)2, "couponCode"),
|
|
|
12722 |
ARGUMENTS((short)3, "arguments"),
|
|
|
12723 |
IS_COD((short)4, "isCod"),
|
|
|
12724 |
PREFIX((short)5, "prefix");
|
| 6250 |
amit.gupta |
12725 |
|
|
|
12726 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
12727 |
|
|
|
12728 |
static {
|
|
|
12729 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
12730 |
byName.put(field.getFieldName(), field);
|
|
|
12731 |
}
|
|
|
12732 |
}
|
|
|
12733 |
|
|
|
12734 |
/**
|
|
|
12735 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
12736 |
*/
|
|
|
12737 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
12738 |
switch(fieldId) {
|
|
|
12739 |
case 1: // PROMOTION_ID
|
|
|
12740 |
return PROMOTION_ID;
|
| 6730 |
anupam.sin |
12741 |
case 2: // COUPON_CODE
|
|
|
12742 |
return COUPON_CODE;
|
|
|
12743 |
case 3: // ARGUMENTS
|
| 6679 |
anupam.sin |
12744 |
return ARGUMENTS;
|
| 6730 |
anupam.sin |
12745 |
case 4: // IS_COD
|
| 6356 |
amit.gupta |
12746 |
return IS_COD;
|
| 6730 |
anupam.sin |
12747 |
case 5: // PREFIX
|
| 6561 |
amit.gupta |
12748 |
return PREFIX;
|
| 6250 |
amit.gupta |
12749 |
default:
|
|
|
12750 |
return null;
|
|
|
12751 |
}
|
|
|
12752 |
}
|
|
|
12753 |
|
|
|
12754 |
/**
|
|
|
12755 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
12756 |
* if it is not found.
|
|
|
12757 |
*/
|
|
|
12758 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
12759 |
_Fields fields = findByThriftId(fieldId);
|
|
|
12760 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
12761 |
return fields;
|
|
|
12762 |
}
|
|
|
12763 |
|
|
|
12764 |
/**
|
|
|
12765 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
12766 |
*/
|
|
|
12767 |
public static _Fields findByName(String name) {
|
|
|
12768 |
return byName.get(name);
|
|
|
12769 |
}
|
|
|
12770 |
|
|
|
12771 |
private final short _thriftId;
|
|
|
12772 |
private final String _fieldName;
|
|
|
12773 |
|
|
|
12774 |
_Fields(short thriftId, String fieldName) {
|
|
|
12775 |
_thriftId = thriftId;
|
|
|
12776 |
_fieldName = fieldName;
|
|
|
12777 |
}
|
|
|
12778 |
|
|
|
12779 |
public short getThriftFieldId() {
|
|
|
12780 |
return _thriftId;
|
|
|
12781 |
}
|
|
|
12782 |
|
|
|
12783 |
public String getFieldName() {
|
|
|
12784 |
return _fieldName;
|
|
|
12785 |
}
|
|
|
12786 |
}
|
|
|
12787 |
|
|
|
12788 |
// isset id assignments
|
|
|
12789 |
private static final int __PROMOTIONID_ISSET_ID = 0;
|
| 6679 |
anupam.sin |
12790 |
private static final int __ISCOD_ISSET_ID = 1;
|
|
|
12791 |
private BitSet __isset_bit_vector = new BitSet(2);
|
| 6250 |
amit.gupta |
12792 |
|
|
|
12793 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
12794 |
static {
|
|
|
12795 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
12796 |
tmpMap.put(_Fields.PROMOTION_ID, new org.apache.thrift.meta_data.FieldMetaData("promotionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
12797 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
| 6730 |
anupam.sin |
12798 |
tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
12799 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
| 6679 |
anupam.sin |
12800 |
tmpMap.put(_Fields.ARGUMENTS, new org.apache.thrift.meta_data.FieldMetaData("arguments", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
| 6250 |
amit.gupta |
12801 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
| 6356 |
amit.gupta |
12802 |
tmpMap.put(_Fields.IS_COD, new org.apache.thrift.meta_data.FieldMetaData("isCod", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
12803 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
|
| 6561 |
amit.gupta |
12804 |
tmpMap.put(_Fields.PREFIX, new org.apache.thrift.meta_data.FieldMetaData("prefix", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
12805 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
| 6250 |
amit.gupta |
12806 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
12807 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createCoupon_args.class, metaDataMap);
|
|
|
12808 |
}
|
|
|
12809 |
|
|
|
12810 |
public createCoupon_args() {
|
|
|
12811 |
}
|
|
|
12812 |
|
|
|
12813 |
public createCoupon_args(
|
|
|
12814 |
long promotionId,
|
| 6730 |
anupam.sin |
12815 |
String couponCode,
|
| 6679 |
anupam.sin |
12816 |
String arguments,
|
| 6356 |
amit.gupta |
12817 |
boolean isCod,
|
| 6561 |
amit.gupta |
12818 |
String prefix)
|
| 6250 |
amit.gupta |
12819 |
{
|
|
|
12820 |
this();
|
|
|
12821 |
this.promotionId = promotionId;
|
|
|
12822 |
setPromotionIdIsSet(true);
|
| 6730 |
anupam.sin |
12823 |
this.couponCode = couponCode;
|
| 6679 |
anupam.sin |
12824 |
this.arguments = arguments;
|
| 6356 |
amit.gupta |
12825 |
this.isCod = isCod;
|
|
|
12826 |
setIsCodIsSet(true);
|
| 6561 |
amit.gupta |
12827 |
this.prefix = prefix;
|
| 6250 |
amit.gupta |
12828 |
}
|
|
|
12829 |
|
|
|
12830 |
/**
|
|
|
12831 |
* Performs a deep copy on <i>other</i>.
|
|
|
12832 |
*/
|
|
|
12833 |
public createCoupon_args(createCoupon_args other) {
|
|
|
12834 |
__isset_bit_vector.clear();
|
|
|
12835 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
12836 |
this.promotionId = other.promotionId;
|
| 6730 |
anupam.sin |
12837 |
if (other.isSetCouponCode()) {
|
|
|
12838 |
this.couponCode = other.couponCode;
|
|
|
12839 |
}
|
| 6679 |
anupam.sin |
12840 |
if (other.isSetArguments()) {
|
|
|
12841 |
this.arguments = other.arguments;
|
| 6250 |
amit.gupta |
12842 |
}
|
| 6356 |
amit.gupta |
12843 |
this.isCod = other.isCod;
|
| 6561 |
amit.gupta |
12844 |
if (other.isSetPrefix()) {
|
|
|
12845 |
this.prefix = other.prefix;
|
|
|
12846 |
}
|
| 6250 |
amit.gupta |
12847 |
}
|
|
|
12848 |
|
|
|
12849 |
public createCoupon_args deepCopy() {
|
|
|
12850 |
return new createCoupon_args(this);
|
|
|
12851 |
}
|
|
|
12852 |
|
|
|
12853 |
@Override
|
|
|
12854 |
public void clear() {
|
|
|
12855 |
setPromotionIdIsSet(false);
|
|
|
12856 |
this.promotionId = 0;
|
| 6730 |
anupam.sin |
12857 |
this.couponCode = null;
|
| 6679 |
anupam.sin |
12858 |
this.arguments = null;
|
| 6356 |
amit.gupta |
12859 |
setIsCodIsSet(false);
|
|
|
12860 |
this.isCod = false;
|
| 6561 |
amit.gupta |
12861 |
this.prefix = null;
|
| 6250 |
amit.gupta |
12862 |
}
|
|
|
12863 |
|
|
|
12864 |
public long getPromotionId() {
|
|
|
12865 |
return this.promotionId;
|
|
|
12866 |
}
|
|
|
12867 |
|
|
|
12868 |
public void setPromotionId(long promotionId) {
|
|
|
12869 |
this.promotionId = promotionId;
|
|
|
12870 |
setPromotionIdIsSet(true);
|
|
|
12871 |
}
|
|
|
12872 |
|
|
|
12873 |
public void unsetPromotionId() {
|
|
|
12874 |
__isset_bit_vector.clear(__PROMOTIONID_ISSET_ID);
|
|
|
12875 |
}
|
|
|
12876 |
|
|
|
12877 |
/** Returns true if field promotionId is set (has been assigned a value) and false otherwise */
|
|
|
12878 |
public boolean isSetPromotionId() {
|
|
|
12879 |
return __isset_bit_vector.get(__PROMOTIONID_ISSET_ID);
|
|
|
12880 |
}
|
|
|
12881 |
|
|
|
12882 |
public void setPromotionIdIsSet(boolean value) {
|
|
|
12883 |
__isset_bit_vector.set(__PROMOTIONID_ISSET_ID, value);
|
|
|
12884 |
}
|
|
|
12885 |
|
| 6730 |
anupam.sin |
12886 |
public String getCouponCode() {
|
|
|
12887 |
return this.couponCode;
|
|
|
12888 |
}
|
|
|
12889 |
|
|
|
12890 |
public void setCouponCode(String couponCode) {
|
|
|
12891 |
this.couponCode = couponCode;
|
|
|
12892 |
}
|
|
|
12893 |
|
|
|
12894 |
public void unsetCouponCode() {
|
|
|
12895 |
this.couponCode = null;
|
|
|
12896 |
}
|
|
|
12897 |
|
|
|
12898 |
/** Returns true if field couponCode is set (has been assigned a value) and false otherwise */
|
|
|
12899 |
public boolean isSetCouponCode() {
|
|
|
12900 |
return this.couponCode != null;
|
|
|
12901 |
}
|
|
|
12902 |
|
|
|
12903 |
public void setCouponCodeIsSet(boolean value) {
|
|
|
12904 |
if (!value) {
|
|
|
12905 |
this.couponCode = null;
|
|
|
12906 |
}
|
|
|
12907 |
}
|
|
|
12908 |
|
| 6679 |
anupam.sin |
12909 |
public String getArguments() {
|
|
|
12910 |
return this.arguments;
|
| 6250 |
amit.gupta |
12911 |
}
|
|
|
12912 |
|
| 6679 |
anupam.sin |
12913 |
public void setArguments(String arguments) {
|
|
|
12914 |
this.arguments = arguments;
|
| 6250 |
amit.gupta |
12915 |
}
|
|
|
12916 |
|
| 6679 |
anupam.sin |
12917 |
public void unsetArguments() {
|
|
|
12918 |
this.arguments = null;
|
| 6250 |
amit.gupta |
12919 |
}
|
|
|
12920 |
|
| 6679 |
anupam.sin |
12921 |
/** Returns true if field arguments is set (has been assigned a value) and false otherwise */
|
|
|
12922 |
public boolean isSetArguments() {
|
|
|
12923 |
return this.arguments != null;
|
| 6250 |
amit.gupta |
12924 |
}
|
|
|
12925 |
|
| 6679 |
anupam.sin |
12926 |
public void setArgumentsIsSet(boolean value) {
|
| 6250 |
amit.gupta |
12927 |
if (!value) {
|
| 6679 |
anupam.sin |
12928 |
this.arguments = null;
|
| 6250 |
amit.gupta |
12929 |
}
|
|
|
12930 |
}
|
|
|
12931 |
|
| 6356 |
amit.gupta |
12932 |
public boolean isIsCod() {
|
|
|
12933 |
return this.isCod;
|
|
|
12934 |
}
|
|
|
12935 |
|
|
|
12936 |
public void setIsCod(boolean isCod) {
|
|
|
12937 |
this.isCod = isCod;
|
|
|
12938 |
setIsCodIsSet(true);
|
|
|
12939 |
}
|
|
|
12940 |
|
|
|
12941 |
public void unsetIsCod() {
|
|
|
12942 |
__isset_bit_vector.clear(__ISCOD_ISSET_ID);
|
|
|
12943 |
}
|
|
|
12944 |
|
|
|
12945 |
/** Returns true if field isCod is set (has been assigned a value) and false otherwise */
|
|
|
12946 |
public boolean isSetIsCod() {
|
|
|
12947 |
return __isset_bit_vector.get(__ISCOD_ISSET_ID);
|
|
|
12948 |
}
|
|
|
12949 |
|
|
|
12950 |
public void setIsCodIsSet(boolean value) {
|
|
|
12951 |
__isset_bit_vector.set(__ISCOD_ISSET_ID, value);
|
|
|
12952 |
}
|
|
|
12953 |
|
| 6561 |
amit.gupta |
12954 |
public String getPrefix() {
|
|
|
12955 |
return this.prefix;
|
|
|
12956 |
}
|
|
|
12957 |
|
|
|
12958 |
public void setPrefix(String prefix) {
|
|
|
12959 |
this.prefix = prefix;
|
|
|
12960 |
}
|
|
|
12961 |
|
|
|
12962 |
public void unsetPrefix() {
|
|
|
12963 |
this.prefix = null;
|
|
|
12964 |
}
|
|
|
12965 |
|
|
|
12966 |
/** Returns true if field prefix is set (has been assigned a value) and false otherwise */
|
|
|
12967 |
public boolean isSetPrefix() {
|
|
|
12968 |
return this.prefix != null;
|
|
|
12969 |
}
|
|
|
12970 |
|
|
|
12971 |
public void setPrefixIsSet(boolean value) {
|
|
|
12972 |
if (!value) {
|
|
|
12973 |
this.prefix = null;
|
|
|
12974 |
}
|
|
|
12975 |
}
|
|
|
12976 |
|
| 6250 |
amit.gupta |
12977 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
12978 |
switch (field) {
|
|
|
12979 |
case PROMOTION_ID:
|
|
|
12980 |
if (value == null) {
|
|
|
12981 |
unsetPromotionId();
|
|
|
12982 |
} else {
|
|
|
12983 |
setPromotionId((Long)value);
|
|
|
12984 |
}
|
|
|
12985 |
break;
|
|
|
12986 |
|
| 6730 |
anupam.sin |
12987 |
case COUPON_CODE:
|
|
|
12988 |
if (value == null) {
|
|
|
12989 |
unsetCouponCode();
|
|
|
12990 |
} else {
|
|
|
12991 |
setCouponCode((String)value);
|
|
|
12992 |
}
|
|
|
12993 |
break;
|
|
|
12994 |
|
| 6679 |
anupam.sin |
12995 |
case ARGUMENTS:
|
| 6250 |
amit.gupta |
12996 |
if (value == null) {
|
| 6679 |
anupam.sin |
12997 |
unsetArguments();
|
| 6250 |
amit.gupta |
12998 |
} else {
|
| 6679 |
anupam.sin |
12999 |
setArguments((String)value);
|
| 6250 |
amit.gupta |
13000 |
}
|
|
|
13001 |
break;
|
|
|
13002 |
|
| 6356 |
amit.gupta |
13003 |
case IS_COD:
|
|
|
13004 |
if (value == null) {
|
|
|
13005 |
unsetIsCod();
|
|
|
13006 |
} else {
|
|
|
13007 |
setIsCod((Boolean)value);
|
|
|
13008 |
}
|
|
|
13009 |
break;
|
|
|
13010 |
|
| 6561 |
amit.gupta |
13011 |
case PREFIX:
|
|
|
13012 |
if (value == null) {
|
|
|
13013 |
unsetPrefix();
|
|
|
13014 |
} else {
|
|
|
13015 |
setPrefix((String)value);
|
|
|
13016 |
}
|
|
|
13017 |
break;
|
|
|
13018 |
|
| 6250 |
amit.gupta |
13019 |
}
|
|
|
13020 |
}
|
|
|
13021 |
|
|
|
13022 |
public Object getFieldValue(_Fields field) {
|
|
|
13023 |
switch (field) {
|
|
|
13024 |
case PROMOTION_ID:
|
|
|
13025 |
return Long.valueOf(getPromotionId());
|
|
|
13026 |
|
| 6730 |
anupam.sin |
13027 |
case COUPON_CODE:
|
|
|
13028 |
return getCouponCode();
|
|
|
13029 |
|
| 6679 |
anupam.sin |
13030 |
case ARGUMENTS:
|
|
|
13031 |
return getArguments();
|
| 6250 |
amit.gupta |
13032 |
|
| 6356 |
amit.gupta |
13033 |
case IS_COD:
|
|
|
13034 |
return Boolean.valueOf(isIsCod());
|
|
|
13035 |
|
| 6561 |
amit.gupta |
13036 |
case PREFIX:
|
|
|
13037 |
return getPrefix();
|
|
|
13038 |
|
| 6250 |
amit.gupta |
13039 |
}
|
|
|
13040 |
throw new IllegalStateException();
|
|
|
13041 |
}
|
|
|
13042 |
|
|
|
13043 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
13044 |
public boolean isSet(_Fields field) {
|
|
|
13045 |
if (field == null) {
|
|
|
13046 |
throw new IllegalArgumentException();
|
|
|
13047 |
}
|
|
|
13048 |
|
|
|
13049 |
switch (field) {
|
|
|
13050 |
case PROMOTION_ID:
|
|
|
13051 |
return isSetPromotionId();
|
| 6730 |
anupam.sin |
13052 |
case COUPON_CODE:
|
|
|
13053 |
return isSetCouponCode();
|
| 6679 |
anupam.sin |
13054 |
case ARGUMENTS:
|
|
|
13055 |
return isSetArguments();
|
| 6356 |
amit.gupta |
13056 |
case IS_COD:
|
|
|
13057 |
return isSetIsCod();
|
| 6561 |
amit.gupta |
13058 |
case PREFIX:
|
|
|
13059 |
return isSetPrefix();
|
| 6250 |
amit.gupta |
13060 |
}
|
|
|
13061 |
throw new IllegalStateException();
|
|
|
13062 |
}
|
|
|
13063 |
|
|
|
13064 |
@Override
|
|
|
13065 |
public boolean equals(Object that) {
|
|
|
13066 |
if (that == null)
|
|
|
13067 |
return false;
|
|
|
13068 |
if (that instanceof createCoupon_args)
|
|
|
13069 |
return this.equals((createCoupon_args)that);
|
|
|
13070 |
return false;
|
|
|
13071 |
}
|
|
|
13072 |
|
|
|
13073 |
public boolean equals(createCoupon_args that) {
|
|
|
13074 |
if (that == null)
|
|
|
13075 |
return false;
|
|
|
13076 |
|
|
|
13077 |
boolean this_present_promotionId = true;
|
|
|
13078 |
boolean that_present_promotionId = true;
|
|
|
13079 |
if (this_present_promotionId || that_present_promotionId) {
|
|
|
13080 |
if (!(this_present_promotionId && that_present_promotionId))
|
|
|
13081 |
return false;
|
|
|
13082 |
if (this.promotionId != that.promotionId)
|
|
|
13083 |
return false;
|
|
|
13084 |
}
|
|
|
13085 |
|
| 6730 |
anupam.sin |
13086 |
boolean this_present_couponCode = true && this.isSetCouponCode();
|
|
|
13087 |
boolean that_present_couponCode = true && that.isSetCouponCode();
|
|
|
13088 |
if (this_present_couponCode || that_present_couponCode) {
|
|
|
13089 |
if (!(this_present_couponCode && that_present_couponCode))
|
|
|
13090 |
return false;
|
|
|
13091 |
if (!this.couponCode.equals(that.couponCode))
|
|
|
13092 |
return false;
|
|
|
13093 |
}
|
|
|
13094 |
|
| 6679 |
anupam.sin |
13095 |
boolean this_present_arguments = true && this.isSetArguments();
|
|
|
13096 |
boolean that_present_arguments = true && that.isSetArguments();
|
|
|
13097 |
if (this_present_arguments || that_present_arguments) {
|
|
|
13098 |
if (!(this_present_arguments && that_present_arguments))
|
| 6250 |
amit.gupta |
13099 |
return false;
|
| 6679 |
anupam.sin |
13100 |
if (!this.arguments.equals(that.arguments))
|
| 6250 |
amit.gupta |
13101 |
return false;
|
|
|
13102 |
}
|
|
|
13103 |
|
| 6356 |
amit.gupta |
13104 |
boolean this_present_isCod = true;
|
|
|
13105 |
boolean that_present_isCod = true;
|
|
|
13106 |
if (this_present_isCod || that_present_isCod) {
|
|
|
13107 |
if (!(this_present_isCod && that_present_isCod))
|
|
|
13108 |
return false;
|
|
|
13109 |
if (this.isCod != that.isCod)
|
|
|
13110 |
return false;
|
|
|
13111 |
}
|
|
|
13112 |
|
| 6561 |
amit.gupta |
13113 |
boolean this_present_prefix = true && this.isSetPrefix();
|
|
|
13114 |
boolean that_present_prefix = true && that.isSetPrefix();
|
|
|
13115 |
if (this_present_prefix || that_present_prefix) {
|
|
|
13116 |
if (!(this_present_prefix && that_present_prefix))
|
|
|
13117 |
return false;
|
|
|
13118 |
if (!this.prefix.equals(that.prefix))
|
|
|
13119 |
return false;
|
|
|
13120 |
}
|
|
|
13121 |
|
| 6250 |
amit.gupta |
13122 |
return true;
|
|
|
13123 |
}
|
|
|
13124 |
|
|
|
13125 |
@Override
|
|
|
13126 |
public int hashCode() {
|
|
|
13127 |
return 0;
|
|
|
13128 |
}
|
|
|
13129 |
|
|
|
13130 |
public int compareTo(createCoupon_args other) {
|
|
|
13131 |
if (!getClass().equals(other.getClass())) {
|
|
|
13132 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
13133 |
}
|
|
|
13134 |
|
|
|
13135 |
int lastComparison = 0;
|
|
|
13136 |
createCoupon_args typedOther = (createCoupon_args)other;
|
|
|
13137 |
|
|
|
13138 |
lastComparison = Boolean.valueOf(isSetPromotionId()).compareTo(typedOther.isSetPromotionId());
|
|
|
13139 |
if (lastComparison != 0) {
|
|
|
13140 |
return lastComparison;
|
|
|
13141 |
}
|
|
|
13142 |
if (isSetPromotionId()) {
|
|
|
13143 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.promotionId, typedOther.promotionId);
|
|
|
13144 |
if (lastComparison != 0) {
|
|
|
13145 |
return lastComparison;
|
|
|
13146 |
}
|
|
|
13147 |
}
|
| 6730 |
anupam.sin |
13148 |
lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
|
|
|
13149 |
if (lastComparison != 0) {
|
|
|
13150 |
return lastComparison;
|
|
|
13151 |
}
|
|
|
13152 |
if (isSetCouponCode()) {
|
|
|
13153 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);
|
|
|
13154 |
if (lastComparison != 0) {
|
|
|
13155 |
return lastComparison;
|
|
|
13156 |
}
|
|
|
13157 |
}
|
| 6679 |
anupam.sin |
13158 |
lastComparison = Boolean.valueOf(isSetArguments()).compareTo(typedOther.isSetArguments());
|
| 6250 |
amit.gupta |
13159 |
if (lastComparison != 0) {
|
|
|
13160 |
return lastComparison;
|
|
|
13161 |
}
|
| 6679 |
anupam.sin |
13162 |
if (isSetArguments()) {
|
|
|
13163 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.arguments, typedOther.arguments);
|
| 6250 |
amit.gupta |
13164 |
if (lastComparison != 0) {
|
|
|
13165 |
return lastComparison;
|
|
|
13166 |
}
|
|
|
13167 |
}
|
| 6356 |
amit.gupta |
13168 |
lastComparison = Boolean.valueOf(isSetIsCod()).compareTo(typedOther.isSetIsCod());
|
|
|
13169 |
if (lastComparison != 0) {
|
|
|
13170 |
return lastComparison;
|
|
|
13171 |
}
|
|
|
13172 |
if (isSetIsCod()) {
|
|
|
13173 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isCod, typedOther.isCod);
|
|
|
13174 |
if (lastComparison != 0) {
|
|
|
13175 |
return lastComparison;
|
|
|
13176 |
}
|
|
|
13177 |
}
|
| 6561 |
amit.gupta |
13178 |
lastComparison = Boolean.valueOf(isSetPrefix()).compareTo(typedOther.isSetPrefix());
|
|
|
13179 |
if (lastComparison != 0) {
|
|
|
13180 |
return lastComparison;
|
|
|
13181 |
}
|
|
|
13182 |
if (isSetPrefix()) {
|
|
|
13183 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefix, typedOther.prefix);
|
|
|
13184 |
if (lastComparison != 0) {
|
|
|
13185 |
return lastComparison;
|
|
|
13186 |
}
|
|
|
13187 |
}
|
| 6250 |
amit.gupta |
13188 |
return 0;
|
|
|
13189 |
}
|
|
|
13190 |
|
|
|
13191 |
public _Fields fieldForId(int fieldId) {
|
|
|
13192 |
return _Fields.findByThriftId(fieldId);
|
|
|
13193 |
}
|
|
|
13194 |
|
|
|
13195 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
13196 |
org.apache.thrift.protocol.TField field;
|
|
|
13197 |
iprot.readStructBegin();
|
|
|
13198 |
while (true)
|
|
|
13199 |
{
|
|
|
13200 |
field = iprot.readFieldBegin();
|
|
|
13201 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
13202 |
break;
|
|
|
13203 |
}
|
|
|
13204 |
switch (field.id) {
|
|
|
13205 |
case 1: // PROMOTION_ID
|
|
|
13206 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
13207 |
this.promotionId = iprot.readI64();
|
|
|
13208 |
setPromotionIdIsSet(true);
|
|
|
13209 |
} else {
|
|
|
13210 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
13211 |
}
|
|
|
13212 |
break;
|
| 6730 |
anupam.sin |
13213 |
case 2: // COUPON_CODE
|
| 6250 |
amit.gupta |
13214 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
| 6730 |
anupam.sin |
13215 |
this.couponCode = iprot.readString();
|
|
|
13216 |
} else {
|
|
|
13217 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
13218 |
}
|
|
|
13219 |
break;
|
|
|
13220 |
case 3: // ARGUMENTS
|
|
|
13221 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
| 6679 |
anupam.sin |
13222 |
this.arguments = iprot.readString();
|
| 6250 |
amit.gupta |
13223 |
} else {
|
|
|
13224 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
13225 |
}
|
|
|
13226 |
break;
|
| 6730 |
anupam.sin |
13227 |
case 4: // IS_COD
|
| 6356 |
amit.gupta |
13228 |
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
|
|
|
13229 |
this.isCod = iprot.readBool();
|
|
|
13230 |
setIsCodIsSet(true);
|
|
|
13231 |
} else {
|
|
|
13232 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
13233 |
}
|
|
|
13234 |
break;
|
| 6730 |
anupam.sin |
13235 |
case 5: // PREFIX
|
| 6561 |
amit.gupta |
13236 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
13237 |
this.prefix = iprot.readString();
|
|
|
13238 |
} else {
|
|
|
13239 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
13240 |
}
|
|
|
13241 |
break;
|
| 6250 |
amit.gupta |
13242 |
default:
|
|
|
13243 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
13244 |
}
|
|
|
13245 |
iprot.readFieldEnd();
|
|
|
13246 |
}
|
|
|
13247 |
iprot.readStructEnd();
|
|
|
13248 |
validate();
|
|
|
13249 |
}
|
|
|
13250 |
|
|
|
13251 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
13252 |
validate();
|
|
|
13253 |
|
|
|
13254 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
13255 |
oprot.writeFieldBegin(PROMOTION_ID_FIELD_DESC);
|
|
|
13256 |
oprot.writeI64(this.promotionId);
|
|
|
13257 |
oprot.writeFieldEnd();
|
| 6730 |
anupam.sin |
13258 |
if (this.couponCode != null) {
|
|
|
13259 |
oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
|
|
|
13260 |
oprot.writeString(this.couponCode);
|
|
|
13261 |
oprot.writeFieldEnd();
|
|
|
13262 |
}
|
| 6679 |
anupam.sin |
13263 |
if (this.arguments != null) {
|
|
|
13264 |
oprot.writeFieldBegin(ARGUMENTS_FIELD_DESC);
|
|
|
13265 |
oprot.writeString(this.arguments);
|
| 6250 |
amit.gupta |
13266 |
oprot.writeFieldEnd();
|
|
|
13267 |
}
|
| 6356 |
amit.gupta |
13268 |
oprot.writeFieldBegin(IS_COD_FIELD_DESC);
|
|
|
13269 |
oprot.writeBool(this.isCod);
|
|
|
13270 |
oprot.writeFieldEnd();
|
| 6561 |
amit.gupta |
13271 |
if (this.prefix != null) {
|
|
|
13272 |
oprot.writeFieldBegin(PREFIX_FIELD_DESC);
|
|
|
13273 |
oprot.writeString(this.prefix);
|
|
|
13274 |
oprot.writeFieldEnd();
|
|
|
13275 |
}
|
| 6250 |
amit.gupta |
13276 |
oprot.writeFieldStop();
|
|
|
13277 |
oprot.writeStructEnd();
|
|
|
13278 |
}
|
|
|
13279 |
|
|
|
13280 |
@Override
|
|
|
13281 |
public String toString() {
|
|
|
13282 |
StringBuilder sb = new StringBuilder("createCoupon_args(");
|
|
|
13283 |
boolean first = true;
|
|
|
13284 |
|
|
|
13285 |
sb.append("promotionId:");
|
|
|
13286 |
sb.append(this.promotionId);
|
|
|
13287 |
first = false;
|
|
|
13288 |
if (!first) sb.append(", ");
|
| 6730 |
anupam.sin |
13289 |
sb.append("couponCode:");
|
|
|
13290 |
if (this.couponCode == null) {
|
|
|
13291 |
sb.append("null");
|
|
|
13292 |
} else {
|
|
|
13293 |
sb.append(this.couponCode);
|
|
|
13294 |
}
|
|
|
13295 |
first = false;
|
|
|
13296 |
if (!first) sb.append(", ");
|
| 6679 |
anupam.sin |
13297 |
sb.append("arguments:");
|
|
|
13298 |
if (this.arguments == null) {
|
| 6250 |
amit.gupta |
13299 |
sb.append("null");
|
|
|
13300 |
} else {
|
| 6679 |
anupam.sin |
13301 |
sb.append(this.arguments);
|
| 6250 |
amit.gupta |
13302 |
}
|
|
|
13303 |
first = false;
|
|
|
13304 |
if (!first) sb.append(", ");
|
| 6356 |
amit.gupta |
13305 |
sb.append("isCod:");
|
|
|
13306 |
sb.append(this.isCod);
|
|
|
13307 |
first = false;
|
|
|
13308 |
if (!first) sb.append(", ");
|
| 6561 |
amit.gupta |
13309 |
sb.append("prefix:");
|
|
|
13310 |
if (this.prefix == null) {
|
|
|
13311 |
sb.append("null");
|
|
|
13312 |
} else {
|
|
|
13313 |
sb.append(this.prefix);
|
|
|
13314 |
}
|
|
|
13315 |
first = false;
|
| 6250 |
amit.gupta |
13316 |
sb.append(")");
|
|
|
13317 |
return sb.toString();
|
|
|
13318 |
}
|
|
|
13319 |
|
|
|
13320 |
public void validate() throws org.apache.thrift.TException {
|
|
|
13321 |
// check for required fields
|
|
|
13322 |
}
|
|
|
13323 |
|
|
|
13324 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
13325 |
try {
|
|
|
13326 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
13327 |
} catch (org.apache.thrift.TException te) {
|
|
|
13328 |
throw new java.io.IOException(te);
|
|
|
13329 |
}
|
|
|
13330 |
}
|
|
|
13331 |
|
|
|
13332 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
13333 |
try {
|
| 6561 |
amit.gupta |
13334 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
13335 |
__isset_bit_vector = new BitSet(1);
|
| 6250 |
amit.gupta |
13336 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
13337 |
} catch (org.apache.thrift.TException te) {
|
|
|
13338 |
throw new java.io.IOException(te);
|
|
|
13339 |
}
|
|
|
13340 |
}
|
|
|
13341 |
|
|
|
13342 |
}
|
|
|
13343 |
|
|
|
13344 |
public static class createCoupon_result implements org.apache.thrift.TBase<createCoupon_result, createCoupon_result._Fields>, java.io.Serializable, Cloneable {
|
|
|
13345 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createCoupon_result");
|
|
|
13346 |
|
|
|
13347 |
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
|
|
|
13348 |
private static final org.apache.thrift.protocol.TField PEX_FIELD_DESC = new org.apache.thrift.protocol.TField("pex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
|
|
|
13349 |
|
|
|
13350 |
private String success; // required
|
|
|
13351 |
private PromotionException pex; // required
|
|
|
13352 |
|
|
|
13353 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
13354 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
13355 |
SUCCESS((short)0, "success"),
|
|
|
13356 |
PEX((short)1, "pex");
|
|
|
13357 |
|
|
|
13358 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
13359 |
|
|
|
13360 |
static {
|
|
|
13361 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
13362 |
byName.put(field.getFieldName(), field);
|
|
|
13363 |
}
|
|
|
13364 |
}
|
|
|
13365 |
|
|
|
13366 |
/**
|
|
|
13367 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
13368 |
*/
|
|
|
13369 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
13370 |
switch(fieldId) {
|
|
|
13371 |
case 0: // SUCCESS
|
|
|
13372 |
return SUCCESS;
|
|
|
13373 |
case 1: // PEX
|
|
|
13374 |
return PEX;
|
|
|
13375 |
default:
|
|
|
13376 |
return null;
|
|
|
13377 |
}
|
|
|
13378 |
}
|
|
|
13379 |
|
|
|
13380 |
/**
|
|
|
13381 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
13382 |
* if it is not found.
|
|
|
13383 |
*/
|
|
|
13384 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
13385 |
_Fields fields = findByThriftId(fieldId);
|
|
|
13386 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
13387 |
return fields;
|
|
|
13388 |
}
|
|
|
13389 |
|
|
|
13390 |
/**
|
|
|
13391 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
13392 |
*/
|
|
|
13393 |
public static _Fields findByName(String name) {
|
|
|
13394 |
return byName.get(name);
|
|
|
13395 |
}
|
|
|
13396 |
|
|
|
13397 |
private final short _thriftId;
|
|
|
13398 |
private final String _fieldName;
|
|
|
13399 |
|
|
|
13400 |
_Fields(short thriftId, String fieldName) {
|
|
|
13401 |
_thriftId = thriftId;
|
|
|
13402 |
_fieldName = fieldName;
|
|
|
13403 |
}
|
|
|
13404 |
|
|
|
13405 |
public short getThriftFieldId() {
|
|
|
13406 |
return _thriftId;
|
|
|
13407 |
}
|
|
|
13408 |
|
|
|
13409 |
public String getFieldName() {
|
|
|
13410 |
return _fieldName;
|
|
|
13411 |
}
|
|
|
13412 |
}
|
|
|
13413 |
|
|
|
13414 |
// isset id assignments
|
|
|
13415 |
|
|
|
13416 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
13417 |
static {
|
|
|
13418 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
13419 |
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
13420 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
13421 |
tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
13422 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
|
|
|
13423 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
13424 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createCoupon_result.class, metaDataMap);
|
|
|
13425 |
}
|
|
|
13426 |
|
|
|
13427 |
public createCoupon_result() {
|
|
|
13428 |
}
|
|
|
13429 |
|
|
|
13430 |
public createCoupon_result(
|
|
|
13431 |
String success,
|
|
|
13432 |
PromotionException pex)
|
|
|
13433 |
{
|
|
|
13434 |
this();
|
|
|
13435 |
this.success = success;
|
|
|
13436 |
this.pex = pex;
|
|
|
13437 |
}
|
|
|
13438 |
|
|
|
13439 |
/**
|
|
|
13440 |
* Performs a deep copy on <i>other</i>.
|
|
|
13441 |
*/
|
|
|
13442 |
public createCoupon_result(createCoupon_result other) {
|
|
|
13443 |
if (other.isSetSuccess()) {
|
|
|
13444 |
this.success = other.success;
|
|
|
13445 |
}
|
|
|
13446 |
if (other.isSetPex()) {
|
|
|
13447 |
this.pex = new PromotionException(other.pex);
|
|
|
13448 |
}
|
|
|
13449 |
}
|
|
|
13450 |
|
|
|
13451 |
public createCoupon_result deepCopy() {
|
|
|
13452 |
return new createCoupon_result(this);
|
|
|
13453 |
}
|
|
|
13454 |
|
|
|
13455 |
@Override
|
|
|
13456 |
public void clear() {
|
|
|
13457 |
this.success = null;
|
|
|
13458 |
this.pex = null;
|
|
|
13459 |
}
|
|
|
13460 |
|
|
|
13461 |
public String getSuccess() {
|
|
|
13462 |
return this.success;
|
|
|
13463 |
}
|
|
|
13464 |
|
|
|
13465 |
public void setSuccess(String success) {
|
|
|
13466 |
this.success = success;
|
|
|
13467 |
}
|
|
|
13468 |
|
|
|
13469 |
public void unsetSuccess() {
|
|
|
13470 |
this.success = null;
|
|
|
13471 |
}
|
|
|
13472 |
|
|
|
13473 |
/** Returns true if field success is set (has been assigned a value) and false otherwise */
|
|
|
13474 |
public boolean isSetSuccess() {
|
|
|
13475 |
return this.success != null;
|
|
|
13476 |
}
|
|
|
13477 |
|
|
|
13478 |
public void setSuccessIsSet(boolean value) {
|
|
|
13479 |
if (!value) {
|
|
|
13480 |
this.success = null;
|
|
|
13481 |
}
|
|
|
13482 |
}
|
|
|
13483 |
|
|
|
13484 |
public PromotionException getPex() {
|
|
|
13485 |
return this.pex;
|
|
|
13486 |
}
|
|
|
13487 |
|
|
|
13488 |
public void setPex(PromotionException pex) {
|
|
|
13489 |
this.pex = pex;
|
|
|
13490 |
}
|
|
|
13491 |
|
|
|
13492 |
public void unsetPex() {
|
|
|
13493 |
this.pex = null;
|
|
|
13494 |
}
|
|
|
13495 |
|
|
|
13496 |
/** Returns true if field pex is set (has been assigned a value) and false otherwise */
|
|
|
13497 |
public boolean isSetPex() {
|
|
|
13498 |
return this.pex != null;
|
|
|
13499 |
}
|
|
|
13500 |
|
|
|
13501 |
public void setPexIsSet(boolean value) {
|
|
|
13502 |
if (!value) {
|
|
|
13503 |
this.pex = null;
|
|
|
13504 |
}
|
|
|
13505 |
}
|
|
|
13506 |
|
|
|
13507 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
13508 |
switch (field) {
|
|
|
13509 |
case SUCCESS:
|
|
|
13510 |
if (value == null) {
|
|
|
13511 |
unsetSuccess();
|
|
|
13512 |
} else {
|
|
|
13513 |
setSuccess((String)value);
|
|
|
13514 |
}
|
|
|
13515 |
break;
|
|
|
13516 |
|
|
|
13517 |
case PEX:
|
|
|
13518 |
if (value == null) {
|
|
|
13519 |
unsetPex();
|
|
|
13520 |
} else {
|
|
|
13521 |
setPex((PromotionException)value);
|
|
|
13522 |
}
|
|
|
13523 |
break;
|
|
|
13524 |
|
|
|
13525 |
}
|
|
|
13526 |
}
|
|
|
13527 |
|
|
|
13528 |
public Object getFieldValue(_Fields field) {
|
|
|
13529 |
switch (field) {
|
|
|
13530 |
case SUCCESS:
|
|
|
13531 |
return getSuccess();
|
|
|
13532 |
|
|
|
13533 |
case PEX:
|
|
|
13534 |
return getPex();
|
|
|
13535 |
|
|
|
13536 |
}
|
|
|
13537 |
throw new IllegalStateException();
|
|
|
13538 |
}
|
|
|
13539 |
|
|
|
13540 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
13541 |
public boolean isSet(_Fields field) {
|
|
|
13542 |
if (field == null) {
|
|
|
13543 |
throw new IllegalArgumentException();
|
|
|
13544 |
}
|
|
|
13545 |
|
|
|
13546 |
switch (field) {
|
|
|
13547 |
case SUCCESS:
|
|
|
13548 |
return isSetSuccess();
|
|
|
13549 |
case PEX:
|
|
|
13550 |
return isSetPex();
|
|
|
13551 |
}
|
|
|
13552 |
throw new IllegalStateException();
|
|
|
13553 |
}
|
|
|
13554 |
|
|
|
13555 |
@Override
|
|
|
13556 |
public boolean equals(Object that) {
|
|
|
13557 |
if (that == null)
|
|
|
13558 |
return false;
|
|
|
13559 |
if (that instanceof createCoupon_result)
|
|
|
13560 |
return this.equals((createCoupon_result)that);
|
|
|
13561 |
return false;
|
|
|
13562 |
}
|
|
|
13563 |
|
|
|
13564 |
public boolean equals(createCoupon_result that) {
|
|
|
13565 |
if (that == null)
|
|
|
13566 |
return false;
|
|
|
13567 |
|
|
|
13568 |
boolean this_present_success = true && this.isSetSuccess();
|
|
|
13569 |
boolean that_present_success = true && that.isSetSuccess();
|
|
|
13570 |
if (this_present_success || that_present_success) {
|
|
|
13571 |
if (!(this_present_success && that_present_success))
|
|
|
13572 |
return false;
|
|
|
13573 |
if (!this.success.equals(that.success))
|
|
|
13574 |
return false;
|
|
|
13575 |
}
|
|
|
13576 |
|
|
|
13577 |
boolean this_present_pex = true && this.isSetPex();
|
|
|
13578 |
boolean that_present_pex = true && that.isSetPex();
|
|
|
13579 |
if (this_present_pex || that_present_pex) {
|
|
|
13580 |
if (!(this_present_pex && that_present_pex))
|
|
|
13581 |
return false;
|
|
|
13582 |
if (!this.pex.equals(that.pex))
|
|
|
13583 |
return false;
|
|
|
13584 |
}
|
|
|
13585 |
|
|
|
13586 |
return true;
|
|
|
13587 |
}
|
|
|
13588 |
|
|
|
13589 |
@Override
|
|
|
13590 |
public int hashCode() {
|
|
|
13591 |
return 0;
|
|
|
13592 |
}
|
|
|
13593 |
|
|
|
13594 |
public int compareTo(createCoupon_result other) {
|
|
|
13595 |
if (!getClass().equals(other.getClass())) {
|
|
|
13596 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
13597 |
}
|
|
|
13598 |
|
|
|
13599 |
int lastComparison = 0;
|
|
|
13600 |
createCoupon_result typedOther = (createCoupon_result)other;
|
|
|
13601 |
|
|
|
13602 |
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
|
|
|
13603 |
if (lastComparison != 0) {
|
|
|
13604 |
return lastComparison;
|
|
|
13605 |
}
|
|
|
13606 |
if (isSetSuccess()) {
|
|
|
13607 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
|
|
|
13608 |
if (lastComparison != 0) {
|
|
|
13609 |
return lastComparison;
|
|
|
13610 |
}
|
|
|
13611 |
}
|
|
|
13612 |
lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
|
|
|
13613 |
if (lastComparison != 0) {
|
|
|
13614 |
return lastComparison;
|
|
|
13615 |
}
|
|
|
13616 |
if (isSetPex()) {
|
|
|
13617 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
|
|
|
13618 |
if (lastComparison != 0) {
|
|
|
13619 |
return lastComparison;
|
|
|
13620 |
}
|
|
|
13621 |
}
|
|
|
13622 |
return 0;
|
|
|
13623 |
}
|
|
|
13624 |
|
|
|
13625 |
public _Fields fieldForId(int fieldId) {
|
|
|
13626 |
return _Fields.findByThriftId(fieldId);
|
|
|
13627 |
}
|
|
|
13628 |
|
|
|
13629 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
13630 |
org.apache.thrift.protocol.TField field;
|
|
|
13631 |
iprot.readStructBegin();
|
|
|
13632 |
while (true)
|
|
|
13633 |
{
|
|
|
13634 |
field = iprot.readFieldBegin();
|
|
|
13635 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
13636 |
break;
|
|
|
13637 |
}
|
|
|
13638 |
switch (field.id) {
|
|
|
13639 |
case 0: // SUCCESS
|
|
|
13640 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
13641 |
this.success = iprot.readString();
|
|
|
13642 |
} else {
|
|
|
13643 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
13644 |
}
|
|
|
13645 |
break;
|
|
|
13646 |
case 1: // PEX
|
|
|
13647 |
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
|
|
13648 |
this.pex = new PromotionException();
|
|
|
13649 |
this.pex.read(iprot);
|
|
|
13650 |
} else {
|
|
|
13651 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
13652 |
}
|
|
|
13653 |
break;
|
|
|
13654 |
default:
|
|
|
13655 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
13656 |
}
|
|
|
13657 |
iprot.readFieldEnd();
|
|
|
13658 |
}
|
|
|
13659 |
iprot.readStructEnd();
|
|
|
13660 |
validate();
|
|
|
13661 |
}
|
|
|
13662 |
|
|
|
13663 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
13664 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
13665 |
|
|
|
13666 |
if (this.isSetSuccess()) {
|
|
|
13667 |
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
|
|
13668 |
oprot.writeString(this.success);
|
|
|
13669 |
oprot.writeFieldEnd();
|
|
|
13670 |
} else if (this.isSetPex()) {
|
|
|
13671 |
oprot.writeFieldBegin(PEX_FIELD_DESC);
|
|
|
13672 |
this.pex.write(oprot);
|
|
|
13673 |
oprot.writeFieldEnd();
|
|
|
13674 |
}
|
|
|
13675 |
oprot.writeFieldStop();
|
|
|
13676 |
oprot.writeStructEnd();
|
|
|
13677 |
}
|
|
|
13678 |
|
|
|
13679 |
@Override
|
|
|
13680 |
public String toString() {
|
|
|
13681 |
StringBuilder sb = new StringBuilder("createCoupon_result(");
|
|
|
13682 |
boolean first = true;
|
|
|
13683 |
|
|
|
13684 |
sb.append("success:");
|
|
|
13685 |
if (this.success == null) {
|
|
|
13686 |
sb.append("null");
|
|
|
13687 |
} else {
|
|
|
13688 |
sb.append(this.success);
|
|
|
13689 |
}
|
|
|
13690 |
first = false;
|
|
|
13691 |
if (!first) sb.append(", ");
|
|
|
13692 |
sb.append("pex:");
|
|
|
13693 |
if (this.pex == null) {
|
|
|
13694 |
sb.append("null");
|
|
|
13695 |
} else {
|
|
|
13696 |
sb.append(this.pex);
|
|
|
13697 |
}
|
|
|
13698 |
first = false;
|
|
|
13699 |
sb.append(")");
|
|
|
13700 |
return sb.toString();
|
|
|
13701 |
}
|
|
|
13702 |
|
|
|
13703 |
public void validate() throws org.apache.thrift.TException {
|
|
|
13704 |
// check for required fields
|
|
|
13705 |
}
|
|
|
13706 |
|
|
|
13707 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
13708 |
try {
|
|
|
13709 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
13710 |
} catch (org.apache.thrift.TException te) {
|
|
|
13711 |
throw new java.io.IOException(te);
|
|
|
13712 |
}
|
|
|
13713 |
}
|
|
|
13714 |
|
|
|
13715 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
13716 |
try {
|
|
|
13717 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
13718 |
} catch (org.apache.thrift.TException te) {
|
|
|
13719 |
throw new java.io.IOException(te);
|
|
|
13720 |
}
|
|
|
13721 |
}
|
|
|
13722 |
|
|
|
13723 |
}
|
|
|
13724 |
|
| 3430 |
rajveer |
13725 |
public static class getSuccessfulPaymentCountForCoupon_args implements org.apache.thrift.TBase<getSuccessfulPaymentCountForCoupon_args, getSuccessfulPaymentCountForCoupon_args._Fields>, java.io.Serializable, Cloneable {
|
|
|
13726 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuccessfulPaymentCountForCoupon_args");
|
| 3385 |
varun.gupt |
13727 |
|
| 3430 |
rajveer |
13728 |
private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCode", org.apache.thrift.protocol.TType.STRING, (short)1);
|
| 3385 |
varun.gupt |
13729 |
|
| 3430 |
rajveer |
13730 |
private String couponCode; // required
|
| 3385 |
varun.gupt |
13731 |
|
|
|
13732 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
| 3430 |
rajveer |
13733 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
| 3385 |
varun.gupt |
13734 |
COUPON_CODE((short)1, "couponCode");
|
|
|
13735 |
|
|
|
13736 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
13737 |
|
|
|
13738 |
static {
|
|
|
13739 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
13740 |
byName.put(field.getFieldName(), field);
|
|
|
13741 |
}
|
|
|
13742 |
}
|
|
|
13743 |
|
|
|
13744 |
/**
|
|
|
13745 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
13746 |
*/
|
|
|
13747 |
public static _Fields findByThriftId(int fieldId) {
|
| 3430 |
rajveer |
13748 |
switch(fieldId) {
|
|
|
13749 |
case 1: // COUPON_CODE
|
|
|
13750 |
return COUPON_CODE;
|
|
|
13751 |
default:
|
|
|
13752 |
return null;
|
|
|
13753 |
}
|
| 3385 |
varun.gupt |
13754 |
}
|
|
|
13755 |
|
|
|
13756 |
/**
|
|
|
13757 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
13758 |
* if it is not found.
|
|
|
13759 |
*/
|
|
|
13760 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
13761 |
_Fields fields = findByThriftId(fieldId);
|
|
|
13762 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
13763 |
return fields;
|
|
|
13764 |
}
|
|
|
13765 |
|
|
|
13766 |
/**
|
|
|
13767 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
13768 |
*/
|
|
|
13769 |
public static _Fields findByName(String name) {
|
|
|
13770 |
return byName.get(name);
|
|
|
13771 |
}
|
|
|
13772 |
|
|
|
13773 |
private final short _thriftId;
|
|
|
13774 |
private final String _fieldName;
|
|
|
13775 |
|
|
|
13776 |
_Fields(short thriftId, String fieldName) {
|
|
|
13777 |
_thriftId = thriftId;
|
|
|
13778 |
_fieldName = fieldName;
|
|
|
13779 |
}
|
|
|
13780 |
|
|
|
13781 |
public short getThriftFieldId() {
|
|
|
13782 |
return _thriftId;
|
|
|
13783 |
}
|
|
|
13784 |
|
|
|
13785 |
public String getFieldName() {
|
|
|
13786 |
return _fieldName;
|
|
|
13787 |
}
|
|
|
13788 |
}
|
|
|
13789 |
|
|
|
13790 |
// isset id assignments
|
|
|
13791 |
|
| 3430 |
rajveer |
13792 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
| 3385 |
varun.gupt |
13793 |
static {
|
| 3430 |
rajveer |
13794 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
13795 |
tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
13796 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
13797 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
13798 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuccessfulPaymentCountForCoupon_args.class, metaDataMap);
|
| 3385 |
varun.gupt |
13799 |
}
|
|
|
13800 |
|
|
|
13801 |
public getSuccessfulPaymentCountForCoupon_args() {
|
|
|
13802 |
}
|
|
|
13803 |
|
|
|
13804 |
public getSuccessfulPaymentCountForCoupon_args(
|
|
|
13805 |
String couponCode)
|
|
|
13806 |
{
|
|
|
13807 |
this();
|
|
|
13808 |
this.couponCode = couponCode;
|
|
|
13809 |
}
|
|
|
13810 |
|
|
|
13811 |
/**
|
|
|
13812 |
* Performs a deep copy on <i>other</i>.
|
|
|
13813 |
*/
|
|
|
13814 |
public getSuccessfulPaymentCountForCoupon_args(getSuccessfulPaymentCountForCoupon_args other) {
|
|
|
13815 |
if (other.isSetCouponCode()) {
|
|
|
13816 |
this.couponCode = other.couponCode;
|
|
|
13817 |
}
|
|
|
13818 |
}
|
|
|
13819 |
|
|
|
13820 |
public getSuccessfulPaymentCountForCoupon_args deepCopy() {
|
|
|
13821 |
return new getSuccessfulPaymentCountForCoupon_args(this);
|
|
|
13822 |
}
|
|
|
13823 |
|
| 3430 |
rajveer |
13824 |
@Override
|
|
|
13825 |
public void clear() {
|
|
|
13826 |
this.couponCode = null;
|
| 3385 |
varun.gupt |
13827 |
}
|
|
|
13828 |
|
|
|
13829 |
public String getCouponCode() {
|
|
|
13830 |
return this.couponCode;
|
|
|
13831 |
}
|
|
|
13832 |
|
| 3430 |
rajveer |
13833 |
public void setCouponCode(String couponCode) {
|
| 3385 |
varun.gupt |
13834 |
this.couponCode = couponCode;
|
|
|
13835 |
}
|
|
|
13836 |
|
|
|
13837 |
public void unsetCouponCode() {
|
|
|
13838 |
this.couponCode = null;
|
|
|
13839 |
}
|
|
|
13840 |
|
| 3430 |
rajveer |
13841 |
/** Returns true if field couponCode is set (has been assigned a value) and false otherwise */
|
| 3385 |
varun.gupt |
13842 |
public boolean isSetCouponCode() {
|
|
|
13843 |
return this.couponCode != null;
|
|
|
13844 |
}
|
|
|
13845 |
|
|
|
13846 |
public void setCouponCodeIsSet(boolean value) {
|
|
|
13847 |
if (!value) {
|
|
|
13848 |
this.couponCode = null;
|
|
|
13849 |
}
|
|
|
13850 |
}
|
|
|
13851 |
|
|
|
13852 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
13853 |
switch (field) {
|
|
|
13854 |
case COUPON_CODE:
|
|
|
13855 |
if (value == null) {
|
|
|
13856 |
unsetCouponCode();
|
|
|
13857 |
} else {
|
|
|
13858 |
setCouponCode((String)value);
|
|
|
13859 |
}
|
|
|
13860 |
break;
|
|
|
13861 |
|
|
|
13862 |
}
|
|
|
13863 |
}
|
|
|
13864 |
|
|
|
13865 |
public Object getFieldValue(_Fields field) {
|
|
|
13866 |
switch (field) {
|
|
|
13867 |
case COUPON_CODE:
|
|
|
13868 |
return getCouponCode();
|
|
|
13869 |
|
|
|
13870 |
}
|
|
|
13871 |
throw new IllegalStateException();
|
|
|
13872 |
}
|
|
|
13873 |
|
| 3430 |
rajveer |
13874 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
13875 |
public boolean isSet(_Fields field) {
|
|
|
13876 |
if (field == null) {
|
|
|
13877 |
throw new IllegalArgumentException();
|
|
|
13878 |
}
|
| 3385 |
varun.gupt |
13879 |
|
|
|
13880 |
switch (field) {
|
|
|
13881 |
case COUPON_CODE:
|
|
|
13882 |
return isSetCouponCode();
|
|
|
13883 |
}
|
|
|
13884 |
throw new IllegalStateException();
|
|
|
13885 |
}
|
|
|
13886 |
|
|
|
13887 |
@Override
|
|
|
13888 |
public boolean equals(Object that) {
|
|
|
13889 |
if (that == null)
|
|
|
13890 |
return false;
|
|
|
13891 |
if (that instanceof getSuccessfulPaymentCountForCoupon_args)
|
|
|
13892 |
return this.equals((getSuccessfulPaymentCountForCoupon_args)that);
|
|
|
13893 |
return false;
|
|
|
13894 |
}
|
|
|
13895 |
|
|
|
13896 |
public boolean equals(getSuccessfulPaymentCountForCoupon_args that) {
|
|
|
13897 |
if (that == null)
|
|
|
13898 |
return false;
|
|
|
13899 |
|
|
|
13900 |
boolean this_present_couponCode = true && this.isSetCouponCode();
|
|
|
13901 |
boolean that_present_couponCode = true && that.isSetCouponCode();
|
|
|
13902 |
if (this_present_couponCode || that_present_couponCode) {
|
|
|
13903 |
if (!(this_present_couponCode && that_present_couponCode))
|
|
|
13904 |
return false;
|
|
|
13905 |
if (!this.couponCode.equals(that.couponCode))
|
|
|
13906 |
return false;
|
|
|
13907 |
}
|
|
|
13908 |
|
|
|
13909 |
return true;
|
|
|
13910 |
}
|
|
|
13911 |
|
|
|
13912 |
@Override
|
|
|
13913 |
public int hashCode() {
|
|
|
13914 |
return 0;
|
|
|
13915 |
}
|
|
|
13916 |
|
|
|
13917 |
public int compareTo(getSuccessfulPaymentCountForCoupon_args other) {
|
|
|
13918 |
if (!getClass().equals(other.getClass())) {
|
|
|
13919 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
13920 |
}
|
|
|
13921 |
|
|
|
13922 |
int lastComparison = 0;
|
|
|
13923 |
getSuccessfulPaymentCountForCoupon_args typedOther = (getSuccessfulPaymentCountForCoupon_args)other;
|
|
|
13924 |
|
| 3430 |
rajveer |
13925 |
lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
|
| 3385 |
varun.gupt |
13926 |
if (lastComparison != 0) {
|
|
|
13927 |
return lastComparison;
|
|
|
13928 |
}
|
| 3430 |
rajveer |
13929 |
if (isSetCouponCode()) {
|
|
|
13930 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);
|
|
|
13931 |
if (lastComparison != 0) {
|
|
|
13932 |
return lastComparison;
|
|
|
13933 |
}
|
| 3385 |
varun.gupt |
13934 |
}
|
|
|
13935 |
return 0;
|
|
|
13936 |
}
|
|
|
13937 |
|
| 3430 |
rajveer |
13938 |
public _Fields fieldForId(int fieldId) {
|
|
|
13939 |
return _Fields.findByThriftId(fieldId);
|
|
|
13940 |
}
|
|
|
13941 |
|
|
|
13942 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
13943 |
org.apache.thrift.protocol.TField field;
|
| 3385 |
varun.gupt |
13944 |
iprot.readStructBegin();
|
|
|
13945 |
while (true)
|
|
|
13946 |
{
|
|
|
13947 |
field = iprot.readFieldBegin();
|
| 3430 |
rajveer |
13948 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
| 3385 |
varun.gupt |
13949 |
break;
|
|
|
13950 |
}
|
| 3430 |
rajveer |
13951 |
switch (field.id) {
|
|
|
13952 |
case 1: // COUPON_CODE
|
|
|
13953 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
13954 |
this.couponCode = iprot.readString();
|
|
|
13955 |
} else {
|
|
|
13956 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
13957 |
}
|
|
|
13958 |
break;
|
|
|
13959 |
default:
|
|
|
13960 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| 3385 |
varun.gupt |
13961 |
}
|
| 3430 |
rajveer |
13962 |
iprot.readFieldEnd();
|
| 3385 |
varun.gupt |
13963 |
}
|
|
|
13964 |
iprot.readStructEnd();
|
|
|
13965 |
validate();
|
|
|
13966 |
}
|
|
|
13967 |
|
| 3430 |
rajveer |
13968 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
| 3385 |
varun.gupt |
13969 |
validate();
|
|
|
13970 |
|
|
|
13971 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
13972 |
if (this.couponCode != null) {
|
|
|
13973 |
oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
|
|
|
13974 |
oprot.writeString(this.couponCode);
|
|
|
13975 |
oprot.writeFieldEnd();
|
|
|
13976 |
}
|
|
|
13977 |
oprot.writeFieldStop();
|
|
|
13978 |
oprot.writeStructEnd();
|
|
|
13979 |
}
|
|
|
13980 |
|
|
|
13981 |
@Override
|
|
|
13982 |
public String toString() {
|
|
|
13983 |
StringBuilder sb = new StringBuilder("getSuccessfulPaymentCountForCoupon_args(");
|
|
|
13984 |
boolean first = true;
|
|
|
13985 |
|
|
|
13986 |
sb.append("couponCode:");
|
|
|
13987 |
if (this.couponCode == null) {
|
|
|
13988 |
sb.append("null");
|
|
|
13989 |
} else {
|
|
|
13990 |
sb.append(this.couponCode);
|
|
|
13991 |
}
|
|
|
13992 |
first = false;
|
|
|
13993 |
sb.append(")");
|
|
|
13994 |
return sb.toString();
|
|
|
13995 |
}
|
|
|
13996 |
|
| 3430 |
rajveer |
13997 |
public void validate() throws org.apache.thrift.TException {
|
| 3385 |
varun.gupt |
13998 |
// check for required fields
|
|
|
13999 |
}
|
|
|
14000 |
|
| 3430 |
rajveer |
14001 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
14002 |
try {
|
|
|
14003 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
14004 |
} catch (org.apache.thrift.TException te) {
|
|
|
14005 |
throw new java.io.IOException(te);
|
|
|
14006 |
}
|
|
|
14007 |
}
|
|
|
14008 |
|
|
|
14009 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
14010 |
try {
|
|
|
14011 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
14012 |
} catch (org.apache.thrift.TException te) {
|
|
|
14013 |
throw new java.io.IOException(te);
|
|
|
14014 |
}
|
|
|
14015 |
}
|
|
|
14016 |
|
| 3385 |
varun.gupt |
14017 |
}
|
|
|
14018 |
|
| 3430 |
rajveer |
14019 |
public static class getSuccessfulPaymentCountForCoupon_result implements org.apache.thrift.TBase<getSuccessfulPaymentCountForCoupon_result, getSuccessfulPaymentCountForCoupon_result._Fields>, java.io.Serializable, Cloneable {
|
|
|
14020 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuccessfulPaymentCountForCoupon_result");
|
| 3385 |
varun.gupt |
14021 |
|
| 3430 |
rajveer |
14022 |
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);
|
|
|
14023 |
private static final org.apache.thrift.protocol.TField PEX_FIELD_DESC = new org.apache.thrift.protocol.TField("pex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
|
| 3385 |
varun.gupt |
14024 |
|
| 3430 |
rajveer |
14025 |
private long success; // required
|
|
|
14026 |
private PromotionException pex; // required
|
| 3385 |
varun.gupt |
14027 |
|
|
|
14028 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
| 3430 |
rajveer |
14029 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
| 3385 |
varun.gupt |
14030 |
SUCCESS((short)0, "success"),
|
|
|
14031 |
PEX((short)1, "pex");
|
|
|
14032 |
|
|
|
14033 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
14034 |
|
|
|
14035 |
static {
|
|
|
14036 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
14037 |
byName.put(field.getFieldName(), field);
|
|
|
14038 |
}
|
|
|
14039 |
}
|
|
|
14040 |
|
|
|
14041 |
/**
|
|
|
14042 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
14043 |
*/
|
|
|
14044 |
public static _Fields findByThriftId(int fieldId) {
|
| 3430 |
rajveer |
14045 |
switch(fieldId) {
|
|
|
14046 |
case 0: // SUCCESS
|
|
|
14047 |
return SUCCESS;
|
|
|
14048 |
case 1: // PEX
|
|
|
14049 |
return PEX;
|
|
|
14050 |
default:
|
|
|
14051 |
return null;
|
|
|
14052 |
}
|
| 3385 |
varun.gupt |
14053 |
}
|
|
|
14054 |
|
|
|
14055 |
/**
|
|
|
14056 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
14057 |
* if it is not found.
|
|
|
14058 |
*/
|
|
|
14059 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
14060 |
_Fields fields = findByThriftId(fieldId);
|
|
|
14061 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
14062 |
return fields;
|
|
|
14063 |
}
|
|
|
14064 |
|
|
|
14065 |
/**
|
|
|
14066 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
14067 |
*/
|
|
|
14068 |
public static _Fields findByName(String name) {
|
|
|
14069 |
return byName.get(name);
|
|
|
14070 |
}
|
|
|
14071 |
|
|
|
14072 |
private final short _thriftId;
|
|
|
14073 |
private final String _fieldName;
|
|
|
14074 |
|
|
|
14075 |
_Fields(short thriftId, String fieldName) {
|
|
|
14076 |
_thriftId = thriftId;
|
|
|
14077 |
_fieldName = fieldName;
|
|
|
14078 |
}
|
|
|
14079 |
|
|
|
14080 |
public short getThriftFieldId() {
|
|
|
14081 |
return _thriftId;
|
|
|
14082 |
}
|
|
|
14083 |
|
|
|
14084 |
public String getFieldName() {
|
|
|
14085 |
return _fieldName;
|
|
|
14086 |
}
|
|
|
14087 |
}
|
|
|
14088 |
|
|
|
14089 |
// isset id assignments
|
|
|
14090 |
private static final int __SUCCESS_ISSET_ID = 0;
|
|
|
14091 |
private BitSet __isset_bit_vector = new BitSet(1);
|
|
|
14092 |
|
| 3430 |
rajveer |
14093 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
| 3385 |
varun.gupt |
14094 |
static {
|
| 3430 |
rajveer |
14095 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
14096 |
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
14097 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
14098 |
tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
14099 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
|
|
|
14100 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
14101 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuccessfulPaymentCountForCoupon_result.class, metaDataMap);
|
| 3385 |
varun.gupt |
14102 |
}
|
|
|
14103 |
|
|
|
14104 |
public getSuccessfulPaymentCountForCoupon_result() {
|
|
|
14105 |
}
|
|
|
14106 |
|
|
|
14107 |
public getSuccessfulPaymentCountForCoupon_result(
|
|
|
14108 |
long success,
|
|
|
14109 |
PromotionException pex)
|
|
|
14110 |
{
|
|
|
14111 |
this();
|
|
|
14112 |
this.success = success;
|
|
|
14113 |
setSuccessIsSet(true);
|
|
|
14114 |
this.pex = pex;
|
|
|
14115 |
}
|
|
|
14116 |
|
|
|
14117 |
/**
|
|
|
14118 |
* Performs a deep copy on <i>other</i>.
|
|
|
14119 |
*/
|
|
|
14120 |
public getSuccessfulPaymentCountForCoupon_result(getSuccessfulPaymentCountForCoupon_result other) {
|
|
|
14121 |
__isset_bit_vector.clear();
|
|
|
14122 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
14123 |
this.success = other.success;
|
|
|
14124 |
if (other.isSetPex()) {
|
|
|
14125 |
this.pex = new PromotionException(other.pex);
|
|
|
14126 |
}
|
|
|
14127 |
}
|
|
|
14128 |
|
|
|
14129 |
public getSuccessfulPaymentCountForCoupon_result deepCopy() {
|
|
|
14130 |
return new getSuccessfulPaymentCountForCoupon_result(this);
|
|
|
14131 |
}
|
|
|
14132 |
|
| 3430 |
rajveer |
14133 |
@Override
|
|
|
14134 |
public void clear() {
|
|
|
14135 |
setSuccessIsSet(false);
|
|
|
14136 |
this.success = 0;
|
|
|
14137 |
this.pex = null;
|
| 3385 |
varun.gupt |
14138 |
}
|
|
|
14139 |
|
|
|
14140 |
public long getSuccess() {
|
|
|
14141 |
return this.success;
|
|
|
14142 |
}
|
|
|
14143 |
|
| 3430 |
rajveer |
14144 |
public void setSuccess(long success) {
|
| 3385 |
varun.gupt |
14145 |
this.success = success;
|
|
|
14146 |
setSuccessIsSet(true);
|
|
|
14147 |
}
|
|
|
14148 |
|
|
|
14149 |
public void unsetSuccess() {
|
|
|
14150 |
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
|
|
|
14151 |
}
|
|
|
14152 |
|
| 3430 |
rajveer |
14153 |
/** Returns true if field success is set (has been assigned a value) and false otherwise */
|
| 3385 |
varun.gupt |
14154 |
public boolean isSetSuccess() {
|
|
|
14155 |
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
|
|
|
14156 |
}
|
|
|
14157 |
|
|
|
14158 |
public void setSuccessIsSet(boolean value) {
|
|
|
14159 |
__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
|
|
|
14160 |
}
|
|
|
14161 |
|
|
|
14162 |
public PromotionException getPex() {
|
|
|
14163 |
return this.pex;
|
|
|
14164 |
}
|
|
|
14165 |
|
| 3430 |
rajveer |
14166 |
public void setPex(PromotionException pex) {
|
| 3385 |
varun.gupt |
14167 |
this.pex = pex;
|
|
|
14168 |
}
|
|
|
14169 |
|
|
|
14170 |
public void unsetPex() {
|
|
|
14171 |
this.pex = null;
|
|
|
14172 |
}
|
|
|
14173 |
|
| 3430 |
rajveer |
14174 |
/** Returns true if field pex is set (has been assigned a value) and false otherwise */
|
| 3385 |
varun.gupt |
14175 |
public boolean isSetPex() {
|
|
|
14176 |
return this.pex != null;
|
|
|
14177 |
}
|
|
|
14178 |
|
|
|
14179 |
public void setPexIsSet(boolean value) {
|
|
|
14180 |
if (!value) {
|
|
|
14181 |
this.pex = null;
|
|
|
14182 |
}
|
|
|
14183 |
}
|
|
|
14184 |
|
|
|
14185 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
14186 |
switch (field) {
|
|
|
14187 |
case SUCCESS:
|
|
|
14188 |
if (value == null) {
|
|
|
14189 |
unsetSuccess();
|
|
|
14190 |
} else {
|
|
|
14191 |
setSuccess((Long)value);
|
|
|
14192 |
}
|
|
|
14193 |
break;
|
|
|
14194 |
|
|
|
14195 |
case PEX:
|
|
|
14196 |
if (value == null) {
|
|
|
14197 |
unsetPex();
|
|
|
14198 |
} else {
|
|
|
14199 |
setPex((PromotionException)value);
|
|
|
14200 |
}
|
|
|
14201 |
break;
|
|
|
14202 |
|
|
|
14203 |
}
|
|
|
14204 |
}
|
|
|
14205 |
|
|
|
14206 |
public Object getFieldValue(_Fields field) {
|
|
|
14207 |
switch (field) {
|
|
|
14208 |
case SUCCESS:
|
| 3430 |
rajveer |
14209 |
return Long.valueOf(getSuccess());
|
| 3385 |
varun.gupt |
14210 |
|
|
|
14211 |
case PEX:
|
|
|
14212 |
return getPex();
|
|
|
14213 |
|
|
|
14214 |
}
|
|
|
14215 |
throw new IllegalStateException();
|
|
|
14216 |
}
|
|
|
14217 |
|
| 3430 |
rajveer |
14218 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
14219 |
public boolean isSet(_Fields field) {
|
|
|
14220 |
if (field == null) {
|
|
|
14221 |
throw new IllegalArgumentException();
|
|
|
14222 |
}
|
| 3385 |
varun.gupt |
14223 |
|
|
|
14224 |
switch (field) {
|
|
|
14225 |
case SUCCESS:
|
|
|
14226 |
return isSetSuccess();
|
|
|
14227 |
case PEX:
|
|
|
14228 |
return isSetPex();
|
|
|
14229 |
}
|
|
|
14230 |
throw new IllegalStateException();
|
|
|
14231 |
}
|
|
|
14232 |
|
|
|
14233 |
@Override
|
|
|
14234 |
public boolean equals(Object that) {
|
|
|
14235 |
if (that == null)
|
|
|
14236 |
return false;
|
|
|
14237 |
if (that instanceof getSuccessfulPaymentCountForCoupon_result)
|
|
|
14238 |
return this.equals((getSuccessfulPaymentCountForCoupon_result)that);
|
|
|
14239 |
return false;
|
|
|
14240 |
}
|
|
|
14241 |
|
|
|
14242 |
public boolean equals(getSuccessfulPaymentCountForCoupon_result that) {
|
|
|
14243 |
if (that == null)
|
|
|
14244 |
return false;
|
|
|
14245 |
|
|
|
14246 |
boolean this_present_success = true;
|
|
|
14247 |
boolean that_present_success = true;
|
|
|
14248 |
if (this_present_success || that_present_success) {
|
|
|
14249 |
if (!(this_present_success && that_present_success))
|
|
|
14250 |
return false;
|
|
|
14251 |
if (this.success != that.success)
|
|
|
14252 |
return false;
|
|
|
14253 |
}
|
|
|
14254 |
|
|
|
14255 |
boolean this_present_pex = true && this.isSetPex();
|
|
|
14256 |
boolean that_present_pex = true && that.isSetPex();
|
|
|
14257 |
if (this_present_pex || that_present_pex) {
|
|
|
14258 |
if (!(this_present_pex && that_present_pex))
|
|
|
14259 |
return false;
|
|
|
14260 |
if (!this.pex.equals(that.pex))
|
|
|
14261 |
return false;
|
|
|
14262 |
}
|
|
|
14263 |
|
|
|
14264 |
return true;
|
|
|
14265 |
}
|
|
|
14266 |
|
|
|
14267 |
@Override
|
|
|
14268 |
public int hashCode() {
|
|
|
14269 |
return 0;
|
|
|
14270 |
}
|
|
|
14271 |
|
|
|
14272 |
public int compareTo(getSuccessfulPaymentCountForCoupon_result other) {
|
|
|
14273 |
if (!getClass().equals(other.getClass())) {
|
|
|
14274 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
14275 |
}
|
|
|
14276 |
|
|
|
14277 |
int lastComparison = 0;
|
|
|
14278 |
getSuccessfulPaymentCountForCoupon_result typedOther = (getSuccessfulPaymentCountForCoupon_result)other;
|
|
|
14279 |
|
| 3430 |
rajveer |
14280 |
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
|
| 3385 |
varun.gupt |
14281 |
if (lastComparison != 0) {
|
|
|
14282 |
return lastComparison;
|
|
|
14283 |
}
|
| 3430 |
rajveer |
14284 |
if (isSetSuccess()) {
|
|
|
14285 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
|
|
|
14286 |
if (lastComparison != 0) {
|
|
|
14287 |
return lastComparison;
|
|
|
14288 |
}
|
| 3385 |
varun.gupt |
14289 |
}
|
| 3430 |
rajveer |
14290 |
lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
|
| 3385 |
varun.gupt |
14291 |
if (lastComparison != 0) {
|
|
|
14292 |
return lastComparison;
|
|
|
14293 |
}
|
| 3430 |
rajveer |
14294 |
if (isSetPex()) {
|
|
|
14295 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
|
|
|
14296 |
if (lastComparison != 0) {
|
|
|
14297 |
return lastComparison;
|
|
|
14298 |
}
|
| 3385 |
varun.gupt |
14299 |
}
|
|
|
14300 |
return 0;
|
|
|
14301 |
}
|
|
|
14302 |
|
| 3430 |
rajveer |
14303 |
public _Fields fieldForId(int fieldId) {
|
|
|
14304 |
return _Fields.findByThriftId(fieldId);
|
|
|
14305 |
}
|
|
|
14306 |
|
|
|
14307 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
14308 |
org.apache.thrift.protocol.TField field;
|
| 3385 |
varun.gupt |
14309 |
iprot.readStructBegin();
|
|
|
14310 |
while (true)
|
|
|
14311 |
{
|
|
|
14312 |
field = iprot.readFieldBegin();
|
| 3430 |
rajveer |
14313 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
| 3385 |
varun.gupt |
14314 |
break;
|
|
|
14315 |
}
|
| 3430 |
rajveer |
14316 |
switch (field.id) {
|
|
|
14317 |
case 0: // SUCCESS
|
|
|
14318 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
14319 |
this.success = iprot.readI64();
|
|
|
14320 |
setSuccessIsSet(true);
|
|
|
14321 |
} else {
|
|
|
14322 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
14323 |
}
|
|
|
14324 |
break;
|
|
|
14325 |
case 1: // PEX
|
|
|
14326 |
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
|
|
14327 |
this.pex = new PromotionException();
|
|
|
14328 |
this.pex.read(iprot);
|
|
|
14329 |
} else {
|
|
|
14330 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
14331 |
}
|
|
|
14332 |
break;
|
|
|
14333 |
default:
|
|
|
14334 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| 3385 |
varun.gupt |
14335 |
}
|
| 3430 |
rajveer |
14336 |
iprot.readFieldEnd();
|
| 3385 |
varun.gupt |
14337 |
}
|
|
|
14338 |
iprot.readStructEnd();
|
|
|
14339 |
validate();
|
|
|
14340 |
}
|
|
|
14341 |
|
| 3430 |
rajveer |
14342 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
| 3385 |
varun.gupt |
14343 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
14344 |
|
|
|
14345 |
if (this.isSetSuccess()) {
|
|
|
14346 |
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
|
|
14347 |
oprot.writeI64(this.success);
|
|
|
14348 |
oprot.writeFieldEnd();
|
|
|
14349 |
} else if (this.isSetPex()) {
|
|
|
14350 |
oprot.writeFieldBegin(PEX_FIELD_DESC);
|
|
|
14351 |
this.pex.write(oprot);
|
|
|
14352 |
oprot.writeFieldEnd();
|
|
|
14353 |
}
|
|
|
14354 |
oprot.writeFieldStop();
|
|
|
14355 |
oprot.writeStructEnd();
|
|
|
14356 |
}
|
|
|
14357 |
|
|
|
14358 |
@Override
|
|
|
14359 |
public String toString() {
|
|
|
14360 |
StringBuilder sb = new StringBuilder("getSuccessfulPaymentCountForCoupon_result(");
|
|
|
14361 |
boolean first = true;
|
|
|
14362 |
|
|
|
14363 |
sb.append("success:");
|
|
|
14364 |
sb.append(this.success);
|
|
|
14365 |
first = false;
|
|
|
14366 |
if (!first) sb.append(", ");
|
|
|
14367 |
sb.append("pex:");
|
|
|
14368 |
if (this.pex == null) {
|
|
|
14369 |
sb.append("null");
|
|
|
14370 |
} else {
|
|
|
14371 |
sb.append(this.pex);
|
|
|
14372 |
}
|
|
|
14373 |
first = false;
|
|
|
14374 |
sb.append(")");
|
|
|
14375 |
return sb.toString();
|
|
|
14376 |
}
|
|
|
14377 |
|
| 3430 |
rajveer |
14378 |
public void validate() throws org.apache.thrift.TException {
|
| 3385 |
varun.gupt |
14379 |
// check for required fields
|
|
|
14380 |
}
|
|
|
14381 |
|
| 3430 |
rajveer |
14382 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
14383 |
try {
|
|
|
14384 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
14385 |
} catch (org.apache.thrift.TException te) {
|
|
|
14386 |
throw new java.io.IOException(te);
|
|
|
14387 |
}
|
|
|
14388 |
}
|
|
|
14389 |
|
|
|
14390 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
14391 |
try {
|
|
|
14392 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
14393 |
} catch (org.apache.thrift.TException te) {
|
|
|
14394 |
throw new java.io.IOException(te);
|
|
|
14395 |
}
|
|
|
14396 |
}
|
|
|
14397 |
|
| 3385 |
varun.gupt |
14398 |
}
|
|
|
14399 |
|
| 3430 |
rajveer |
14400 |
public static class getRuleDocString_args implements org.apache.thrift.TBase<getRuleDocString_args, getRuleDocString_args._Fields>, java.io.Serializable, Cloneable {
|
|
|
14401 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRuleDocString_args");
|
| 3385 |
varun.gupt |
14402 |
|
| 3430 |
rajveer |
14403 |
private static final org.apache.thrift.protocol.TField RULE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("ruleName", org.apache.thrift.protocol.TType.STRING, (short)1);
|
| 3385 |
varun.gupt |
14404 |
|
| 3430 |
rajveer |
14405 |
private String ruleName; // required
|
| 3385 |
varun.gupt |
14406 |
|
|
|
14407 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
| 3430 |
rajveer |
14408 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
| 3385 |
varun.gupt |
14409 |
RULE_NAME((short)1, "ruleName");
|
|
|
14410 |
|
|
|
14411 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
14412 |
|
|
|
14413 |
static {
|
|
|
14414 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
14415 |
byName.put(field.getFieldName(), field);
|
|
|
14416 |
}
|
|
|
14417 |
}
|
|
|
14418 |
|
|
|
14419 |
/**
|
|
|
14420 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
14421 |
*/
|
|
|
14422 |
public static _Fields findByThriftId(int fieldId) {
|
| 3430 |
rajveer |
14423 |
switch(fieldId) {
|
|
|
14424 |
case 1: // RULE_NAME
|
|
|
14425 |
return RULE_NAME;
|
|
|
14426 |
default:
|
|
|
14427 |
return null;
|
|
|
14428 |
}
|
| 3385 |
varun.gupt |
14429 |
}
|
|
|
14430 |
|
|
|
14431 |
/**
|
|
|
14432 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
14433 |
* if it is not found.
|
|
|
14434 |
*/
|
|
|
14435 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
14436 |
_Fields fields = findByThriftId(fieldId);
|
|
|
14437 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
14438 |
return fields;
|
|
|
14439 |
}
|
|
|
14440 |
|
|
|
14441 |
/**
|
|
|
14442 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
14443 |
*/
|
|
|
14444 |
public static _Fields findByName(String name) {
|
|
|
14445 |
return byName.get(name);
|
|
|
14446 |
}
|
|
|
14447 |
|
|
|
14448 |
private final short _thriftId;
|
|
|
14449 |
private final String _fieldName;
|
|
|
14450 |
|
|
|
14451 |
_Fields(short thriftId, String fieldName) {
|
|
|
14452 |
_thriftId = thriftId;
|
|
|
14453 |
_fieldName = fieldName;
|
|
|
14454 |
}
|
|
|
14455 |
|
|
|
14456 |
public short getThriftFieldId() {
|
|
|
14457 |
return _thriftId;
|
|
|
14458 |
}
|
|
|
14459 |
|
|
|
14460 |
public String getFieldName() {
|
|
|
14461 |
return _fieldName;
|
|
|
14462 |
}
|
|
|
14463 |
}
|
|
|
14464 |
|
|
|
14465 |
// isset id assignments
|
|
|
14466 |
|
| 3430 |
rajveer |
14467 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
| 3385 |
varun.gupt |
14468 |
static {
|
| 3430 |
rajveer |
14469 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
14470 |
tmpMap.put(_Fields.RULE_NAME, new org.apache.thrift.meta_data.FieldMetaData("ruleName", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
14471 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
14472 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
14473 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRuleDocString_args.class, metaDataMap);
|
| 3385 |
varun.gupt |
14474 |
}
|
|
|
14475 |
|
|
|
14476 |
public getRuleDocString_args() {
|
|
|
14477 |
}
|
|
|
14478 |
|
|
|
14479 |
public getRuleDocString_args(
|
|
|
14480 |
String ruleName)
|
|
|
14481 |
{
|
|
|
14482 |
this();
|
|
|
14483 |
this.ruleName = ruleName;
|
|
|
14484 |
}
|
|
|
14485 |
|
|
|
14486 |
/**
|
|
|
14487 |
* Performs a deep copy on <i>other</i>.
|
|
|
14488 |
*/
|
|
|
14489 |
public getRuleDocString_args(getRuleDocString_args other) {
|
|
|
14490 |
if (other.isSetRuleName()) {
|
|
|
14491 |
this.ruleName = other.ruleName;
|
|
|
14492 |
}
|
|
|
14493 |
}
|
|
|
14494 |
|
|
|
14495 |
public getRuleDocString_args deepCopy() {
|
|
|
14496 |
return new getRuleDocString_args(this);
|
|
|
14497 |
}
|
|
|
14498 |
|
| 3430 |
rajveer |
14499 |
@Override
|
|
|
14500 |
public void clear() {
|
|
|
14501 |
this.ruleName = null;
|
| 3385 |
varun.gupt |
14502 |
}
|
|
|
14503 |
|
|
|
14504 |
public String getRuleName() {
|
|
|
14505 |
return this.ruleName;
|
|
|
14506 |
}
|
|
|
14507 |
|
| 3430 |
rajveer |
14508 |
public void setRuleName(String ruleName) {
|
| 3385 |
varun.gupt |
14509 |
this.ruleName = ruleName;
|
|
|
14510 |
}
|
|
|
14511 |
|
|
|
14512 |
public void unsetRuleName() {
|
|
|
14513 |
this.ruleName = null;
|
|
|
14514 |
}
|
|
|
14515 |
|
| 3430 |
rajveer |
14516 |
/** Returns true if field ruleName is set (has been assigned a value) and false otherwise */
|
| 3385 |
varun.gupt |
14517 |
public boolean isSetRuleName() {
|
|
|
14518 |
return this.ruleName != null;
|
|
|
14519 |
}
|
|
|
14520 |
|
|
|
14521 |
public void setRuleNameIsSet(boolean value) {
|
|
|
14522 |
if (!value) {
|
|
|
14523 |
this.ruleName = null;
|
|
|
14524 |
}
|
|
|
14525 |
}
|
|
|
14526 |
|
|
|
14527 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
14528 |
switch (field) {
|
|
|
14529 |
case RULE_NAME:
|
|
|
14530 |
if (value == null) {
|
|
|
14531 |
unsetRuleName();
|
|
|
14532 |
} else {
|
|
|
14533 |
setRuleName((String)value);
|
|
|
14534 |
}
|
|
|
14535 |
break;
|
|
|
14536 |
|
|
|
14537 |
}
|
|
|
14538 |
}
|
|
|
14539 |
|
|
|
14540 |
public Object getFieldValue(_Fields field) {
|
|
|
14541 |
switch (field) {
|
|
|
14542 |
case RULE_NAME:
|
|
|
14543 |
return getRuleName();
|
|
|
14544 |
|
|
|
14545 |
}
|
|
|
14546 |
throw new IllegalStateException();
|
|
|
14547 |
}
|
|
|
14548 |
|
| 3430 |
rajveer |
14549 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
14550 |
public boolean isSet(_Fields field) {
|
|
|
14551 |
if (field == null) {
|
|
|
14552 |
throw new IllegalArgumentException();
|
|
|
14553 |
}
|
| 3385 |
varun.gupt |
14554 |
|
|
|
14555 |
switch (field) {
|
|
|
14556 |
case RULE_NAME:
|
|
|
14557 |
return isSetRuleName();
|
|
|
14558 |
}
|
|
|
14559 |
throw new IllegalStateException();
|
|
|
14560 |
}
|
|
|
14561 |
|
|
|
14562 |
@Override
|
|
|
14563 |
public boolean equals(Object that) {
|
|
|
14564 |
if (that == null)
|
|
|
14565 |
return false;
|
|
|
14566 |
if (that instanceof getRuleDocString_args)
|
|
|
14567 |
return this.equals((getRuleDocString_args)that);
|
|
|
14568 |
return false;
|
|
|
14569 |
}
|
|
|
14570 |
|
|
|
14571 |
public boolean equals(getRuleDocString_args that) {
|
|
|
14572 |
if (that == null)
|
|
|
14573 |
return false;
|
|
|
14574 |
|
|
|
14575 |
boolean this_present_ruleName = true && this.isSetRuleName();
|
|
|
14576 |
boolean that_present_ruleName = true && that.isSetRuleName();
|
|
|
14577 |
if (this_present_ruleName || that_present_ruleName) {
|
|
|
14578 |
if (!(this_present_ruleName && that_present_ruleName))
|
|
|
14579 |
return false;
|
|
|
14580 |
if (!this.ruleName.equals(that.ruleName))
|
|
|
14581 |
return false;
|
|
|
14582 |
}
|
|
|
14583 |
|
|
|
14584 |
return true;
|
|
|
14585 |
}
|
|
|
14586 |
|
|
|
14587 |
@Override
|
|
|
14588 |
public int hashCode() {
|
|
|
14589 |
return 0;
|
|
|
14590 |
}
|
|
|
14591 |
|
|
|
14592 |
public int compareTo(getRuleDocString_args other) {
|
|
|
14593 |
if (!getClass().equals(other.getClass())) {
|
|
|
14594 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
14595 |
}
|
|
|
14596 |
|
|
|
14597 |
int lastComparison = 0;
|
|
|
14598 |
getRuleDocString_args typedOther = (getRuleDocString_args)other;
|
|
|
14599 |
|
| 3430 |
rajveer |
14600 |
lastComparison = Boolean.valueOf(isSetRuleName()).compareTo(typedOther.isSetRuleName());
|
| 3385 |
varun.gupt |
14601 |
if (lastComparison != 0) {
|
|
|
14602 |
return lastComparison;
|
|
|
14603 |
}
|
| 3430 |
rajveer |
14604 |
if (isSetRuleName()) {
|
|
|
14605 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ruleName, typedOther.ruleName);
|
|
|
14606 |
if (lastComparison != 0) {
|
|
|
14607 |
return lastComparison;
|
|
|
14608 |
}
|
| 3385 |
varun.gupt |
14609 |
}
|
|
|
14610 |
return 0;
|
|
|
14611 |
}
|
|
|
14612 |
|
| 3430 |
rajveer |
14613 |
public _Fields fieldForId(int fieldId) {
|
|
|
14614 |
return _Fields.findByThriftId(fieldId);
|
|
|
14615 |
}
|
|
|
14616 |
|
|
|
14617 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
14618 |
org.apache.thrift.protocol.TField field;
|
| 3385 |
varun.gupt |
14619 |
iprot.readStructBegin();
|
|
|
14620 |
while (true)
|
|
|
14621 |
{
|
|
|
14622 |
field = iprot.readFieldBegin();
|
| 3430 |
rajveer |
14623 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
| 3385 |
varun.gupt |
14624 |
break;
|
|
|
14625 |
}
|
| 3430 |
rajveer |
14626 |
switch (field.id) {
|
|
|
14627 |
case 1: // RULE_NAME
|
|
|
14628 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
14629 |
this.ruleName = iprot.readString();
|
|
|
14630 |
} else {
|
|
|
14631 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
14632 |
}
|
|
|
14633 |
break;
|
|
|
14634 |
default:
|
|
|
14635 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| 3385 |
varun.gupt |
14636 |
}
|
| 3430 |
rajveer |
14637 |
iprot.readFieldEnd();
|
| 3385 |
varun.gupt |
14638 |
}
|
|
|
14639 |
iprot.readStructEnd();
|
|
|
14640 |
validate();
|
|
|
14641 |
}
|
|
|
14642 |
|
| 3430 |
rajveer |
14643 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
| 3385 |
varun.gupt |
14644 |
validate();
|
|
|
14645 |
|
|
|
14646 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
14647 |
if (this.ruleName != null) {
|
|
|
14648 |
oprot.writeFieldBegin(RULE_NAME_FIELD_DESC);
|
|
|
14649 |
oprot.writeString(this.ruleName);
|
|
|
14650 |
oprot.writeFieldEnd();
|
|
|
14651 |
}
|
|
|
14652 |
oprot.writeFieldStop();
|
|
|
14653 |
oprot.writeStructEnd();
|
|
|
14654 |
}
|
|
|
14655 |
|
|
|
14656 |
@Override
|
|
|
14657 |
public String toString() {
|
|
|
14658 |
StringBuilder sb = new StringBuilder("getRuleDocString_args(");
|
|
|
14659 |
boolean first = true;
|
|
|
14660 |
|
|
|
14661 |
sb.append("ruleName:");
|
|
|
14662 |
if (this.ruleName == null) {
|
|
|
14663 |
sb.append("null");
|
|
|
14664 |
} else {
|
|
|
14665 |
sb.append(this.ruleName);
|
|
|
14666 |
}
|
|
|
14667 |
first = false;
|
|
|
14668 |
sb.append(")");
|
|
|
14669 |
return sb.toString();
|
|
|
14670 |
}
|
|
|
14671 |
|
| 3430 |
rajveer |
14672 |
public void validate() throws org.apache.thrift.TException {
|
| 3385 |
varun.gupt |
14673 |
// check for required fields
|
|
|
14674 |
}
|
|
|
14675 |
|
| 3430 |
rajveer |
14676 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
14677 |
try {
|
|
|
14678 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
14679 |
} catch (org.apache.thrift.TException te) {
|
|
|
14680 |
throw new java.io.IOException(te);
|
|
|
14681 |
}
|
|
|
14682 |
}
|
|
|
14683 |
|
|
|
14684 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
14685 |
try {
|
|
|
14686 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
14687 |
} catch (org.apache.thrift.TException te) {
|
|
|
14688 |
throw new java.io.IOException(te);
|
|
|
14689 |
}
|
|
|
14690 |
}
|
|
|
14691 |
|
| 3385 |
varun.gupt |
14692 |
}
|
|
|
14693 |
|
| 3430 |
rajveer |
14694 |
public static class getRuleDocString_result implements org.apache.thrift.TBase<getRuleDocString_result, getRuleDocString_result._Fields>, java.io.Serializable, Cloneable {
|
|
|
14695 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRuleDocString_result");
|
| 3385 |
varun.gupt |
14696 |
|
| 3430 |
rajveer |
14697 |
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
|
| 3385 |
varun.gupt |
14698 |
|
| 3430 |
rajveer |
14699 |
private String success; // required
|
| 3385 |
varun.gupt |
14700 |
|
|
|
14701 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
| 3430 |
rajveer |
14702 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
| 3385 |
varun.gupt |
14703 |
SUCCESS((short)0, "success");
|
|
|
14704 |
|
|
|
14705 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
14706 |
|
|
|
14707 |
static {
|
|
|
14708 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
14709 |
byName.put(field.getFieldName(), field);
|
|
|
14710 |
}
|
|
|
14711 |
}
|
|
|
14712 |
|
|
|
14713 |
/**
|
|
|
14714 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
14715 |
*/
|
|
|
14716 |
public static _Fields findByThriftId(int fieldId) {
|
| 3430 |
rajveer |
14717 |
switch(fieldId) {
|
|
|
14718 |
case 0: // SUCCESS
|
|
|
14719 |
return SUCCESS;
|
|
|
14720 |
default:
|
|
|
14721 |
return null;
|
|
|
14722 |
}
|
| 3385 |
varun.gupt |
14723 |
}
|
|
|
14724 |
|
|
|
14725 |
/**
|
|
|
14726 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
14727 |
* if it is not found.
|
|
|
14728 |
*/
|
|
|
14729 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
14730 |
_Fields fields = findByThriftId(fieldId);
|
|
|
14731 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
14732 |
return fields;
|
|
|
14733 |
}
|
|
|
14734 |
|
|
|
14735 |
/**
|
|
|
14736 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
14737 |
*/
|
|
|
14738 |
public static _Fields findByName(String name) {
|
|
|
14739 |
return byName.get(name);
|
|
|
14740 |
}
|
|
|
14741 |
|
|
|
14742 |
private final short _thriftId;
|
|
|
14743 |
private final String _fieldName;
|
|
|
14744 |
|
|
|
14745 |
_Fields(short thriftId, String fieldName) {
|
|
|
14746 |
_thriftId = thriftId;
|
|
|
14747 |
_fieldName = fieldName;
|
|
|
14748 |
}
|
|
|
14749 |
|
|
|
14750 |
public short getThriftFieldId() {
|
|
|
14751 |
return _thriftId;
|
|
|
14752 |
}
|
|
|
14753 |
|
|
|
14754 |
public String getFieldName() {
|
|
|
14755 |
return _fieldName;
|
|
|
14756 |
}
|
|
|
14757 |
}
|
|
|
14758 |
|
|
|
14759 |
// isset id assignments
|
|
|
14760 |
|
| 3430 |
rajveer |
14761 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
| 3385 |
varun.gupt |
14762 |
static {
|
| 3430 |
rajveer |
14763 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
14764 |
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
14765 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
14766 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
14767 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRuleDocString_result.class, metaDataMap);
|
| 3385 |
varun.gupt |
14768 |
}
|
|
|
14769 |
|
|
|
14770 |
public getRuleDocString_result() {
|
|
|
14771 |
}
|
|
|
14772 |
|
|
|
14773 |
public getRuleDocString_result(
|
|
|
14774 |
String success)
|
|
|
14775 |
{
|
|
|
14776 |
this();
|
|
|
14777 |
this.success = success;
|
|
|
14778 |
}
|
|
|
14779 |
|
|
|
14780 |
/**
|
|
|
14781 |
* Performs a deep copy on <i>other</i>.
|
|
|
14782 |
*/
|
|
|
14783 |
public getRuleDocString_result(getRuleDocString_result other) {
|
|
|
14784 |
if (other.isSetSuccess()) {
|
|
|
14785 |
this.success = other.success;
|
|
|
14786 |
}
|
|
|
14787 |
}
|
|
|
14788 |
|
|
|
14789 |
public getRuleDocString_result deepCopy() {
|
|
|
14790 |
return new getRuleDocString_result(this);
|
|
|
14791 |
}
|
|
|
14792 |
|
| 3430 |
rajveer |
14793 |
@Override
|
|
|
14794 |
public void clear() {
|
|
|
14795 |
this.success = null;
|
| 3385 |
varun.gupt |
14796 |
}
|
|
|
14797 |
|
|
|
14798 |
public String getSuccess() {
|
|
|
14799 |
return this.success;
|
|
|
14800 |
}
|
|
|
14801 |
|
| 3430 |
rajveer |
14802 |
public void setSuccess(String success) {
|
| 3385 |
varun.gupt |
14803 |
this.success = success;
|
|
|
14804 |
}
|
|
|
14805 |
|
|
|
14806 |
public void unsetSuccess() {
|
|
|
14807 |
this.success = null;
|
|
|
14808 |
}
|
|
|
14809 |
|
| 3430 |
rajveer |
14810 |
/** Returns true if field success is set (has been assigned a value) and false otherwise */
|
| 3385 |
varun.gupt |
14811 |
public boolean isSetSuccess() {
|
|
|
14812 |
return this.success != null;
|
|
|
14813 |
}
|
|
|
14814 |
|
|
|
14815 |
public void setSuccessIsSet(boolean value) {
|
|
|
14816 |
if (!value) {
|
|
|
14817 |
this.success = null;
|
|
|
14818 |
}
|
|
|
14819 |
}
|
|
|
14820 |
|
|
|
14821 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
14822 |
switch (field) {
|
|
|
14823 |
case SUCCESS:
|
|
|
14824 |
if (value == null) {
|
|
|
14825 |
unsetSuccess();
|
|
|
14826 |
} else {
|
|
|
14827 |
setSuccess((String)value);
|
|
|
14828 |
}
|
|
|
14829 |
break;
|
|
|
14830 |
|
|
|
14831 |
}
|
|
|
14832 |
}
|
|
|
14833 |
|
|
|
14834 |
public Object getFieldValue(_Fields field) {
|
|
|
14835 |
switch (field) {
|
|
|
14836 |
case SUCCESS:
|
|
|
14837 |
return getSuccess();
|
|
|
14838 |
|
|
|
14839 |
}
|
|
|
14840 |
throw new IllegalStateException();
|
|
|
14841 |
}
|
|
|
14842 |
|
| 3430 |
rajveer |
14843 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
14844 |
public boolean isSet(_Fields field) {
|
|
|
14845 |
if (field == null) {
|
|
|
14846 |
throw new IllegalArgumentException();
|
|
|
14847 |
}
|
| 3385 |
varun.gupt |
14848 |
|
|
|
14849 |
switch (field) {
|
|
|
14850 |
case SUCCESS:
|
|
|
14851 |
return isSetSuccess();
|
|
|
14852 |
}
|
|
|
14853 |
throw new IllegalStateException();
|
|
|
14854 |
}
|
|
|
14855 |
|
|
|
14856 |
@Override
|
|
|
14857 |
public boolean equals(Object that) {
|
|
|
14858 |
if (that == null)
|
|
|
14859 |
return false;
|
|
|
14860 |
if (that instanceof getRuleDocString_result)
|
|
|
14861 |
return this.equals((getRuleDocString_result)that);
|
|
|
14862 |
return false;
|
|
|
14863 |
}
|
|
|
14864 |
|
|
|
14865 |
public boolean equals(getRuleDocString_result that) {
|
|
|
14866 |
if (that == null)
|
|
|
14867 |
return false;
|
|
|
14868 |
|
|
|
14869 |
boolean this_present_success = true && this.isSetSuccess();
|
|
|
14870 |
boolean that_present_success = true && that.isSetSuccess();
|
|
|
14871 |
if (this_present_success || that_present_success) {
|
|
|
14872 |
if (!(this_present_success && that_present_success))
|
|
|
14873 |
return false;
|
|
|
14874 |
if (!this.success.equals(that.success))
|
|
|
14875 |
return false;
|
|
|
14876 |
}
|
|
|
14877 |
|
|
|
14878 |
return true;
|
|
|
14879 |
}
|
|
|
14880 |
|
|
|
14881 |
@Override
|
|
|
14882 |
public int hashCode() {
|
|
|
14883 |
return 0;
|
|
|
14884 |
}
|
|
|
14885 |
|
|
|
14886 |
public int compareTo(getRuleDocString_result other) {
|
|
|
14887 |
if (!getClass().equals(other.getClass())) {
|
|
|
14888 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
14889 |
}
|
|
|
14890 |
|
|
|
14891 |
int lastComparison = 0;
|
|
|
14892 |
getRuleDocString_result typedOther = (getRuleDocString_result)other;
|
|
|
14893 |
|
| 3430 |
rajveer |
14894 |
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
|
| 3385 |
varun.gupt |
14895 |
if (lastComparison != 0) {
|
|
|
14896 |
return lastComparison;
|
|
|
14897 |
}
|
| 3430 |
rajveer |
14898 |
if (isSetSuccess()) {
|
|
|
14899 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
|
|
|
14900 |
if (lastComparison != 0) {
|
|
|
14901 |
return lastComparison;
|
|
|
14902 |
}
|
| 3385 |
varun.gupt |
14903 |
}
|
|
|
14904 |
return 0;
|
|
|
14905 |
}
|
|
|
14906 |
|
| 3430 |
rajveer |
14907 |
public _Fields fieldForId(int fieldId) {
|
|
|
14908 |
return _Fields.findByThriftId(fieldId);
|
|
|
14909 |
}
|
|
|
14910 |
|
|
|
14911 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
14912 |
org.apache.thrift.protocol.TField field;
|
| 3385 |
varun.gupt |
14913 |
iprot.readStructBegin();
|
|
|
14914 |
while (true)
|
|
|
14915 |
{
|
|
|
14916 |
field = iprot.readFieldBegin();
|
| 3430 |
rajveer |
14917 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
| 3385 |
varun.gupt |
14918 |
break;
|
|
|
14919 |
}
|
| 3430 |
rajveer |
14920 |
switch (field.id) {
|
|
|
14921 |
case 0: // SUCCESS
|
|
|
14922 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
14923 |
this.success = iprot.readString();
|
|
|
14924 |
} else {
|
|
|
14925 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
14926 |
}
|
|
|
14927 |
break;
|
|
|
14928 |
default:
|
|
|
14929 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| 3385 |
varun.gupt |
14930 |
}
|
| 3430 |
rajveer |
14931 |
iprot.readFieldEnd();
|
| 3385 |
varun.gupt |
14932 |
}
|
|
|
14933 |
iprot.readStructEnd();
|
|
|
14934 |
validate();
|
|
|
14935 |
}
|
|
|
14936 |
|
| 3430 |
rajveer |
14937 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
| 3385 |
varun.gupt |
14938 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
14939 |
|
|
|
14940 |
if (this.isSetSuccess()) {
|
|
|
14941 |
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
|
|
14942 |
oprot.writeString(this.success);
|
|
|
14943 |
oprot.writeFieldEnd();
|
|
|
14944 |
}
|
|
|
14945 |
oprot.writeFieldStop();
|
|
|
14946 |
oprot.writeStructEnd();
|
|
|
14947 |
}
|
|
|
14948 |
|
|
|
14949 |
@Override
|
|
|
14950 |
public String toString() {
|
|
|
14951 |
StringBuilder sb = new StringBuilder("getRuleDocString_result(");
|
|
|
14952 |
boolean first = true;
|
|
|
14953 |
|
|
|
14954 |
sb.append("success:");
|
|
|
14955 |
if (this.success == null) {
|
|
|
14956 |
sb.append("null");
|
|
|
14957 |
} else {
|
|
|
14958 |
sb.append(this.success);
|
|
|
14959 |
}
|
|
|
14960 |
first = false;
|
|
|
14961 |
sb.append(")");
|
|
|
14962 |
return sb.toString();
|
|
|
14963 |
}
|
|
|
14964 |
|
| 3430 |
rajveer |
14965 |
public void validate() throws org.apache.thrift.TException {
|
| 3385 |
varun.gupt |
14966 |
// check for required fields
|
|
|
14967 |
}
|
|
|
14968 |
|
| 3430 |
rajveer |
14969 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
14970 |
try {
|
|
|
14971 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
14972 |
} catch (org.apache.thrift.TException te) {
|
|
|
14973 |
throw new java.io.IOException(te);
|
|
|
14974 |
}
|
|
|
14975 |
}
|
|
|
14976 |
|
|
|
14977 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
14978 |
try {
|
|
|
14979 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
14980 |
} catch (org.apache.thrift.TException te) {
|
|
|
14981 |
throw new java.io.IOException(te);
|
|
|
14982 |
}
|
|
|
14983 |
}
|
|
|
14984 |
|
| 3385 |
varun.gupt |
14985 |
}
|
|
|
14986 |
|
| 4189 |
varun.gupt |
14987 |
public static class getItemDiscountMap_args implements org.apache.thrift.TBase<getItemDiscountMap_args, getItemDiscountMap_args._Fields>, java.io.Serializable, Cloneable {
|
|
|
14988 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemDiscountMap_args");
|
|
|
14989 |
|
|
|
14990 |
private static final org.apache.thrift.protocol.TField ITEM_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("itemIds", org.apache.thrift.protocol.TType.LIST, (short)1);
|
|
|
14991 |
|
|
|
14992 |
private List<Long> itemIds; // required
|
|
|
14993 |
|
|
|
14994 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
14995 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
14996 |
ITEM_IDS((short)1, "itemIds");
|
|
|
14997 |
|
|
|
14998 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
14999 |
|
|
|
15000 |
static {
|
|
|
15001 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
15002 |
byName.put(field.getFieldName(), field);
|
|
|
15003 |
}
|
|
|
15004 |
}
|
|
|
15005 |
|
|
|
15006 |
/**
|
|
|
15007 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
15008 |
*/
|
|
|
15009 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
15010 |
switch(fieldId) {
|
|
|
15011 |
case 1: // ITEM_IDS
|
|
|
15012 |
return ITEM_IDS;
|
|
|
15013 |
default:
|
|
|
15014 |
return null;
|
|
|
15015 |
}
|
|
|
15016 |
}
|
|
|
15017 |
|
|
|
15018 |
/**
|
|
|
15019 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
15020 |
* if it is not found.
|
|
|
15021 |
*/
|
|
|
15022 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
15023 |
_Fields fields = findByThriftId(fieldId);
|
|
|
15024 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
15025 |
return fields;
|
|
|
15026 |
}
|
|
|
15027 |
|
|
|
15028 |
/**
|
|
|
15029 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
15030 |
*/
|
|
|
15031 |
public static _Fields findByName(String name) {
|
|
|
15032 |
return byName.get(name);
|
|
|
15033 |
}
|
|
|
15034 |
|
|
|
15035 |
private final short _thriftId;
|
|
|
15036 |
private final String _fieldName;
|
|
|
15037 |
|
|
|
15038 |
_Fields(short thriftId, String fieldName) {
|
|
|
15039 |
_thriftId = thriftId;
|
|
|
15040 |
_fieldName = fieldName;
|
|
|
15041 |
}
|
|
|
15042 |
|
|
|
15043 |
public short getThriftFieldId() {
|
|
|
15044 |
return _thriftId;
|
|
|
15045 |
}
|
|
|
15046 |
|
|
|
15047 |
public String getFieldName() {
|
|
|
15048 |
return _fieldName;
|
|
|
15049 |
}
|
|
|
15050 |
}
|
|
|
15051 |
|
|
|
15052 |
// isset id assignments
|
|
|
15053 |
|
|
|
15054 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
15055 |
static {
|
|
|
15056 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
15057 |
tmpMap.put(_Fields.ITEM_IDS, new org.apache.thrift.meta_data.FieldMetaData("itemIds", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
15058 |
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
|
|
|
15059 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
|
|
|
15060 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
15061 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemDiscountMap_args.class, metaDataMap);
|
|
|
15062 |
}
|
|
|
15063 |
|
|
|
15064 |
public getItemDiscountMap_args() {
|
|
|
15065 |
}
|
|
|
15066 |
|
|
|
15067 |
public getItemDiscountMap_args(
|
|
|
15068 |
List<Long> itemIds)
|
|
|
15069 |
{
|
|
|
15070 |
this();
|
|
|
15071 |
this.itemIds = itemIds;
|
|
|
15072 |
}
|
|
|
15073 |
|
|
|
15074 |
/**
|
|
|
15075 |
* Performs a deep copy on <i>other</i>.
|
|
|
15076 |
*/
|
|
|
15077 |
public getItemDiscountMap_args(getItemDiscountMap_args other) {
|
|
|
15078 |
if (other.isSetItemIds()) {
|
|
|
15079 |
List<Long> __this__itemIds = new ArrayList<Long>();
|
|
|
15080 |
for (Long other_element : other.itemIds) {
|
|
|
15081 |
__this__itemIds.add(other_element);
|
|
|
15082 |
}
|
|
|
15083 |
this.itemIds = __this__itemIds;
|
|
|
15084 |
}
|
|
|
15085 |
}
|
|
|
15086 |
|
|
|
15087 |
public getItemDiscountMap_args deepCopy() {
|
|
|
15088 |
return new getItemDiscountMap_args(this);
|
|
|
15089 |
}
|
|
|
15090 |
|
|
|
15091 |
@Override
|
|
|
15092 |
public void clear() {
|
|
|
15093 |
this.itemIds = null;
|
|
|
15094 |
}
|
|
|
15095 |
|
|
|
15096 |
public int getItemIdsSize() {
|
|
|
15097 |
return (this.itemIds == null) ? 0 : this.itemIds.size();
|
|
|
15098 |
}
|
|
|
15099 |
|
|
|
15100 |
public java.util.Iterator<Long> getItemIdsIterator() {
|
|
|
15101 |
return (this.itemIds == null) ? null : this.itemIds.iterator();
|
|
|
15102 |
}
|
|
|
15103 |
|
|
|
15104 |
public void addToItemIds(long elem) {
|
|
|
15105 |
if (this.itemIds == null) {
|
|
|
15106 |
this.itemIds = new ArrayList<Long>();
|
|
|
15107 |
}
|
|
|
15108 |
this.itemIds.add(elem);
|
|
|
15109 |
}
|
|
|
15110 |
|
|
|
15111 |
public List<Long> getItemIds() {
|
|
|
15112 |
return this.itemIds;
|
|
|
15113 |
}
|
|
|
15114 |
|
|
|
15115 |
public void setItemIds(List<Long> itemIds) {
|
|
|
15116 |
this.itemIds = itemIds;
|
|
|
15117 |
}
|
|
|
15118 |
|
|
|
15119 |
public void unsetItemIds() {
|
|
|
15120 |
this.itemIds = null;
|
|
|
15121 |
}
|
|
|
15122 |
|
|
|
15123 |
/** Returns true if field itemIds is set (has been assigned a value) and false otherwise */
|
|
|
15124 |
public boolean isSetItemIds() {
|
|
|
15125 |
return this.itemIds != null;
|
|
|
15126 |
}
|
|
|
15127 |
|
|
|
15128 |
public void setItemIdsIsSet(boolean value) {
|
|
|
15129 |
if (!value) {
|
|
|
15130 |
this.itemIds = null;
|
|
|
15131 |
}
|
|
|
15132 |
}
|
|
|
15133 |
|
|
|
15134 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
15135 |
switch (field) {
|
|
|
15136 |
case ITEM_IDS:
|
|
|
15137 |
if (value == null) {
|
|
|
15138 |
unsetItemIds();
|
|
|
15139 |
} else {
|
|
|
15140 |
setItemIds((List<Long>)value);
|
|
|
15141 |
}
|
|
|
15142 |
break;
|
|
|
15143 |
|
|
|
15144 |
}
|
|
|
15145 |
}
|
|
|
15146 |
|
|
|
15147 |
public Object getFieldValue(_Fields field) {
|
|
|
15148 |
switch (field) {
|
|
|
15149 |
case ITEM_IDS:
|
|
|
15150 |
return getItemIds();
|
|
|
15151 |
|
|
|
15152 |
}
|
|
|
15153 |
throw new IllegalStateException();
|
|
|
15154 |
}
|
|
|
15155 |
|
|
|
15156 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
15157 |
public boolean isSet(_Fields field) {
|
|
|
15158 |
if (field == null) {
|
|
|
15159 |
throw new IllegalArgumentException();
|
|
|
15160 |
}
|
|
|
15161 |
|
|
|
15162 |
switch (field) {
|
|
|
15163 |
case ITEM_IDS:
|
|
|
15164 |
return isSetItemIds();
|
|
|
15165 |
}
|
|
|
15166 |
throw new IllegalStateException();
|
|
|
15167 |
}
|
|
|
15168 |
|
|
|
15169 |
@Override
|
|
|
15170 |
public boolean equals(Object that) {
|
|
|
15171 |
if (that == null)
|
|
|
15172 |
return false;
|
|
|
15173 |
if (that instanceof getItemDiscountMap_args)
|
|
|
15174 |
return this.equals((getItemDiscountMap_args)that);
|
|
|
15175 |
return false;
|
|
|
15176 |
}
|
|
|
15177 |
|
|
|
15178 |
public boolean equals(getItemDiscountMap_args that) {
|
|
|
15179 |
if (that == null)
|
|
|
15180 |
return false;
|
|
|
15181 |
|
|
|
15182 |
boolean this_present_itemIds = true && this.isSetItemIds();
|
|
|
15183 |
boolean that_present_itemIds = true && that.isSetItemIds();
|
|
|
15184 |
if (this_present_itemIds || that_present_itemIds) {
|
|
|
15185 |
if (!(this_present_itemIds && that_present_itemIds))
|
|
|
15186 |
return false;
|
|
|
15187 |
if (!this.itemIds.equals(that.itemIds))
|
|
|
15188 |
return false;
|
|
|
15189 |
}
|
|
|
15190 |
|
|
|
15191 |
return true;
|
|
|
15192 |
}
|
|
|
15193 |
|
|
|
15194 |
@Override
|
|
|
15195 |
public int hashCode() {
|
|
|
15196 |
return 0;
|
|
|
15197 |
}
|
|
|
15198 |
|
|
|
15199 |
public int compareTo(getItemDiscountMap_args other) {
|
|
|
15200 |
if (!getClass().equals(other.getClass())) {
|
|
|
15201 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
15202 |
}
|
|
|
15203 |
|
|
|
15204 |
int lastComparison = 0;
|
|
|
15205 |
getItemDiscountMap_args typedOther = (getItemDiscountMap_args)other;
|
|
|
15206 |
|
|
|
15207 |
lastComparison = Boolean.valueOf(isSetItemIds()).compareTo(typedOther.isSetItemIds());
|
|
|
15208 |
if (lastComparison != 0) {
|
|
|
15209 |
return lastComparison;
|
|
|
15210 |
}
|
|
|
15211 |
if (isSetItemIds()) {
|
|
|
15212 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemIds, typedOther.itemIds);
|
|
|
15213 |
if (lastComparison != 0) {
|
|
|
15214 |
return lastComparison;
|
|
|
15215 |
}
|
|
|
15216 |
}
|
|
|
15217 |
return 0;
|
|
|
15218 |
}
|
|
|
15219 |
|
|
|
15220 |
public _Fields fieldForId(int fieldId) {
|
|
|
15221 |
return _Fields.findByThriftId(fieldId);
|
|
|
15222 |
}
|
|
|
15223 |
|
|
|
15224 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
15225 |
org.apache.thrift.protocol.TField field;
|
|
|
15226 |
iprot.readStructBegin();
|
|
|
15227 |
while (true)
|
|
|
15228 |
{
|
|
|
15229 |
field = iprot.readFieldBegin();
|
|
|
15230 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
15231 |
break;
|
|
|
15232 |
}
|
|
|
15233 |
switch (field.id) {
|
|
|
15234 |
case 1: // ITEM_IDS
|
|
|
15235 |
if (field.type == org.apache.thrift.protocol.TType.LIST) {
|
|
|
15236 |
{
|
| 6736 |
amit.gupta |
15237 |
org.apache.thrift.protocol.TList _list34 = iprot.readListBegin();
|
|
|
15238 |
this.itemIds = new ArrayList<Long>(_list34.size);
|
|
|
15239 |
for (int _i35 = 0; _i35 < _list34.size; ++_i35)
|
| 4189 |
varun.gupt |
15240 |
{
|
| 6736 |
amit.gupta |
15241 |
long _elem36; // required
|
|
|
15242 |
_elem36 = iprot.readI64();
|
|
|
15243 |
this.itemIds.add(_elem36);
|
| 4189 |
varun.gupt |
15244 |
}
|
|
|
15245 |
iprot.readListEnd();
|
|
|
15246 |
}
|
|
|
15247 |
} else {
|
|
|
15248 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
15249 |
}
|
|
|
15250 |
break;
|
|
|
15251 |
default:
|
|
|
15252 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
15253 |
}
|
|
|
15254 |
iprot.readFieldEnd();
|
|
|
15255 |
}
|
|
|
15256 |
iprot.readStructEnd();
|
|
|
15257 |
validate();
|
|
|
15258 |
}
|
|
|
15259 |
|
|
|
15260 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
15261 |
validate();
|
|
|
15262 |
|
|
|
15263 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
15264 |
if (this.itemIds != null) {
|
|
|
15265 |
oprot.writeFieldBegin(ITEM_IDS_FIELD_DESC);
|
|
|
15266 |
{
|
|
|
15267 |
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.itemIds.size()));
|
| 6736 |
amit.gupta |
15268 |
for (long _iter37 : this.itemIds)
|
| 4189 |
varun.gupt |
15269 |
{
|
| 6736 |
amit.gupta |
15270 |
oprot.writeI64(_iter37);
|
| 4189 |
varun.gupt |
15271 |
}
|
|
|
15272 |
oprot.writeListEnd();
|
|
|
15273 |
}
|
|
|
15274 |
oprot.writeFieldEnd();
|
|
|
15275 |
}
|
|
|
15276 |
oprot.writeFieldStop();
|
|
|
15277 |
oprot.writeStructEnd();
|
|
|
15278 |
}
|
|
|
15279 |
|
|
|
15280 |
@Override
|
|
|
15281 |
public String toString() {
|
|
|
15282 |
StringBuilder sb = new StringBuilder("getItemDiscountMap_args(");
|
|
|
15283 |
boolean first = true;
|
|
|
15284 |
|
|
|
15285 |
sb.append("itemIds:");
|
|
|
15286 |
if (this.itemIds == null) {
|
|
|
15287 |
sb.append("null");
|
|
|
15288 |
} else {
|
|
|
15289 |
sb.append(this.itemIds);
|
|
|
15290 |
}
|
|
|
15291 |
first = false;
|
|
|
15292 |
sb.append(")");
|
|
|
15293 |
return sb.toString();
|
|
|
15294 |
}
|
|
|
15295 |
|
|
|
15296 |
public void validate() throws org.apache.thrift.TException {
|
|
|
15297 |
// check for required fields
|
|
|
15298 |
}
|
|
|
15299 |
|
|
|
15300 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
15301 |
try {
|
|
|
15302 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
15303 |
} catch (org.apache.thrift.TException te) {
|
|
|
15304 |
throw new java.io.IOException(te);
|
|
|
15305 |
}
|
|
|
15306 |
}
|
|
|
15307 |
|
|
|
15308 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
15309 |
try {
|
|
|
15310 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
15311 |
} catch (org.apache.thrift.TException te) {
|
|
|
15312 |
throw new java.io.IOException(te);
|
|
|
15313 |
}
|
|
|
15314 |
}
|
|
|
15315 |
|
|
|
15316 |
}
|
|
|
15317 |
|
|
|
15318 |
public static class getItemDiscountMap_result implements org.apache.thrift.TBase<getItemDiscountMap_result, getItemDiscountMap_result._Fields>, java.io.Serializable, Cloneable {
|
|
|
15319 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemDiscountMap_result");
|
|
|
15320 |
|
|
|
15321 |
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
|
|
|
15322 |
private static final org.apache.thrift.protocol.TField PEX_FIELD_DESC = new org.apache.thrift.protocol.TField("pex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
|
|
|
15323 |
|
|
|
15324 |
private List<ItemCouponDiscount> success; // required
|
|
|
15325 |
private PromotionException pex; // required
|
|
|
15326 |
|
|
|
15327 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
15328 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
15329 |
SUCCESS((short)0, "success"),
|
|
|
15330 |
PEX((short)1, "pex");
|
|
|
15331 |
|
|
|
15332 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
15333 |
|
|
|
15334 |
static {
|
|
|
15335 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
15336 |
byName.put(field.getFieldName(), field);
|
|
|
15337 |
}
|
|
|
15338 |
}
|
|
|
15339 |
|
|
|
15340 |
/**
|
|
|
15341 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
15342 |
*/
|
|
|
15343 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
15344 |
switch(fieldId) {
|
|
|
15345 |
case 0: // SUCCESS
|
|
|
15346 |
return SUCCESS;
|
|
|
15347 |
case 1: // PEX
|
|
|
15348 |
return PEX;
|
|
|
15349 |
default:
|
|
|
15350 |
return null;
|
|
|
15351 |
}
|
|
|
15352 |
}
|
|
|
15353 |
|
|
|
15354 |
/**
|
|
|
15355 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
15356 |
* if it is not found.
|
|
|
15357 |
*/
|
|
|
15358 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
15359 |
_Fields fields = findByThriftId(fieldId);
|
|
|
15360 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
15361 |
return fields;
|
|
|
15362 |
}
|
|
|
15363 |
|
|
|
15364 |
/**
|
|
|
15365 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
15366 |
*/
|
|
|
15367 |
public static _Fields findByName(String name) {
|
|
|
15368 |
return byName.get(name);
|
|
|
15369 |
}
|
|
|
15370 |
|
|
|
15371 |
private final short _thriftId;
|
|
|
15372 |
private final String _fieldName;
|
|
|
15373 |
|
|
|
15374 |
_Fields(short thriftId, String fieldName) {
|
|
|
15375 |
_thriftId = thriftId;
|
|
|
15376 |
_fieldName = fieldName;
|
|
|
15377 |
}
|
|
|
15378 |
|
|
|
15379 |
public short getThriftFieldId() {
|
|
|
15380 |
return _thriftId;
|
|
|
15381 |
}
|
|
|
15382 |
|
|
|
15383 |
public String getFieldName() {
|
|
|
15384 |
return _fieldName;
|
|
|
15385 |
}
|
|
|
15386 |
}
|
|
|
15387 |
|
|
|
15388 |
// isset id assignments
|
|
|
15389 |
|
|
|
15390 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
15391 |
static {
|
|
|
15392 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
15393 |
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
15394 |
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
|
|
|
15395 |
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ItemCouponDiscount.class))));
|
|
|
15396 |
tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
15397 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
|
|
|
15398 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
15399 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemDiscountMap_result.class, metaDataMap);
|
|
|
15400 |
}
|
|
|
15401 |
|
|
|
15402 |
public getItemDiscountMap_result() {
|
|
|
15403 |
}
|
|
|
15404 |
|
|
|
15405 |
public getItemDiscountMap_result(
|
|
|
15406 |
List<ItemCouponDiscount> success,
|
|
|
15407 |
PromotionException pex)
|
|
|
15408 |
{
|
|
|
15409 |
this();
|
|
|
15410 |
this.success = success;
|
|
|
15411 |
this.pex = pex;
|
|
|
15412 |
}
|
|
|
15413 |
|
|
|
15414 |
/**
|
|
|
15415 |
* Performs a deep copy on <i>other</i>.
|
|
|
15416 |
*/
|
|
|
15417 |
public getItemDiscountMap_result(getItemDiscountMap_result other) {
|
|
|
15418 |
if (other.isSetSuccess()) {
|
|
|
15419 |
List<ItemCouponDiscount> __this__success = new ArrayList<ItemCouponDiscount>();
|
|
|
15420 |
for (ItemCouponDiscount other_element : other.success) {
|
|
|
15421 |
__this__success.add(new ItemCouponDiscount(other_element));
|
|
|
15422 |
}
|
|
|
15423 |
this.success = __this__success;
|
|
|
15424 |
}
|
|
|
15425 |
if (other.isSetPex()) {
|
|
|
15426 |
this.pex = new PromotionException(other.pex);
|
|
|
15427 |
}
|
|
|
15428 |
}
|
|
|
15429 |
|
|
|
15430 |
public getItemDiscountMap_result deepCopy() {
|
|
|
15431 |
return new getItemDiscountMap_result(this);
|
|
|
15432 |
}
|
|
|
15433 |
|
|
|
15434 |
@Override
|
|
|
15435 |
public void clear() {
|
|
|
15436 |
this.success = null;
|
|
|
15437 |
this.pex = null;
|
|
|
15438 |
}
|
|
|
15439 |
|
|
|
15440 |
public int getSuccessSize() {
|
|
|
15441 |
return (this.success == null) ? 0 : this.success.size();
|
|
|
15442 |
}
|
|
|
15443 |
|
|
|
15444 |
public java.util.Iterator<ItemCouponDiscount> getSuccessIterator() {
|
|
|
15445 |
return (this.success == null) ? null : this.success.iterator();
|
|
|
15446 |
}
|
|
|
15447 |
|
|
|
15448 |
public void addToSuccess(ItemCouponDiscount elem) {
|
|
|
15449 |
if (this.success == null) {
|
|
|
15450 |
this.success = new ArrayList<ItemCouponDiscount>();
|
|
|
15451 |
}
|
|
|
15452 |
this.success.add(elem);
|
|
|
15453 |
}
|
|
|
15454 |
|
|
|
15455 |
public List<ItemCouponDiscount> getSuccess() {
|
|
|
15456 |
return this.success;
|
|
|
15457 |
}
|
|
|
15458 |
|
|
|
15459 |
public void setSuccess(List<ItemCouponDiscount> success) {
|
|
|
15460 |
this.success = success;
|
|
|
15461 |
}
|
|
|
15462 |
|
|
|
15463 |
public void unsetSuccess() {
|
|
|
15464 |
this.success = null;
|
|
|
15465 |
}
|
|
|
15466 |
|
|
|
15467 |
/** Returns true if field success is set (has been assigned a value) and false otherwise */
|
|
|
15468 |
public boolean isSetSuccess() {
|
|
|
15469 |
return this.success != null;
|
|
|
15470 |
}
|
|
|
15471 |
|
|
|
15472 |
public void setSuccessIsSet(boolean value) {
|
|
|
15473 |
if (!value) {
|
|
|
15474 |
this.success = null;
|
|
|
15475 |
}
|
|
|
15476 |
}
|
|
|
15477 |
|
|
|
15478 |
public PromotionException getPex() {
|
|
|
15479 |
return this.pex;
|
|
|
15480 |
}
|
|
|
15481 |
|
|
|
15482 |
public void setPex(PromotionException pex) {
|
|
|
15483 |
this.pex = pex;
|
|
|
15484 |
}
|
|
|
15485 |
|
|
|
15486 |
public void unsetPex() {
|
|
|
15487 |
this.pex = null;
|
|
|
15488 |
}
|
|
|
15489 |
|
|
|
15490 |
/** Returns true if field pex is set (has been assigned a value) and false otherwise */
|
|
|
15491 |
public boolean isSetPex() {
|
|
|
15492 |
return this.pex != null;
|
|
|
15493 |
}
|
|
|
15494 |
|
|
|
15495 |
public void setPexIsSet(boolean value) {
|
|
|
15496 |
if (!value) {
|
|
|
15497 |
this.pex = null;
|
|
|
15498 |
}
|
|
|
15499 |
}
|
|
|
15500 |
|
|
|
15501 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
15502 |
switch (field) {
|
|
|
15503 |
case SUCCESS:
|
|
|
15504 |
if (value == null) {
|
|
|
15505 |
unsetSuccess();
|
|
|
15506 |
} else {
|
|
|
15507 |
setSuccess((List<ItemCouponDiscount>)value);
|
|
|
15508 |
}
|
|
|
15509 |
break;
|
|
|
15510 |
|
|
|
15511 |
case PEX:
|
|
|
15512 |
if (value == null) {
|
|
|
15513 |
unsetPex();
|
|
|
15514 |
} else {
|
|
|
15515 |
setPex((PromotionException)value);
|
|
|
15516 |
}
|
|
|
15517 |
break;
|
|
|
15518 |
|
|
|
15519 |
}
|
|
|
15520 |
}
|
|
|
15521 |
|
|
|
15522 |
public Object getFieldValue(_Fields field) {
|
|
|
15523 |
switch (field) {
|
|
|
15524 |
case SUCCESS:
|
|
|
15525 |
return getSuccess();
|
|
|
15526 |
|
|
|
15527 |
case PEX:
|
|
|
15528 |
return getPex();
|
|
|
15529 |
|
|
|
15530 |
}
|
|
|
15531 |
throw new IllegalStateException();
|
|
|
15532 |
}
|
|
|
15533 |
|
|
|
15534 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
15535 |
public boolean isSet(_Fields field) {
|
|
|
15536 |
if (field == null) {
|
|
|
15537 |
throw new IllegalArgumentException();
|
|
|
15538 |
}
|
|
|
15539 |
|
|
|
15540 |
switch (field) {
|
|
|
15541 |
case SUCCESS:
|
|
|
15542 |
return isSetSuccess();
|
|
|
15543 |
case PEX:
|
|
|
15544 |
return isSetPex();
|
|
|
15545 |
}
|
|
|
15546 |
throw new IllegalStateException();
|
|
|
15547 |
}
|
|
|
15548 |
|
|
|
15549 |
@Override
|
|
|
15550 |
public boolean equals(Object that) {
|
|
|
15551 |
if (that == null)
|
|
|
15552 |
return false;
|
|
|
15553 |
if (that instanceof getItemDiscountMap_result)
|
|
|
15554 |
return this.equals((getItemDiscountMap_result)that);
|
|
|
15555 |
return false;
|
|
|
15556 |
}
|
|
|
15557 |
|
|
|
15558 |
public boolean equals(getItemDiscountMap_result that) {
|
|
|
15559 |
if (that == null)
|
|
|
15560 |
return false;
|
|
|
15561 |
|
|
|
15562 |
boolean this_present_success = true && this.isSetSuccess();
|
|
|
15563 |
boolean that_present_success = true && that.isSetSuccess();
|
|
|
15564 |
if (this_present_success || that_present_success) {
|
|
|
15565 |
if (!(this_present_success && that_present_success))
|
|
|
15566 |
return false;
|
|
|
15567 |
if (!this.success.equals(that.success))
|
|
|
15568 |
return false;
|
|
|
15569 |
}
|
|
|
15570 |
|
|
|
15571 |
boolean this_present_pex = true && this.isSetPex();
|
|
|
15572 |
boolean that_present_pex = true && that.isSetPex();
|
|
|
15573 |
if (this_present_pex || that_present_pex) {
|
|
|
15574 |
if (!(this_present_pex && that_present_pex))
|
|
|
15575 |
return false;
|
|
|
15576 |
if (!this.pex.equals(that.pex))
|
|
|
15577 |
return false;
|
|
|
15578 |
}
|
|
|
15579 |
|
|
|
15580 |
return true;
|
|
|
15581 |
}
|
|
|
15582 |
|
|
|
15583 |
@Override
|
|
|
15584 |
public int hashCode() {
|
|
|
15585 |
return 0;
|
|
|
15586 |
}
|
|
|
15587 |
|
|
|
15588 |
public int compareTo(getItemDiscountMap_result other) {
|
|
|
15589 |
if (!getClass().equals(other.getClass())) {
|
|
|
15590 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
15591 |
}
|
|
|
15592 |
|
|
|
15593 |
int lastComparison = 0;
|
|
|
15594 |
getItemDiscountMap_result typedOther = (getItemDiscountMap_result)other;
|
|
|
15595 |
|
|
|
15596 |
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
|
|
|
15597 |
if (lastComparison != 0) {
|
|
|
15598 |
return lastComparison;
|
|
|
15599 |
}
|
|
|
15600 |
if (isSetSuccess()) {
|
|
|
15601 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
|
|
|
15602 |
if (lastComparison != 0) {
|
|
|
15603 |
return lastComparison;
|
|
|
15604 |
}
|
|
|
15605 |
}
|
|
|
15606 |
lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
|
|
|
15607 |
if (lastComparison != 0) {
|
|
|
15608 |
return lastComparison;
|
|
|
15609 |
}
|
|
|
15610 |
if (isSetPex()) {
|
|
|
15611 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
|
|
|
15612 |
if (lastComparison != 0) {
|
|
|
15613 |
return lastComparison;
|
|
|
15614 |
}
|
|
|
15615 |
}
|
|
|
15616 |
return 0;
|
|
|
15617 |
}
|
|
|
15618 |
|
|
|
15619 |
public _Fields fieldForId(int fieldId) {
|
|
|
15620 |
return _Fields.findByThriftId(fieldId);
|
|
|
15621 |
}
|
|
|
15622 |
|
|
|
15623 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
15624 |
org.apache.thrift.protocol.TField field;
|
|
|
15625 |
iprot.readStructBegin();
|
|
|
15626 |
while (true)
|
|
|
15627 |
{
|
|
|
15628 |
field = iprot.readFieldBegin();
|
|
|
15629 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
15630 |
break;
|
|
|
15631 |
}
|
|
|
15632 |
switch (field.id) {
|
|
|
15633 |
case 0: // SUCCESS
|
|
|
15634 |
if (field.type == org.apache.thrift.protocol.TType.LIST) {
|
|
|
15635 |
{
|
| 6736 |
amit.gupta |
15636 |
org.apache.thrift.protocol.TList _list38 = iprot.readListBegin();
|
|
|
15637 |
this.success = new ArrayList<ItemCouponDiscount>(_list38.size);
|
|
|
15638 |
for (int _i39 = 0; _i39 < _list38.size; ++_i39)
|
| 4189 |
varun.gupt |
15639 |
{
|
| 6736 |
amit.gupta |
15640 |
ItemCouponDiscount _elem40; // required
|
|
|
15641 |
_elem40 = new ItemCouponDiscount();
|
|
|
15642 |
_elem40.read(iprot);
|
|
|
15643 |
this.success.add(_elem40);
|
| 4189 |
varun.gupt |
15644 |
}
|
|
|
15645 |
iprot.readListEnd();
|
|
|
15646 |
}
|
|
|
15647 |
} else {
|
|
|
15648 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
15649 |
}
|
|
|
15650 |
break;
|
|
|
15651 |
case 1: // PEX
|
|
|
15652 |
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
|
|
15653 |
this.pex = new PromotionException();
|
|
|
15654 |
this.pex.read(iprot);
|
|
|
15655 |
} else {
|
|
|
15656 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
15657 |
}
|
|
|
15658 |
break;
|
|
|
15659 |
default:
|
|
|
15660 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
15661 |
}
|
|
|
15662 |
iprot.readFieldEnd();
|
|
|
15663 |
}
|
|
|
15664 |
iprot.readStructEnd();
|
|
|
15665 |
validate();
|
|
|
15666 |
}
|
|
|
15667 |
|
|
|
15668 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
15669 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
15670 |
|
|
|
15671 |
if (this.isSetSuccess()) {
|
|
|
15672 |
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
|
|
15673 |
{
|
|
|
15674 |
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
|
| 6736 |
amit.gupta |
15675 |
for (ItemCouponDiscount _iter41 : this.success)
|
| 4189 |
varun.gupt |
15676 |
{
|
| 6736 |
amit.gupta |
15677 |
_iter41.write(oprot);
|
| 4189 |
varun.gupt |
15678 |
}
|
|
|
15679 |
oprot.writeListEnd();
|
|
|
15680 |
}
|
|
|
15681 |
oprot.writeFieldEnd();
|
|
|
15682 |
} else if (this.isSetPex()) {
|
|
|
15683 |
oprot.writeFieldBegin(PEX_FIELD_DESC);
|
|
|
15684 |
this.pex.write(oprot);
|
|
|
15685 |
oprot.writeFieldEnd();
|
|
|
15686 |
}
|
|
|
15687 |
oprot.writeFieldStop();
|
|
|
15688 |
oprot.writeStructEnd();
|
|
|
15689 |
}
|
|
|
15690 |
|
|
|
15691 |
@Override
|
|
|
15692 |
public String toString() {
|
|
|
15693 |
StringBuilder sb = new StringBuilder("getItemDiscountMap_result(");
|
|
|
15694 |
boolean first = true;
|
|
|
15695 |
|
|
|
15696 |
sb.append("success:");
|
|
|
15697 |
if (this.success == null) {
|
|
|
15698 |
sb.append("null");
|
|
|
15699 |
} else {
|
|
|
15700 |
sb.append(this.success);
|
|
|
15701 |
}
|
|
|
15702 |
first = false;
|
|
|
15703 |
if (!first) sb.append(", ");
|
|
|
15704 |
sb.append("pex:");
|
|
|
15705 |
if (this.pex == null) {
|
|
|
15706 |
sb.append("null");
|
|
|
15707 |
} else {
|
|
|
15708 |
sb.append(this.pex);
|
|
|
15709 |
}
|
|
|
15710 |
first = false;
|
|
|
15711 |
sb.append(")");
|
|
|
15712 |
return sb.toString();
|
|
|
15713 |
}
|
|
|
15714 |
|
|
|
15715 |
public void validate() throws org.apache.thrift.TException {
|
|
|
15716 |
// check for required fields
|
|
|
15717 |
}
|
|
|
15718 |
|
|
|
15719 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
15720 |
try {
|
|
|
15721 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
15722 |
} catch (org.apache.thrift.TException te) {
|
|
|
15723 |
throw new java.io.IOException(te);
|
|
|
15724 |
}
|
|
|
15725 |
}
|
|
|
15726 |
|
|
|
15727 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
15728 |
try {
|
|
|
15729 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
15730 |
} catch (org.apache.thrift.TException te) {
|
|
|
15731 |
throw new java.io.IOException(te);
|
|
|
15732 |
}
|
|
|
15733 |
}
|
|
|
15734 |
|
|
|
15735 |
}
|
|
|
15736 |
|
| 4494 |
varun.gupt |
15737 |
public static class getDiscountsForEntity_args implements org.apache.thrift.TBase<getDiscountsForEntity_args, getDiscountsForEntity_args._Fields>, java.io.Serializable, Cloneable {
|
|
|
15738 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getDiscountsForEntity_args");
|
|
|
15739 |
|
|
|
15740 |
private static final org.apache.thrift.protocol.TField ENTITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("entityId", org.apache.thrift.protocol.TType.I64, (short)1);
|
|
|
15741 |
|
|
|
15742 |
private long entityId; // required
|
|
|
15743 |
|
|
|
15744 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
15745 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
15746 |
ENTITY_ID((short)1, "entityId");
|
|
|
15747 |
|
|
|
15748 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
15749 |
|
|
|
15750 |
static {
|
|
|
15751 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
15752 |
byName.put(field.getFieldName(), field);
|
|
|
15753 |
}
|
|
|
15754 |
}
|
|
|
15755 |
|
|
|
15756 |
/**
|
|
|
15757 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
15758 |
*/
|
|
|
15759 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
15760 |
switch(fieldId) {
|
|
|
15761 |
case 1: // ENTITY_ID
|
|
|
15762 |
return ENTITY_ID;
|
|
|
15763 |
default:
|
|
|
15764 |
return null;
|
|
|
15765 |
}
|
|
|
15766 |
}
|
|
|
15767 |
|
|
|
15768 |
/**
|
|
|
15769 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
15770 |
* if it is not found.
|
|
|
15771 |
*/
|
|
|
15772 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
15773 |
_Fields fields = findByThriftId(fieldId);
|
|
|
15774 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
15775 |
return fields;
|
|
|
15776 |
}
|
|
|
15777 |
|
|
|
15778 |
/**
|
|
|
15779 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
15780 |
*/
|
|
|
15781 |
public static _Fields findByName(String name) {
|
|
|
15782 |
return byName.get(name);
|
|
|
15783 |
}
|
|
|
15784 |
|
|
|
15785 |
private final short _thriftId;
|
|
|
15786 |
private final String _fieldName;
|
|
|
15787 |
|
|
|
15788 |
_Fields(short thriftId, String fieldName) {
|
|
|
15789 |
_thriftId = thriftId;
|
|
|
15790 |
_fieldName = fieldName;
|
|
|
15791 |
}
|
|
|
15792 |
|
|
|
15793 |
public short getThriftFieldId() {
|
|
|
15794 |
return _thriftId;
|
|
|
15795 |
}
|
|
|
15796 |
|
|
|
15797 |
public String getFieldName() {
|
|
|
15798 |
return _fieldName;
|
|
|
15799 |
}
|
|
|
15800 |
}
|
|
|
15801 |
|
|
|
15802 |
// isset id assignments
|
|
|
15803 |
private static final int __ENTITYID_ISSET_ID = 0;
|
|
|
15804 |
private BitSet __isset_bit_vector = new BitSet(1);
|
|
|
15805 |
|
|
|
15806 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
15807 |
static {
|
|
|
15808 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
15809 |
tmpMap.put(_Fields.ENTITY_ID, new org.apache.thrift.meta_data.FieldMetaData("entityId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
15810 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
15811 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
15812 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getDiscountsForEntity_args.class, metaDataMap);
|
|
|
15813 |
}
|
|
|
15814 |
|
|
|
15815 |
public getDiscountsForEntity_args() {
|
|
|
15816 |
}
|
|
|
15817 |
|
|
|
15818 |
public getDiscountsForEntity_args(
|
|
|
15819 |
long entityId)
|
|
|
15820 |
{
|
|
|
15821 |
this();
|
|
|
15822 |
this.entityId = entityId;
|
|
|
15823 |
setEntityIdIsSet(true);
|
|
|
15824 |
}
|
|
|
15825 |
|
|
|
15826 |
/**
|
|
|
15827 |
* Performs a deep copy on <i>other</i>.
|
|
|
15828 |
*/
|
|
|
15829 |
public getDiscountsForEntity_args(getDiscountsForEntity_args other) {
|
|
|
15830 |
__isset_bit_vector.clear();
|
|
|
15831 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
15832 |
this.entityId = other.entityId;
|
|
|
15833 |
}
|
|
|
15834 |
|
|
|
15835 |
public getDiscountsForEntity_args deepCopy() {
|
|
|
15836 |
return new getDiscountsForEntity_args(this);
|
|
|
15837 |
}
|
|
|
15838 |
|
|
|
15839 |
@Override
|
|
|
15840 |
public void clear() {
|
|
|
15841 |
setEntityIdIsSet(false);
|
|
|
15842 |
this.entityId = 0;
|
|
|
15843 |
}
|
|
|
15844 |
|
|
|
15845 |
public long getEntityId() {
|
|
|
15846 |
return this.entityId;
|
|
|
15847 |
}
|
|
|
15848 |
|
|
|
15849 |
public void setEntityId(long entityId) {
|
|
|
15850 |
this.entityId = entityId;
|
|
|
15851 |
setEntityIdIsSet(true);
|
|
|
15852 |
}
|
|
|
15853 |
|
|
|
15854 |
public void unsetEntityId() {
|
|
|
15855 |
__isset_bit_vector.clear(__ENTITYID_ISSET_ID);
|
|
|
15856 |
}
|
|
|
15857 |
|
|
|
15858 |
/** Returns true if field entityId is set (has been assigned a value) and false otherwise */
|
|
|
15859 |
public boolean isSetEntityId() {
|
|
|
15860 |
return __isset_bit_vector.get(__ENTITYID_ISSET_ID);
|
|
|
15861 |
}
|
|
|
15862 |
|
|
|
15863 |
public void setEntityIdIsSet(boolean value) {
|
|
|
15864 |
__isset_bit_vector.set(__ENTITYID_ISSET_ID, value);
|
|
|
15865 |
}
|
|
|
15866 |
|
|
|
15867 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
15868 |
switch (field) {
|
|
|
15869 |
case ENTITY_ID:
|
|
|
15870 |
if (value == null) {
|
|
|
15871 |
unsetEntityId();
|
|
|
15872 |
} else {
|
|
|
15873 |
setEntityId((Long)value);
|
|
|
15874 |
}
|
|
|
15875 |
break;
|
|
|
15876 |
|
|
|
15877 |
}
|
|
|
15878 |
}
|
|
|
15879 |
|
|
|
15880 |
public Object getFieldValue(_Fields field) {
|
|
|
15881 |
switch (field) {
|
|
|
15882 |
case ENTITY_ID:
|
|
|
15883 |
return Long.valueOf(getEntityId());
|
|
|
15884 |
|
|
|
15885 |
}
|
|
|
15886 |
throw new IllegalStateException();
|
|
|
15887 |
}
|
|
|
15888 |
|
|
|
15889 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
15890 |
public boolean isSet(_Fields field) {
|
|
|
15891 |
if (field == null) {
|
|
|
15892 |
throw new IllegalArgumentException();
|
|
|
15893 |
}
|
|
|
15894 |
|
|
|
15895 |
switch (field) {
|
|
|
15896 |
case ENTITY_ID:
|
|
|
15897 |
return isSetEntityId();
|
|
|
15898 |
}
|
|
|
15899 |
throw new IllegalStateException();
|
|
|
15900 |
}
|
|
|
15901 |
|
|
|
15902 |
@Override
|
|
|
15903 |
public boolean equals(Object that) {
|
|
|
15904 |
if (that == null)
|
|
|
15905 |
return false;
|
|
|
15906 |
if (that instanceof getDiscountsForEntity_args)
|
|
|
15907 |
return this.equals((getDiscountsForEntity_args)that);
|
|
|
15908 |
return false;
|
|
|
15909 |
}
|
|
|
15910 |
|
|
|
15911 |
public boolean equals(getDiscountsForEntity_args that) {
|
|
|
15912 |
if (that == null)
|
|
|
15913 |
return false;
|
|
|
15914 |
|
|
|
15915 |
boolean this_present_entityId = true;
|
|
|
15916 |
boolean that_present_entityId = true;
|
|
|
15917 |
if (this_present_entityId || that_present_entityId) {
|
|
|
15918 |
if (!(this_present_entityId && that_present_entityId))
|
|
|
15919 |
return false;
|
|
|
15920 |
if (this.entityId != that.entityId)
|
|
|
15921 |
return false;
|
|
|
15922 |
}
|
|
|
15923 |
|
|
|
15924 |
return true;
|
|
|
15925 |
}
|
|
|
15926 |
|
|
|
15927 |
@Override
|
|
|
15928 |
public int hashCode() {
|
|
|
15929 |
return 0;
|
|
|
15930 |
}
|
|
|
15931 |
|
|
|
15932 |
public int compareTo(getDiscountsForEntity_args other) {
|
|
|
15933 |
if (!getClass().equals(other.getClass())) {
|
|
|
15934 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
15935 |
}
|
|
|
15936 |
|
|
|
15937 |
int lastComparison = 0;
|
|
|
15938 |
getDiscountsForEntity_args typedOther = (getDiscountsForEntity_args)other;
|
|
|
15939 |
|
|
|
15940 |
lastComparison = Boolean.valueOf(isSetEntityId()).compareTo(typedOther.isSetEntityId());
|
|
|
15941 |
if (lastComparison != 0) {
|
|
|
15942 |
return lastComparison;
|
|
|
15943 |
}
|
|
|
15944 |
if (isSetEntityId()) {
|
|
|
15945 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.entityId, typedOther.entityId);
|
|
|
15946 |
if (lastComparison != 0) {
|
|
|
15947 |
return lastComparison;
|
|
|
15948 |
}
|
|
|
15949 |
}
|
|
|
15950 |
return 0;
|
|
|
15951 |
}
|
|
|
15952 |
|
|
|
15953 |
public _Fields fieldForId(int fieldId) {
|
|
|
15954 |
return _Fields.findByThriftId(fieldId);
|
|
|
15955 |
}
|
|
|
15956 |
|
|
|
15957 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
15958 |
org.apache.thrift.protocol.TField field;
|
|
|
15959 |
iprot.readStructBegin();
|
|
|
15960 |
while (true)
|
|
|
15961 |
{
|
|
|
15962 |
field = iprot.readFieldBegin();
|
|
|
15963 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
15964 |
break;
|
|
|
15965 |
}
|
|
|
15966 |
switch (field.id) {
|
|
|
15967 |
case 1: // ENTITY_ID
|
|
|
15968 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
15969 |
this.entityId = iprot.readI64();
|
|
|
15970 |
setEntityIdIsSet(true);
|
|
|
15971 |
} else {
|
|
|
15972 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
15973 |
}
|
|
|
15974 |
break;
|
|
|
15975 |
default:
|
|
|
15976 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
15977 |
}
|
|
|
15978 |
iprot.readFieldEnd();
|
|
|
15979 |
}
|
|
|
15980 |
iprot.readStructEnd();
|
|
|
15981 |
validate();
|
|
|
15982 |
}
|
|
|
15983 |
|
|
|
15984 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
15985 |
validate();
|
|
|
15986 |
|
|
|
15987 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
15988 |
oprot.writeFieldBegin(ENTITY_ID_FIELD_DESC);
|
|
|
15989 |
oprot.writeI64(this.entityId);
|
|
|
15990 |
oprot.writeFieldEnd();
|
|
|
15991 |
oprot.writeFieldStop();
|
|
|
15992 |
oprot.writeStructEnd();
|
|
|
15993 |
}
|
|
|
15994 |
|
|
|
15995 |
@Override
|
|
|
15996 |
public String toString() {
|
|
|
15997 |
StringBuilder sb = new StringBuilder("getDiscountsForEntity_args(");
|
|
|
15998 |
boolean first = true;
|
|
|
15999 |
|
|
|
16000 |
sb.append("entityId:");
|
|
|
16001 |
sb.append(this.entityId);
|
|
|
16002 |
first = false;
|
|
|
16003 |
sb.append(")");
|
|
|
16004 |
return sb.toString();
|
|
|
16005 |
}
|
|
|
16006 |
|
|
|
16007 |
public void validate() throws org.apache.thrift.TException {
|
|
|
16008 |
// check for required fields
|
|
|
16009 |
}
|
|
|
16010 |
|
|
|
16011 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
16012 |
try {
|
|
|
16013 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
16014 |
} catch (org.apache.thrift.TException te) {
|
|
|
16015 |
throw new java.io.IOException(te);
|
|
|
16016 |
}
|
|
|
16017 |
}
|
|
|
16018 |
|
|
|
16019 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
16020 |
try {
|
|
|
16021 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
16022 |
__isset_bit_vector = new BitSet(1);
|
|
|
16023 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
16024 |
} catch (org.apache.thrift.TException te) {
|
|
|
16025 |
throw new java.io.IOException(te);
|
|
|
16026 |
}
|
|
|
16027 |
}
|
|
|
16028 |
|
|
|
16029 |
}
|
|
|
16030 |
|
|
|
16031 |
public static class getDiscountsForEntity_result implements org.apache.thrift.TBase<getDiscountsForEntity_result, getDiscountsForEntity_result._Fields>, java.io.Serializable, Cloneable {
|
|
|
16032 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getDiscountsForEntity_result");
|
|
|
16033 |
|
|
|
16034 |
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0);
|
|
|
16035 |
|
|
|
16036 |
private Map<String,Double> success; // required
|
|
|
16037 |
|
|
|
16038 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
16039 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
16040 |
SUCCESS((short)0, "success");
|
|
|
16041 |
|
|
|
16042 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
16043 |
|
|
|
16044 |
static {
|
|
|
16045 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
16046 |
byName.put(field.getFieldName(), field);
|
|
|
16047 |
}
|
|
|
16048 |
}
|
|
|
16049 |
|
|
|
16050 |
/**
|
|
|
16051 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
16052 |
*/
|
|
|
16053 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
16054 |
switch(fieldId) {
|
|
|
16055 |
case 0: // SUCCESS
|
|
|
16056 |
return SUCCESS;
|
|
|
16057 |
default:
|
|
|
16058 |
return null;
|
|
|
16059 |
}
|
|
|
16060 |
}
|
|
|
16061 |
|
|
|
16062 |
/**
|
|
|
16063 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
16064 |
* if it is not found.
|
|
|
16065 |
*/
|
|
|
16066 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
16067 |
_Fields fields = findByThriftId(fieldId);
|
|
|
16068 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
16069 |
return fields;
|
|
|
16070 |
}
|
|
|
16071 |
|
|
|
16072 |
/**
|
|
|
16073 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
16074 |
*/
|
|
|
16075 |
public static _Fields findByName(String name) {
|
|
|
16076 |
return byName.get(name);
|
|
|
16077 |
}
|
|
|
16078 |
|
|
|
16079 |
private final short _thriftId;
|
|
|
16080 |
private final String _fieldName;
|
|
|
16081 |
|
|
|
16082 |
_Fields(short thriftId, String fieldName) {
|
|
|
16083 |
_thriftId = thriftId;
|
|
|
16084 |
_fieldName = fieldName;
|
|
|
16085 |
}
|
|
|
16086 |
|
|
|
16087 |
public short getThriftFieldId() {
|
|
|
16088 |
return _thriftId;
|
|
|
16089 |
}
|
|
|
16090 |
|
|
|
16091 |
public String getFieldName() {
|
|
|
16092 |
return _fieldName;
|
|
|
16093 |
}
|
|
|
16094 |
}
|
|
|
16095 |
|
|
|
16096 |
// isset id assignments
|
|
|
16097 |
|
|
|
16098 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
16099 |
static {
|
|
|
16100 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
16101 |
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
16102 |
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
|
|
|
16103 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
|
|
|
16104 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))));
|
|
|
16105 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
16106 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getDiscountsForEntity_result.class, metaDataMap);
|
|
|
16107 |
}
|
|
|
16108 |
|
|
|
16109 |
public getDiscountsForEntity_result() {
|
|
|
16110 |
}
|
|
|
16111 |
|
|
|
16112 |
public getDiscountsForEntity_result(
|
|
|
16113 |
Map<String,Double> success)
|
|
|
16114 |
{
|
|
|
16115 |
this();
|
|
|
16116 |
this.success = success;
|
|
|
16117 |
}
|
|
|
16118 |
|
|
|
16119 |
/**
|
|
|
16120 |
* Performs a deep copy on <i>other</i>.
|
|
|
16121 |
*/
|
|
|
16122 |
public getDiscountsForEntity_result(getDiscountsForEntity_result other) {
|
|
|
16123 |
if (other.isSetSuccess()) {
|
|
|
16124 |
Map<String,Double> __this__success = new HashMap<String,Double>();
|
|
|
16125 |
for (Map.Entry<String, Double> other_element : other.success.entrySet()) {
|
|
|
16126 |
|
|
|
16127 |
String other_element_key = other_element.getKey();
|
|
|
16128 |
Double other_element_value = other_element.getValue();
|
|
|
16129 |
|
|
|
16130 |
String __this__success_copy_key = other_element_key;
|
|
|
16131 |
|
|
|
16132 |
Double __this__success_copy_value = other_element_value;
|
|
|
16133 |
|
|
|
16134 |
__this__success.put(__this__success_copy_key, __this__success_copy_value);
|
|
|
16135 |
}
|
|
|
16136 |
this.success = __this__success;
|
|
|
16137 |
}
|
|
|
16138 |
}
|
|
|
16139 |
|
|
|
16140 |
public getDiscountsForEntity_result deepCopy() {
|
|
|
16141 |
return new getDiscountsForEntity_result(this);
|
|
|
16142 |
}
|
|
|
16143 |
|
|
|
16144 |
@Override
|
|
|
16145 |
public void clear() {
|
|
|
16146 |
this.success = null;
|
|
|
16147 |
}
|
|
|
16148 |
|
|
|
16149 |
public int getSuccessSize() {
|
|
|
16150 |
return (this.success == null) ? 0 : this.success.size();
|
|
|
16151 |
}
|
|
|
16152 |
|
|
|
16153 |
public void putToSuccess(String key, double val) {
|
|
|
16154 |
if (this.success == null) {
|
|
|
16155 |
this.success = new HashMap<String,Double>();
|
|
|
16156 |
}
|
|
|
16157 |
this.success.put(key, val);
|
|
|
16158 |
}
|
|
|
16159 |
|
|
|
16160 |
public Map<String,Double> getSuccess() {
|
|
|
16161 |
return this.success;
|
|
|
16162 |
}
|
|
|
16163 |
|
|
|
16164 |
public void setSuccess(Map<String,Double> success) {
|
|
|
16165 |
this.success = success;
|
|
|
16166 |
}
|
|
|
16167 |
|
|
|
16168 |
public void unsetSuccess() {
|
|
|
16169 |
this.success = null;
|
|
|
16170 |
}
|
|
|
16171 |
|
|
|
16172 |
/** Returns true if field success is set (has been assigned a value) and false otherwise */
|
|
|
16173 |
public boolean isSetSuccess() {
|
|
|
16174 |
return this.success != null;
|
|
|
16175 |
}
|
|
|
16176 |
|
|
|
16177 |
public void setSuccessIsSet(boolean value) {
|
|
|
16178 |
if (!value) {
|
|
|
16179 |
this.success = null;
|
|
|
16180 |
}
|
|
|
16181 |
}
|
|
|
16182 |
|
|
|
16183 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
16184 |
switch (field) {
|
|
|
16185 |
case SUCCESS:
|
|
|
16186 |
if (value == null) {
|
|
|
16187 |
unsetSuccess();
|
|
|
16188 |
} else {
|
|
|
16189 |
setSuccess((Map<String,Double>)value);
|
|
|
16190 |
}
|
|
|
16191 |
break;
|
|
|
16192 |
|
|
|
16193 |
}
|
|
|
16194 |
}
|
|
|
16195 |
|
|
|
16196 |
public Object getFieldValue(_Fields field) {
|
|
|
16197 |
switch (field) {
|
|
|
16198 |
case SUCCESS:
|
|
|
16199 |
return getSuccess();
|
|
|
16200 |
|
|
|
16201 |
}
|
|
|
16202 |
throw new IllegalStateException();
|
|
|
16203 |
}
|
|
|
16204 |
|
|
|
16205 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
16206 |
public boolean isSet(_Fields field) {
|
|
|
16207 |
if (field == null) {
|
|
|
16208 |
throw new IllegalArgumentException();
|
|
|
16209 |
}
|
|
|
16210 |
|
|
|
16211 |
switch (field) {
|
|
|
16212 |
case SUCCESS:
|
|
|
16213 |
return isSetSuccess();
|
|
|
16214 |
}
|
|
|
16215 |
throw new IllegalStateException();
|
|
|
16216 |
}
|
|
|
16217 |
|
|
|
16218 |
@Override
|
|
|
16219 |
public boolean equals(Object that) {
|
|
|
16220 |
if (that == null)
|
|
|
16221 |
return false;
|
|
|
16222 |
if (that instanceof getDiscountsForEntity_result)
|
|
|
16223 |
return this.equals((getDiscountsForEntity_result)that);
|
|
|
16224 |
return false;
|
|
|
16225 |
}
|
|
|
16226 |
|
|
|
16227 |
public boolean equals(getDiscountsForEntity_result that) {
|
|
|
16228 |
if (that == null)
|
|
|
16229 |
return false;
|
|
|
16230 |
|
|
|
16231 |
boolean this_present_success = true && this.isSetSuccess();
|
|
|
16232 |
boolean that_present_success = true && that.isSetSuccess();
|
|
|
16233 |
if (this_present_success || that_present_success) {
|
|
|
16234 |
if (!(this_present_success && that_present_success))
|
|
|
16235 |
return false;
|
|
|
16236 |
if (!this.success.equals(that.success))
|
|
|
16237 |
return false;
|
|
|
16238 |
}
|
|
|
16239 |
|
|
|
16240 |
return true;
|
|
|
16241 |
}
|
|
|
16242 |
|
|
|
16243 |
@Override
|
|
|
16244 |
public int hashCode() {
|
|
|
16245 |
return 0;
|
|
|
16246 |
}
|
|
|
16247 |
|
|
|
16248 |
public int compareTo(getDiscountsForEntity_result other) {
|
|
|
16249 |
if (!getClass().equals(other.getClass())) {
|
|
|
16250 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
16251 |
}
|
|
|
16252 |
|
|
|
16253 |
int lastComparison = 0;
|
|
|
16254 |
getDiscountsForEntity_result typedOther = (getDiscountsForEntity_result)other;
|
|
|
16255 |
|
|
|
16256 |
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
|
|
|
16257 |
if (lastComparison != 0) {
|
|
|
16258 |
return lastComparison;
|
|
|
16259 |
}
|
|
|
16260 |
if (isSetSuccess()) {
|
|
|
16261 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
|
|
|
16262 |
if (lastComparison != 0) {
|
|
|
16263 |
return lastComparison;
|
|
|
16264 |
}
|
|
|
16265 |
}
|
|
|
16266 |
return 0;
|
|
|
16267 |
}
|
|
|
16268 |
|
|
|
16269 |
public _Fields fieldForId(int fieldId) {
|
|
|
16270 |
return _Fields.findByThriftId(fieldId);
|
|
|
16271 |
}
|
|
|
16272 |
|
|
|
16273 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
16274 |
org.apache.thrift.protocol.TField field;
|
|
|
16275 |
iprot.readStructBegin();
|
|
|
16276 |
while (true)
|
|
|
16277 |
{
|
|
|
16278 |
field = iprot.readFieldBegin();
|
|
|
16279 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
16280 |
break;
|
|
|
16281 |
}
|
|
|
16282 |
switch (field.id) {
|
|
|
16283 |
case 0: // SUCCESS
|
|
|
16284 |
if (field.type == org.apache.thrift.protocol.TType.MAP) {
|
|
|
16285 |
{
|
| 6736 |
amit.gupta |
16286 |
org.apache.thrift.protocol.TMap _map42 = iprot.readMapBegin();
|
|
|
16287 |
this.success = new HashMap<String,Double>(2*_map42.size);
|
|
|
16288 |
for (int _i43 = 0; _i43 < _map42.size; ++_i43)
|
| 4494 |
varun.gupt |
16289 |
{
|
| 6736 |
amit.gupta |
16290 |
String _key44; // required
|
|
|
16291 |
double _val45; // required
|
|
|
16292 |
_key44 = iprot.readString();
|
|
|
16293 |
_val45 = iprot.readDouble();
|
|
|
16294 |
this.success.put(_key44, _val45);
|
| 4494 |
varun.gupt |
16295 |
}
|
|
|
16296 |
iprot.readMapEnd();
|
|
|
16297 |
}
|
|
|
16298 |
} else {
|
|
|
16299 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
16300 |
}
|
|
|
16301 |
break;
|
|
|
16302 |
default:
|
|
|
16303 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
16304 |
}
|
|
|
16305 |
iprot.readFieldEnd();
|
|
|
16306 |
}
|
|
|
16307 |
iprot.readStructEnd();
|
|
|
16308 |
validate();
|
|
|
16309 |
}
|
|
|
16310 |
|
|
|
16311 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
16312 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
16313 |
|
|
|
16314 |
if (this.isSetSuccess()) {
|
|
|
16315 |
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
|
|
16316 |
{
|
|
|
16317 |
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, this.success.size()));
|
| 6736 |
amit.gupta |
16318 |
for (Map.Entry<String, Double> _iter46 : this.success.entrySet())
|
| 4494 |
varun.gupt |
16319 |
{
|
| 6736 |
amit.gupta |
16320 |
oprot.writeString(_iter46.getKey());
|
|
|
16321 |
oprot.writeDouble(_iter46.getValue());
|
| 4494 |
varun.gupt |
16322 |
}
|
|
|
16323 |
oprot.writeMapEnd();
|
|
|
16324 |
}
|
|
|
16325 |
oprot.writeFieldEnd();
|
|
|
16326 |
}
|
|
|
16327 |
oprot.writeFieldStop();
|
|
|
16328 |
oprot.writeStructEnd();
|
|
|
16329 |
}
|
|
|
16330 |
|
|
|
16331 |
@Override
|
|
|
16332 |
public String toString() {
|
|
|
16333 |
StringBuilder sb = new StringBuilder("getDiscountsForEntity_result(");
|
|
|
16334 |
boolean first = true;
|
|
|
16335 |
|
|
|
16336 |
sb.append("success:");
|
|
|
16337 |
if (this.success == null) {
|
|
|
16338 |
sb.append("null");
|
|
|
16339 |
} else {
|
|
|
16340 |
sb.append(this.success);
|
|
|
16341 |
}
|
|
|
16342 |
first = false;
|
|
|
16343 |
sb.append(")");
|
|
|
16344 |
return sb.toString();
|
|
|
16345 |
}
|
|
|
16346 |
|
|
|
16347 |
public void validate() throws org.apache.thrift.TException {
|
|
|
16348 |
// check for required fields
|
|
|
16349 |
}
|
|
|
16350 |
|
|
|
16351 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
16352 |
try {
|
|
|
16353 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
16354 |
} catch (org.apache.thrift.TException te) {
|
|
|
16355 |
throw new java.io.IOException(te);
|
|
|
16356 |
}
|
|
|
16357 |
}
|
|
|
16358 |
|
|
|
16359 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
16360 |
try {
|
|
|
16361 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
16362 |
} catch (org.apache.thrift.TException te) {
|
|
|
16363 |
throw new java.io.IOException(te);
|
|
|
16364 |
}
|
|
|
16365 |
}
|
|
|
16366 |
|
|
|
16367 |
}
|
|
|
16368 |
|
| 5469 |
rajveer |
16369 |
public static class addVoucher_args implements org.apache.thrift.TBase<addVoucher_args, addVoucher_args._Fields>, java.io.Serializable, Cloneable {
|
|
|
16370 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addVoucher_args");
|
|
|
16371 |
|
|
|
16372 |
private static final org.apache.thrift.protocol.TField VOUCHER_FIELD_DESC = new org.apache.thrift.protocol.TField("voucher", org.apache.thrift.protocol.TType.STRUCT, (short)1);
|
|
|
16373 |
|
|
|
16374 |
private Voucher voucher; // required
|
|
|
16375 |
|
|
|
16376 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
16377 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
16378 |
VOUCHER((short)1, "voucher");
|
|
|
16379 |
|
|
|
16380 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
16381 |
|
|
|
16382 |
static {
|
|
|
16383 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
16384 |
byName.put(field.getFieldName(), field);
|
|
|
16385 |
}
|
|
|
16386 |
}
|
|
|
16387 |
|
|
|
16388 |
/**
|
|
|
16389 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
16390 |
*/
|
|
|
16391 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
16392 |
switch(fieldId) {
|
|
|
16393 |
case 1: // VOUCHER
|
|
|
16394 |
return VOUCHER;
|
|
|
16395 |
default:
|
|
|
16396 |
return null;
|
|
|
16397 |
}
|
|
|
16398 |
}
|
|
|
16399 |
|
|
|
16400 |
/**
|
|
|
16401 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
16402 |
* if it is not found.
|
|
|
16403 |
*/
|
|
|
16404 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
16405 |
_Fields fields = findByThriftId(fieldId);
|
|
|
16406 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
16407 |
return fields;
|
|
|
16408 |
}
|
|
|
16409 |
|
|
|
16410 |
/**
|
|
|
16411 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
16412 |
*/
|
|
|
16413 |
public static _Fields findByName(String name) {
|
|
|
16414 |
return byName.get(name);
|
|
|
16415 |
}
|
|
|
16416 |
|
|
|
16417 |
private final short _thriftId;
|
|
|
16418 |
private final String _fieldName;
|
|
|
16419 |
|
|
|
16420 |
_Fields(short thriftId, String fieldName) {
|
|
|
16421 |
_thriftId = thriftId;
|
|
|
16422 |
_fieldName = fieldName;
|
|
|
16423 |
}
|
|
|
16424 |
|
|
|
16425 |
public short getThriftFieldId() {
|
|
|
16426 |
return _thriftId;
|
|
|
16427 |
}
|
|
|
16428 |
|
|
|
16429 |
public String getFieldName() {
|
|
|
16430 |
return _fieldName;
|
|
|
16431 |
}
|
|
|
16432 |
}
|
|
|
16433 |
|
|
|
16434 |
// isset id assignments
|
|
|
16435 |
|
|
|
16436 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
16437 |
static {
|
|
|
16438 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
16439 |
tmpMap.put(_Fields.VOUCHER, new org.apache.thrift.meta_data.FieldMetaData("voucher", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
16440 |
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Voucher.class)));
|
|
|
16441 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
16442 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addVoucher_args.class, metaDataMap);
|
|
|
16443 |
}
|
|
|
16444 |
|
|
|
16445 |
public addVoucher_args() {
|
|
|
16446 |
}
|
|
|
16447 |
|
|
|
16448 |
public addVoucher_args(
|
|
|
16449 |
Voucher voucher)
|
|
|
16450 |
{
|
|
|
16451 |
this();
|
|
|
16452 |
this.voucher = voucher;
|
|
|
16453 |
}
|
|
|
16454 |
|
|
|
16455 |
/**
|
|
|
16456 |
* Performs a deep copy on <i>other</i>.
|
|
|
16457 |
*/
|
|
|
16458 |
public addVoucher_args(addVoucher_args other) {
|
|
|
16459 |
if (other.isSetVoucher()) {
|
|
|
16460 |
this.voucher = new Voucher(other.voucher);
|
|
|
16461 |
}
|
|
|
16462 |
}
|
|
|
16463 |
|
|
|
16464 |
public addVoucher_args deepCopy() {
|
|
|
16465 |
return new addVoucher_args(this);
|
|
|
16466 |
}
|
|
|
16467 |
|
|
|
16468 |
@Override
|
|
|
16469 |
public void clear() {
|
|
|
16470 |
this.voucher = null;
|
|
|
16471 |
}
|
|
|
16472 |
|
|
|
16473 |
public Voucher getVoucher() {
|
|
|
16474 |
return this.voucher;
|
|
|
16475 |
}
|
|
|
16476 |
|
|
|
16477 |
public void setVoucher(Voucher voucher) {
|
|
|
16478 |
this.voucher = voucher;
|
|
|
16479 |
}
|
|
|
16480 |
|
|
|
16481 |
public void unsetVoucher() {
|
|
|
16482 |
this.voucher = null;
|
|
|
16483 |
}
|
|
|
16484 |
|
|
|
16485 |
/** Returns true if field voucher is set (has been assigned a value) and false otherwise */
|
|
|
16486 |
public boolean isSetVoucher() {
|
|
|
16487 |
return this.voucher != null;
|
|
|
16488 |
}
|
|
|
16489 |
|
|
|
16490 |
public void setVoucherIsSet(boolean value) {
|
|
|
16491 |
if (!value) {
|
|
|
16492 |
this.voucher = null;
|
|
|
16493 |
}
|
|
|
16494 |
}
|
|
|
16495 |
|
|
|
16496 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
16497 |
switch (field) {
|
|
|
16498 |
case VOUCHER:
|
|
|
16499 |
if (value == null) {
|
|
|
16500 |
unsetVoucher();
|
|
|
16501 |
} else {
|
|
|
16502 |
setVoucher((Voucher)value);
|
|
|
16503 |
}
|
|
|
16504 |
break;
|
|
|
16505 |
|
|
|
16506 |
}
|
|
|
16507 |
}
|
|
|
16508 |
|
|
|
16509 |
public Object getFieldValue(_Fields field) {
|
|
|
16510 |
switch (field) {
|
|
|
16511 |
case VOUCHER:
|
|
|
16512 |
return getVoucher();
|
|
|
16513 |
|
|
|
16514 |
}
|
|
|
16515 |
throw new IllegalStateException();
|
|
|
16516 |
}
|
|
|
16517 |
|
|
|
16518 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
16519 |
public boolean isSet(_Fields field) {
|
|
|
16520 |
if (field == null) {
|
|
|
16521 |
throw new IllegalArgumentException();
|
|
|
16522 |
}
|
|
|
16523 |
|
|
|
16524 |
switch (field) {
|
|
|
16525 |
case VOUCHER:
|
|
|
16526 |
return isSetVoucher();
|
|
|
16527 |
}
|
|
|
16528 |
throw new IllegalStateException();
|
|
|
16529 |
}
|
|
|
16530 |
|
|
|
16531 |
@Override
|
|
|
16532 |
public boolean equals(Object that) {
|
|
|
16533 |
if (that == null)
|
|
|
16534 |
return false;
|
|
|
16535 |
if (that instanceof addVoucher_args)
|
|
|
16536 |
return this.equals((addVoucher_args)that);
|
|
|
16537 |
return false;
|
|
|
16538 |
}
|
|
|
16539 |
|
|
|
16540 |
public boolean equals(addVoucher_args that) {
|
|
|
16541 |
if (that == null)
|
|
|
16542 |
return false;
|
|
|
16543 |
|
|
|
16544 |
boolean this_present_voucher = true && this.isSetVoucher();
|
|
|
16545 |
boolean that_present_voucher = true && that.isSetVoucher();
|
|
|
16546 |
if (this_present_voucher || that_present_voucher) {
|
|
|
16547 |
if (!(this_present_voucher && that_present_voucher))
|
|
|
16548 |
return false;
|
|
|
16549 |
if (!this.voucher.equals(that.voucher))
|
|
|
16550 |
return false;
|
|
|
16551 |
}
|
|
|
16552 |
|
|
|
16553 |
return true;
|
|
|
16554 |
}
|
|
|
16555 |
|
|
|
16556 |
@Override
|
|
|
16557 |
public int hashCode() {
|
|
|
16558 |
return 0;
|
|
|
16559 |
}
|
|
|
16560 |
|
|
|
16561 |
public int compareTo(addVoucher_args other) {
|
|
|
16562 |
if (!getClass().equals(other.getClass())) {
|
|
|
16563 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
16564 |
}
|
|
|
16565 |
|
|
|
16566 |
int lastComparison = 0;
|
|
|
16567 |
addVoucher_args typedOther = (addVoucher_args)other;
|
|
|
16568 |
|
|
|
16569 |
lastComparison = Boolean.valueOf(isSetVoucher()).compareTo(typedOther.isSetVoucher());
|
|
|
16570 |
if (lastComparison != 0) {
|
|
|
16571 |
return lastComparison;
|
|
|
16572 |
}
|
|
|
16573 |
if (isSetVoucher()) {
|
|
|
16574 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.voucher, typedOther.voucher);
|
|
|
16575 |
if (lastComparison != 0) {
|
|
|
16576 |
return lastComparison;
|
|
|
16577 |
}
|
|
|
16578 |
}
|
|
|
16579 |
return 0;
|
|
|
16580 |
}
|
|
|
16581 |
|
|
|
16582 |
public _Fields fieldForId(int fieldId) {
|
|
|
16583 |
return _Fields.findByThriftId(fieldId);
|
|
|
16584 |
}
|
|
|
16585 |
|
|
|
16586 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
16587 |
org.apache.thrift.protocol.TField field;
|
|
|
16588 |
iprot.readStructBegin();
|
|
|
16589 |
while (true)
|
|
|
16590 |
{
|
|
|
16591 |
field = iprot.readFieldBegin();
|
|
|
16592 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
16593 |
break;
|
|
|
16594 |
}
|
|
|
16595 |
switch (field.id) {
|
|
|
16596 |
case 1: // VOUCHER
|
|
|
16597 |
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
|
|
16598 |
this.voucher = new Voucher();
|
|
|
16599 |
this.voucher.read(iprot);
|
|
|
16600 |
} else {
|
|
|
16601 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
16602 |
}
|
|
|
16603 |
break;
|
|
|
16604 |
default:
|
|
|
16605 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
16606 |
}
|
|
|
16607 |
iprot.readFieldEnd();
|
|
|
16608 |
}
|
|
|
16609 |
iprot.readStructEnd();
|
|
|
16610 |
validate();
|
|
|
16611 |
}
|
|
|
16612 |
|
|
|
16613 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
16614 |
validate();
|
|
|
16615 |
|
|
|
16616 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
16617 |
if (this.voucher != null) {
|
|
|
16618 |
oprot.writeFieldBegin(VOUCHER_FIELD_DESC);
|
|
|
16619 |
this.voucher.write(oprot);
|
|
|
16620 |
oprot.writeFieldEnd();
|
|
|
16621 |
}
|
|
|
16622 |
oprot.writeFieldStop();
|
|
|
16623 |
oprot.writeStructEnd();
|
|
|
16624 |
}
|
|
|
16625 |
|
|
|
16626 |
@Override
|
|
|
16627 |
public String toString() {
|
|
|
16628 |
StringBuilder sb = new StringBuilder("addVoucher_args(");
|
|
|
16629 |
boolean first = true;
|
|
|
16630 |
|
|
|
16631 |
sb.append("voucher:");
|
|
|
16632 |
if (this.voucher == null) {
|
|
|
16633 |
sb.append("null");
|
|
|
16634 |
} else {
|
|
|
16635 |
sb.append(this.voucher);
|
|
|
16636 |
}
|
|
|
16637 |
first = false;
|
|
|
16638 |
sb.append(")");
|
|
|
16639 |
return sb.toString();
|
|
|
16640 |
}
|
|
|
16641 |
|
|
|
16642 |
public void validate() throws org.apache.thrift.TException {
|
|
|
16643 |
// check for required fields
|
|
|
16644 |
}
|
|
|
16645 |
|
|
|
16646 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
16647 |
try {
|
|
|
16648 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
16649 |
} catch (org.apache.thrift.TException te) {
|
|
|
16650 |
throw new java.io.IOException(te);
|
|
|
16651 |
}
|
|
|
16652 |
}
|
|
|
16653 |
|
|
|
16654 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
16655 |
try {
|
|
|
16656 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
16657 |
} catch (org.apache.thrift.TException te) {
|
|
|
16658 |
throw new java.io.IOException(te);
|
|
|
16659 |
}
|
|
|
16660 |
}
|
|
|
16661 |
|
|
|
16662 |
}
|
|
|
16663 |
|
|
|
16664 |
public static class addVoucher_result implements org.apache.thrift.TBase<addVoucher_result, addVoucher_result._Fields>, java.io.Serializable, Cloneable {
|
|
|
16665 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addVoucher_result");
|
|
|
16666 |
|
|
|
16667 |
|
|
|
16668 |
|
|
|
16669 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
16670 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
16671 |
;
|
|
|
16672 |
|
|
|
16673 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
16674 |
|
|
|
16675 |
static {
|
|
|
16676 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
16677 |
byName.put(field.getFieldName(), field);
|
|
|
16678 |
}
|
|
|
16679 |
}
|
|
|
16680 |
|
|
|
16681 |
/**
|
|
|
16682 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
16683 |
*/
|
|
|
16684 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
16685 |
switch(fieldId) {
|
|
|
16686 |
default:
|
|
|
16687 |
return null;
|
|
|
16688 |
}
|
|
|
16689 |
}
|
|
|
16690 |
|
|
|
16691 |
/**
|
|
|
16692 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
16693 |
* if it is not found.
|
|
|
16694 |
*/
|
|
|
16695 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
16696 |
_Fields fields = findByThriftId(fieldId);
|
|
|
16697 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
16698 |
return fields;
|
|
|
16699 |
}
|
|
|
16700 |
|
|
|
16701 |
/**
|
|
|
16702 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
16703 |
*/
|
|
|
16704 |
public static _Fields findByName(String name) {
|
|
|
16705 |
return byName.get(name);
|
|
|
16706 |
}
|
|
|
16707 |
|
|
|
16708 |
private final short _thriftId;
|
|
|
16709 |
private final String _fieldName;
|
|
|
16710 |
|
|
|
16711 |
_Fields(short thriftId, String fieldName) {
|
|
|
16712 |
_thriftId = thriftId;
|
|
|
16713 |
_fieldName = fieldName;
|
|
|
16714 |
}
|
|
|
16715 |
|
|
|
16716 |
public short getThriftFieldId() {
|
|
|
16717 |
return _thriftId;
|
|
|
16718 |
}
|
|
|
16719 |
|
|
|
16720 |
public String getFieldName() {
|
|
|
16721 |
return _fieldName;
|
|
|
16722 |
}
|
|
|
16723 |
}
|
|
|
16724 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
16725 |
static {
|
|
|
16726 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
16727 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
16728 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addVoucher_result.class, metaDataMap);
|
|
|
16729 |
}
|
|
|
16730 |
|
|
|
16731 |
public addVoucher_result() {
|
|
|
16732 |
}
|
|
|
16733 |
|
|
|
16734 |
/**
|
|
|
16735 |
* Performs a deep copy on <i>other</i>.
|
|
|
16736 |
*/
|
|
|
16737 |
public addVoucher_result(addVoucher_result other) {
|
|
|
16738 |
}
|
|
|
16739 |
|
|
|
16740 |
public addVoucher_result deepCopy() {
|
|
|
16741 |
return new addVoucher_result(this);
|
|
|
16742 |
}
|
|
|
16743 |
|
|
|
16744 |
@Override
|
|
|
16745 |
public void clear() {
|
|
|
16746 |
}
|
|
|
16747 |
|
|
|
16748 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
16749 |
switch (field) {
|
|
|
16750 |
}
|
|
|
16751 |
}
|
|
|
16752 |
|
|
|
16753 |
public Object getFieldValue(_Fields field) {
|
|
|
16754 |
switch (field) {
|
|
|
16755 |
}
|
|
|
16756 |
throw new IllegalStateException();
|
|
|
16757 |
}
|
|
|
16758 |
|
|
|
16759 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
16760 |
public boolean isSet(_Fields field) {
|
|
|
16761 |
if (field == null) {
|
|
|
16762 |
throw new IllegalArgumentException();
|
|
|
16763 |
}
|
|
|
16764 |
|
|
|
16765 |
switch (field) {
|
|
|
16766 |
}
|
|
|
16767 |
throw new IllegalStateException();
|
|
|
16768 |
}
|
|
|
16769 |
|
|
|
16770 |
@Override
|
|
|
16771 |
public boolean equals(Object that) {
|
|
|
16772 |
if (that == null)
|
|
|
16773 |
return false;
|
|
|
16774 |
if (that instanceof addVoucher_result)
|
|
|
16775 |
return this.equals((addVoucher_result)that);
|
|
|
16776 |
return false;
|
|
|
16777 |
}
|
|
|
16778 |
|
|
|
16779 |
public boolean equals(addVoucher_result that) {
|
|
|
16780 |
if (that == null)
|
|
|
16781 |
return false;
|
|
|
16782 |
|
|
|
16783 |
return true;
|
|
|
16784 |
}
|
|
|
16785 |
|
|
|
16786 |
@Override
|
|
|
16787 |
public int hashCode() {
|
|
|
16788 |
return 0;
|
|
|
16789 |
}
|
|
|
16790 |
|
|
|
16791 |
public int compareTo(addVoucher_result other) {
|
|
|
16792 |
if (!getClass().equals(other.getClass())) {
|
|
|
16793 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
16794 |
}
|
|
|
16795 |
|
|
|
16796 |
int lastComparison = 0;
|
|
|
16797 |
addVoucher_result typedOther = (addVoucher_result)other;
|
|
|
16798 |
|
|
|
16799 |
return 0;
|
|
|
16800 |
}
|
|
|
16801 |
|
|
|
16802 |
public _Fields fieldForId(int fieldId) {
|
|
|
16803 |
return _Fields.findByThriftId(fieldId);
|
|
|
16804 |
}
|
|
|
16805 |
|
|
|
16806 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
16807 |
org.apache.thrift.protocol.TField field;
|
|
|
16808 |
iprot.readStructBegin();
|
|
|
16809 |
while (true)
|
|
|
16810 |
{
|
|
|
16811 |
field = iprot.readFieldBegin();
|
|
|
16812 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
16813 |
break;
|
|
|
16814 |
}
|
|
|
16815 |
switch (field.id) {
|
|
|
16816 |
default:
|
|
|
16817 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
16818 |
}
|
|
|
16819 |
iprot.readFieldEnd();
|
|
|
16820 |
}
|
|
|
16821 |
iprot.readStructEnd();
|
|
|
16822 |
validate();
|
|
|
16823 |
}
|
|
|
16824 |
|
|
|
16825 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
16826 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
16827 |
|
|
|
16828 |
oprot.writeFieldStop();
|
|
|
16829 |
oprot.writeStructEnd();
|
|
|
16830 |
}
|
|
|
16831 |
|
|
|
16832 |
@Override
|
|
|
16833 |
public String toString() {
|
|
|
16834 |
StringBuilder sb = new StringBuilder("addVoucher_result(");
|
|
|
16835 |
boolean first = true;
|
|
|
16836 |
|
|
|
16837 |
sb.append(")");
|
|
|
16838 |
return sb.toString();
|
|
|
16839 |
}
|
|
|
16840 |
|
|
|
16841 |
public void validate() throws org.apache.thrift.TException {
|
|
|
16842 |
// check for required fields
|
|
|
16843 |
}
|
|
|
16844 |
|
|
|
16845 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
16846 |
try {
|
|
|
16847 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
16848 |
} catch (org.apache.thrift.TException te) {
|
|
|
16849 |
throw new java.io.IOException(te);
|
|
|
16850 |
}
|
|
|
16851 |
}
|
|
|
16852 |
|
|
|
16853 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
16854 |
try {
|
|
|
16855 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
16856 |
} catch (org.apache.thrift.TException te) {
|
|
|
16857 |
throw new java.io.IOException(te);
|
|
|
16858 |
}
|
|
|
16859 |
}
|
|
|
16860 |
|
|
|
16861 |
}
|
|
|
16862 |
|
|
|
16863 |
public static class assignVoucher_args implements org.apache.thrift.TBase<assignVoucher_args, assignVoucher_args._Fields>, java.io.Serializable, Cloneable {
|
|
|
16864 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("assignVoucher_args");
|
|
|
16865 |
|
|
|
16866 |
private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);
|
|
|
16867 |
private static final org.apache.thrift.protocol.TField USER_EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("userEmail", org.apache.thrift.protocol.TType.STRING, (short)2);
|
|
|
16868 |
private static final org.apache.thrift.protocol.TField VOUCHER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("voucherType", org.apache.thrift.protocol.TType.I32, (short)3);
|
|
|
16869 |
private static final org.apache.thrift.protocol.TField AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("amount", org.apache.thrift.protocol.TType.I64, (short)4);
|
|
|
16870 |
|
|
|
16871 |
private long userId; // required
|
|
|
16872 |
private String userEmail; // required
|
|
|
16873 |
private VoucherType voucherType; // required
|
|
|
16874 |
private long amount; // required
|
|
|
16875 |
|
|
|
16876 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
16877 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
16878 |
USER_ID((short)1, "userId"),
|
|
|
16879 |
USER_EMAIL((short)2, "userEmail"),
|
|
|
16880 |
/**
|
|
|
16881 |
*
|
|
|
16882 |
* @see VoucherType
|
|
|
16883 |
*/
|
|
|
16884 |
VOUCHER_TYPE((short)3, "voucherType"),
|
|
|
16885 |
AMOUNT((short)4, "amount");
|
|
|
16886 |
|
|
|
16887 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
16888 |
|
|
|
16889 |
static {
|
|
|
16890 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
16891 |
byName.put(field.getFieldName(), field);
|
|
|
16892 |
}
|
|
|
16893 |
}
|
|
|
16894 |
|
|
|
16895 |
/**
|
|
|
16896 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
16897 |
*/
|
|
|
16898 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
16899 |
switch(fieldId) {
|
|
|
16900 |
case 1: // USER_ID
|
|
|
16901 |
return USER_ID;
|
|
|
16902 |
case 2: // USER_EMAIL
|
|
|
16903 |
return USER_EMAIL;
|
|
|
16904 |
case 3: // VOUCHER_TYPE
|
|
|
16905 |
return VOUCHER_TYPE;
|
|
|
16906 |
case 4: // AMOUNT
|
|
|
16907 |
return AMOUNT;
|
|
|
16908 |
default:
|
|
|
16909 |
return null;
|
|
|
16910 |
}
|
|
|
16911 |
}
|
|
|
16912 |
|
|
|
16913 |
/**
|
|
|
16914 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
16915 |
* if it is not found.
|
|
|
16916 |
*/
|
|
|
16917 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
16918 |
_Fields fields = findByThriftId(fieldId);
|
|
|
16919 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
16920 |
return fields;
|
|
|
16921 |
}
|
|
|
16922 |
|
|
|
16923 |
/**
|
|
|
16924 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
16925 |
*/
|
|
|
16926 |
public static _Fields findByName(String name) {
|
|
|
16927 |
return byName.get(name);
|
|
|
16928 |
}
|
|
|
16929 |
|
|
|
16930 |
private final short _thriftId;
|
|
|
16931 |
private final String _fieldName;
|
|
|
16932 |
|
|
|
16933 |
_Fields(short thriftId, String fieldName) {
|
|
|
16934 |
_thriftId = thriftId;
|
|
|
16935 |
_fieldName = fieldName;
|
|
|
16936 |
}
|
|
|
16937 |
|
|
|
16938 |
public short getThriftFieldId() {
|
|
|
16939 |
return _thriftId;
|
|
|
16940 |
}
|
|
|
16941 |
|
|
|
16942 |
public String getFieldName() {
|
|
|
16943 |
return _fieldName;
|
|
|
16944 |
}
|
|
|
16945 |
}
|
|
|
16946 |
|
|
|
16947 |
// isset id assignments
|
|
|
16948 |
private static final int __USERID_ISSET_ID = 0;
|
|
|
16949 |
private static final int __AMOUNT_ISSET_ID = 1;
|
|
|
16950 |
private BitSet __isset_bit_vector = new BitSet(2);
|
|
|
16951 |
|
|
|
16952 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
16953 |
static {
|
|
|
16954 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
16955 |
tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
16956 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
16957 |
tmpMap.put(_Fields.USER_EMAIL, new org.apache.thrift.meta_data.FieldMetaData("userEmail", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
16958 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
16959 |
tmpMap.put(_Fields.VOUCHER_TYPE, new org.apache.thrift.meta_data.FieldMetaData("voucherType", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
16960 |
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, VoucherType.class)));
|
|
|
16961 |
tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
16962 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
16963 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
16964 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(assignVoucher_args.class, metaDataMap);
|
|
|
16965 |
}
|
|
|
16966 |
|
|
|
16967 |
public assignVoucher_args() {
|
|
|
16968 |
}
|
|
|
16969 |
|
|
|
16970 |
public assignVoucher_args(
|
|
|
16971 |
long userId,
|
|
|
16972 |
String userEmail,
|
|
|
16973 |
VoucherType voucherType,
|
|
|
16974 |
long amount)
|
|
|
16975 |
{
|
|
|
16976 |
this();
|
|
|
16977 |
this.userId = userId;
|
|
|
16978 |
setUserIdIsSet(true);
|
|
|
16979 |
this.userEmail = userEmail;
|
|
|
16980 |
this.voucherType = voucherType;
|
|
|
16981 |
this.amount = amount;
|
|
|
16982 |
setAmountIsSet(true);
|
|
|
16983 |
}
|
|
|
16984 |
|
|
|
16985 |
/**
|
|
|
16986 |
* Performs a deep copy on <i>other</i>.
|
|
|
16987 |
*/
|
|
|
16988 |
public assignVoucher_args(assignVoucher_args other) {
|
|
|
16989 |
__isset_bit_vector.clear();
|
|
|
16990 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
16991 |
this.userId = other.userId;
|
|
|
16992 |
if (other.isSetUserEmail()) {
|
|
|
16993 |
this.userEmail = other.userEmail;
|
|
|
16994 |
}
|
|
|
16995 |
if (other.isSetVoucherType()) {
|
|
|
16996 |
this.voucherType = other.voucherType;
|
|
|
16997 |
}
|
|
|
16998 |
this.amount = other.amount;
|
|
|
16999 |
}
|
|
|
17000 |
|
|
|
17001 |
public assignVoucher_args deepCopy() {
|
|
|
17002 |
return new assignVoucher_args(this);
|
|
|
17003 |
}
|
|
|
17004 |
|
|
|
17005 |
@Override
|
|
|
17006 |
public void clear() {
|
|
|
17007 |
setUserIdIsSet(false);
|
|
|
17008 |
this.userId = 0;
|
|
|
17009 |
this.userEmail = null;
|
|
|
17010 |
this.voucherType = null;
|
|
|
17011 |
setAmountIsSet(false);
|
|
|
17012 |
this.amount = 0;
|
|
|
17013 |
}
|
|
|
17014 |
|
|
|
17015 |
public long getUserId() {
|
|
|
17016 |
return this.userId;
|
|
|
17017 |
}
|
|
|
17018 |
|
|
|
17019 |
public void setUserId(long userId) {
|
|
|
17020 |
this.userId = userId;
|
|
|
17021 |
setUserIdIsSet(true);
|
|
|
17022 |
}
|
|
|
17023 |
|
|
|
17024 |
public void unsetUserId() {
|
|
|
17025 |
__isset_bit_vector.clear(__USERID_ISSET_ID);
|
|
|
17026 |
}
|
|
|
17027 |
|
|
|
17028 |
/** Returns true if field userId is set (has been assigned a value) and false otherwise */
|
|
|
17029 |
public boolean isSetUserId() {
|
|
|
17030 |
return __isset_bit_vector.get(__USERID_ISSET_ID);
|
|
|
17031 |
}
|
|
|
17032 |
|
|
|
17033 |
public void setUserIdIsSet(boolean value) {
|
|
|
17034 |
__isset_bit_vector.set(__USERID_ISSET_ID, value);
|
|
|
17035 |
}
|
|
|
17036 |
|
|
|
17037 |
public String getUserEmail() {
|
|
|
17038 |
return this.userEmail;
|
|
|
17039 |
}
|
|
|
17040 |
|
|
|
17041 |
public void setUserEmail(String userEmail) {
|
|
|
17042 |
this.userEmail = userEmail;
|
|
|
17043 |
}
|
|
|
17044 |
|
|
|
17045 |
public void unsetUserEmail() {
|
|
|
17046 |
this.userEmail = null;
|
|
|
17047 |
}
|
|
|
17048 |
|
|
|
17049 |
/** Returns true if field userEmail is set (has been assigned a value) and false otherwise */
|
|
|
17050 |
public boolean isSetUserEmail() {
|
|
|
17051 |
return this.userEmail != null;
|
|
|
17052 |
}
|
|
|
17053 |
|
|
|
17054 |
public void setUserEmailIsSet(boolean value) {
|
|
|
17055 |
if (!value) {
|
|
|
17056 |
this.userEmail = null;
|
|
|
17057 |
}
|
|
|
17058 |
}
|
|
|
17059 |
|
|
|
17060 |
/**
|
|
|
17061 |
*
|
|
|
17062 |
* @see VoucherType
|
|
|
17063 |
*/
|
|
|
17064 |
public VoucherType getVoucherType() {
|
|
|
17065 |
return this.voucherType;
|
|
|
17066 |
}
|
|
|
17067 |
|
|
|
17068 |
/**
|
|
|
17069 |
*
|
|
|
17070 |
* @see VoucherType
|
|
|
17071 |
*/
|
|
|
17072 |
public void setVoucherType(VoucherType voucherType) {
|
|
|
17073 |
this.voucherType = voucherType;
|
|
|
17074 |
}
|
|
|
17075 |
|
|
|
17076 |
public void unsetVoucherType() {
|
|
|
17077 |
this.voucherType = null;
|
|
|
17078 |
}
|
|
|
17079 |
|
|
|
17080 |
/** Returns true if field voucherType is set (has been assigned a value) and false otherwise */
|
|
|
17081 |
public boolean isSetVoucherType() {
|
|
|
17082 |
return this.voucherType != null;
|
|
|
17083 |
}
|
|
|
17084 |
|
|
|
17085 |
public void setVoucherTypeIsSet(boolean value) {
|
|
|
17086 |
if (!value) {
|
|
|
17087 |
this.voucherType = null;
|
|
|
17088 |
}
|
|
|
17089 |
}
|
|
|
17090 |
|
|
|
17091 |
public long getAmount() {
|
|
|
17092 |
return this.amount;
|
|
|
17093 |
}
|
|
|
17094 |
|
|
|
17095 |
public void setAmount(long amount) {
|
|
|
17096 |
this.amount = amount;
|
|
|
17097 |
setAmountIsSet(true);
|
|
|
17098 |
}
|
|
|
17099 |
|
|
|
17100 |
public void unsetAmount() {
|
|
|
17101 |
__isset_bit_vector.clear(__AMOUNT_ISSET_ID);
|
|
|
17102 |
}
|
|
|
17103 |
|
|
|
17104 |
/** Returns true if field amount is set (has been assigned a value) and false otherwise */
|
|
|
17105 |
public boolean isSetAmount() {
|
|
|
17106 |
return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
|
|
|
17107 |
}
|
|
|
17108 |
|
|
|
17109 |
public void setAmountIsSet(boolean value) {
|
|
|
17110 |
__isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
|
|
|
17111 |
}
|
|
|
17112 |
|
|
|
17113 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
17114 |
switch (field) {
|
|
|
17115 |
case USER_ID:
|
|
|
17116 |
if (value == null) {
|
|
|
17117 |
unsetUserId();
|
|
|
17118 |
} else {
|
|
|
17119 |
setUserId((Long)value);
|
|
|
17120 |
}
|
|
|
17121 |
break;
|
|
|
17122 |
|
|
|
17123 |
case USER_EMAIL:
|
|
|
17124 |
if (value == null) {
|
|
|
17125 |
unsetUserEmail();
|
|
|
17126 |
} else {
|
|
|
17127 |
setUserEmail((String)value);
|
|
|
17128 |
}
|
|
|
17129 |
break;
|
|
|
17130 |
|
|
|
17131 |
case VOUCHER_TYPE:
|
|
|
17132 |
if (value == null) {
|
|
|
17133 |
unsetVoucherType();
|
|
|
17134 |
} else {
|
|
|
17135 |
setVoucherType((VoucherType)value);
|
|
|
17136 |
}
|
|
|
17137 |
break;
|
|
|
17138 |
|
|
|
17139 |
case AMOUNT:
|
|
|
17140 |
if (value == null) {
|
|
|
17141 |
unsetAmount();
|
|
|
17142 |
} else {
|
|
|
17143 |
setAmount((Long)value);
|
|
|
17144 |
}
|
|
|
17145 |
break;
|
|
|
17146 |
|
|
|
17147 |
}
|
|
|
17148 |
}
|
|
|
17149 |
|
|
|
17150 |
public Object getFieldValue(_Fields field) {
|
|
|
17151 |
switch (field) {
|
|
|
17152 |
case USER_ID:
|
|
|
17153 |
return Long.valueOf(getUserId());
|
|
|
17154 |
|
|
|
17155 |
case USER_EMAIL:
|
|
|
17156 |
return getUserEmail();
|
|
|
17157 |
|
|
|
17158 |
case VOUCHER_TYPE:
|
|
|
17159 |
return getVoucherType();
|
|
|
17160 |
|
|
|
17161 |
case AMOUNT:
|
|
|
17162 |
return Long.valueOf(getAmount());
|
|
|
17163 |
|
|
|
17164 |
}
|
|
|
17165 |
throw new IllegalStateException();
|
|
|
17166 |
}
|
|
|
17167 |
|
|
|
17168 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
17169 |
public boolean isSet(_Fields field) {
|
|
|
17170 |
if (field == null) {
|
|
|
17171 |
throw new IllegalArgumentException();
|
|
|
17172 |
}
|
|
|
17173 |
|
|
|
17174 |
switch (field) {
|
|
|
17175 |
case USER_ID:
|
|
|
17176 |
return isSetUserId();
|
|
|
17177 |
case USER_EMAIL:
|
|
|
17178 |
return isSetUserEmail();
|
|
|
17179 |
case VOUCHER_TYPE:
|
|
|
17180 |
return isSetVoucherType();
|
|
|
17181 |
case AMOUNT:
|
|
|
17182 |
return isSetAmount();
|
|
|
17183 |
}
|
|
|
17184 |
throw new IllegalStateException();
|
|
|
17185 |
}
|
|
|
17186 |
|
|
|
17187 |
@Override
|
|
|
17188 |
public boolean equals(Object that) {
|
|
|
17189 |
if (that == null)
|
|
|
17190 |
return false;
|
|
|
17191 |
if (that instanceof assignVoucher_args)
|
|
|
17192 |
return this.equals((assignVoucher_args)that);
|
|
|
17193 |
return false;
|
|
|
17194 |
}
|
|
|
17195 |
|
|
|
17196 |
public boolean equals(assignVoucher_args that) {
|
|
|
17197 |
if (that == null)
|
|
|
17198 |
return false;
|
|
|
17199 |
|
|
|
17200 |
boolean this_present_userId = true;
|
|
|
17201 |
boolean that_present_userId = true;
|
|
|
17202 |
if (this_present_userId || that_present_userId) {
|
|
|
17203 |
if (!(this_present_userId && that_present_userId))
|
|
|
17204 |
return false;
|
|
|
17205 |
if (this.userId != that.userId)
|
|
|
17206 |
return false;
|
|
|
17207 |
}
|
|
|
17208 |
|
|
|
17209 |
boolean this_present_userEmail = true && this.isSetUserEmail();
|
|
|
17210 |
boolean that_present_userEmail = true && that.isSetUserEmail();
|
|
|
17211 |
if (this_present_userEmail || that_present_userEmail) {
|
|
|
17212 |
if (!(this_present_userEmail && that_present_userEmail))
|
|
|
17213 |
return false;
|
|
|
17214 |
if (!this.userEmail.equals(that.userEmail))
|
|
|
17215 |
return false;
|
|
|
17216 |
}
|
|
|
17217 |
|
|
|
17218 |
boolean this_present_voucherType = true && this.isSetVoucherType();
|
|
|
17219 |
boolean that_present_voucherType = true && that.isSetVoucherType();
|
|
|
17220 |
if (this_present_voucherType || that_present_voucherType) {
|
|
|
17221 |
if (!(this_present_voucherType && that_present_voucherType))
|
|
|
17222 |
return false;
|
|
|
17223 |
if (!this.voucherType.equals(that.voucherType))
|
|
|
17224 |
return false;
|
|
|
17225 |
}
|
|
|
17226 |
|
|
|
17227 |
boolean this_present_amount = true;
|
|
|
17228 |
boolean that_present_amount = true;
|
|
|
17229 |
if (this_present_amount || that_present_amount) {
|
|
|
17230 |
if (!(this_present_amount && that_present_amount))
|
|
|
17231 |
return false;
|
|
|
17232 |
if (this.amount != that.amount)
|
|
|
17233 |
return false;
|
|
|
17234 |
}
|
|
|
17235 |
|
|
|
17236 |
return true;
|
|
|
17237 |
}
|
|
|
17238 |
|
|
|
17239 |
@Override
|
|
|
17240 |
public int hashCode() {
|
|
|
17241 |
return 0;
|
|
|
17242 |
}
|
|
|
17243 |
|
|
|
17244 |
public int compareTo(assignVoucher_args other) {
|
|
|
17245 |
if (!getClass().equals(other.getClass())) {
|
|
|
17246 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
17247 |
}
|
|
|
17248 |
|
|
|
17249 |
int lastComparison = 0;
|
|
|
17250 |
assignVoucher_args typedOther = (assignVoucher_args)other;
|
|
|
17251 |
|
|
|
17252 |
lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
|
|
|
17253 |
if (lastComparison != 0) {
|
|
|
17254 |
return lastComparison;
|
|
|
17255 |
}
|
|
|
17256 |
if (isSetUserId()) {
|
|
|
17257 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
|
|
|
17258 |
if (lastComparison != 0) {
|
|
|
17259 |
return lastComparison;
|
|
|
17260 |
}
|
|
|
17261 |
}
|
|
|
17262 |
lastComparison = Boolean.valueOf(isSetUserEmail()).compareTo(typedOther.isSetUserEmail());
|
|
|
17263 |
if (lastComparison != 0) {
|
|
|
17264 |
return lastComparison;
|
|
|
17265 |
}
|
|
|
17266 |
if (isSetUserEmail()) {
|
|
|
17267 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userEmail, typedOther.userEmail);
|
|
|
17268 |
if (lastComparison != 0) {
|
|
|
17269 |
return lastComparison;
|
|
|
17270 |
}
|
|
|
17271 |
}
|
|
|
17272 |
lastComparison = Boolean.valueOf(isSetVoucherType()).compareTo(typedOther.isSetVoucherType());
|
|
|
17273 |
if (lastComparison != 0) {
|
|
|
17274 |
return lastComparison;
|
|
|
17275 |
}
|
|
|
17276 |
if (isSetVoucherType()) {
|
|
|
17277 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.voucherType, typedOther.voucherType);
|
|
|
17278 |
if (lastComparison != 0) {
|
|
|
17279 |
return lastComparison;
|
|
|
17280 |
}
|
|
|
17281 |
}
|
|
|
17282 |
lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
|
|
|
17283 |
if (lastComparison != 0) {
|
|
|
17284 |
return lastComparison;
|
|
|
17285 |
}
|
|
|
17286 |
if (isSetAmount()) {
|
|
|
17287 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
|
|
|
17288 |
if (lastComparison != 0) {
|
|
|
17289 |
return lastComparison;
|
|
|
17290 |
}
|
|
|
17291 |
}
|
|
|
17292 |
return 0;
|
|
|
17293 |
}
|
|
|
17294 |
|
|
|
17295 |
public _Fields fieldForId(int fieldId) {
|
|
|
17296 |
return _Fields.findByThriftId(fieldId);
|
|
|
17297 |
}
|
|
|
17298 |
|
|
|
17299 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
17300 |
org.apache.thrift.protocol.TField field;
|
|
|
17301 |
iprot.readStructBegin();
|
|
|
17302 |
while (true)
|
|
|
17303 |
{
|
|
|
17304 |
field = iprot.readFieldBegin();
|
|
|
17305 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
17306 |
break;
|
|
|
17307 |
}
|
|
|
17308 |
switch (field.id) {
|
|
|
17309 |
case 1: // USER_ID
|
|
|
17310 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
17311 |
this.userId = iprot.readI64();
|
|
|
17312 |
setUserIdIsSet(true);
|
|
|
17313 |
} else {
|
|
|
17314 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
17315 |
}
|
|
|
17316 |
break;
|
|
|
17317 |
case 2: // USER_EMAIL
|
|
|
17318 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
17319 |
this.userEmail = iprot.readString();
|
|
|
17320 |
} else {
|
|
|
17321 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
17322 |
}
|
|
|
17323 |
break;
|
|
|
17324 |
case 3: // VOUCHER_TYPE
|
|
|
17325 |
if (field.type == org.apache.thrift.protocol.TType.I32) {
|
|
|
17326 |
this.voucherType = VoucherType.findByValue(iprot.readI32());
|
|
|
17327 |
} else {
|
|
|
17328 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
17329 |
}
|
|
|
17330 |
break;
|
|
|
17331 |
case 4: // AMOUNT
|
|
|
17332 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
17333 |
this.amount = iprot.readI64();
|
|
|
17334 |
setAmountIsSet(true);
|
|
|
17335 |
} else {
|
|
|
17336 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
17337 |
}
|
|
|
17338 |
break;
|
|
|
17339 |
default:
|
|
|
17340 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
17341 |
}
|
|
|
17342 |
iprot.readFieldEnd();
|
|
|
17343 |
}
|
|
|
17344 |
iprot.readStructEnd();
|
|
|
17345 |
validate();
|
|
|
17346 |
}
|
|
|
17347 |
|
|
|
17348 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
17349 |
validate();
|
|
|
17350 |
|
|
|
17351 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
17352 |
oprot.writeFieldBegin(USER_ID_FIELD_DESC);
|
|
|
17353 |
oprot.writeI64(this.userId);
|
|
|
17354 |
oprot.writeFieldEnd();
|
|
|
17355 |
if (this.userEmail != null) {
|
|
|
17356 |
oprot.writeFieldBegin(USER_EMAIL_FIELD_DESC);
|
|
|
17357 |
oprot.writeString(this.userEmail);
|
|
|
17358 |
oprot.writeFieldEnd();
|
|
|
17359 |
}
|
|
|
17360 |
if (this.voucherType != null) {
|
|
|
17361 |
oprot.writeFieldBegin(VOUCHER_TYPE_FIELD_DESC);
|
|
|
17362 |
oprot.writeI32(this.voucherType.getValue());
|
|
|
17363 |
oprot.writeFieldEnd();
|
|
|
17364 |
}
|
|
|
17365 |
oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
|
|
|
17366 |
oprot.writeI64(this.amount);
|
|
|
17367 |
oprot.writeFieldEnd();
|
|
|
17368 |
oprot.writeFieldStop();
|
|
|
17369 |
oprot.writeStructEnd();
|
|
|
17370 |
}
|
|
|
17371 |
|
|
|
17372 |
@Override
|
|
|
17373 |
public String toString() {
|
|
|
17374 |
StringBuilder sb = new StringBuilder("assignVoucher_args(");
|
|
|
17375 |
boolean first = true;
|
|
|
17376 |
|
|
|
17377 |
sb.append("userId:");
|
|
|
17378 |
sb.append(this.userId);
|
|
|
17379 |
first = false;
|
|
|
17380 |
if (!first) sb.append(", ");
|
|
|
17381 |
sb.append("userEmail:");
|
|
|
17382 |
if (this.userEmail == null) {
|
|
|
17383 |
sb.append("null");
|
|
|
17384 |
} else {
|
|
|
17385 |
sb.append(this.userEmail);
|
|
|
17386 |
}
|
|
|
17387 |
first = false;
|
|
|
17388 |
if (!first) sb.append(", ");
|
|
|
17389 |
sb.append("voucherType:");
|
|
|
17390 |
if (this.voucherType == null) {
|
|
|
17391 |
sb.append("null");
|
|
|
17392 |
} else {
|
|
|
17393 |
sb.append(this.voucherType);
|
|
|
17394 |
}
|
|
|
17395 |
first = false;
|
|
|
17396 |
if (!first) sb.append(", ");
|
|
|
17397 |
sb.append("amount:");
|
|
|
17398 |
sb.append(this.amount);
|
|
|
17399 |
first = false;
|
|
|
17400 |
sb.append(")");
|
|
|
17401 |
return sb.toString();
|
|
|
17402 |
}
|
|
|
17403 |
|
|
|
17404 |
public void validate() throws org.apache.thrift.TException {
|
|
|
17405 |
// check for required fields
|
|
|
17406 |
}
|
|
|
17407 |
|
|
|
17408 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
17409 |
try {
|
|
|
17410 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
17411 |
} catch (org.apache.thrift.TException te) {
|
|
|
17412 |
throw new java.io.IOException(te);
|
|
|
17413 |
}
|
|
|
17414 |
}
|
|
|
17415 |
|
|
|
17416 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
17417 |
try {
|
|
|
17418 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
17419 |
__isset_bit_vector = new BitSet(1);
|
|
|
17420 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
17421 |
} catch (org.apache.thrift.TException te) {
|
|
|
17422 |
throw new java.io.IOException(te);
|
|
|
17423 |
}
|
|
|
17424 |
}
|
|
|
17425 |
|
|
|
17426 |
}
|
|
|
17427 |
|
|
|
17428 |
public static class assignVoucher_result implements org.apache.thrift.TBase<assignVoucher_result, assignVoucher_result._Fields>, java.io.Serializable, Cloneable {
|
|
|
17429 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("assignVoucher_result");
|
|
|
17430 |
|
|
|
17431 |
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
|
|
|
17432 |
|
|
|
17433 |
private Voucher success; // required
|
|
|
17434 |
|
|
|
17435 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
17436 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
17437 |
SUCCESS((short)0, "success");
|
|
|
17438 |
|
|
|
17439 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
17440 |
|
|
|
17441 |
static {
|
|
|
17442 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
17443 |
byName.put(field.getFieldName(), field);
|
|
|
17444 |
}
|
|
|
17445 |
}
|
|
|
17446 |
|
|
|
17447 |
/**
|
|
|
17448 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
17449 |
*/
|
|
|
17450 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
17451 |
switch(fieldId) {
|
|
|
17452 |
case 0: // SUCCESS
|
|
|
17453 |
return SUCCESS;
|
|
|
17454 |
default:
|
|
|
17455 |
return null;
|
|
|
17456 |
}
|
|
|
17457 |
}
|
|
|
17458 |
|
|
|
17459 |
/**
|
|
|
17460 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
17461 |
* if it is not found.
|
|
|
17462 |
*/
|
|
|
17463 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
17464 |
_Fields fields = findByThriftId(fieldId);
|
|
|
17465 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
17466 |
return fields;
|
|
|
17467 |
}
|
|
|
17468 |
|
|
|
17469 |
/**
|
|
|
17470 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
17471 |
*/
|
|
|
17472 |
public static _Fields findByName(String name) {
|
|
|
17473 |
return byName.get(name);
|
|
|
17474 |
}
|
|
|
17475 |
|
|
|
17476 |
private final short _thriftId;
|
|
|
17477 |
private final String _fieldName;
|
|
|
17478 |
|
|
|
17479 |
_Fields(short thriftId, String fieldName) {
|
|
|
17480 |
_thriftId = thriftId;
|
|
|
17481 |
_fieldName = fieldName;
|
|
|
17482 |
}
|
|
|
17483 |
|
|
|
17484 |
public short getThriftFieldId() {
|
|
|
17485 |
return _thriftId;
|
|
|
17486 |
}
|
|
|
17487 |
|
|
|
17488 |
public String getFieldName() {
|
|
|
17489 |
return _fieldName;
|
|
|
17490 |
}
|
|
|
17491 |
}
|
|
|
17492 |
|
|
|
17493 |
// isset id assignments
|
|
|
17494 |
|
|
|
17495 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
17496 |
static {
|
|
|
17497 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
17498 |
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
17499 |
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Voucher.class)));
|
|
|
17500 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
17501 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(assignVoucher_result.class, metaDataMap);
|
|
|
17502 |
}
|
|
|
17503 |
|
|
|
17504 |
public assignVoucher_result() {
|
|
|
17505 |
}
|
|
|
17506 |
|
|
|
17507 |
public assignVoucher_result(
|
|
|
17508 |
Voucher success)
|
|
|
17509 |
{
|
|
|
17510 |
this();
|
|
|
17511 |
this.success = success;
|
|
|
17512 |
}
|
|
|
17513 |
|
|
|
17514 |
/**
|
|
|
17515 |
* Performs a deep copy on <i>other</i>.
|
|
|
17516 |
*/
|
|
|
17517 |
public assignVoucher_result(assignVoucher_result other) {
|
|
|
17518 |
if (other.isSetSuccess()) {
|
|
|
17519 |
this.success = new Voucher(other.success);
|
|
|
17520 |
}
|
|
|
17521 |
}
|
|
|
17522 |
|
|
|
17523 |
public assignVoucher_result deepCopy() {
|
|
|
17524 |
return new assignVoucher_result(this);
|
|
|
17525 |
}
|
|
|
17526 |
|
|
|
17527 |
@Override
|
|
|
17528 |
public void clear() {
|
|
|
17529 |
this.success = null;
|
|
|
17530 |
}
|
|
|
17531 |
|
|
|
17532 |
public Voucher getSuccess() {
|
|
|
17533 |
return this.success;
|
|
|
17534 |
}
|
|
|
17535 |
|
|
|
17536 |
public void setSuccess(Voucher success) {
|
|
|
17537 |
this.success = success;
|
|
|
17538 |
}
|
|
|
17539 |
|
|
|
17540 |
public void unsetSuccess() {
|
|
|
17541 |
this.success = null;
|
|
|
17542 |
}
|
|
|
17543 |
|
|
|
17544 |
/** Returns true if field success is set (has been assigned a value) and false otherwise */
|
|
|
17545 |
public boolean isSetSuccess() {
|
|
|
17546 |
return this.success != null;
|
|
|
17547 |
}
|
|
|
17548 |
|
|
|
17549 |
public void setSuccessIsSet(boolean value) {
|
|
|
17550 |
if (!value) {
|
|
|
17551 |
this.success = null;
|
|
|
17552 |
}
|
|
|
17553 |
}
|
|
|
17554 |
|
|
|
17555 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
17556 |
switch (field) {
|
|
|
17557 |
case SUCCESS:
|
|
|
17558 |
if (value == null) {
|
|
|
17559 |
unsetSuccess();
|
|
|
17560 |
} else {
|
|
|
17561 |
setSuccess((Voucher)value);
|
|
|
17562 |
}
|
|
|
17563 |
break;
|
|
|
17564 |
|
|
|
17565 |
}
|
|
|
17566 |
}
|
|
|
17567 |
|
|
|
17568 |
public Object getFieldValue(_Fields field) {
|
|
|
17569 |
switch (field) {
|
|
|
17570 |
case SUCCESS:
|
|
|
17571 |
return getSuccess();
|
|
|
17572 |
|
|
|
17573 |
}
|
|
|
17574 |
throw new IllegalStateException();
|
|
|
17575 |
}
|
|
|
17576 |
|
|
|
17577 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
17578 |
public boolean isSet(_Fields field) {
|
|
|
17579 |
if (field == null) {
|
|
|
17580 |
throw new IllegalArgumentException();
|
|
|
17581 |
}
|
|
|
17582 |
|
|
|
17583 |
switch (field) {
|
|
|
17584 |
case SUCCESS:
|
|
|
17585 |
return isSetSuccess();
|
|
|
17586 |
}
|
|
|
17587 |
throw new IllegalStateException();
|
|
|
17588 |
}
|
|
|
17589 |
|
|
|
17590 |
@Override
|
|
|
17591 |
public boolean equals(Object that) {
|
|
|
17592 |
if (that == null)
|
|
|
17593 |
return false;
|
|
|
17594 |
if (that instanceof assignVoucher_result)
|
|
|
17595 |
return this.equals((assignVoucher_result)that);
|
|
|
17596 |
return false;
|
|
|
17597 |
}
|
|
|
17598 |
|
|
|
17599 |
public boolean equals(assignVoucher_result that) {
|
|
|
17600 |
if (that == null)
|
|
|
17601 |
return false;
|
|
|
17602 |
|
|
|
17603 |
boolean this_present_success = true && this.isSetSuccess();
|
|
|
17604 |
boolean that_present_success = true && that.isSetSuccess();
|
|
|
17605 |
if (this_present_success || that_present_success) {
|
|
|
17606 |
if (!(this_present_success && that_present_success))
|
|
|
17607 |
return false;
|
|
|
17608 |
if (!this.success.equals(that.success))
|
|
|
17609 |
return false;
|
|
|
17610 |
}
|
|
|
17611 |
|
|
|
17612 |
return true;
|
|
|
17613 |
}
|
|
|
17614 |
|
|
|
17615 |
@Override
|
|
|
17616 |
public int hashCode() {
|
|
|
17617 |
return 0;
|
|
|
17618 |
}
|
|
|
17619 |
|
|
|
17620 |
public int compareTo(assignVoucher_result other) {
|
|
|
17621 |
if (!getClass().equals(other.getClass())) {
|
|
|
17622 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
17623 |
}
|
|
|
17624 |
|
|
|
17625 |
int lastComparison = 0;
|
|
|
17626 |
assignVoucher_result typedOther = (assignVoucher_result)other;
|
|
|
17627 |
|
|
|
17628 |
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
|
|
|
17629 |
if (lastComparison != 0) {
|
|
|
17630 |
return lastComparison;
|
|
|
17631 |
}
|
|
|
17632 |
if (isSetSuccess()) {
|
|
|
17633 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
|
|
|
17634 |
if (lastComparison != 0) {
|
|
|
17635 |
return lastComparison;
|
|
|
17636 |
}
|
|
|
17637 |
}
|
|
|
17638 |
return 0;
|
|
|
17639 |
}
|
|
|
17640 |
|
|
|
17641 |
public _Fields fieldForId(int fieldId) {
|
|
|
17642 |
return _Fields.findByThriftId(fieldId);
|
|
|
17643 |
}
|
|
|
17644 |
|
|
|
17645 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
17646 |
org.apache.thrift.protocol.TField field;
|
|
|
17647 |
iprot.readStructBegin();
|
|
|
17648 |
while (true)
|
|
|
17649 |
{
|
|
|
17650 |
field = iprot.readFieldBegin();
|
|
|
17651 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
17652 |
break;
|
|
|
17653 |
}
|
|
|
17654 |
switch (field.id) {
|
|
|
17655 |
case 0: // SUCCESS
|
|
|
17656 |
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
|
|
17657 |
this.success = new Voucher();
|
|
|
17658 |
this.success.read(iprot);
|
|
|
17659 |
} else {
|
|
|
17660 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
17661 |
}
|
|
|
17662 |
break;
|
|
|
17663 |
default:
|
|
|
17664 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
17665 |
}
|
|
|
17666 |
iprot.readFieldEnd();
|
|
|
17667 |
}
|
|
|
17668 |
iprot.readStructEnd();
|
|
|
17669 |
validate();
|
|
|
17670 |
}
|
|
|
17671 |
|
|
|
17672 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
17673 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
17674 |
|
|
|
17675 |
if (this.isSetSuccess()) {
|
|
|
17676 |
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
|
|
17677 |
this.success.write(oprot);
|
|
|
17678 |
oprot.writeFieldEnd();
|
|
|
17679 |
}
|
|
|
17680 |
oprot.writeFieldStop();
|
|
|
17681 |
oprot.writeStructEnd();
|
|
|
17682 |
}
|
|
|
17683 |
|
|
|
17684 |
@Override
|
|
|
17685 |
public String toString() {
|
|
|
17686 |
StringBuilder sb = new StringBuilder("assignVoucher_result(");
|
|
|
17687 |
boolean first = true;
|
|
|
17688 |
|
|
|
17689 |
sb.append("success:");
|
|
|
17690 |
if (this.success == null) {
|
|
|
17691 |
sb.append("null");
|
|
|
17692 |
} else {
|
|
|
17693 |
sb.append(this.success);
|
|
|
17694 |
}
|
|
|
17695 |
first = false;
|
|
|
17696 |
sb.append(")");
|
|
|
17697 |
return sb.toString();
|
|
|
17698 |
}
|
|
|
17699 |
|
|
|
17700 |
public void validate() throws org.apache.thrift.TException {
|
|
|
17701 |
// check for required fields
|
|
|
17702 |
}
|
|
|
17703 |
|
|
|
17704 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
17705 |
try {
|
|
|
17706 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
17707 |
} catch (org.apache.thrift.TException te) {
|
|
|
17708 |
throw new java.io.IOException(te);
|
|
|
17709 |
}
|
|
|
17710 |
}
|
|
|
17711 |
|
|
|
17712 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
17713 |
try {
|
|
|
17714 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
17715 |
} catch (org.apache.thrift.TException te) {
|
|
|
17716 |
throw new java.io.IOException(te);
|
|
|
17717 |
}
|
|
|
17718 |
}
|
|
|
17719 |
|
|
|
17720 |
}
|
|
|
17721 |
|
|
|
17722 |
public static class markVoucherAsRedeemed_args implements org.apache.thrift.TBase<markVoucherAsRedeemed_args, markVoucherAsRedeemed_args._Fields>, java.io.Serializable, Cloneable {
|
|
|
17723 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markVoucherAsRedeemed_args");
|
|
|
17724 |
|
|
|
17725 |
private static final org.apache.thrift.protocol.TField VOUCHER_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("voucherCode", org.apache.thrift.protocol.TType.STRING, (short)1);
|
|
|
17726 |
private static final org.apache.thrift.protocol.TField REDEEMED_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("redeemedOn", org.apache.thrift.protocol.TType.I64, (short)2);
|
|
|
17727 |
|
|
|
17728 |
private String voucherCode; // required
|
|
|
17729 |
private long redeemedOn; // required
|
|
|
17730 |
|
|
|
17731 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
17732 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
17733 |
VOUCHER_CODE((short)1, "voucherCode"),
|
|
|
17734 |
REDEEMED_ON((short)2, "redeemedOn");
|
|
|
17735 |
|
|
|
17736 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
17737 |
|
|
|
17738 |
static {
|
|
|
17739 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
17740 |
byName.put(field.getFieldName(), field);
|
|
|
17741 |
}
|
|
|
17742 |
}
|
|
|
17743 |
|
|
|
17744 |
/**
|
|
|
17745 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
17746 |
*/
|
|
|
17747 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
17748 |
switch(fieldId) {
|
|
|
17749 |
case 1: // VOUCHER_CODE
|
|
|
17750 |
return VOUCHER_CODE;
|
|
|
17751 |
case 2: // REDEEMED_ON
|
|
|
17752 |
return REDEEMED_ON;
|
|
|
17753 |
default:
|
|
|
17754 |
return null;
|
|
|
17755 |
}
|
|
|
17756 |
}
|
|
|
17757 |
|
|
|
17758 |
/**
|
|
|
17759 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
17760 |
* if it is not found.
|
|
|
17761 |
*/
|
|
|
17762 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
17763 |
_Fields fields = findByThriftId(fieldId);
|
|
|
17764 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
17765 |
return fields;
|
|
|
17766 |
}
|
|
|
17767 |
|
|
|
17768 |
/**
|
|
|
17769 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
17770 |
*/
|
|
|
17771 |
public static _Fields findByName(String name) {
|
|
|
17772 |
return byName.get(name);
|
|
|
17773 |
}
|
|
|
17774 |
|
|
|
17775 |
private final short _thriftId;
|
|
|
17776 |
private final String _fieldName;
|
|
|
17777 |
|
|
|
17778 |
_Fields(short thriftId, String fieldName) {
|
|
|
17779 |
_thriftId = thriftId;
|
|
|
17780 |
_fieldName = fieldName;
|
|
|
17781 |
}
|
|
|
17782 |
|
|
|
17783 |
public short getThriftFieldId() {
|
|
|
17784 |
return _thriftId;
|
|
|
17785 |
}
|
|
|
17786 |
|
|
|
17787 |
public String getFieldName() {
|
|
|
17788 |
return _fieldName;
|
|
|
17789 |
}
|
|
|
17790 |
}
|
|
|
17791 |
|
|
|
17792 |
// isset id assignments
|
|
|
17793 |
private static final int __REDEEMEDON_ISSET_ID = 0;
|
|
|
17794 |
private BitSet __isset_bit_vector = new BitSet(1);
|
|
|
17795 |
|
|
|
17796 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
17797 |
static {
|
|
|
17798 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
17799 |
tmpMap.put(_Fields.VOUCHER_CODE, new org.apache.thrift.meta_data.FieldMetaData("voucherCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
17800 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
17801 |
tmpMap.put(_Fields.REDEEMED_ON, new org.apache.thrift.meta_data.FieldMetaData("redeemedOn", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
17802 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
17803 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
17804 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markVoucherAsRedeemed_args.class, metaDataMap);
|
|
|
17805 |
}
|
|
|
17806 |
|
|
|
17807 |
public markVoucherAsRedeemed_args() {
|
|
|
17808 |
}
|
|
|
17809 |
|
|
|
17810 |
public markVoucherAsRedeemed_args(
|
|
|
17811 |
String voucherCode,
|
|
|
17812 |
long redeemedOn)
|
|
|
17813 |
{
|
|
|
17814 |
this();
|
|
|
17815 |
this.voucherCode = voucherCode;
|
|
|
17816 |
this.redeemedOn = redeemedOn;
|
|
|
17817 |
setRedeemedOnIsSet(true);
|
|
|
17818 |
}
|
|
|
17819 |
|
|
|
17820 |
/**
|
|
|
17821 |
* Performs a deep copy on <i>other</i>.
|
|
|
17822 |
*/
|
|
|
17823 |
public markVoucherAsRedeemed_args(markVoucherAsRedeemed_args other) {
|
|
|
17824 |
__isset_bit_vector.clear();
|
|
|
17825 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
17826 |
if (other.isSetVoucherCode()) {
|
|
|
17827 |
this.voucherCode = other.voucherCode;
|
|
|
17828 |
}
|
|
|
17829 |
this.redeemedOn = other.redeemedOn;
|
|
|
17830 |
}
|
|
|
17831 |
|
|
|
17832 |
public markVoucherAsRedeemed_args deepCopy() {
|
|
|
17833 |
return new markVoucherAsRedeemed_args(this);
|
|
|
17834 |
}
|
|
|
17835 |
|
|
|
17836 |
@Override
|
|
|
17837 |
public void clear() {
|
|
|
17838 |
this.voucherCode = null;
|
|
|
17839 |
setRedeemedOnIsSet(false);
|
|
|
17840 |
this.redeemedOn = 0;
|
|
|
17841 |
}
|
|
|
17842 |
|
|
|
17843 |
public String getVoucherCode() {
|
|
|
17844 |
return this.voucherCode;
|
|
|
17845 |
}
|
|
|
17846 |
|
|
|
17847 |
public void setVoucherCode(String voucherCode) {
|
|
|
17848 |
this.voucherCode = voucherCode;
|
|
|
17849 |
}
|
|
|
17850 |
|
|
|
17851 |
public void unsetVoucherCode() {
|
|
|
17852 |
this.voucherCode = null;
|
|
|
17853 |
}
|
|
|
17854 |
|
|
|
17855 |
/** Returns true if field voucherCode is set (has been assigned a value) and false otherwise */
|
|
|
17856 |
public boolean isSetVoucherCode() {
|
|
|
17857 |
return this.voucherCode != null;
|
|
|
17858 |
}
|
|
|
17859 |
|
|
|
17860 |
public void setVoucherCodeIsSet(boolean value) {
|
|
|
17861 |
if (!value) {
|
|
|
17862 |
this.voucherCode = null;
|
|
|
17863 |
}
|
|
|
17864 |
}
|
|
|
17865 |
|
|
|
17866 |
public long getRedeemedOn() {
|
|
|
17867 |
return this.redeemedOn;
|
|
|
17868 |
}
|
|
|
17869 |
|
|
|
17870 |
public void setRedeemedOn(long redeemedOn) {
|
|
|
17871 |
this.redeemedOn = redeemedOn;
|
|
|
17872 |
setRedeemedOnIsSet(true);
|
|
|
17873 |
}
|
|
|
17874 |
|
|
|
17875 |
public void unsetRedeemedOn() {
|
|
|
17876 |
__isset_bit_vector.clear(__REDEEMEDON_ISSET_ID);
|
|
|
17877 |
}
|
|
|
17878 |
|
|
|
17879 |
/** Returns true if field redeemedOn is set (has been assigned a value) and false otherwise */
|
|
|
17880 |
public boolean isSetRedeemedOn() {
|
|
|
17881 |
return __isset_bit_vector.get(__REDEEMEDON_ISSET_ID);
|
|
|
17882 |
}
|
|
|
17883 |
|
|
|
17884 |
public void setRedeemedOnIsSet(boolean value) {
|
|
|
17885 |
__isset_bit_vector.set(__REDEEMEDON_ISSET_ID, value);
|
|
|
17886 |
}
|
|
|
17887 |
|
|
|
17888 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
17889 |
switch (field) {
|
|
|
17890 |
case VOUCHER_CODE:
|
|
|
17891 |
if (value == null) {
|
|
|
17892 |
unsetVoucherCode();
|
|
|
17893 |
} else {
|
|
|
17894 |
setVoucherCode((String)value);
|
|
|
17895 |
}
|
|
|
17896 |
break;
|
|
|
17897 |
|
|
|
17898 |
case REDEEMED_ON:
|
|
|
17899 |
if (value == null) {
|
|
|
17900 |
unsetRedeemedOn();
|
|
|
17901 |
} else {
|
|
|
17902 |
setRedeemedOn((Long)value);
|
|
|
17903 |
}
|
|
|
17904 |
break;
|
|
|
17905 |
|
|
|
17906 |
}
|
|
|
17907 |
}
|
|
|
17908 |
|
|
|
17909 |
public Object getFieldValue(_Fields field) {
|
|
|
17910 |
switch (field) {
|
|
|
17911 |
case VOUCHER_CODE:
|
|
|
17912 |
return getVoucherCode();
|
|
|
17913 |
|
|
|
17914 |
case REDEEMED_ON:
|
|
|
17915 |
return Long.valueOf(getRedeemedOn());
|
|
|
17916 |
|
|
|
17917 |
}
|
|
|
17918 |
throw new IllegalStateException();
|
|
|
17919 |
}
|
|
|
17920 |
|
|
|
17921 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
17922 |
public boolean isSet(_Fields field) {
|
|
|
17923 |
if (field == null) {
|
|
|
17924 |
throw new IllegalArgumentException();
|
|
|
17925 |
}
|
|
|
17926 |
|
|
|
17927 |
switch (field) {
|
|
|
17928 |
case VOUCHER_CODE:
|
|
|
17929 |
return isSetVoucherCode();
|
|
|
17930 |
case REDEEMED_ON:
|
|
|
17931 |
return isSetRedeemedOn();
|
|
|
17932 |
}
|
|
|
17933 |
throw new IllegalStateException();
|
|
|
17934 |
}
|
|
|
17935 |
|
|
|
17936 |
@Override
|
|
|
17937 |
public boolean equals(Object that) {
|
|
|
17938 |
if (that == null)
|
|
|
17939 |
return false;
|
|
|
17940 |
if (that instanceof markVoucherAsRedeemed_args)
|
|
|
17941 |
return this.equals((markVoucherAsRedeemed_args)that);
|
|
|
17942 |
return false;
|
|
|
17943 |
}
|
|
|
17944 |
|
|
|
17945 |
public boolean equals(markVoucherAsRedeemed_args that) {
|
|
|
17946 |
if (that == null)
|
|
|
17947 |
return false;
|
|
|
17948 |
|
|
|
17949 |
boolean this_present_voucherCode = true && this.isSetVoucherCode();
|
|
|
17950 |
boolean that_present_voucherCode = true && that.isSetVoucherCode();
|
|
|
17951 |
if (this_present_voucherCode || that_present_voucherCode) {
|
|
|
17952 |
if (!(this_present_voucherCode && that_present_voucherCode))
|
|
|
17953 |
return false;
|
|
|
17954 |
if (!this.voucherCode.equals(that.voucherCode))
|
|
|
17955 |
return false;
|
|
|
17956 |
}
|
|
|
17957 |
|
|
|
17958 |
boolean this_present_redeemedOn = true;
|
|
|
17959 |
boolean that_present_redeemedOn = true;
|
|
|
17960 |
if (this_present_redeemedOn || that_present_redeemedOn) {
|
|
|
17961 |
if (!(this_present_redeemedOn && that_present_redeemedOn))
|
|
|
17962 |
return false;
|
|
|
17963 |
if (this.redeemedOn != that.redeemedOn)
|
|
|
17964 |
return false;
|
|
|
17965 |
}
|
|
|
17966 |
|
|
|
17967 |
return true;
|
|
|
17968 |
}
|
|
|
17969 |
|
|
|
17970 |
@Override
|
|
|
17971 |
public int hashCode() {
|
|
|
17972 |
return 0;
|
|
|
17973 |
}
|
|
|
17974 |
|
|
|
17975 |
public int compareTo(markVoucherAsRedeemed_args other) {
|
|
|
17976 |
if (!getClass().equals(other.getClass())) {
|
|
|
17977 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
17978 |
}
|
|
|
17979 |
|
|
|
17980 |
int lastComparison = 0;
|
|
|
17981 |
markVoucherAsRedeemed_args typedOther = (markVoucherAsRedeemed_args)other;
|
|
|
17982 |
|
|
|
17983 |
lastComparison = Boolean.valueOf(isSetVoucherCode()).compareTo(typedOther.isSetVoucherCode());
|
|
|
17984 |
if (lastComparison != 0) {
|
|
|
17985 |
return lastComparison;
|
|
|
17986 |
}
|
|
|
17987 |
if (isSetVoucherCode()) {
|
|
|
17988 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.voucherCode, typedOther.voucherCode);
|
|
|
17989 |
if (lastComparison != 0) {
|
|
|
17990 |
return lastComparison;
|
|
|
17991 |
}
|
|
|
17992 |
}
|
|
|
17993 |
lastComparison = Boolean.valueOf(isSetRedeemedOn()).compareTo(typedOther.isSetRedeemedOn());
|
|
|
17994 |
if (lastComparison != 0) {
|
|
|
17995 |
return lastComparison;
|
|
|
17996 |
}
|
|
|
17997 |
if (isSetRedeemedOn()) {
|
|
|
17998 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.redeemedOn, typedOther.redeemedOn);
|
|
|
17999 |
if (lastComparison != 0) {
|
|
|
18000 |
return lastComparison;
|
|
|
18001 |
}
|
|
|
18002 |
}
|
|
|
18003 |
return 0;
|
|
|
18004 |
}
|
|
|
18005 |
|
|
|
18006 |
public _Fields fieldForId(int fieldId) {
|
|
|
18007 |
return _Fields.findByThriftId(fieldId);
|
|
|
18008 |
}
|
|
|
18009 |
|
|
|
18010 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
18011 |
org.apache.thrift.protocol.TField field;
|
|
|
18012 |
iprot.readStructBegin();
|
|
|
18013 |
while (true)
|
|
|
18014 |
{
|
|
|
18015 |
field = iprot.readFieldBegin();
|
|
|
18016 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
18017 |
break;
|
|
|
18018 |
}
|
|
|
18019 |
switch (field.id) {
|
|
|
18020 |
case 1: // VOUCHER_CODE
|
|
|
18021 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
18022 |
this.voucherCode = iprot.readString();
|
|
|
18023 |
} else {
|
|
|
18024 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
18025 |
}
|
|
|
18026 |
break;
|
|
|
18027 |
case 2: // REDEEMED_ON
|
|
|
18028 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
18029 |
this.redeemedOn = iprot.readI64();
|
|
|
18030 |
setRedeemedOnIsSet(true);
|
|
|
18031 |
} else {
|
|
|
18032 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
18033 |
}
|
|
|
18034 |
break;
|
|
|
18035 |
default:
|
|
|
18036 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
18037 |
}
|
|
|
18038 |
iprot.readFieldEnd();
|
|
|
18039 |
}
|
|
|
18040 |
iprot.readStructEnd();
|
|
|
18041 |
validate();
|
|
|
18042 |
}
|
|
|
18043 |
|
|
|
18044 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
18045 |
validate();
|
|
|
18046 |
|
|
|
18047 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
18048 |
if (this.voucherCode != null) {
|
|
|
18049 |
oprot.writeFieldBegin(VOUCHER_CODE_FIELD_DESC);
|
|
|
18050 |
oprot.writeString(this.voucherCode);
|
|
|
18051 |
oprot.writeFieldEnd();
|
|
|
18052 |
}
|
|
|
18053 |
oprot.writeFieldBegin(REDEEMED_ON_FIELD_DESC);
|
|
|
18054 |
oprot.writeI64(this.redeemedOn);
|
|
|
18055 |
oprot.writeFieldEnd();
|
|
|
18056 |
oprot.writeFieldStop();
|
|
|
18057 |
oprot.writeStructEnd();
|
|
|
18058 |
}
|
|
|
18059 |
|
|
|
18060 |
@Override
|
|
|
18061 |
public String toString() {
|
|
|
18062 |
StringBuilder sb = new StringBuilder("markVoucherAsRedeemed_args(");
|
|
|
18063 |
boolean first = true;
|
|
|
18064 |
|
|
|
18065 |
sb.append("voucherCode:");
|
|
|
18066 |
if (this.voucherCode == null) {
|
|
|
18067 |
sb.append("null");
|
|
|
18068 |
} else {
|
|
|
18069 |
sb.append(this.voucherCode);
|
|
|
18070 |
}
|
|
|
18071 |
first = false;
|
|
|
18072 |
if (!first) sb.append(", ");
|
|
|
18073 |
sb.append("redeemedOn:");
|
|
|
18074 |
sb.append(this.redeemedOn);
|
|
|
18075 |
first = false;
|
|
|
18076 |
sb.append(")");
|
|
|
18077 |
return sb.toString();
|
|
|
18078 |
}
|
|
|
18079 |
|
|
|
18080 |
public void validate() throws org.apache.thrift.TException {
|
|
|
18081 |
// check for required fields
|
|
|
18082 |
}
|
|
|
18083 |
|
|
|
18084 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
18085 |
try {
|
|
|
18086 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
18087 |
} catch (org.apache.thrift.TException te) {
|
|
|
18088 |
throw new java.io.IOException(te);
|
|
|
18089 |
}
|
|
|
18090 |
}
|
|
|
18091 |
|
|
|
18092 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
18093 |
try {
|
|
|
18094 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
18095 |
__isset_bit_vector = new BitSet(1);
|
|
|
18096 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
18097 |
} catch (org.apache.thrift.TException te) {
|
|
|
18098 |
throw new java.io.IOException(te);
|
|
|
18099 |
}
|
|
|
18100 |
}
|
|
|
18101 |
|
|
|
18102 |
}
|
|
|
18103 |
|
|
|
18104 |
public static class markVoucherAsRedeemed_result implements org.apache.thrift.TBase<markVoucherAsRedeemed_result, markVoucherAsRedeemed_result._Fields>, java.io.Serializable, Cloneable {
|
|
|
18105 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markVoucherAsRedeemed_result");
|
|
|
18106 |
|
|
|
18107 |
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
|
|
|
18108 |
|
|
|
18109 |
private boolean success; // required
|
|
|
18110 |
|
|
|
18111 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
18112 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
18113 |
SUCCESS((short)0, "success");
|
|
|
18114 |
|
|
|
18115 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
18116 |
|
|
|
18117 |
static {
|
|
|
18118 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
18119 |
byName.put(field.getFieldName(), field);
|
|
|
18120 |
}
|
|
|
18121 |
}
|
|
|
18122 |
|
|
|
18123 |
/**
|
|
|
18124 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
18125 |
*/
|
|
|
18126 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
18127 |
switch(fieldId) {
|
|
|
18128 |
case 0: // SUCCESS
|
|
|
18129 |
return SUCCESS;
|
|
|
18130 |
default:
|
|
|
18131 |
return null;
|
|
|
18132 |
}
|
|
|
18133 |
}
|
|
|
18134 |
|
|
|
18135 |
/**
|
|
|
18136 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
18137 |
* if it is not found.
|
|
|
18138 |
*/
|
|
|
18139 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
18140 |
_Fields fields = findByThriftId(fieldId);
|
|
|
18141 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
18142 |
return fields;
|
|
|
18143 |
}
|
|
|
18144 |
|
|
|
18145 |
/**
|
|
|
18146 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
18147 |
*/
|
|
|
18148 |
public static _Fields findByName(String name) {
|
|
|
18149 |
return byName.get(name);
|
|
|
18150 |
}
|
|
|
18151 |
|
|
|
18152 |
private final short _thriftId;
|
|
|
18153 |
private final String _fieldName;
|
|
|
18154 |
|
|
|
18155 |
_Fields(short thriftId, String fieldName) {
|
|
|
18156 |
_thriftId = thriftId;
|
|
|
18157 |
_fieldName = fieldName;
|
|
|
18158 |
}
|
|
|
18159 |
|
|
|
18160 |
public short getThriftFieldId() {
|
|
|
18161 |
return _thriftId;
|
|
|
18162 |
}
|
|
|
18163 |
|
|
|
18164 |
public String getFieldName() {
|
|
|
18165 |
return _fieldName;
|
|
|
18166 |
}
|
|
|
18167 |
}
|
|
|
18168 |
|
|
|
18169 |
// isset id assignments
|
|
|
18170 |
private static final int __SUCCESS_ISSET_ID = 0;
|
|
|
18171 |
private BitSet __isset_bit_vector = new BitSet(1);
|
|
|
18172 |
|
|
|
18173 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
18174 |
static {
|
|
|
18175 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
18176 |
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
18177 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
|
|
|
18178 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
18179 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markVoucherAsRedeemed_result.class, metaDataMap);
|
|
|
18180 |
}
|
|
|
18181 |
|
|
|
18182 |
public markVoucherAsRedeemed_result() {
|
|
|
18183 |
}
|
|
|
18184 |
|
|
|
18185 |
public markVoucherAsRedeemed_result(
|
|
|
18186 |
boolean success)
|
|
|
18187 |
{
|
|
|
18188 |
this();
|
|
|
18189 |
this.success = success;
|
|
|
18190 |
setSuccessIsSet(true);
|
|
|
18191 |
}
|
|
|
18192 |
|
|
|
18193 |
/**
|
|
|
18194 |
* Performs a deep copy on <i>other</i>.
|
|
|
18195 |
*/
|
|
|
18196 |
public markVoucherAsRedeemed_result(markVoucherAsRedeemed_result other) {
|
|
|
18197 |
__isset_bit_vector.clear();
|
|
|
18198 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
18199 |
this.success = other.success;
|
|
|
18200 |
}
|
|
|
18201 |
|
|
|
18202 |
public markVoucherAsRedeemed_result deepCopy() {
|
|
|
18203 |
return new markVoucherAsRedeemed_result(this);
|
|
|
18204 |
}
|
|
|
18205 |
|
|
|
18206 |
@Override
|
|
|
18207 |
public void clear() {
|
|
|
18208 |
setSuccessIsSet(false);
|
|
|
18209 |
this.success = false;
|
|
|
18210 |
}
|
|
|
18211 |
|
|
|
18212 |
public boolean isSuccess() {
|
|
|
18213 |
return this.success;
|
|
|
18214 |
}
|
|
|
18215 |
|
|
|
18216 |
public void setSuccess(boolean success) {
|
|
|
18217 |
this.success = success;
|
|
|
18218 |
setSuccessIsSet(true);
|
|
|
18219 |
}
|
|
|
18220 |
|
|
|
18221 |
public void unsetSuccess() {
|
|
|
18222 |
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
|
|
|
18223 |
}
|
|
|
18224 |
|
|
|
18225 |
/** Returns true if field success is set (has been assigned a value) and false otherwise */
|
|
|
18226 |
public boolean isSetSuccess() {
|
|
|
18227 |
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
|
|
|
18228 |
}
|
|
|
18229 |
|
|
|
18230 |
public void setSuccessIsSet(boolean value) {
|
|
|
18231 |
__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
|
|
|
18232 |
}
|
|
|
18233 |
|
|
|
18234 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
18235 |
switch (field) {
|
|
|
18236 |
case SUCCESS:
|
|
|
18237 |
if (value == null) {
|
|
|
18238 |
unsetSuccess();
|
|
|
18239 |
} else {
|
|
|
18240 |
setSuccess((Boolean)value);
|
|
|
18241 |
}
|
|
|
18242 |
break;
|
|
|
18243 |
|
|
|
18244 |
}
|
|
|
18245 |
}
|
|
|
18246 |
|
|
|
18247 |
public Object getFieldValue(_Fields field) {
|
|
|
18248 |
switch (field) {
|
|
|
18249 |
case SUCCESS:
|
|
|
18250 |
return Boolean.valueOf(isSuccess());
|
|
|
18251 |
|
|
|
18252 |
}
|
|
|
18253 |
throw new IllegalStateException();
|
|
|
18254 |
}
|
|
|
18255 |
|
|
|
18256 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
18257 |
public boolean isSet(_Fields field) {
|
|
|
18258 |
if (field == null) {
|
|
|
18259 |
throw new IllegalArgumentException();
|
|
|
18260 |
}
|
|
|
18261 |
|
|
|
18262 |
switch (field) {
|
|
|
18263 |
case SUCCESS:
|
|
|
18264 |
return isSetSuccess();
|
|
|
18265 |
}
|
|
|
18266 |
throw new IllegalStateException();
|
|
|
18267 |
}
|
|
|
18268 |
|
|
|
18269 |
@Override
|
|
|
18270 |
public boolean equals(Object that) {
|
|
|
18271 |
if (that == null)
|
|
|
18272 |
return false;
|
|
|
18273 |
if (that instanceof markVoucherAsRedeemed_result)
|
|
|
18274 |
return this.equals((markVoucherAsRedeemed_result)that);
|
|
|
18275 |
return false;
|
|
|
18276 |
}
|
|
|
18277 |
|
|
|
18278 |
public boolean equals(markVoucherAsRedeemed_result that) {
|
|
|
18279 |
if (that == null)
|
|
|
18280 |
return false;
|
|
|
18281 |
|
|
|
18282 |
boolean this_present_success = true;
|
|
|
18283 |
boolean that_present_success = true;
|
|
|
18284 |
if (this_present_success || that_present_success) {
|
|
|
18285 |
if (!(this_present_success && that_present_success))
|
|
|
18286 |
return false;
|
|
|
18287 |
if (this.success != that.success)
|
|
|
18288 |
return false;
|
|
|
18289 |
}
|
|
|
18290 |
|
|
|
18291 |
return true;
|
|
|
18292 |
}
|
|
|
18293 |
|
|
|
18294 |
@Override
|
|
|
18295 |
public int hashCode() {
|
|
|
18296 |
return 0;
|
|
|
18297 |
}
|
|
|
18298 |
|
|
|
18299 |
public int compareTo(markVoucherAsRedeemed_result other) {
|
|
|
18300 |
if (!getClass().equals(other.getClass())) {
|
|
|
18301 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
18302 |
}
|
|
|
18303 |
|
|
|
18304 |
int lastComparison = 0;
|
|
|
18305 |
markVoucherAsRedeemed_result typedOther = (markVoucherAsRedeemed_result)other;
|
|
|
18306 |
|
|
|
18307 |
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
|
|
|
18308 |
if (lastComparison != 0) {
|
|
|
18309 |
return lastComparison;
|
|
|
18310 |
}
|
|
|
18311 |
if (isSetSuccess()) {
|
|
|
18312 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
|
|
|
18313 |
if (lastComparison != 0) {
|
|
|
18314 |
return lastComparison;
|
|
|
18315 |
}
|
|
|
18316 |
}
|
|
|
18317 |
return 0;
|
|
|
18318 |
}
|
|
|
18319 |
|
|
|
18320 |
public _Fields fieldForId(int fieldId) {
|
|
|
18321 |
return _Fields.findByThriftId(fieldId);
|
|
|
18322 |
}
|
|
|
18323 |
|
|
|
18324 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
18325 |
org.apache.thrift.protocol.TField field;
|
|
|
18326 |
iprot.readStructBegin();
|
|
|
18327 |
while (true)
|
|
|
18328 |
{
|
|
|
18329 |
field = iprot.readFieldBegin();
|
|
|
18330 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
18331 |
break;
|
|
|
18332 |
}
|
|
|
18333 |
switch (field.id) {
|
|
|
18334 |
case 0: // SUCCESS
|
|
|
18335 |
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
|
|
|
18336 |
this.success = iprot.readBool();
|
|
|
18337 |
setSuccessIsSet(true);
|
|
|
18338 |
} else {
|
|
|
18339 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
18340 |
}
|
|
|
18341 |
break;
|
|
|
18342 |
default:
|
|
|
18343 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
18344 |
}
|
|
|
18345 |
iprot.readFieldEnd();
|
|
|
18346 |
}
|
|
|
18347 |
iprot.readStructEnd();
|
|
|
18348 |
validate();
|
|
|
18349 |
}
|
|
|
18350 |
|
|
|
18351 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
18352 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
18353 |
|
|
|
18354 |
if (this.isSetSuccess()) {
|
|
|
18355 |
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
|
|
18356 |
oprot.writeBool(this.success);
|
|
|
18357 |
oprot.writeFieldEnd();
|
|
|
18358 |
}
|
|
|
18359 |
oprot.writeFieldStop();
|
|
|
18360 |
oprot.writeStructEnd();
|
|
|
18361 |
}
|
|
|
18362 |
|
|
|
18363 |
@Override
|
|
|
18364 |
public String toString() {
|
|
|
18365 |
StringBuilder sb = new StringBuilder("markVoucherAsRedeemed_result(");
|
|
|
18366 |
boolean first = true;
|
|
|
18367 |
|
|
|
18368 |
sb.append("success:");
|
|
|
18369 |
sb.append(this.success);
|
|
|
18370 |
first = false;
|
|
|
18371 |
sb.append(")");
|
|
|
18372 |
return sb.toString();
|
|
|
18373 |
}
|
|
|
18374 |
|
|
|
18375 |
public void validate() throws org.apache.thrift.TException {
|
|
|
18376 |
// check for required fields
|
|
|
18377 |
}
|
|
|
18378 |
|
|
|
18379 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
18380 |
try {
|
|
|
18381 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
18382 |
} catch (org.apache.thrift.TException te) {
|
|
|
18383 |
throw new java.io.IOException(te);
|
|
|
18384 |
}
|
|
|
18385 |
}
|
|
|
18386 |
|
|
|
18387 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
18388 |
try {
|
|
|
18389 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
18390 |
} catch (org.apache.thrift.TException te) {
|
|
|
18391 |
throw new java.io.IOException(te);
|
|
|
18392 |
}
|
|
|
18393 |
}
|
|
|
18394 |
|
|
|
18395 |
}
|
|
|
18396 |
|
| 1982 |
varun.gupt |
18397 |
}
|