Subversion Repositories SmartDukaan

Rev

Rev 3385 | Rev 3555 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3385 Rev 3430
Line 1... Line 1...
1
/**
1
/**
2
 * Autogenerated by Thrift
2
 * Autogenerated by Thrift Compiler (0.7.0)
3
 *
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
5
 */
6
package in.shop2020.model.v1.user;
6
package in.shop2020.model.v1.user;
7
 
7
 
Line 13... Line 13...
13
import java.util.Set;
13
import java.util.Set;
14
import java.util.HashSet;
14
import java.util.HashSet;
15
import java.util.EnumSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
16
import java.util.Collections;
17
import java.util.BitSet;
17
import java.util.BitSet;
-
 
18
import java.nio.ByteBuffer;
18
import java.util.Arrays;
19
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
import org.slf4j.LoggerFactory;
21
 
22
 
22
import org.apache.thrift.*;
-
 
23
import org.apache.thrift.meta_data.*;
-
 
24
import org.apache.thrift.protocol.*;
-
 
25
 
-
 
26
public class PromotionService {
23
public class PromotionService {
27
 
24
 
28
  /**
25
  /**
29
   * Promotion Service
26
   * Promotion Service
30
   */
27
   */
31
  public interface Iface extends in.shop2020.generic.GenericService.Iface {
28
  public interface Iface extends in.shop2020.generic.GenericService.Iface {
32
 
29
 
33
    /**
-
 
34
     * For closing the open session in sqlalchemy
-
 
35
     */
-
 
36
    public void closeSession() throws TException;
-
 
37
 
-
 
38
    public void createPromotion(String name, String ruleExecutionSrc, long startOn, long endOn) throws PromotionException, TException;
30
    public void createPromotion(String name, String ruleExecutionSrc, long startOn, long endOn) throws PromotionException, org.apache.thrift.TException;
39
 
31
 
40
    public List<Promotion> getAllPromotions() throws PromotionException, TException;
32
    public List<Promotion> getAllPromotions() throws PromotionException, org.apache.thrift.TException;
41
 
33
 
42
    public Promotion getPromotionById(long promotionId) throws PromotionException, TException;
34
    public Promotion getPromotionById(long promotionId) throws PromotionException, org.apache.thrift.TException;
43
 
35
 
44
    public void generateCouponsForPromotion(long promotionId, String couponCode) throws PromotionException, TException;
36
    public void generateCouponsForPromotion(long promotionId, String couponCode) throws PromotionException, org.apache.thrift.TException;
45
 
37
 
46
    public Cart applyCoupon(String couponCode, long cartId) throws PromotionException, TException;
38
    public Cart applyCoupon(String couponCode, long cartId) throws PromotionException, org.apache.thrift.TException;
47
 
39
 
48
    public void trackCouponUsage(String couponCode, long transactionId, long userId) throws PromotionException, TException;
40
    public void trackCouponUsage(String couponCode, long transactionId, long userId) throws PromotionException, org.apache.thrift.TException;
49
 
41
 
50
    public long getCouponUsageCountByUser(String couponCode, long userId) throws PromotionException, TException;
42
    public long getCouponUsageCountByUser(String couponCode, long userId) throws PromotionException, org.apache.thrift.TException;
51
 
43
 
52
    /**
44
    /**
53
     * Returns a list of active coupons
45
     * Returns a list of active coupons
54
     */
46
     */
55
    public List<Coupon> getActiveCoupons() throws PromotionException, TException;
47
    public List<Coupon> getActiveCoupons() throws PromotionException, org.apache.thrift.TException;
56
 
48
 
57
    /**
49
    /**
58
     * Returns the count of successful payments done using a given coupon
50
     * Returns the count of successful payments done using a given coupon
59
     * 
51
     * 
60
     * @param couponCode
52
     * @param couponCode
61
     */
53
     */
62
    public long getSuccessfulPaymentCountForCoupon(String couponCode) throws PromotionException, TException;
54
    public long getSuccessfulPaymentCountForCoupon(String couponCode) throws PromotionException, org.apache.thrift.TException;
63
 
55
 
64
    /**
56
    /**
65
     * Returns the doc string of the rule module
57
     * Returns the doc string of the rule module
66
     * 
58
     * 
67
     * @param ruleName
59
     * @param ruleName
68
     */
60
     */
69
    public String getRuleDocString(String ruleName) throws TException;
61
    public String getRuleDocString(String ruleName) throws org.apache.thrift.TException;
70
 
62
 
71
  }
63
  }
72
 
64
 
73
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
65
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
74
    public Client(TProtocol prot)
-
 
75
    {
-
 
76
      this(prot, prot);
-
 
77
    }
-
 
78
 
66
 
79
    public Client(TProtocol iprot, TProtocol oprot)
67
    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;
80
    {
-
 
81
      super(iprot, oprot);
-
 
82
    }
-
 
83
 
68
 
84
    public void closeSession() throws TException
69
    public void getAllPromotions(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPromotions_call> resultHandler) throws org.apache.thrift.TException;
-
 
70
 
-
 
71
    public void getPromotionById(long promotionId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPromotionById_call> resultHandler) throws org.apache.thrift.TException;
-
 
72
 
-
 
73
    public void generateCouponsForPromotion(long promotionId, String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.generateCouponsForPromotion_call> resultHandler) throws org.apache.thrift.TException;
-
 
74
 
-
 
75
    public void applyCoupon(String couponCode, long cartId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.applyCoupon_call> resultHandler) throws org.apache.thrift.TException;
-
 
76
 
-
 
77
    public void trackCouponUsage(String couponCode, long transactionId, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.trackCouponUsage_call> resultHandler) throws org.apache.thrift.TException;
-
 
78
 
-
 
79
    public void getCouponUsageCountByUser(String couponCode, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCouponUsageCountByUser_call> resultHandler) throws org.apache.thrift.TException;
-
 
80
 
-
 
81
    public void getActiveCoupons(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActiveCoupons_call> resultHandler) throws org.apache.thrift.TException;
-
 
82
 
-
 
83
    public void getSuccessfulPaymentCountForCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuccessfulPaymentCountForCoupon_call> resultHandler) throws org.apache.thrift.TException;
-
 
84
 
-
 
85
    public void getRuleDocString(String ruleName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRuleDocString_call> resultHandler) throws org.apache.thrift.TException;
-
 
86
 
85
    {
87
  }
-
 
88
 
-
 
89
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
-
 
90
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
86
      send_closeSession();
91
      public Factory() {}
-
 
92
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
87
      recv_closeSession();
93
        return new Client(prot);
-
 
94
      }
-
 
95
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
-
 
96
        return new Client(iprot, oprot);
-
 
97
      }
88
    }
98
    }
89
 
99
 
90
    public void send_closeSession() throws TException
100
    public Client(org.apache.thrift.protocol.TProtocol prot)
91
    {
101
    {
92
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
-
 
93
      closeSession_args args = new closeSession_args();
-
 
94
      args.write(oprot_);
102
      super(prot, prot);
95
      oprot_.writeMessageEnd();
-
 
96
      oprot_.getTransport().flush();
-
 
97
    }
103
    }
98
 
104
 
99
    public void recv_closeSession() throws TException
-
 
100
    {
-
 
101
      TMessage msg = iprot_.readMessageBegin();
-
 
102
      if (msg.type == TMessageType.EXCEPTION) {
-
 
103
        TApplicationException x = TApplicationException.read(iprot_);
105
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
104
        iprot_.readMessageEnd();
-
 
105
        throw x;
-
 
106
      }
-
 
107
      closeSession_result result = new closeSession_result();
-
 
108
      result.read(iprot_);
106
      super(iprot, oprot);
109
      iprot_.readMessageEnd();
-
 
110
      return;
-
 
111
    }
107
    }
112
 
108
 
113
    public void createPromotion(String name, String ruleExecutionSrc, long startOn, long endOn) throws PromotionException, TException
109
    public void createPromotion(String name, String ruleExecutionSrc, long startOn, long endOn) throws PromotionException, org.apache.thrift.TException
114
    {
110
    {
115
      send_createPromotion(name, ruleExecutionSrc, startOn, endOn);
111
      send_createPromotion(name, ruleExecutionSrc, startOn, endOn);
116
      recv_createPromotion();
112
      recv_createPromotion();
117
    }
113
    }
118
 
114
 
119
    public void send_createPromotion(String name, String ruleExecutionSrc, long startOn, long endOn) throws TException
115
    public void send_createPromotion(String name, String ruleExecutionSrc, long startOn, long endOn) throws org.apache.thrift.TException
120
    {
116
    {
121
      oprot_.writeMessageBegin(new TMessage("createPromotion", TMessageType.CALL, seqid_));
-
 
122
      createPromotion_args args = new createPromotion_args();
117
      createPromotion_args args = new createPromotion_args();
123
      args.name = name;
118
      args.setName(name);
124
      args.ruleExecutionSrc = ruleExecutionSrc;
119
      args.setRuleExecutionSrc(ruleExecutionSrc);
125
      args.startOn = startOn;
120
      args.setStartOn(startOn);
126
      args.endOn = endOn;
121
      args.setEndOn(endOn);
127
      args.write(oprot_);
-
 
128
      oprot_.writeMessageEnd();
-
 
129
      oprot_.getTransport().flush();
122
      sendBase("createPromotion", args);
130
    }
123
    }
131
 
124
 
132
    public void recv_createPromotion() throws PromotionException, TException
125
    public void recv_createPromotion() throws PromotionException, org.apache.thrift.TException
133
    {
126
    {
134
      TMessage msg = iprot_.readMessageBegin();
-
 
135
      if (msg.type == TMessageType.EXCEPTION) {
-
 
136
        TApplicationException x = TApplicationException.read(iprot_);
-
 
137
        iprot_.readMessageEnd();
-
 
138
        throw x;
-
 
139
      }
-
 
140
      createPromotion_result result = new createPromotion_result();
127
      createPromotion_result result = new createPromotion_result();
141
      result.read(iprot_);
128
      receiveBase(result, "createPromotion");
142
      iprot_.readMessageEnd();
-
 
143
      if (result.pex != null) {
129
      if (result.pex != null) {
144
        throw result.pex;
130
        throw result.pex;
145
      }
131
      }
146
      return;
132
      return;
147
    }
133
    }
148
 
134
 
149
    public List<Promotion> getAllPromotions() throws PromotionException, TException
135
    public List<Promotion> getAllPromotions() throws PromotionException, org.apache.thrift.TException
150
    {
136
    {
151
      send_getAllPromotions();
137
      send_getAllPromotions();
152
      return recv_getAllPromotions();
138
      return recv_getAllPromotions();
153
    }
139
    }
154
 
140
 
155
    public void send_getAllPromotions() throws TException
141
    public void send_getAllPromotions() throws org.apache.thrift.TException
156
    {
142
    {
157
      oprot_.writeMessageBegin(new TMessage("getAllPromotions", TMessageType.CALL, seqid_));
-
 
158
      getAllPromotions_args args = new getAllPromotions_args();
143
      getAllPromotions_args args = new getAllPromotions_args();
159
      args.write(oprot_);
-
 
160
      oprot_.writeMessageEnd();
-
 
161
      oprot_.getTransport().flush();
144
      sendBase("getAllPromotions", args);
162
    }
145
    }
163
 
146
 
164
    public List<Promotion> recv_getAllPromotions() throws PromotionException, TException
147
    public List<Promotion> recv_getAllPromotions() throws PromotionException, org.apache.thrift.TException
165
    {
148
    {
166
      TMessage msg = iprot_.readMessageBegin();
-
 
167
      if (msg.type == TMessageType.EXCEPTION) {
-
 
168
        TApplicationException x = TApplicationException.read(iprot_);
-
 
169
        iprot_.readMessageEnd();
-
 
170
        throw x;
-
 
171
      }
-
 
172
      getAllPromotions_result result = new getAllPromotions_result();
149
      getAllPromotions_result result = new getAllPromotions_result();
173
      result.read(iprot_);
150
      receiveBase(result, "getAllPromotions");
174
      iprot_.readMessageEnd();
-
 
175
      if (result.isSetSuccess()) {
151
      if (result.isSetSuccess()) {
176
        return result.success;
152
        return result.success;
177
      }
153
      }
178
      if (result.pex != null) {
154
      if (result.pex != null) {
179
        throw result.pex;
155
        throw result.pex;
180
      }
156
      }
181
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllPromotions failed: unknown result");
157
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPromotions failed: unknown result");
182
    }
158
    }
183
 
159
 
184
    public Promotion getPromotionById(long promotionId) throws PromotionException, TException
160
    public Promotion getPromotionById(long promotionId) throws PromotionException, org.apache.thrift.TException
185
    {
161
    {
186
      send_getPromotionById(promotionId);
162
      send_getPromotionById(promotionId);
187
      return recv_getPromotionById();
163
      return recv_getPromotionById();
188
    }
164
    }
189
 
165
 
190
    public void send_getPromotionById(long promotionId) throws TException
166
    public void send_getPromotionById(long promotionId) throws org.apache.thrift.TException
191
    {
167
    {
192
      oprot_.writeMessageBegin(new TMessage("getPromotionById", TMessageType.CALL, seqid_));
-
 
193
      getPromotionById_args args = new getPromotionById_args();
168
      getPromotionById_args args = new getPromotionById_args();
194
      args.promotionId = promotionId;
169
      args.setPromotionId(promotionId);
195
      args.write(oprot_);
-
 
196
      oprot_.writeMessageEnd();
-
 
197
      oprot_.getTransport().flush();
170
      sendBase("getPromotionById", args);
198
    }
171
    }
199
 
172
 
200
    public Promotion recv_getPromotionById() throws PromotionException, TException
173
    public Promotion recv_getPromotionById() throws PromotionException, org.apache.thrift.TException
201
    {
174
    {
202
      TMessage msg = iprot_.readMessageBegin();
-
 
203
      if (msg.type == TMessageType.EXCEPTION) {
-
 
204
        TApplicationException x = TApplicationException.read(iprot_);
-
 
205
        iprot_.readMessageEnd();
-
 
206
        throw x;
-
 
207
      }
-
 
208
      getPromotionById_result result = new getPromotionById_result();
175
      getPromotionById_result result = new getPromotionById_result();
209
      result.read(iprot_);
-
 
210
      iprot_.readMessageEnd();
176
      receiveBase(result, "getPromotionById");
211
      if (result.isSetSuccess()) {
177
      if (result.isSetSuccess()) {
212
        return result.success;
178
        return result.success;
213
      }
179
      }
214
      if (result.pex != null) {
180
      if (result.pex != null) {
215
        throw result.pex;
181
        throw result.pex;
216
      }
182
      }
217
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getPromotionById failed: unknown result");
183
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPromotionById failed: unknown result");
218
    }
184
    }
219
 
185
 
220
    public void generateCouponsForPromotion(long promotionId, String couponCode) throws PromotionException, TException
186
    public void generateCouponsForPromotion(long promotionId, String couponCode) throws PromotionException, org.apache.thrift.TException
221
    {
187
    {
222
      send_generateCouponsForPromotion(promotionId, couponCode);
188
      send_generateCouponsForPromotion(promotionId, couponCode);
223
      recv_generateCouponsForPromotion();
189
      recv_generateCouponsForPromotion();
224
    }
190
    }
225
 
191
 
226
    public void send_generateCouponsForPromotion(long promotionId, String couponCode) throws TException
192
    public void send_generateCouponsForPromotion(long promotionId, String couponCode) throws org.apache.thrift.TException
227
    {
193
    {
228
      oprot_.writeMessageBegin(new TMessage("generateCouponsForPromotion", TMessageType.CALL, seqid_));
-
 
229
      generateCouponsForPromotion_args args = new generateCouponsForPromotion_args();
194
      generateCouponsForPromotion_args args = new generateCouponsForPromotion_args();
230
      args.promotionId = promotionId;
195
      args.setPromotionId(promotionId);
231
      args.couponCode = couponCode;
196
      args.setCouponCode(couponCode);
232
      args.write(oprot_);
-
 
233
      oprot_.writeMessageEnd();
-
 
234
      oprot_.getTransport().flush();
197
      sendBase("generateCouponsForPromotion", args);
235
    }
198
    }
236
 
199
 
237
    public void recv_generateCouponsForPromotion() throws PromotionException, TException
200
    public void recv_generateCouponsForPromotion() throws PromotionException, org.apache.thrift.TException
238
    {
201
    {
239
      TMessage msg = iprot_.readMessageBegin();
-
 
240
      if (msg.type == TMessageType.EXCEPTION) {
-
 
241
        TApplicationException x = TApplicationException.read(iprot_);
-
 
242
        iprot_.readMessageEnd();
-
 
243
        throw x;
-
 
244
      }
-
 
245
      generateCouponsForPromotion_result result = new generateCouponsForPromotion_result();
202
      generateCouponsForPromotion_result result = new generateCouponsForPromotion_result();
246
      result.read(iprot_);
203
      receiveBase(result, "generateCouponsForPromotion");
247
      iprot_.readMessageEnd();
-
 
248
      if (result.pex != null) {
204
      if (result.pex != null) {
249
        throw result.pex;
205
        throw result.pex;
250
      }
206
      }
251
      return;
207
      return;
252
    }
208
    }
253
 
209
 
254
    public Cart applyCoupon(String couponCode, long cartId) throws PromotionException, TException
210
    public Cart applyCoupon(String couponCode, long cartId) throws PromotionException, org.apache.thrift.TException
255
    {
211
    {
256
      send_applyCoupon(couponCode, cartId);
212
      send_applyCoupon(couponCode, cartId);
257
      return recv_applyCoupon();
213
      return recv_applyCoupon();
258
    }
214
    }
259
 
215
 
260
    public void send_applyCoupon(String couponCode, long cartId) throws TException
216
    public void send_applyCoupon(String couponCode, long cartId) throws org.apache.thrift.TException
261
    {
217
    {
262
      oprot_.writeMessageBegin(new TMessage("applyCoupon", TMessageType.CALL, seqid_));
-
 
263
      applyCoupon_args args = new applyCoupon_args();
218
      applyCoupon_args args = new applyCoupon_args();
264
      args.couponCode = couponCode;
219
      args.setCouponCode(couponCode);
265
      args.cartId = cartId;
220
      args.setCartId(cartId);
266
      args.write(oprot_);
-
 
267
      oprot_.writeMessageEnd();
-
 
268
      oprot_.getTransport().flush();
221
      sendBase("applyCoupon", args);
269
    }
222
    }
270
 
223
 
271
    public Cart recv_applyCoupon() throws PromotionException, TException
224
    public Cart recv_applyCoupon() throws PromotionException, org.apache.thrift.TException
272
    {
225
    {
273
      TMessage msg = iprot_.readMessageBegin();
-
 
274
      if (msg.type == TMessageType.EXCEPTION) {
-
 
275
        TApplicationException x = TApplicationException.read(iprot_);
-
 
276
        iprot_.readMessageEnd();
-
 
277
        throw x;
-
 
278
      }
-
 
279
      applyCoupon_result result = new applyCoupon_result();
226
      applyCoupon_result result = new applyCoupon_result();
280
      result.read(iprot_);
227
      receiveBase(result, "applyCoupon");
281
      iprot_.readMessageEnd();
-
 
282
      if (result.isSetSuccess()) {
228
      if (result.isSetSuccess()) {
283
        return result.success;
229
        return result.success;
284
      }
230
      }
285
      if (result.pex != null) {
231
      if (result.pex != null) {
286
        throw result.pex;
232
        throw result.pex;
287
      }
233
      }
288
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "applyCoupon failed: unknown result");
234
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "applyCoupon failed: unknown result");
289
    }
235
    }
290
 
236
 
291
    public void trackCouponUsage(String couponCode, long transactionId, long userId) throws PromotionException, TException
237
    public void trackCouponUsage(String couponCode, long transactionId, long userId) throws PromotionException, org.apache.thrift.TException
292
    {
238
    {
293
      send_trackCouponUsage(couponCode, transactionId, userId);
239
      send_trackCouponUsage(couponCode, transactionId, userId);
294
      recv_trackCouponUsage();
240
      recv_trackCouponUsage();
295
    }
241
    }
296
 
242
 
297
    public void send_trackCouponUsage(String couponCode, long transactionId, long userId) throws TException
243
    public void send_trackCouponUsage(String couponCode, long transactionId, long userId) throws org.apache.thrift.TException
298
    {
244
    {
299
      oprot_.writeMessageBegin(new TMessage("trackCouponUsage", TMessageType.CALL, seqid_));
-
 
300
      trackCouponUsage_args args = new trackCouponUsage_args();
245
      trackCouponUsage_args args = new trackCouponUsage_args();
301
      args.couponCode = couponCode;
246
      args.setCouponCode(couponCode);
302
      args.transactionId = transactionId;
247
      args.setTransactionId(transactionId);
303
      args.userId = userId;
248
      args.setUserId(userId);
304
      args.write(oprot_);
-
 
305
      oprot_.writeMessageEnd();
-
 
306
      oprot_.getTransport().flush();
249
      sendBase("trackCouponUsage", args);
307
    }
250
    }
308
 
251
 
309
    public void recv_trackCouponUsage() throws PromotionException, TException
252
    public void recv_trackCouponUsage() throws PromotionException, org.apache.thrift.TException
310
    {
253
    {
311
      TMessage msg = iprot_.readMessageBegin();
-
 
312
      if (msg.type == TMessageType.EXCEPTION) {
-
 
313
        TApplicationException x = TApplicationException.read(iprot_);
-
 
314
        iprot_.readMessageEnd();
-
 
315
        throw x;
-
 
316
      }
-
 
317
      trackCouponUsage_result result = new trackCouponUsage_result();
254
      trackCouponUsage_result result = new trackCouponUsage_result();
318
      result.read(iprot_);
255
      receiveBase(result, "trackCouponUsage");
319
      iprot_.readMessageEnd();
-
 
320
      if (result.pex != null) {
256
      if (result.pex != null) {
321
        throw result.pex;
257
        throw result.pex;
322
      }
258
      }
323
      return;
259
      return;
324
    }
260
    }
325
 
261
 
326
    public long getCouponUsageCountByUser(String couponCode, long userId) throws PromotionException, TException
262
    public long getCouponUsageCountByUser(String couponCode, long userId) throws PromotionException, org.apache.thrift.TException
327
    {
263
    {
328
      send_getCouponUsageCountByUser(couponCode, userId);
264
      send_getCouponUsageCountByUser(couponCode, userId);
329
      return recv_getCouponUsageCountByUser();
265
      return recv_getCouponUsageCountByUser();
330
    }
266
    }
331
 
267
 
332
    public void send_getCouponUsageCountByUser(String couponCode, long userId) throws TException
268
    public void send_getCouponUsageCountByUser(String couponCode, long userId) throws org.apache.thrift.TException
333
    {
269
    {
334
      oprot_.writeMessageBegin(new TMessage("getCouponUsageCountByUser", TMessageType.CALL, seqid_));
-
 
335
      getCouponUsageCountByUser_args args = new getCouponUsageCountByUser_args();
270
      getCouponUsageCountByUser_args args = new getCouponUsageCountByUser_args();
336
      args.couponCode = couponCode;
271
      args.setCouponCode(couponCode);
337
      args.userId = userId;
272
      args.setUserId(userId);
338
      args.write(oprot_);
-
 
339
      oprot_.writeMessageEnd();
-
 
340
      oprot_.getTransport().flush();
273
      sendBase("getCouponUsageCountByUser", args);
341
    }
274
    }
342
 
275
 
343
    public long recv_getCouponUsageCountByUser() throws PromotionException, TException
276
    public long recv_getCouponUsageCountByUser() throws PromotionException, org.apache.thrift.TException
344
    {
277
    {
345
      TMessage msg = iprot_.readMessageBegin();
-
 
346
      if (msg.type == TMessageType.EXCEPTION) {
-
 
347
        TApplicationException x = TApplicationException.read(iprot_);
-
 
348
        iprot_.readMessageEnd();
-
 
349
        throw x;
-
 
350
      }
-
 
351
      getCouponUsageCountByUser_result result = new getCouponUsageCountByUser_result();
278
      getCouponUsageCountByUser_result result = new getCouponUsageCountByUser_result();
352
      result.read(iprot_);
-
 
353
      iprot_.readMessageEnd();
279
      receiveBase(result, "getCouponUsageCountByUser");
354
      if (result.isSetSuccess()) {
280
      if (result.isSetSuccess()) {
355
        return result.success;
281
        return result.success;
356
      }
282
      }
357
      if (result.pex != null) {
283
      if (result.pex != null) {
358
        throw result.pex;
284
        throw result.pex;
359
      }
285
      }
360
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCouponUsageCountByUser failed: unknown result");
286
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCouponUsageCountByUser failed: unknown result");
361
    }
287
    }
362
 
288
 
363
    public List<Coupon> getActiveCoupons() throws PromotionException, TException
289
    public List<Coupon> getActiveCoupons() throws PromotionException, org.apache.thrift.TException
364
    {
290
    {
365
      send_getActiveCoupons();
291
      send_getActiveCoupons();
366
      return recv_getActiveCoupons();
292
      return recv_getActiveCoupons();
367
    }
293
    }
368
 
294
 
369
    public void send_getActiveCoupons() throws TException
295
    public void send_getActiveCoupons() throws org.apache.thrift.TException
370
    {
296
    {
371
      oprot_.writeMessageBegin(new TMessage("getActiveCoupons", TMessageType.CALL, seqid_));
-
 
372
      getActiveCoupons_args args = new getActiveCoupons_args();
297
      getActiveCoupons_args args = new getActiveCoupons_args();
373
      args.write(oprot_);
-
 
374
      oprot_.writeMessageEnd();
-
 
375
      oprot_.getTransport().flush();
298
      sendBase("getActiveCoupons", args);
376
    }
299
    }
377
 
300
 
378
    public List<Coupon> recv_getActiveCoupons() throws PromotionException, TException
301
    public List<Coupon> recv_getActiveCoupons() throws PromotionException, org.apache.thrift.TException
379
    {
302
    {
380
      TMessage msg = iprot_.readMessageBegin();
-
 
381
      if (msg.type == TMessageType.EXCEPTION) {
-
 
382
        TApplicationException x = TApplicationException.read(iprot_);
-
 
383
        iprot_.readMessageEnd();
-
 
384
        throw x;
-
 
385
      }
-
 
386
      getActiveCoupons_result result = new getActiveCoupons_result();
303
      getActiveCoupons_result result = new getActiveCoupons_result();
387
      result.read(iprot_);
304
      receiveBase(result, "getActiveCoupons");
388
      iprot_.readMessageEnd();
-
 
389
      if (result.isSetSuccess()) {
305
      if (result.isSetSuccess()) {
390
        return result.success;
306
        return result.success;
391
      }
307
      }
392
      if (result.pex != null) {
308
      if (result.pex != null) {
393
        throw result.pex;
309
        throw result.pex;
394
      }
310
      }
395
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getActiveCoupons failed: unknown result");
311
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getActiveCoupons failed: unknown result");
396
    }
312
    }
397
 
313
 
398
    public long getSuccessfulPaymentCountForCoupon(String couponCode) throws PromotionException, TException
314
    public long getSuccessfulPaymentCountForCoupon(String couponCode) throws PromotionException, org.apache.thrift.TException
399
    {
315
    {
400
      send_getSuccessfulPaymentCountForCoupon(couponCode);
316
      send_getSuccessfulPaymentCountForCoupon(couponCode);
401
      return recv_getSuccessfulPaymentCountForCoupon();
317
      return recv_getSuccessfulPaymentCountForCoupon();
402
    }
318
    }
403
 
319
 
404
    public void send_getSuccessfulPaymentCountForCoupon(String couponCode) throws TException
320
    public void send_getSuccessfulPaymentCountForCoupon(String couponCode) throws org.apache.thrift.TException
405
    {
321
    {
406
      oprot_.writeMessageBegin(new TMessage("getSuccessfulPaymentCountForCoupon", TMessageType.CALL, seqid_));
-
 
407
      getSuccessfulPaymentCountForCoupon_args args = new getSuccessfulPaymentCountForCoupon_args();
322
      getSuccessfulPaymentCountForCoupon_args args = new getSuccessfulPaymentCountForCoupon_args();
408
      args.couponCode = couponCode;
323
      args.setCouponCode(couponCode);
409
      args.write(oprot_);
-
 
410
      oprot_.writeMessageEnd();
-
 
411
      oprot_.getTransport().flush();
324
      sendBase("getSuccessfulPaymentCountForCoupon", args);
412
    }
325
    }
413
 
326
 
414
    public long recv_getSuccessfulPaymentCountForCoupon() throws PromotionException, TException
327
    public long recv_getSuccessfulPaymentCountForCoupon() throws PromotionException, org.apache.thrift.TException
415
    {
328
    {
416
      TMessage msg = iprot_.readMessageBegin();
-
 
417
      if (msg.type == TMessageType.EXCEPTION) {
-
 
418
        TApplicationException x = TApplicationException.read(iprot_);
-
 
419
        iprot_.readMessageEnd();
-
 
420
        throw x;
-
 
421
      }
-
 
422
      getSuccessfulPaymentCountForCoupon_result result = new getSuccessfulPaymentCountForCoupon_result();
329
      getSuccessfulPaymentCountForCoupon_result result = new getSuccessfulPaymentCountForCoupon_result();
423
      result.read(iprot_);
-
 
424
      iprot_.readMessageEnd();
330
      receiveBase(result, "getSuccessfulPaymentCountForCoupon");
425
      if (result.isSetSuccess()) {
331
      if (result.isSetSuccess()) {
426
        return result.success;
332
        return result.success;
427
      }
333
      }
428
      if (result.pex != null) {
334
      if (result.pex != null) {
429
        throw result.pex;
335
        throw result.pex;
430
      }
336
      }
431
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getSuccessfulPaymentCountForCoupon failed: unknown result");
337
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSuccessfulPaymentCountForCoupon failed: unknown result");
432
    }
338
    }
433
 
339
 
434
    public String getRuleDocString(String ruleName) throws TException
340
    public String getRuleDocString(String ruleName) throws org.apache.thrift.TException
435
    {
341
    {
436
      send_getRuleDocString(ruleName);
342
      send_getRuleDocString(ruleName);
437
      return recv_getRuleDocString();
343
      return recv_getRuleDocString();
438
    }
344
    }
439
 
345
 
440
    public void send_getRuleDocString(String ruleName) throws TException
346
    public void send_getRuleDocString(String ruleName) throws org.apache.thrift.TException
441
    {
347
    {
442
      oprot_.writeMessageBegin(new TMessage("getRuleDocString", TMessageType.CALL, seqid_));
-
 
443
      getRuleDocString_args args = new getRuleDocString_args();
348
      getRuleDocString_args args = new getRuleDocString_args();
444
      args.ruleName = ruleName;
349
      args.setRuleName(ruleName);
445
      args.write(oprot_);
-
 
446
      oprot_.writeMessageEnd();
-
 
447
      oprot_.getTransport().flush();
350
      sendBase("getRuleDocString", args);
448
    }
351
    }
449
 
352
 
450
    public String recv_getRuleDocString() throws TException
353
    public String recv_getRuleDocString() throws org.apache.thrift.TException
451
    {
354
    {
452
      TMessage msg = iprot_.readMessageBegin();
-
 
453
      if (msg.type == TMessageType.EXCEPTION) {
-
 
454
        TApplicationException x = TApplicationException.read(iprot_);
-
 
455
        iprot_.readMessageEnd();
-
 
456
        throw x;
-
 
457
      }
-
 
458
      getRuleDocString_result result = new getRuleDocString_result();
355
      getRuleDocString_result result = new getRuleDocString_result();
459
      result.read(iprot_);
356
      receiveBase(result, "getRuleDocString");
460
      iprot_.readMessageEnd();
-
 
461
      if (result.isSetSuccess()) {
357
      if (result.isSetSuccess()) {
462
        return result.success;
358
        return result.success;
463
      }
359
      }
464
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getRuleDocString failed: unknown result");
360
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRuleDocString failed: unknown result");
465
    }
361
    }
466
 
362
 
467
  }
363
  }
468
  public static class Processor extends in.shop2020.generic.GenericService.Processor implements TProcessor {
364
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
469
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
365
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
470
    public Processor(Iface iface)
-
 
471
    {
-
 
472
      super(iface);
-
 
473
      iface_ = iface;
-
 
474
      processMap_.put("closeSession", new closeSession());
-
 
475
      processMap_.put("createPromotion", new createPromotion());
-
 
476
      processMap_.put("getAllPromotions", new getAllPromotions());
-
 
477
      processMap_.put("getPromotionById", new getPromotionById());
-
 
478
      processMap_.put("generateCouponsForPromotion", new generateCouponsForPromotion());
-
 
479
      processMap_.put("applyCoupon", new applyCoupon());
-
 
480
      processMap_.put("trackCouponUsage", new trackCouponUsage());
-
 
481
      processMap_.put("getCouponUsageCountByUser", new getCouponUsageCountByUser());
-
 
482
      processMap_.put("getActiveCoupons", new getActiveCoupons());
366
      private org.apache.thrift.async.TAsyncClientManager clientManager;
483
      processMap_.put("getSuccessfulPaymentCountForCoupon", new getSuccessfulPaymentCountForCoupon());
-
 
484
      processMap_.put("getRuleDocString", new getRuleDocString());
-
 
485
    }
-
 
486
 
-
 
487
    private Iface iface_;
-
 
488
 
-
 
489
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
367
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
490
    {
-
 
491
      TMessage msg = iprot.readMessageBegin();
-
 
492
      ProcessFunction fn = processMap_.get(msg.name);
-
 
493
      if (fn == null) {
-
 
494
        TProtocolUtil.skip(iprot, TType.STRUCT);
-
 
495
        iprot.readMessageEnd();
-
 
496
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
368
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
497
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
-
 
498
        x.write(oprot);
-
 
499
        oprot.writeMessageEnd();
369
        this.clientManager = clientManager;
500
        oprot.getTransport().flush();
370
        this.protocolFactory = protocolFactory;
501
        return true;
-
 
502
      }
371
      }
503
      fn.process(msg.seqid, iprot, oprot);
-
 
504
      return true;
-
 
505
    }
-
 
506
 
-
 
507
    private class closeSession implements ProcessFunction {
-
 
508
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
372
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
509
      {
-
 
510
        closeSession_args args = new closeSession_args();
-
 
511
        args.read(iprot);
-
 
512
        iprot.readMessageEnd();
-
 
513
        closeSession_result result = new closeSession_result();
373
        return new AsyncClient(protocolFactory, clientManager, transport);
514
        iface_.closeSession();
-
 
515
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
-
 
516
        result.write(oprot);
-
 
517
        oprot.writeMessageEnd();
-
 
518
        oprot.getTransport().flush();
-
 
519
      }
374
      }
520
 
-
 
521
    }
375
    }
522
 
376
 
523
    private class createPromotion implements ProcessFunction {
-
 
524
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
525
      {
-
 
526
        createPromotion_args args = new createPromotion_args();
-
 
527
        args.read(iprot);
-
 
528
        iprot.readMessageEnd();
-
 
529
        createPromotion_result result = new createPromotion_result();
-
 
530
        try {
-
 
531
          iface_.createPromotion(args.name, args.ruleExecutionSrc, args.startOn, args.endOn);
-
 
532
        } catch (PromotionException pex) {
-
 
533
          result.pex = pex;
-
 
534
        } catch (Throwable th) {
-
 
535
          LOGGER.error("Internal error processing createPromotion", th);
-
 
536
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createPromotion");
377
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
537
          oprot.writeMessageBegin(new TMessage("createPromotion", TMessageType.EXCEPTION, seqid));
-
 
538
          x.write(oprot);
-
 
539
          oprot.writeMessageEnd();
-
 
540
          oprot.getTransport().flush();
378
      super(protocolFactory, clientManager, transport);
541
          return;
-
 
542
        }
-
 
543
        oprot.writeMessageBegin(new TMessage("createPromotion", TMessageType.REPLY, seqid));
-
 
544
        result.write(oprot);
-
 
545
        oprot.writeMessageEnd();
-
 
546
        oprot.getTransport().flush();
-
 
547
      }
379
    }
548
 
380
 
-
 
381
    public void createPromotion(String name, String ruleExecutionSrc, long startOn, long endOn, org.apache.thrift.async.AsyncMethodCallback<createPromotion_call> resultHandler) throws org.apache.thrift.TException {
-
 
382
      checkReady();
-
 
383
      createPromotion_call method_call = new createPromotion_call(name, ruleExecutionSrc, startOn, endOn, resultHandler, this, ___protocolFactory, ___transport);
-
 
384
      this.___currentMethod = method_call;
-
 
385
      ___manager.call(method_call);
549
    }
386
    }
550
 
387
 
551
    private class getAllPromotions implements ProcessFunction {
388
    public static class createPromotion_call extends org.apache.thrift.async.TAsyncMethodCall {
552
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
553
      {
-
 
554
        getAllPromotions_args args = new getAllPromotions_args();
-
 
555
        args.read(iprot);
-
 
556
        iprot.readMessageEnd();
389
      private String name;
557
        getAllPromotions_result result = new getAllPromotions_result();
-
 
558
        try {
-
 
559
          result.success = iface_.getAllPromotions();
-
 
560
        } catch (PromotionException pex) {
390
      private String ruleExecutionSrc;
561
          result.pex = pex;
391
      private long startOn;
562
        } catch (Throwable th) {
392
      private long endOn;
563
          LOGGER.error("Internal error processing getAllPromotions", th);
-
 
564
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllPromotions");
393
      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 {
565
          oprot.writeMessageBegin(new TMessage("getAllPromotions", TMessageType.EXCEPTION, seqid));
394
        super(client, protocolFactory, transport, resultHandler, false);
566
          x.write(oprot);
395
        this.name = name;
567
          oprot.writeMessageEnd();
-
 
568
          oprot.getTransport().flush();
396
        this.ruleExecutionSrc = ruleExecutionSrc;
569
          return;
-
 
570
        }
-
 
571
        oprot.writeMessageBegin(new TMessage("getAllPromotions", TMessageType.REPLY, seqid));
-
 
572
        result.write(oprot);
397
        this.startOn = startOn;
573
        oprot.writeMessageEnd();
398
        this.endOn = endOn;
574
        oprot.getTransport().flush();
-
 
575
      }
399
      }
576
 
400
 
-
 
401
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
402
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPromotion", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
403
        createPromotion_args args = new createPromotion_args();
-
 
404
        args.setName(name);
-
 
405
        args.setRuleExecutionSrc(ruleExecutionSrc);
-
 
406
        args.setStartOn(startOn);
-
 
407
        args.setEndOn(endOn);
-
 
408
        args.write(prot);
-
 
409
        prot.writeMessageEnd();
577
    }
410
      }
578
 
411
 
579
    private class getPromotionById implements ProcessFunction {
-
 
580
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
412
      public void getResult() throws PromotionException, org.apache.thrift.TException {
581
      {
-
 
582
        getPromotionById_args args = new getPromotionById_args();
-
 
583
        args.read(iprot);
-
 
584
        iprot.readMessageEnd();
-
 
585
        getPromotionById_result result = new getPromotionById_result();
-
 
586
        try {
-
 
587
          result.success = iface_.getPromotionById(args.promotionId);
413
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
588
        } catch (PromotionException pex) {
-
 
589
          result.pex = pex;
-
 
590
        } catch (Throwable th) {
-
 
591
          LOGGER.error("Internal error processing getPromotionById", th);
414
          throw new IllegalStateException("Method call not finished!");
592
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getPromotionById");
-
 
593
          oprot.writeMessageBegin(new TMessage("getPromotionById", TMessageType.EXCEPTION, seqid));
-
 
594
          x.write(oprot);
-
 
595
          oprot.writeMessageEnd();
-
 
596
          oprot.getTransport().flush();
-
 
597
          return;
-
 
598
        }
415
        }
599
        oprot.writeMessageBegin(new TMessage("getPromotionById", TMessageType.REPLY, seqid));
416
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
600
        result.write(oprot);
-
 
601
        oprot.writeMessageEnd();
417
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
602
        oprot.getTransport().flush();
418
        (new Client(prot)).recv_createPromotion();
603
      }
419
      }
-
 
420
    }
604
 
421
 
-
 
422
    public void getAllPromotions(org.apache.thrift.async.AsyncMethodCallback<getAllPromotions_call> resultHandler) throws org.apache.thrift.TException {
-
 
423
      checkReady();
-
 
424
      getAllPromotions_call method_call = new getAllPromotions_call(resultHandler, this, ___protocolFactory, ___transport);
-
 
425
      this.___currentMethod = method_call;
-
 
426
      ___manager.call(method_call);
605
    }
427
    }
606
 
428
 
607
    private class generateCouponsForPromotion implements ProcessFunction {
429
    public static class getAllPromotions_call extends org.apache.thrift.async.TAsyncMethodCall {
608
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
609
      {
430
      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 {
610
        generateCouponsForPromotion_args args = new generateCouponsForPromotion_args();
431
        super(client, protocolFactory, transport, resultHandler, false);
611
        args.read(iprot);
-
 
612
        iprot.readMessageEnd();
-
 
613
        generateCouponsForPromotion_result result = new generateCouponsForPromotion_result();
-
 
614
        try {
-
 
615
          iface_.generateCouponsForPromotion(args.promotionId, args.couponCode);
-
 
616
        } catch (PromotionException pex) {
-
 
617
          result.pex = pex;
-
 
618
        } catch (Throwable th) {
-
 
619
          LOGGER.error("Internal error processing generateCouponsForPromotion", th);
-
 
620
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing generateCouponsForPromotion");
-
 
621
          oprot.writeMessageBegin(new TMessage("generateCouponsForPromotion", TMessageType.EXCEPTION, seqid));
-
 
622
          x.write(oprot);
-
 
623
          oprot.writeMessageEnd();
-
 
624
          oprot.getTransport().flush();
-
 
625
          return;
-
 
626
        }
-
 
627
        oprot.writeMessageBegin(new TMessage("generateCouponsForPromotion", TMessageType.REPLY, seqid));
-
 
628
        result.write(oprot);
-
 
629
        oprot.writeMessageEnd();
-
 
630
        oprot.getTransport().flush();
-
 
631
      }
432
      }
632
 
433
 
-
 
434
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
435
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPromotions", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
436
        getAllPromotions_args args = new getAllPromotions_args();
-
 
437
        args.write(prot);
-
 
438
        prot.writeMessageEnd();
633
    }
439
      }
634
 
440
 
635
    private class applyCoupon implements ProcessFunction {
-
 
636
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
441
      public List<Promotion> getResult() throws PromotionException, org.apache.thrift.TException {
637
      {
-
 
638
        applyCoupon_args args = new applyCoupon_args();
-
 
639
        args.read(iprot);
-
 
640
        iprot.readMessageEnd();
-
 
641
        applyCoupon_result result = new applyCoupon_result();
-
 
642
        try {
-
 
643
          result.success = iface_.applyCoupon(args.couponCode, args.cartId);
442
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
644
        } catch (PromotionException pex) {
-
 
645
          result.pex = pex;
-
 
646
        } catch (Throwable th) {
-
 
647
          LOGGER.error("Internal error processing applyCoupon", th);
443
          throw new IllegalStateException("Method call not finished!");
648
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing applyCoupon");
-
 
649
          oprot.writeMessageBegin(new TMessage("applyCoupon", TMessageType.EXCEPTION, seqid));
-
 
650
          x.write(oprot);
-
 
651
          oprot.writeMessageEnd();
-
 
652
          oprot.getTransport().flush();
-
 
653
          return;
-
 
654
        }
444
        }
655
        oprot.writeMessageBegin(new TMessage("applyCoupon", TMessageType.REPLY, seqid));
445
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
656
        result.write(oprot);
-
 
657
        oprot.writeMessageEnd();
446
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
658
        oprot.getTransport().flush();
447
        return (new Client(prot)).recv_getAllPromotions();
659
      }
448
      }
-
 
449
    }
660
 
450
 
-
 
451
    public void getPromotionById(long promotionId, org.apache.thrift.async.AsyncMethodCallback<getPromotionById_call> resultHandler) throws org.apache.thrift.TException {
-
 
452
      checkReady();
-
 
453
      getPromotionById_call method_call = new getPromotionById_call(promotionId, resultHandler, this, ___protocolFactory, ___transport);
-
 
454
      this.___currentMethod = method_call;
-
 
455
      ___manager.call(method_call);
661
    }
456
    }
662
 
457
 
663
    private class trackCouponUsage implements ProcessFunction {
458
    public static class getPromotionById_call extends org.apache.thrift.async.TAsyncMethodCall {
664
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
665
      {
-
 
666
        trackCouponUsage_args args = new trackCouponUsage_args();
-
 
667
        args.read(iprot);
459
      private long promotionId;
668
        iprot.readMessageEnd();
460
      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 {
669
        trackCouponUsage_result result = new trackCouponUsage_result();
-
 
670
        try {
-
 
671
          iface_.trackCouponUsage(args.couponCode, args.transactionId, args.userId);
461
        super(client, protocolFactory, transport, resultHandler, false);
672
        } catch (PromotionException pex) {
462
        this.promotionId = promotionId;
673
          result.pex = pex;
-
 
674
        } catch (Throwable th) {
-
 
675
          LOGGER.error("Internal error processing trackCouponUsage", th);
-
 
676
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing trackCouponUsage");
-
 
677
          oprot.writeMessageBegin(new TMessage("trackCouponUsage", TMessageType.EXCEPTION, seqid));
-
 
678
          x.write(oprot);
-
 
679
          oprot.writeMessageEnd();
-
 
680
          oprot.getTransport().flush();
-
 
681
          return;
-
 
682
        }
-
 
683
        oprot.writeMessageBegin(new TMessage("trackCouponUsage", TMessageType.REPLY, seqid));
-
 
684
        result.write(oprot);
-
 
685
        oprot.writeMessageEnd();
-
 
686
        oprot.getTransport().flush();
-
 
687
      }
463
      }
688
 
464
 
-
 
465
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
466
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPromotionById", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
467
        getPromotionById_args args = new getPromotionById_args();
-
 
468
        args.setPromotionId(promotionId);
-
 
469
        args.write(prot);
-
 
470
        prot.writeMessageEnd();
689
    }
471
      }
690
 
472
 
691
    private class getCouponUsageCountByUser implements ProcessFunction {
-
 
692
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
473
      public Promotion getResult() throws PromotionException, org.apache.thrift.TException {
693
      {
-
 
694
        getCouponUsageCountByUser_args args = new getCouponUsageCountByUser_args();
474
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
695
        args.read(iprot);
-
 
696
        iprot.readMessageEnd();
-
 
697
        getCouponUsageCountByUser_result result = new getCouponUsageCountByUser_result();
-
 
698
        try {
-
 
699
          result.success = iface_.getCouponUsageCountByUser(args.couponCode, args.userId);
-
 
700
          result.setSuccessIsSet(true);
-
 
701
        } catch (PromotionException pex) {
-
 
702
          result.pex = pex;
-
 
703
        } catch (Throwable th) {
-
 
704
          LOGGER.error("Internal error processing getCouponUsageCountByUser", th);
475
          throw new IllegalStateException("Method call not finished!");
705
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCouponUsageCountByUser");
-
 
706
          oprot.writeMessageBegin(new TMessage("getCouponUsageCountByUser", TMessageType.EXCEPTION, seqid));
-
 
707
          x.write(oprot);
-
 
708
          oprot.writeMessageEnd();
-
 
709
          oprot.getTransport().flush();
-
 
710
          return;
-
 
711
        }
476
        }
712
        oprot.writeMessageBegin(new TMessage("getCouponUsageCountByUser", TMessageType.REPLY, seqid));
477
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
713
        result.write(oprot);
-
 
714
        oprot.writeMessageEnd();
478
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
715
        oprot.getTransport().flush();
479
        return (new Client(prot)).recv_getPromotionById();
716
      }
480
      }
-
 
481
    }
717
 
482
 
-
 
483
    public void generateCouponsForPromotion(long promotionId, String couponCode, org.apache.thrift.async.AsyncMethodCallback<generateCouponsForPromotion_call> resultHandler) throws org.apache.thrift.TException {
-
 
484
      checkReady();
-
 
485
      generateCouponsForPromotion_call method_call = new generateCouponsForPromotion_call(promotionId, couponCode, resultHandler, this, ___protocolFactory, ___transport);
-
 
486
      this.___currentMethod = method_call;
-
 
487
      ___manager.call(method_call);
718
    }
488
    }
719
 
489
 
720
    private class getActiveCoupons implements ProcessFunction {
490
    public static class generateCouponsForPromotion_call extends org.apache.thrift.async.TAsyncMethodCall {
721
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
722
      {
-
 
723
        getActiveCoupons_args args = new getActiveCoupons_args();
-
 
724
        args.read(iprot);
491
      private long promotionId;
725
        iprot.readMessageEnd();
492
      private String couponCode;
726
        getActiveCoupons_result result = new getActiveCoupons_result();
-
 
727
        try {
493
      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 {
728
          result.success = iface_.getActiveCoupons();
494
        super(client, protocolFactory, transport, resultHandler, false);
729
        } catch (PromotionException pex) {
495
        this.promotionId = promotionId;
730
          result.pex = pex;
-
 
731
        } catch (Throwable th) {
-
 
732
          LOGGER.error("Internal error processing getActiveCoupons", th);
-
 
733
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getActiveCoupons");
-
 
734
          oprot.writeMessageBegin(new TMessage("getActiveCoupons", TMessageType.EXCEPTION, seqid));
-
 
735
          x.write(oprot);
-
 
736
          oprot.writeMessageEnd();
-
 
737
          oprot.getTransport().flush();
-
 
738
          return;
-
 
739
        }
-
 
740
        oprot.writeMessageBegin(new TMessage("getActiveCoupons", TMessageType.REPLY, seqid));
-
 
741
        result.write(oprot);
496
        this.couponCode = couponCode;
742
        oprot.writeMessageEnd();
-
 
743
        oprot.getTransport().flush();
-
 
744
      }
497
      }
745
 
498
 
-
 
499
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
500
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("generateCouponsForPromotion", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
501
        generateCouponsForPromotion_args args = new generateCouponsForPromotion_args();
-
 
502
        args.setPromotionId(promotionId);
-
 
503
        args.setCouponCode(couponCode);
-
 
504
        args.write(prot);
-
 
505
        prot.writeMessageEnd();
746
    }
506
      }
747
 
507
 
748
    private class getSuccessfulPaymentCountForCoupon implements ProcessFunction {
-
 
749
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
508
      public void getResult() throws PromotionException, org.apache.thrift.TException {
750
      {
-
 
751
        getSuccessfulPaymentCountForCoupon_args args = new getSuccessfulPaymentCountForCoupon_args();
-
 
752
        args.read(iprot);
-
 
753
        iprot.readMessageEnd();
-
 
754
        getSuccessfulPaymentCountForCoupon_result result = new getSuccessfulPaymentCountForCoupon_result();
-
 
755
        try {
-
 
756
          result.success = iface_.getSuccessfulPaymentCountForCoupon(args.couponCode);
509
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
757
          result.setSuccessIsSet(true);
-
 
758
        } catch (PromotionException pex) {
-
 
759
          result.pex = pex;
-
 
760
        } catch (Throwable th) {
-
 
761
          LOGGER.error("Internal error processing getSuccessfulPaymentCountForCoupon", th);
510
          throw new IllegalStateException("Method call not finished!");
762
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getSuccessfulPaymentCountForCoupon");
-
 
763
          oprot.writeMessageBegin(new TMessage("getSuccessfulPaymentCountForCoupon", TMessageType.EXCEPTION, seqid));
-
 
764
          x.write(oprot);
-
 
765
          oprot.writeMessageEnd();
-
 
766
          oprot.getTransport().flush();
-
 
767
          return;
-
 
768
        }
511
        }
769
        oprot.writeMessageBegin(new TMessage("getSuccessfulPaymentCountForCoupon", TMessageType.REPLY, seqid));
512
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
770
        result.write(oprot);
-
 
771
        oprot.writeMessageEnd();
513
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
772
        oprot.getTransport().flush();
514
        (new Client(prot)).recv_generateCouponsForPromotion();
773
      }
515
      }
774
 
-
 
775
    }
516
    }
776
 
517
 
777
    private class getRuleDocString implements ProcessFunction {
-
 
778
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
518
    public void applyCoupon(String couponCode, long cartId, org.apache.thrift.async.AsyncMethodCallback<applyCoupon_call> resultHandler) throws org.apache.thrift.TException {
779
      {
-
 
780
        getRuleDocString_args args = new getRuleDocString_args();
-
 
781
        args.read(iprot);
519
      checkReady();
782
        iprot.readMessageEnd();
-
 
783
        getRuleDocString_result result = new getRuleDocString_result();
-
 
784
        result.success = iface_.getRuleDocString(args.ruleName);
-
 
785
        oprot.writeMessageBegin(new TMessage("getRuleDocString", TMessageType.REPLY, seqid));
520
      applyCoupon_call method_call = new applyCoupon_call(couponCode, cartId, resultHandler, this, ___protocolFactory, ___transport);
786
        result.write(oprot);
-
 
787
        oprot.writeMessageEnd();
521
      this.___currentMethod = method_call;
788
        oprot.getTransport().flush();
522
      ___manager.call(method_call);
789
      }
-
 
790
 
-
 
791
    }
523
    }
792
 
524
 
793
  }
-
 
794
 
-
 
795
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
-
 
796
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
525
    public static class applyCoupon_call extends org.apache.thrift.async.TAsyncMethodCall {
797
 
-
 
798
 
-
 
799
 
-
 
800
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
801
    public enum _Fields implements TFieldIdEnum {
526
      private String couponCode;
802
;
-
 
803
 
-
 
804
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
805
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
806
 
-
 
807
      static {
527
      private long cartId;
808
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
528
      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 {
809
          byId.put((int)field._thriftId, field);
529
        super(client, protocolFactory, transport, resultHandler, false);
810
          byName.put(field.getFieldName(), field);
530
        this.couponCode = couponCode;
811
        }
-
 
812
      }
-
 
813
 
-
 
814
      /**
-
 
815
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
816
       */
-
 
817
      public static _Fields findByThriftId(int fieldId) {
-
 
818
        return byId.get(fieldId);
531
        this.cartId = cartId;
819
      }
532
      }
820
 
533
 
821
      /**
-
 
822
       * Find the _Fields constant that matches fieldId, throwing an exception
534
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
535
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("applyCoupon", org.apache.thrift.protocol.TMessageType.CALL, 0));
823
       * if it is not found.
536
        applyCoupon_args args = new applyCoupon_args();
824
       */
-
 
825
      public static _Fields findByThriftIdOrThrow(int fieldId) {
537
        args.setCouponCode(couponCode);
826
        _Fields fields = findByThriftId(fieldId);
538
        args.setCartId(cartId);
827
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
539
        args.write(prot);
828
        return fields;
540
        prot.writeMessageEnd();
829
      }
541
      }
830
 
542
 
831
      /**
-
 
-
 
543
      public Cart getResult() throws PromotionException, org.apache.thrift.TException {
-
 
544
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
832
       * Find the _Fields constant that matches name, or null if its not found.
545
          throw new IllegalStateException("Method call not finished!");
833
       */
546
        }
-
 
547
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
834
      public static _Fields findByName(String name) {
548
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
835
        return byName.get(name);
549
        return (new Client(prot)).recv_applyCoupon();
836
      }
550
      }
-
 
551
    }
837
 
552
 
-
 
553
    public void trackCouponUsage(String couponCode, long transactionId, long userId, org.apache.thrift.async.AsyncMethodCallback<trackCouponUsage_call> resultHandler) throws org.apache.thrift.TException {
-
 
554
      checkReady();
-
 
555
      trackCouponUsage_call method_call = new trackCouponUsage_call(couponCode, transactionId, userId, resultHandler, this, ___protocolFactory, ___transport);
838
      private final short _thriftId;
556
      this.___currentMethod = method_call;
839
      private final String _fieldName;
557
      ___manager.call(method_call);
-
 
558
    }
840
 
559
 
-
 
560
    public static class trackCouponUsage_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
561
      private String couponCode;
-
 
562
      private long transactionId;
-
 
563
      private long userId;
841
      _Fields(short thriftId, String fieldName) {
564
      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 {
-
 
565
        super(client, protocolFactory, transport, resultHandler, false);
-
 
566
        this.couponCode = couponCode;
842
        _thriftId = thriftId;
567
        this.transactionId = transactionId;
843
        _fieldName = fieldName;
568
        this.userId = userId;
844
      }
569
      }
845
 
570
 
-
 
571
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
572
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("trackCouponUsage", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
573
        trackCouponUsage_args args = new trackCouponUsage_args();
-
 
574
        args.setCouponCode(couponCode);
-
 
575
        args.setTransactionId(transactionId);
846
      public short getThriftFieldId() {
576
        args.setUserId(userId);
847
        return _thriftId;
577
        args.write(prot);
-
 
578
        prot.writeMessageEnd();
848
      }
579
      }
849
 
580
 
850
      public String getFieldName() {
581
      public void getResult() throws PromotionException, org.apache.thrift.TException {
-
 
582
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
583
          throw new IllegalStateException("Method call not finished!");
-
 
584
        }
-
 
585
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
586
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
851
        return _fieldName;
587
        (new Client(prot)).recv_trackCouponUsage();
852
      }
588
      }
853
    }
589
    }
854
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
855
    }});
-
 
856
 
590
 
-
 
591
    public void getCouponUsageCountByUser(String couponCode, long userId, org.apache.thrift.async.AsyncMethodCallback<getCouponUsageCountByUser_call> resultHandler) throws org.apache.thrift.TException {
857
    static {
592
      checkReady();
-
 
593
      getCouponUsageCountByUser_call method_call = new getCouponUsageCountByUser_call(couponCode, userId, resultHandler, this, ___protocolFactory, ___transport);
858
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
594
      this.___currentMethod = method_call;
-
 
595
      ___manager.call(method_call);
859
    }
596
    }
860
 
597
 
-
 
598
    public static class getCouponUsageCountByUser_call extends org.apache.thrift.async.TAsyncMethodCall {
861
    public closeSession_args() {
599
      private String couponCode;
862
    }
-
 
863
 
-
 
864
    /**
-
 
865
     * Performs a deep copy on <i>other</i>.
600
      private long userId;
866
     */
601
      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 {
867
    public closeSession_args(closeSession_args other) {
602
        super(client, protocolFactory, transport, resultHandler, false);
868
    }
-
 
869
 
-
 
870
    public closeSession_args deepCopy() {
603
        this.couponCode = couponCode;
871
      return new closeSession_args(this);
604
        this.userId = userId;
872
    }
605
      }
873
 
606
 
-
 
607
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
608
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCouponUsageCountByUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
609
        getCouponUsageCountByUser_args args = new getCouponUsageCountByUser_args();
-
 
610
        args.setCouponCode(couponCode);
874
    @Deprecated
611
        args.setUserId(userId);
875
    public closeSession_args clone() {
612
        args.write(prot);
876
      return new closeSession_args(this);
613
        prot.writeMessageEnd();
877
    }
614
      }
878
 
615
 
879
    public void setFieldValue(_Fields field, Object value) {
616
      public long getResult() throws PromotionException, org.apache.thrift.TException {
-
 
617
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
618
          throw new IllegalStateException("Method call not finished!");
880
      switch (field) {
619
        }
-
 
620
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
621
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
622
        return (new Client(prot)).recv_getCouponUsageCountByUser();
881
      }
623
      }
882
    }
624
    }
883
 
625
 
-
 
626
    public void getActiveCoupons(org.apache.thrift.async.AsyncMethodCallback<getActiveCoupons_call> resultHandler) throws org.apache.thrift.TException {
-
 
627
      checkReady();
-
 
628
      getActiveCoupons_call method_call = new getActiveCoupons_call(resultHandler, this, ___protocolFactory, ___transport);
884
    public void setFieldValue(int fieldID, Object value) {
629
      this.___currentMethod = method_call;
885
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
630
      ___manager.call(method_call);
886
    }
631
    }
887
 
632
 
888
    public Object getFieldValue(_Fields field) {
633
    public static class getActiveCoupons_call extends org.apache.thrift.async.TAsyncMethodCall {
889
      switch (field) {
634
      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 {
-
 
635
        super(client, protocolFactory, transport, resultHandler, false);
890
      }
636
      }
891
      throw new IllegalStateException();
-
 
892
    }
-
 
893
 
637
 
894
    public Object getFieldValue(int fieldId) {
638
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
639
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getActiveCoupons", org.apache.thrift.protocol.TMessageType.CALL, 0));
895
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
640
        getActiveCoupons_args args = new getActiveCoupons_args();
-
 
641
        args.write(prot);
-
 
642
        prot.writeMessageEnd();
896
    }
643
      }
897
 
644
 
898
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
645
      public List<Coupon> getResult() throws PromotionException, org.apache.thrift.TException {
-
 
646
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
899
    public boolean isSet(_Fields field) {
647
          throw new IllegalStateException("Method call not finished!");
900
      switch (field) {
648
        }
-
 
649
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
650
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
651
        return (new Client(prot)).recv_getActiveCoupons();
901
      }
652
      }
902
      throw new IllegalStateException();
-
 
903
    }
653
    }
904
 
654
 
-
 
655
    public void getSuccessfulPaymentCountForCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<getSuccessfulPaymentCountForCoupon_call> resultHandler) throws org.apache.thrift.TException {
-
 
656
      checkReady();
-
 
657
      getSuccessfulPaymentCountForCoupon_call method_call = new getSuccessfulPaymentCountForCoupon_call(couponCode, resultHandler, this, ___protocolFactory, ___transport);
905
    public boolean isSet(int fieldID) {
658
      this.___currentMethod = method_call;
906
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
659
      ___manager.call(method_call);
907
    }
660
    }
908
 
661
 
909
    @Override
-
 
910
    public boolean equals(Object that) {
662
    public static class getSuccessfulPaymentCountForCoupon_call extends org.apache.thrift.async.TAsyncMethodCall {
911
      if (that == null)
663
      private String couponCode;
912
        return false;
664
      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 {
913
      if (that instanceof closeSession_args)
665
        super(client, protocolFactory, transport, resultHandler, false);
914
        return this.equals((closeSession_args)that);
666
        this.couponCode = couponCode;
915
      return false;
-
 
916
    }
667
      }
917
 
668
 
-
 
669
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
670
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSuccessfulPaymentCountForCoupon", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
671
        getSuccessfulPaymentCountForCoupon_args args = new getSuccessfulPaymentCountForCoupon_args();
918
    public boolean equals(closeSession_args that) {
672
        args.setCouponCode(couponCode);
919
      if (that == null)
673
        args.write(prot);
920
        return false;
674
        prot.writeMessageEnd();
-
 
675
      }
921
 
676
 
-
 
677
      public long getResult() throws PromotionException, org.apache.thrift.TException {
-
 
678
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
679
          throw new IllegalStateException("Method call not finished!");
922
      return true;
680
        }
-
 
681
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
682
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
683
        return (new Client(prot)).recv_getSuccessfulPaymentCountForCoupon();
-
 
684
      }
923
    }
685
    }
924
 
686
 
-
 
687
    public void getRuleDocString(String ruleName, org.apache.thrift.async.AsyncMethodCallback<getRuleDocString_call> resultHandler) throws org.apache.thrift.TException {
925
    @Override
688
      checkReady();
-
 
689
      getRuleDocString_call method_call = new getRuleDocString_call(ruleName, resultHandler, this, ___protocolFactory, ___transport);
926
    public int hashCode() {
690
      this.___currentMethod = method_call;
927
      return 0;
691
      ___manager.call(method_call);
928
    }
692
    }
929
 
693
 
930
    public int compareTo(closeSession_args other) {
694
    public static class getRuleDocString_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
695
      private String ruleName;
931
      if (!getClass().equals(other.getClass())) {
696
      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 {
932
        return getClass().getName().compareTo(other.getClass().getName());
697
        super(client, protocolFactory, transport, resultHandler, false);
-
 
698
        this.ruleName = ruleName;
933
      }
699
      }
934
 
700
 
-
 
701
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
702
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRuleDocString", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
703
        getRuleDocString_args args = new getRuleDocString_args();
935
      int lastComparison = 0;
704
        args.setRuleName(ruleName);
936
      closeSession_args typedOther = (closeSession_args)other;
705
        args.write(prot);
937
 
-
 
938
      return 0;
706
        prot.writeMessageEnd();
939
    }
707
      }
940
 
708
 
941
    public void read(TProtocol iprot) throws TException {
709
      public String getResult() throws org.apache.thrift.TException {
942
      TField field;
-
 
943
      iprot.readStructBegin();
-
 
944
      while (true)
-
 
945
      {
-
 
946
        field = iprot.readFieldBegin();
710
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
947
        if (field.type == TType.STOP) { 
711
          throw new IllegalStateException("Method call not finished!");
948
          break;
-
 
949
        }
712
        }
950
        _Fields fieldId = _Fields.findByThriftId(field.id);
713
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
951
        if (fieldId == null) {
-
 
952
          TProtocolUtil.skip(iprot, field.type);
714
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
953
        } else {
-
 
954
          switch (fieldId) {
-
 
955
          }
-
 
956
          iprot.readFieldEnd();
715
        return (new Client(prot)).recv_getRuleDocString();
957
        }
-
 
958
      }
716
      }
959
      iprot.readStructEnd();
-
 
960
      validate();
-
 
961
    }
717
    }
962
 
718
 
963
    public void write(TProtocol oprot) throws TException {
-
 
964
      validate();
719
  }
965
 
720
 
-
 
721
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
966
      oprot.writeStructBegin(STRUCT_DESC);
722
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
967
      oprot.writeFieldStop();
723
    public Processor(I iface) {
968
      oprot.writeStructEnd();
724
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
969
    }
725
    }
970
 
726
 
971
    @Override
-
 
972
    public String toString() {
-
 
973
      StringBuilder sb = new StringBuilder("closeSession_args(");
727
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
974
      boolean first = true;
-
 
975
 
-
 
976
      sb.append(")");
-
 
977
      return sb.toString();
728
      super(iface, getProcessMap(processMap));
978
    }
729
    }
979
 
730
 
-
 
731
    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) {
980
    public void validate() throws TException {
732
      processMap.put("createPromotion", new createPromotion());
-
 
733
      processMap.put("getAllPromotions", new getAllPromotions());
-
 
734
      processMap.put("getPromotionById", new getPromotionById());
-
 
735
      processMap.put("generateCouponsForPromotion", new generateCouponsForPromotion());
-
 
736
      processMap.put("applyCoupon", new applyCoupon());
-
 
737
      processMap.put("trackCouponUsage", new trackCouponUsage());
-
 
738
      processMap.put("getCouponUsageCountByUser", new getCouponUsageCountByUser());
-
 
739
      processMap.put("getActiveCoupons", new getActiveCoupons());
-
 
740
      processMap.put("getSuccessfulPaymentCountForCoupon", new getSuccessfulPaymentCountForCoupon());
-
 
741
      processMap.put("getRuleDocString", new getRuleDocString());
981
      // check for required fields
742
      return processMap;
982
    }
743
    }
983
 
744
 
984
  }
-
 
985
 
-
 
986
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
745
    private static class createPromotion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPromotion_args> {
987
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
746
      public createPromotion() {
988
 
-
 
989
 
-
 
990
 
-
 
991
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
992
    public enum _Fields implements TFieldIdEnum {
747
        super("createPromotion");
993
;
748
      }
994
 
749
 
995
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
750
      protected createPromotion_args getEmptyArgsInstance() {
996
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
751
        return new createPromotion_args();
-
 
752
      }
997
 
753
 
-
 
754
      protected createPromotion_result getResult(I iface, createPromotion_args args) throws org.apache.thrift.TException {
-
 
755
        createPromotion_result result = new createPromotion_result();
998
      static {
756
        try {
999
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
757
          iface.createPromotion(args.name, args.ruleExecutionSrc, args.startOn, args.endOn);
1000
          byId.put((int)field._thriftId, field);
758
        } catch (PromotionException pex) {
1001
          byName.put(field.getFieldName(), field);
759
          result.pex = pex;
1002
        }
760
        }
-
 
761
        return result;
1003
      }
762
      }
-
 
763
    }
1004
 
764
 
1005
      /**
-
 
1006
       * Find the _Fields constant that matches fieldId, or null if its not found.
765
    private static class getAllPromotions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPromotions_args> {
1007
       */
-
 
1008
      public static _Fields findByThriftId(int fieldId) {
766
      public getAllPromotions() {
1009
        return byId.get(fieldId);
767
        super("getAllPromotions");
1010
      }
768
      }
1011
 
769
 
1012
      /**
-
 
1013
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
1014
       * if it is not found.
-
 
1015
       */
-
 
1016
      public static _Fields findByThriftIdOrThrow(int fieldId) {
770
      protected getAllPromotions_args getEmptyArgsInstance() {
1017
        _Fields fields = findByThriftId(fieldId);
-
 
1018
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
1019
        return fields;
771
        return new getAllPromotions_args();
1020
      }
772
      }
1021
 
773
 
-
 
774
      protected getAllPromotions_result getResult(I iface, getAllPromotions_args args) throws org.apache.thrift.TException {
-
 
775
        getAllPromotions_result result = new getAllPromotions_result();
1022
      /**
776
        try {
1023
       * Find the _Fields constant that matches name, or null if its not found.
777
          result.success = iface.getAllPromotions();
-
 
778
        } catch (PromotionException pex) {
-
 
779
          result.pex = pex;
1024
       */
780
        }
1025
      public static _Fields findByName(String name) {
-
 
1026
        return byName.get(name);
781
        return result;
1027
      }
782
      }
-
 
783
    }
1028
 
784
 
1029
      private final short _thriftId;
-
 
1030
      private final String _fieldName;
-
 
1031
 
-
 
1032
      _Fields(short thriftId, String fieldName) {
785
    private static class getPromotionById<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPromotionById_args> {
1033
        _thriftId = thriftId;
786
      public getPromotionById() {
1034
        _fieldName = fieldName;
787
        super("getPromotionById");
1035
      }
788
      }
1036
 
789
 
1037
      public short getThriftFieldId() {
790
      protected getPromotionById_args getEmptyArgsInstance() {
1038
        return _thriftId;
791
        return new getPromotionById_args();
1039
      }
792
      }
1040
 
793
 
-
 
794
      protected getPromotionById_result getResult(I iface, getPromotionById_args args) throws org.apache.thrift.TException {
-
 
795
        getPromotionById_result result = new getPromotionById_result();
-
 
796
        try {
-
 
797
          result.success = iface.getPromotionById(args.promotionId);
1041
      public String getFieldName() {
798
        } catch (PromotionException pex) {
-
 
799
          result.pex = pex;
-
 
800
        }
1042
        return _fieldName;
801
        return result;
1043
      }
802
      }
1044
    }
803
    }
1045
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
1046
    }});
-
 
1047
 
804
 
-
 
805
    private static class generateCouponsForPromotion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, generateCouponsForPromotion_args> {
1048
    static {
806
      public generateCouponsForPromotion() {
1049
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
807
        super("generateCouponsForPromotion");
1050
    }
808
      }
1051
 
809
 
-
 
810
      protected generateCouponsForPromotion_args getEmptyArgsInstance() {
1052
    public closeSession_result() {
811
        return new generateCouponsForPromotion_args();
1053
    }
812
      }
1054
 
813
 
-
 
814
      protected generateCouponsForPromotion_result getResult(I iface, generateCouponsForPromotion_args args) throws org.apache.thrift.TException {
-
 
815
        generateCouponsForPromotion_result result = new generateCouponsForPromotion_result();
1055
    /**
816
        try {
-
 
817
          iface.generateCouponsForPromotion(args.promotionId, args.couponCode);
1056
     * Performs a deep copy on <i>other</i>.
818
        } catch (PromotionException pex) {
-
 
819
          result.pex = pex;
1057
     */
820
        }
1058
    public closeSession_result(closeSession_result other) {
821
        return result;
-
 
822
      }
1059
    }
823
    }
1060
 
824
 
-
 
825
    private static class applyCoupon<I extends Iface> extends org.apache.thrift.ProcessFunction<I, applyCoupon_args> {
1061
    public closeSession_result deepCopy() {
826
      public applyCoupon() {
1062
      return new closeSession_result(this);
827
        super("applyCoupon");
1063
    }
828
      }
1064
 
829
 
1065
    @Deprecated
-
 
1066
    public closeSession_result clone() {
830
      protected applyCoupon_args getEmptyArgsInstance() {
1067
      return new closeSession_result(this);
831
        return new applyCoupon_args();
1068
    }
832
      }
1069
 
833
 
-
 
834
      protected applyCoupon_result getResult(I iface, applyCoupon_args args) throws org.apache.thrift.TException {
1070
    public void setFieldValue(_Fields field, Object value) {
835
        applyCoupon_result result = new applyCoupon_result();
-
 
836
        try {
-
 
837
          result.success = iface.applyCoupon(args.couponCode, args.cartId);
-
 
838
        } catch (PromotionException pex) {
-
 
839
          result.pex = pex;
-
 
840
        }
1071
      switch (field) {
841
        return result;
1072
      }
842
      }
1073
    }
843
    }
1074
 
844
 
-
 
845
    private static class trackCouponUsage<I extends Iface> extends org.apache.thrift.ProcessFunction<I, trackCouponUsage_args> {
1075
    public void setFieldValue(int fieldID, Object value) {
846
      public trackCouponUsage() {
1076
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
847
        super("trackCouponUsage");
1077
    }
848
      }
1078
 
849
 
1079
    public Object getFieldValue(_Fields field) {
850
      protected trackCouponUsage_args getEmptyArgsInstance() {
1080
      switch (field) {
851
        return new trackCouponUsage_args();
1081
      }
852
      }
1082
      throw new IllegalStateException();
-
 
1083
    }
-
 
1084
 
853
 
-
 
854
      protected trackCouponUsage_result getResult(I iface, trackCouponUsage_args args) throws org.apache.thrift.TException {
1085
    public Object getFieldValue(int fieldId) {
855
        trackCouponUsage_result result = new trackCouponUsage_result();
-
 
856
        try {
1086
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
857
          iface.trackCouponUsage(args.couponCode, args.transactionId, args.userId);
-
 
858
        } catch (PromotionException pex) {
-
 
859
          result.pex = pex;
-
 
860
        }
-
 
861
        return result;
-
 
862
      }
1087
    }
863
    }
1088
 
864
 
1089
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
865
    private static class getCouponUsageCountByUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCouponUsageCountByUser_args> {
1090
    public boolean isSet(_Fields field) {
866
      public getCouponUsageCountByUser() {
1091
      switch (field) {
867
        super("getCouponUsageCountByUser");
1092
      }
868
      }
1093
      throw new IllegalStateException();
-
 
1094
    }
-
 
1095
 
869
 
1096
    public boolean isSet(int fieldID) {
870
      protected getCouponUsageCountByUser_args getEmptyArgsInstance() {
1097
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
871
        return new getCouponUsageCountByUser_args();
1098
    }
872
      }
1099
 
873
 
-
 
874
      protected getCouponUsageCountByUser_result getResult(I iface, getCouponUsageCountByUser_args args) throws org.apache.thrift.TException {
-
 
875
        getCouponUsageCountByUser_result result = new getCouponUsageCountByUser_result();
1100
    @Override
876
        try {
-
 
877
          result.success = iface.getCouponUsageCountByUser(args.couponCode, args.userId);
1101
    public boolean equals(Object that) {
878
          result.setSuccessIsSet(true);
1102
      if (that == null)
879
        } catch (PromotionException pex) {
1103
        return false;
880
          result.pex = pex;
1104
      if (that instanceof closeSession_result)
881
        }
1105
        return this.equals((closeSession_result)that);
882
        return result;
1106
      return false;
883
      }
1107
    }
884
    }
1108
 
885
 
-
 
886
    private static class getActiveCoupons<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getActiveCoupons_args> {
1109
    public boolean equals(closeSession_result that) {
887
      public getActiveCoupons() {
1110
      if (that == null)
888
        super("getActiveCoupons");
1111
        return false;
889
      }
1112
 
890
 
-
 
891
      protected getActiveCoupons_args getEmptyArgsInstance() {
1113
      return true;
892
        return new getActiveCoupons_args();
1114
    }
893
      }
1115
 
894
 
-
 
895
      protected getActiveCoupons_result getResult(I iface, getActiveCoupons_args args) throws org.apache.thrift.TException {
-
 
896
        getActiveCoupons_result result = new getActiveCoupons_result();
1116
    @Override
897
        try {
-
 
898
          result.success = iface.getActiveCoupons();
-
 
899
        } catch (PromotionException pex) {
1117
    public int hashCode() {
900
          result.pex = pex;
-
 
901
        }
1118
      return 0;
902
        return result;
-
 
903
      }
1119
    }
904
    }
1120
 
905
 
1121
    public int compareTo(closeSession_result other) {
906
    private static class getSuccessfulPaymentCountForCoupon<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSuccessfulPaymentCountForCoupon_args> {
1122
      if (!getClass().equals(other.getClass())) {
907
      public getSuccessfulPaymentCountForCoupon() {
1123
        return getClass().getName().compareTo(other.getClass().getName());
908
        super("getSuccessfulPaymentCountForCoupon");
1124
      }
909
      }
1125
 
910
 
1126
      int lastComparison = 0;
911
      protected getSuccessfulPaymentCountForCoupon_args getEmptyArgsInstance() {
1127
      closeSession_result typedOther = (closeSession_result)other;
912
        return new getSuccessfulPaymentCountForCoupon_args();
1128
 
-
 
1129
      return 0;
-
 
1130
    }
913
      }
1131
 
914
 
1132
    public void read(TProtocol iprot) throws TException {
915
      protected getSuccessfulPaymentCountForCoupon_result getResult(I iface, getSuccessfulPaymentCountForCoupon_args args) throws org.apache.thrift.TException {
1133
      TField field;
-
 
1134
      iprot.readStructBegin();
-
 
1135
      while (true)
-
 
1136
      {
-
 
1137
        field = iprot.readFieldBegin();
916
        getSuccessfulPaymentCountForCoupon_result result = new getSuccessfulPaymentCountForCoupon_result();
1138
        if (field.type == TType.STOP) { 
-
 
1139
          break;
-
 
1140
        }
917
        try {
1141
        _Fields fieldId = _Fields.findByThriftId(field.id);
918
          result.success = iface.getSuccessfulPaymentCountForCoupon(args.couponCode);
1142
        if (fieldId == null) {
-
 
1143
          TProtocolUtil.skip(iprot, field.type);
919
          result.setSuccessIsSet(true);
1144
        } else {
-
 
1145
          switch (fieldId) {
920
        } catch (PromotionException pex) {
1146
          }
-
 
1147
          iprot.readFieldEnd();
921
          result.pex = pex;
1148
        }
922
        }
-
 
923
        return result;
1149
      }
924
      }
1150
      iprot.readStructEnd();
-
 
1151
      validate();
-
 
1152
    }
-
 
1153
 
-
 
1154
    public void write(TProtocol oprot) throws TException {
-
 
1155
      oprot.writeStructBegin(STRUCT_DESC);
-
 
1156
 
-
 
1157
      oprot.writeFieldStop();
-
 
1158
      oprot.writeStructEnd();
-
 
1159
    }
925
    }
1160
 
926
 
1161
    @Override
-
 
-
 
927
    private static class getRuleDocString<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getRuleDocString_args> {
1162
    public String toString() {
928
      public getRuleDocString() {
1163
      StringBuilder sb = new StringBuilder("closeSession_result(");
929
        super("getRuleDocString");
1164
      boolean first = true;
930
      }
1165
 
931
 
1166
      sb.append(")");
932
      protected getRuleDocString_args getEmptyArgsInstance() {
1167
      return sb.toString();
933
        return new getRuleDocString_args();
1168
    }
934
      }
1169
 
935
 
-
 
936
      protected getRuleDocString_result getResult(I iface, getRuleDocString_args args) throws org.apache.thrift.TException {
-
 
937
        getRuleDocString_result result = new getRuleDocString_result();
1170
    public void validate() throws TException {
938
        result.success = iface.getRuleDocString(args.ruleName);
1171
      // check for required fields
939
        return result;
-
 
940
      }
1172
    }
941
    }
1173
 
942
 
1174
  }
943
  }
1175
 
944
 
1176
  public static class createPromotion_args implements TBase<createPromotion_args._Fields>, java.io.Serializable, Cloneable, Comparable<createPromotion_args>   {
945
  public static class createPromotion_args implements org.apache.thrift.TBase<createPromotion_args, createPromotion_args._Fields>, java.io.Serializable, Cloneable   {
1177
    private static final TStruct STRUCT_DESC = new TStruct("createPromotion_args");
946
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPromotion_args");
1178
 
947
 
1179
    private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1);
948
    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);
1180
    private static final TField RULE_EXECUTION_SRC_FIELD_DESC = new TField("ruleExecutionSrc", TType.STRING, (short)2);
949
    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);
1181
    private static final TField START_ON_FIELD_DESC = new TField("startOn", TType.I64, (short)3);
950
    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);
1182
    private static final TField END_ON_FIELD_DESC = new TField("endOn", TType.I64, (short)4);
951
    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);
1183
 
952
 
1184
    private String name;
953
    private String name; // required
1185
    private String ruleExecutionSrc;
954
    private String ruleExecutionSrc; // required
1186
    private long startOn;
955
    private long startOn; // required
1187
    private long endOn;
956
    private long endOn; // required
1188
 
957
 
1189
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
958
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1190
    public enum _Fields implements TFieldIdEnum {
959
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
1191
      NAME((short)1, "name"),
960
      NAME((short)1, "name"),
1192
      RULE_EXECUTION_SRC((short)2, "ruleExecutionSrc"),
961
      RULE_EXECUTION_SRC((short)2, "ruleExecutionSrc"),
1193
      START_ON((short)3, "startOn"),
962
      START_ON((short)3, "startOn"),
1194
      END_ON((short)4, "endOn");
963
      END_ON((short)4, "endOn");
1195
 
964
 
1196
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
1197
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
965
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1198
 
966
 
1199
      static {
967
      static {
1200
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
968
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1201
          byId.put((int)field._thriftId, field);
-
 
1202
          byName.put(field.getFieldName(), field);
969
          byName.put(field.getFieldName(), field);
1203
        }
970
        }
1204
      }
971
      }
1205
 
972
 
1206
      /**
973
      /**
1207
       * Find the _Fields constant that matches fieldId, or null if its not found.
974
       * Find the _Fields constant that matches fieldId, or null if its not found.
1208
       */
975
       */
1209
      public static _Fields findByThriftId(int fieldId) {
976
      public static _Fields findByThriftId(int fieldId) {
1210
        return byId.get(fieldId);
977
        switch(fieldId) {
-
 
978
          case 1: // NAME
-
 
979
            return NAME;
-
 
980
          case 2: // RULE_EXECUTION_SRC
-
 
981
            return RULE_EXECUTION_SRC;
-
 
982
          case 3: // START_ON
-
 
983
            return START_ON;
-
 
984
          case 4: // END_ON
-
 
985
            return END_ON;
-
 
986
          default:
-
 
987
            return null;
-
 
988
        }
1211
      }
989
      }
1212
 
990
 
1213
      /**
991
      /**
1214
       * Find the _Fields constant that matches fieldId, throwing an exception
992
       * Find the _Fields constant that matches fieldId, throwing an exception
1215
       * if it is not found.
993
       * if it is not found.
Line 1247... Line 1025...
1247
    // isset id assignments
1025
    // isset id assignments
1248
    private static final int __STARTON_ISSET_ID = 0;
1026
    private static final int __STARTON_ISSET_ID = 0;
1249
    private static final int __ENDON_ISSET_ID = 1;
1027
    private static final int __ENDON_ISSET_ID = 1;
1250
    private BitSet __isset_bit_vector = new BitSet(2);
1028
    private BitSet __isset_bit_vector = new BitSet(2);
1251
 
1029
 
1252
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1030
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
1253
      put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, 
-
 
1254
          new FieldValueMetaData(TType.STRING)));
-
 
1255
      put(_Fields.RULE_EXECUTION_SRC, new FieldMetaData("ruleExecutionSrc", TFieldRequirementType.DEFAULT, 
-
 
1256
          new FieldValueMetaData(TType.STRING)));
-
 
1257
      put(_Fields.START_ON, new FieldMetaData("startOn", TFieldRequirementType.DEFAULT, 
-
 
1258
          new FieldValueMetaData(TType.I64)));
-
 
1259
      put(_Fields.END_ON, new FieldMetaData("endOn", TFieldRequirementType.DEFAULT, 
-
 
1260
          new FieldValueMetaData(TType.I64)));
-
 
1261
    }});
-
 
1262
 
-
 
1263
    static {
1031
    static {
-
 
1032
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
1033
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
1034
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
1035
      tmpMap.put(_Fields.RULE_EXECUTION_SRC, new org.apache.thrift.meta_data.FieldMetaData("ruleExecutionSrc", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
1036
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
1037
      tmpMap.put(_Fields.START_ON, new org.apache.thrift.meta_data.FieldMetaData("startOn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
1038
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
1039
      tmpMap.put(_Fields.END_ON, new org.apache.thrift.meta_data.FieldMetaData("endOn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
1040
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
1041
      metaDataMap = Collections.unmodifiableMap(tmpMap);
1264
      FieldMetaData.addStructMetaDataMap(createPromotion_args.class, metaDataMap);
1042
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPromotion_args.class, metaDataMap);
1265
    }
1043
    }
1266
 
1044
 
1267
    public createPromotion_args() {
1045
    public createPromotion_args() {
1268
    }
1046
    }
1269
 
1047
 
Line 1300... Line 1078...
1300
 
1078
 
1301
    public createPromotion_args deepCopy() {
1079
    public createPromotion_args deepCopy() {
1302
      return new createPromotion_args(this);
1080
      return new createPromotion_args(this);
1303
    }
1081
    }
1304
 
1082
 
1305
    @Deprecated
1083
    @Override
1306
    public createPromotion_args clone() {
1084
    public void clear() {
-
 
1085
      this.name = null;
1307
      return new createPromotion_args(this);
1086
      this.ruleExecutionSrc = null;
-
 
1087
      setStartOnIsSet(false);
-
 
1088
      this.startOn = 0;
-
 
1089
      setEndOnIsSet(false);
-
 
1090
      this.endOn = 0;
1308
    }
1091
    }
1309
 
1092
 
1310
    public String getName() {
1093
    public String getName() {
1311
      return this.name;
1094
      return this.name;
1312
    }
1095
    }
1313
 
1096
 
1314
    public createPromotion_args setName(String name) {
1097
    public void setName(String name) {
1315
      this.name = name;
1098
      this.name = name;
1316
      return this;
-
 
1317
    }
1099
    }
1318
 
1100
 
1319
    public void unsetName() {
1101
    public void unsetName() {
1320
      this.name = null;
1102
      this.name = null;
1321
    }
1103
    }
1322
 
1104
 
1323
    /** Returns true if field name is set (has been asigned a value) and false otherwise */
1105
    /** Returns true if field name is set (has been assigned a value) and false otherwise */
1324
    public boolean isSetName() {
1106
    public boolean isSetName() {
1325
      return this.name != null;
1107
      return this.name != null;
1326
    }
1108
    }
1327
 
1109
 
1328
    public void setNameIsSet(boolean value) {
1110
    public void setNameIsSet(boolean value) {
Line 1333... Line 1115...
1333
 
1115
 
1334
    public String getRuleExecutionSrc() {
1116
    public String getRuleExecutionSrc() {
1335
      return this.ruleExecutionSrc;
1117
      return this.ruleExecutionSrc;
1336
    }
1118
    }
1337
 
1119
 
1338
    public createPromotion_args setRuleExecutionSrc(String ruleExecutionSrc) {
1120
    public void setRuleExecutionSrc(String ruleExecutionSrc) {
1339
      this.ruleExecutionSrc = ruleExecutionSrc;
1121
      this.ruleExecutionSrc = ruleExecutionSrc;
1340
      return this;
-
 
1341
    }
1122
    }
1342
 
1123
 
1343
    public void unsetRuleExecutionSrc() {
1124
    public void unsetRuleExecutionSrc() {
1344
      this.ruleExecutionSrc = null;
1125
      this.ruleExecutionSrc = null;
1345
    }
1126
    }
1346
 
1127
 
1347
    /** Returns true if field ruleExecutionSrc is set (has been asigned a value) and false otherwise */
1128
    /** Returns true if field ruleExecutionSrc is set (has been assigned a value) and false otherwise */
1348
    public boolean isSetRuleExecutionSrc() {
1129
    public boolean isSetRuleExecutionSrc() {
1349
      return this.ruleExecutionSrc != null;
1130
      return this.ruleExecutionSrc != null;
1350
    }
1131
    }
1351
 
1132
 
1352
    public void setRuleExecutionSrcIsSet(boolean value) {
1133
    public void setRuleExecutionSrcIsSet(boolean value) {
Line 1357... Line 1138...
1357
 
1138
 
1358
    public long getStartOn() {
1139
    public long getStartOn() {
1359
      return this.startOn;
1140
      return this.startOn;
1360
    }
1141
    }
1361
 
1142
 
1362
    public createPromotion_args setStartOn(long startOn) {
1143
    public void setStartOn(long startOn) {
1363
      this.startOn = startOn;
1144
      this.startOn = startOn;
1364
      setStartOnIsSet(true);
1145
      setStartOnIsSet(true);
1365
      return this;
-
 
1366
    }
1146
    }
1367
 
1147
 
1368
    public void unsetStartOn() {
1148
    public void unsetStartOn() {
1369
      __isset_bit_vector.clear(__STARTON_ISSET_ID);
1149
      __isset_bit_vector.clear(__STARTON_ISSET_ID);
1370
    }
1150
    }
1371
 
1151
 
1372
    /** Returns true if field startOn is set (has been asigned a value) and false otherwise */
1152
    /** Returns true if field startOn is set (has been assigned a value) and false otherwise */
1373
    public boolean isSetStartOn() {
1153
    public boolean isSetStartOn() {
1374
      return __isset_bit_vector.get(__STARTON_ISSET_ID);
1154
      return __isset_bit_vector.get(__STARTON_ISSET_ID);
1375
    }
1155
    }
1376
 
1156
 
1377
    public void setStartOnIsSet(boolean value) {
1157
    public void setStartOnIsSet(boolean value) {
Line 1380... Line 1160...
1380
 
1160
 
1381
    public long getEndOn() {
1161
    public long getEndOn() {
1382
      return this.endOn;
1162
      return this.endOn;
1383
    }
1163
    }
1384
 
1164
 
1385
    public createPromotion_args setEndOn(long endOn) {
1165
    public void setEndOn(long endOn) {
1386
      this.endOn = endOn;
1166
      this.endOn = endOn;
1387
      setEndOnIsSet(true);
1167
      setEndOnIsSet(true);
1388
      return this;
-
 
1389
    }
1168
    }
1390
 
1169
 
1391
    public void unsetEndOn() {
1170
    public void unsetEndOn() {
1392
      __isset_bit_vector.clear(__ENDON_ISSET_ID);
1171
      __isset_bit_vector.clear(__ENDON_ISSET_ID);
1393
    }
1172
    }
1394
 
1173
 
1395
    /** Returns true if field endOn is set (has been asigned a value) and false otherwise */
1174
    /** Returns true if field endOn is set (has been assigned a value) and false otherwise */
1396
    public boolean isSetEndOn() {
1175
    public boolean isSetEndOn() {
1397
      return __isset_bit_vector.get(__ENDON_ISSET_ID);
1176
      return __isset_bit_vector.get(__ENDON_ISSET_ID);
1398
    }
1177
    }
1399
 
1178
 
1400
    public void setEndOnIsSet(boolean value) {
1179
    public void setEndOnIsSet(boolean value) {
Line 1436... Line 1215...
1436
        break;
1215
        break;
1437
 
1216
 
1438
      }
1217
      }
1439
    }
1218
    }
1440
 
1219
 
1441
    public void setFieldValue(int fieldID, Object value) {
-
 
1442
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
1443
    }
-
 
1444
 
-
 
1445
    public Object getFieldValue(_Fields field) {
1220
    public Object getFieldValue(_Fields field) {
1446
      switch (field) {
1221
      switch (field) {
1447
      case NAME:
1222
      case NAME:
1448
        return getName();
1223
        return getName();
1449
 
1224
 
1450
      case RULE_EXECUTION_SRC:
1225
      case RULE_EXECUTION_SRC:
1451
        return getRuleExecutionSrc();
1226
        return getRuleExecutionSrc();
1452
 
1227
 
1453
      case START_ON:
1228
      case START_ON:
1454
        return new Long(getStartOn());
1229
        return Long.valueOf(getStartOn());
1455
 
1230
 
1456
      case END_ON:
1231
      case END_ON:
1457
        return new Long(getEndOn());
1232
        return Long.valueOf(getEndOn());
1458
 
1233
 
1459
      }
1234
      }
1460
      throw new IllegalStateException();
1235
      throw new IllegalStateException();
1461
    }
1236
    }
1462
 
1237
 
1463
    public Object getFieldValue(int fieldId) {
-
 
1464
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
1465
    }
-
 
1466
 
-
 
1467
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1238
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1468
    public boolean isSet(_Fields field) {
1239
    public boolean isSet(_Fields field) {
-
 
1240
      if (field == null) {
-
 
1241
        throw new IllegalArgumentException();
-
 
1242
      }
-
 
1243
 
1469
      switch (field) {
1244
      switch (field) {
1470
      case NAME:
1245
      case NAME:
1471
        return isSetName();
1246
        return isSetName();
1472
      case RULE_EXECUTION_SRC:
1247
      case RULE_EXECUTION_SRC:
1473
        return isSetRuleExecutionSrc();
1248
        return isSetRuleExecutionSrc();
Line 1477... Line 1252...
1477
        return isSetEndOn();
1252
        return isSetEndOn();
1478
      }
1253
      }
1479
      throw new IllegalStateException();
1254
      throw new IllegalStateException();
1480
    }
1255
    }
1481
 
1256
 
1482
    public boolean isSet(int fieldID) {
-
 
1483
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
1484
    }
-
 
1485
 
-
 
1486
    @Override
1257
    @Override
1487
    public boolean equals(Object that) {
1258
    public boolean equals(Object that) {
1488
      if (that == null)
1259
      if (that == null)
1489
        return false;
1260
        return false;
1490
      if (that instanceof createPromotion_args)
1261
      if (that instanceof createPromotion_args)
Line 1546... Line 1317...
1546
      }
1317
      }
1547
 
1318
 
1548
      int lastComparison = 0;
1319
      int lastComparison = 0;
1549
      createPromotion_args typedOther = (createPromotion_args)other;
1320
      createPromotion_args typedOther = (createPromotion_args)other;
1550
 
1321
 
1551
      lastComparison = Boolean.valueOf(isSetName()).compareTo(isSetName());
1322
      lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
1552
      if (lastComparison != 0) {
1323
      if (lastComparison != 0) {
1553
        return lastComparison;
1324
        return lastComparison;
1554
      }
1325
      }
-
 
1326
      if (isSetName()) {
1555
      lastComparison = TBaseHelper.compareTo(name, typedOther.name);
1327
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
1556
      if (lastComparison != 0) {
1328
        if (lastComparison != 0) {
1557
        return lastComparison;
1329
          return lastComparison;
-
 
1330
        }
1558
      }
1331
      }
1559
      lastComparison = Boolean.valueOf(isSetRuleExecutionSrc()).compareTo(isSetRuleExecutionSrc());
1332
      lastComparison = Boolean.valueOf(isSetRuleExecutionSrc()).compareTo(typedOther.isSetRuleExecutionSrc());
1560
      if (lastComparison != 0) {
1333
      if (lastComparison != 0) {
1561
        return lastComparison;
1334
        return lastComparison;
1562
      }
1335
      }
-
 
1336
      if (isSetRuleExecutionSrc()) {
1563
      lastComparison = TBaseHelper.compareTo(ruleExecutionSrc, typedOther.ruleExecutionSrc);
1337
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ruleExecutionSrc, typedOther.ruleExecutionSrc);
1564
      if (lastComparison != 0) {
1338
        if (lastComparison != 0) {
1565
        return lastComparison;
1339
          return lastComparison;
-
 
1340
        }
1566
      }
1341
      }
1567
      lastComparison = Boolean.valueOf(isSetStartOn()).compareTo(isSetStartOn());
1342
      lastComparison = Boolean.valueOf(isSetStartOn()).compareTo(typedOther.isSetStartOn());
1568
      if (lastComparison != 0) {
1343
      if (lastComparison != 0) {
1569
        return lastComparison;
1344
        return lastComparison;
1570
      }
1345
      }
-
 
1346
      if (isSetStartOn()) {
1571
      lastComparison = TBaseHelper.compareTo(startOn, typedOther.startOn);
1347
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startOn, typedOther.startOn);
1572
      if (lastComparison != 0) {
1348
        if (lastComparison != 0) {
1573
        return lastComparison;
1349
          return lastComparison;
-
 
1350
        }
1574
      }
1351
      }
1575
      lastComparison = Boolean.valueOf(isSetEndOn()).compareTo(isSetEndOn());
1352
      lastComparison = Boolean.valueOf(isSetEndOn()).compareTo(typedOther.isSetEndOn());
1576
      if (lastComparison != 0) {
1353
      if (lastComparison != 0) {
1577
        return lastComparison;
1354
        return lastComparison;
1578
      }
1355
      }
-
 
1356
      if (isSetEndOn()) {
1579
      lastComparison = TBaseHelper.compareTo(endOn, typedOther.endOn);
1357
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endOn, typedOther.endOn);
1580
      if (lastComparison != 0) {
1358
        if (lastComparison != 0) {
1581
        return lastComparison;
1359
          return lastComparison;
-
 
1360
        }
1582
      }
1361
      }
1583
      return 0;
1362
      return 0;
1584
    }
1363
    }
1585
 
1364
 
-
 
1365
    public _Fields fieldForId(int fieldId) {
-
 
1366
      return _Fields.findByThriftId(fieldId);
-
 
1367
    }
-
 
1368
 
1586
    public void read(TProtocol iprot) throws TException {
1369
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1587
      TField field;
1370
      org.apache.thrift.protocol.TField field;
1588
      iprot.readStructBegin();
1371
      iprot.readStructBegin();
1589
      while (true)
1372
      while (true)
1590
      {
1373
      {
1591
        field = iprot.readFieldBegin();
1374
        field = iprot.readFieldBegin();
1592
        if (field.type == TType.STOP) { 
1375
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
1593
          break;
1376
          break;
1594
        }
1377
        }
1595
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
1596
        if (fieldId == null) {
-
 
1597
          TProtocolUtil.skip(iprot, field.type);
-
 
1598
        } else {
-
 
1599
          switch (fieldId) {
1378
        switch (field.id) {
1600
            case NAME:
1379
          case 1: // NAME
1601
              if (field.type == TType.STRING) {
1380
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
1602
                this.name = iprot.readString();
1381
              this.name = iprot.readString();
1603
              } else { 
1382
            } else { 
1604
                TProtocolUtil.skip(iprot, field.type);
1383
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1605
              }
1384
            }
1606
              break;
1385
            break;
1607
            case RULE_EXECUTION_SRC:
1386
          case 2: // RULE_EXECUTION_SRC
1608
              if (field.type == TType.STRING) {
1387
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
1609
                this.ruleExecutionSrc = iprot.readString();
1388
              this.ruleExecutionSrc = iprot.readString();
1610
              } else { 
1389
            } else { 
1611
                TProtocolUtil.skip(iprot, field.type);
1390
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1612
              }
1391
            }
1613
              break;
1392
            break;
1614
            case START_ON:
1393
          case 3: // START_ON
1615
              if (field.type == TType.I64) {
1394
            if (field.type == org.apache.thrift.protocol.TType.I64) {
1616
                this.startOn = iprot.readI64();
1395
              this.startOn = iprot.readI64();
1617
                setStartOnIsSet(true);
1396
              setStartOnIsSet(true);
1618
              } else { 
1397
            } else { 
1619
                TProtocolUtil.skip(iprot, field.type);
1398
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1620
              }
1399
            }
1621
              break;
1400
            break;
1622
            case END_ON:
1401
          case 4: // END_ON
1623
              if (field.type == TType.I64) {
1402
            if (field.type == org.apache.thrift.protocol.TType.I64) {
1624
                this.endOn = iprot.readI64();
1403
              this.endOn = iprot.readI64();
1625
                setEndOnIsSet(true);
1404
              setEndOnIsSet(true);
1626
              } else { 
1405
            } else { 
1627
                TProtocolUtil.skip(iprot, field.type);
1406
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1628
              }
1407
            }
1629
              break;
1408
            break;
1630
          }
1409
          default:
1631
          iprot.readFieldEnd();
1410
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1632
        }
1411
        }
-
 
1412
        iprot.readFieldEnd();
1633
      }
1413
      }
1634
      iprot.readStructEnd();
1414
      iprot.readStructEnd();
1635
      validate();
1415
      validate();
1636
    }
1416
    }
1637
 
1417
 
1638
    public void write(TProtocol oprot) throws TException {
1418
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1639
      validate();
1419
      validate();
1640
 
1420
 
1641
      oprot.writeStructBegin(STRUCT_DESC);
1421
      oprot.writeStructBegin(STRUCT_DESC);
1642
      if (this.name != null) {
1422
      if (this.name != null) {
1643
        oprot.writeFieldBegin(NAME_FIELD_DESC);
1423
        oprot.writeFieldBegin(NAME_FIELD_DESC);
Line 1689... Line 1469...
1689
      first = false;
1469
      first = false;
1690
      sb.append(")");
1470
      sb.append(")");
1691
      return sb.toString();
1471
      return sb.toString();
1692
    }
1472
    }
1693
 
1473
 
1694
    public void validate() throws TException {
1474
    public void validate() throws org.apache.thrift.TException {
1695
      // check for required fields
1475
      // check for required fields
1696
    }
1476
    }
1697
 
1477
 
-
 
1478
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
1479
      try {
-
 
1480
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
1481
      } catch (org.apache.thrift.TException te) {
-
 
1482
        throw new java.io.IOException(te);
-
 
1483
      }
-
 
1484
    }
-
 
1485
 
-
 
1486
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
1487
      try {
-
 
1488
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
1489
        __isset_bit_vector = new BitSet(1);
-
 
1490
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
1491
      } catch (org.apache.thrift.TException te) {
-
 
1492
        throw new java.io.IOException(te);
-
 
1493
      }
-
 
1494
    }
-
 
1495
 
1698
  }
1496
  }
1699
 
1497
 
1700
  public static class createPromotion_result implements TBase<createPromotion_result._Fields>, java.io.Serializable, Cloneable, Comparable<createPromotion_result>   {
1498
  public static class createPromotion_result implements org.apache.thrift.TBase<createPromotion_result, createPromotion_result._Fields>, java.io.Serializable, Cloneable   {
1701
    private static final TStruct STRUCT_DESC = new TStruct("createPromotion_result");
1499
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPromotion_result");
1702
 
1500
 
1703
    private static final TField PEX_FIELD_DESC = new TField("pex", TType.STRUCT, (short)1);
1501
    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);
1704
 
1502
 
1705
    private PromotionException pex;
1503
    private PromotionException pex; // required
1706
 
1504
 
1707
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1505
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1708
    public enum _Fields implements TFieldIdEnum {
1506
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
1709
      PEX((short)1, "pex");
1507
      PEX((short)1, "pex");
1710
 
1508
 
1711
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
1712
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1509
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1713
 
1510
 
1714
      static {
1511
      static {
1715
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1512
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1716
          byId.put((int)field._thriftId, field);
-
 
1717
          byName.put(field.getFieldName(), field);
1513
          byName.put(field.getFieldName(), field);
1718
        }
1514
        }
1719
      }
1515
      }
1720
 
1516
 
1721
      /**
1517
      /**
1722
       * Find the _Fields constant that matches fieldId, or null if its not found.
1518
       * Find the _Fields constant that matches fieldId, or null if its not found.
1723
       */
1519
       */
1724
      public static _Fields findByThriftId(int fieldId) {
1520
      public static _Fields findByThriftId(int fieldId) {
1725
        return byId.get(fieldId);
1521
        switch(fieldId) {
-
 
1522
          case 1: // PEX
-
 
1523
            return PEX;
-
 
1524
          default:
-
 
1525
            return null;
-
 
1526
        }
1726
      }
1527
      }
1727
 
1528
 
1728
      /**
1529
      /**
1729
       * Find the _Fields constant that matches fieldId, throwing an exception
1530
       * Find the _Fields constant that matches fieldId, throwing an exception
1730
       * if it is not found.
1531
       * if it is not found.
Line 1759... Line 1560...
1759
      }
1560
      }
1760
    }
1561
    }
1761
 
1562
 
1762
    // isset id assignments
1563
    // isset id assignments
1763
 
1564
 
1764
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1565
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
1765
      put(_Fields.PEX, new FieldMetaData("pex", TFieldRequirementType.DEFAULT, 
-
 
1766
          new FieldValueMetaData(TType.STRUCT)));
-
 
1767
    }});
-
 
1768
 
-
 
1769
    static {
1566
    static {
-
 
1567
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
1568
      tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
1569
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
1570
      metaDataMap = Collections.unmodifiableMap(tmpMap);
1770
      FieldMetaData.addStructMetaDataMap(createPromotion_result.class, metaDataMap);
1571
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPromotion_result.class, metaDataMap);
1771
    }
1572
    }
1772
 
1573
 
1773
    public createPromotion_result() {
1574
    public createPromotion_result() {
1774
    }
1575
    }
1775
 
1576
 
Line 1791... Line 1592...
1791
 
1592
 
1792
    public createPromotion_result deepCopy() {
1593
    public createPromotion_result deepCopy() {
1793
      return new createPromotion_result(this);
1594
      return new createPromotion_result(this);
1794
    }
1595
    }
1795
 
1596
 
1796
    @Deprecated
1597
    @Override
1797
    public createPromotion_result clone() {
1598
    public void clear() {
1798
      return new createPromotion_result(this);
1599
      this.pex = null;
1799
    }
1600
    }
1800
 
1601
 
1801
    public PromotionException getPex() {
1602
    public PromotionException getPex() {
1802
      return this.pex;
1603
      return this.pex;
1803
    }
1604
    }
1804
 
1605
 
1805
    public createPromotion_result setPex(PromotionException pex) {
1606
    public void setPex(PromotionException pex) {
1806
      this.pex = pex;
1607
      this.pex = pex;
1807
      return this;
-
 
1808
    }
1608
    }
1809
 
1609
 
1810
    public void unsetPex() {
1610
    public void unsetPex() {
1811
      this.pex = null;
1611
      this.pex = null;
1812
    }
1612
    }
1813
 
1613
 
1814
    /** Returns true if field pex is set (has been asigned a value) and false otherwise */
1614
    /** Returns true if field pex is set (has been assigned a value) and false otherwise */
1815
    public boolean isSetPex() {
1615
    public boolean isSetPex() {
1816
      return this.pex != null;
1616
      return this.pex != null;
1817
    }
1617
    }
1818
 
1618
 
1819
    public void setPexIsSet(boolean value) {
1619
    public void setPexIsSet(boolean value) {
Line 1833... Line 1633...
1833
        break;
1633
        break;
1834
 
1634
 
1835
      }
1635
      }
1836
    }
1636
    }
1837
 
1637
 
1838
    public void setFieldValue(int fieldID, Object value) {
-
 
1839
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
1840
    }
-
 
1841
 
-
 
1842
    public Object getFieldValue(_Fields field) {
1638
    public Object getFieldValue(_Fields field) {
1843
      switch (field) {
1639
      switch (field) {
1844
      case PEX:
1640
      case PEX:
1845
        return getPex();
1641
        return getPex();
1846
 
1642
 
1847
      }
1643
      }
1848
      throw new IllegalStateException();
1644
      throw new IllegalStateException();
1849
    }
1645
    }
1850
 
1646
 
1851
    public Object getFieldValue(int fieldId) {
-
 
1852
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
1853
    }
-
 
1854
 
-
 
1855
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1647
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1856
    public boolean isSet(_Fields field) {
1648
    public boolean isSet(_Fields field) {
-
 
1649
      if (field == null) {
-
 
1650
        throw new IllegalArgumentException();
-
 
1651
      }
-
 
1652
 
1857
      switch (field) {
1653
      switch (field) {
1858
      case PEX:
1654
      case PEX:
1859
        return isSetPex();
1655
        return isSetPex();
1860
      }
1656
      }
1861
      throw new IllegalStateException();
1657
      throw new IllegalStateException();
1862
    }
1658
    }
1863
 
1659
 
1864
    public boolean isSet(int fieldID) {
-
 
1865
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
1866
    }
-
 
1867
 
-
 
1868
    @Override
1660
    @Override
1869
    public boolean equals(Object that) {
1661
    public boolean equals(Object that) {
1870
      if (that == null)
1662
      if (that == null)
1871
        return false;
1663
        return false;
1872
      if (that instanceof createPromotion_result)
1664
      if (that instanceof createPromotion_result)
Line 1901... Line 1693...
1901
      }
1693
      }
1902
 
1694
 
1903
      int lastComparison = 0;
1695
      int lastComparison = 0;
1904
      createPromotion_result typedOther = (createPromotion_result)other;
1696
      createPromotion_result typedOther = (createPromotion_result)other;
1905
 
1697
 
1906
      lastComparison = Boolean.valueOf(isSetPex()).compareTo(isSetPex());
1698
      lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
1907
      if (lastComparison != 0) {
1699
      if (lastComparison != 0) {
1908
        return lastComparison;
1700
        return lastComparison;
1909
      }
1701
      }
-
 
1702
      if (isSetPex()) {
1910
      lastComparison = TBaseHelper.compareTo(pex, typedOther.pex);
1703
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
1911
      if (lastComparison != 0) {
1704
        if (lastComparison != 0) {
1912
        return lastComparison;
1705
          return lastComparison;
-
 
1706
        }
1913
      }
1707
      }
1914
      return 0;
1708
      return 0;
1915
    }
1709
    }
1916
 
1710
 
-
 
1711
    public _Fields fieldForId(int fieldId) {
-
 
1712
      return _Fields.findByThriftId(fieldId);
-
 
1713
    }
-
 
1714
 
1917
    public void read(TProtocol iprot) throws TException {
1715
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1918
      TField field;
1716
      org.apache.thrift.protocol.TField field;
1919
      iprot.readStructBegin();
1717
      iprot.readStructBegin();
1920
      while (true)
1718
      while (true)
1921
      {
1719
      {
1922
        field = iprot.readFieldBegin();
1720
        field = iprot.readFieldBegin();
1923
        if (field.type == TType.STOP) { 
1721
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
1924
          break;
1722
          break;
1925
        }
1723
        }
1926
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
1927
        if (fieldId == null) {
-
 
1928
          TProtocolUtil.skip(iprot, field.type);
-
 
1929
        } else {
-
 
1930
          switch (fieldId) {
1724
        switch (field.id) {
1931
            case PEX:
1725
          case 1: // PEX
1932
              if (field.type == TType.STRUCT) {
1726
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
1933
                this.pex = new PromotionException();
1727
              this.pex = new PromotionException();
1934
                this.pex.read(iprot);
1728
              this.pex.read(iprot);
1935
              } else { 
1729
            } else { 
1936
                TProtocolUtil.skip(iprot, field.type);
1730
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1937
              }
1731
            }
1938
              break;
1732
            break;
1939
          }
1733
          default:
1940
          iprot.readFieldEnd();
1734
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1941
        }
1735
        }
-
 
1736
        iprot.readFieldEnd();
1942
      }
1737
      }
1943
      iprot.readStructEnd();
1738
      iprot.readStructEnd();
1944
      validate();
1739
      validate();
1945
    }
1740
    }
1946
 
1741
 
1947
    public void write(TProtocol oprot) throws TException {
1742
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1948
      oprot.writeStructBegin(STRUCT_DESC);
1743
      oprot.writeStructBegin(STRUCT_DESC);
1949
 
1744
 
1950
      if (this.isSetPex()) {
1745
      if (this.isSetPex()) {
1951
        oprot.writeFieldBegin(PEX_FIELD_DESC);
1746
        oprot.writeFieldBegin(PEX_FIELD_DESC);
1952
        this.pex.write(oprot);
1747
        this.pex.write(oprot);
Line 1970... Line 1765...
1970
      first = false;
1765
      first = false;
1971
      sb.append(")");
1766
      sb.append(")");
1972
      return sb.toString();
1767
      return sb.toString();
1973
    }
1768
    }
1974
 
1769
 
1975
    public void validate() throws TException {
1770
    public void validate() throws org.apache.thrift.TException {
1976
      // check for required fields
1771
      // check for required fields
1977
    }
1772
    }
1978
 
1773
 
-
 
1774
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
1775
      try {
-
 
1776
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
1777
      } catch (org.apache.thrift.TException te) {
-
 
1778
        throw new java.io.IOException(te);
-
 
1779
      }
-
 
1780
    }
-
 
1781
 
-
 
1782
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
1783
      try {
-
 
1784
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
1785
      } catch (org.apache.thrift.TException te) {
-
 
1786
        throw new java.io.IOException(te);
-
 
1787
      }
-
 
1788
    }
-
 
1789
 
1979
  }
1790
  }
1980
 
1791
 
1981
  public static class getAllPromotions_args implements TBase<getAllPromotions_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllPromotions_args>   {
1792
  public static class getAllPromotions_args implements org.apache.thrift.TBase<getAllPromotions_args, getAllPromotions_args._Fields>, java.io.Serializable, Cloneable   {
1982
    private static final TStruct STRUCT_DESC = new TStruct("getAllPromotions_args");
1793
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPromotions_args");
1983
 
1794
 
1984
 
1795
 
1985
 
1796
 
1986
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1797
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1987
    public enum _Fields implements TFieldIdEnum {
1798
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
1988
;
1799
;
1989
 
1800
 
1990
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
1991
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1801
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1992
 
1802
 
1993
      static {
1803
      static {
1994
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1804
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1995
          byId.put((int)field._thriftId, field);
-
 
1996
          byName.put(field.getFieldName(), field);
1805
          byName.put(field.getFieldName(), field);
1997
        }
1806
        }
1998
      }
1807
      }
1999
 
1808
 
2000
      /**
1809
      /**
2001
       * Find the _Fields constant that matches fieldId, or null if its not found.
1810
       * Find the _Fields constant that matches fieldId, or null if its not found.
2002
       */
1811
       */
2003
      public static _Fields findByThriftId(int fieldId) {
1812
      public static _Fields findByThriftId(int fieldId) {
2004
        return byId.get(fieldId);
1813
        switch(fieldId) {
-
 
1814
          default:
-
 
1815
            return null;
-
 
1816
        }
2005
      }
1817
      }
2006
 
1818
 
2007
      /**
1819
      /**
2008
       * Find the _Fields constant that matches fieldId, throwing an exception
1820
       * Find the _Fields constant that matches fieldId, throwing an exception
2009
       * if it is not found.
1821
       * if it is not found.
Line 2035... Line 1847...
2035
 
1847
 
2036
      public String getFieldName() {
1848
      public String getFieldName() {
2037
        return _fieldName;
1849
        return _fieldName;
2038
      }
1850
      }
2039
    }
1851
    }
2040
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1852
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2041
    }});
-
 
2042
 
-
 
2043
    static {
1853
    static {
-
 
1854
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
1855
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2044
      FieldMetaData.addStructMetaDataMap(getAllPromotions_args.class, metaDataMap);
1856
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPromotions_args.class, metaDataMap);
2045
    }
1857
    }
2046
 
1858
 
2047
    public getAllPromotions_args() {
1859
    public getAllPromotions_args() {
2048
    }
1860
    }
2049
 
1861
 
Line 2055... Line 1867...
2055
 
1867
 
2056
    public getAllPromotions_args deepCopy() {
1868
    public getAllPromotions_args deepCopy() {
2057
      return new getAllPromotions_args(this);
1869
      return new getAllPromotions_args(this);
2058
    }
1870
    }
2059
 
1871
 
2060
    @Deprecated
1872
    @Override
2061
    public getAllPromotions_args clone() {
1873
    public void clear() {
2062
      return new getAllPromotions_args(this);
-
 
2063
    }
1874
    }
2064
 
1875
 
2065
    public void setFieldValue(_Fields field, Object value) {
1876
    public void setFieldValue(_Fields field, Object value) {
2066
      switch (field) {
1877
      switch (field) {
2067
      }
1878
      }
2068
    }
1879
    }
2069
 
1880
 
2070
    public void setFieldValue(int fieldID, Object value) {
-
 
2071
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
2072
    }
-
 
2073
 
-
 
2074
    public Object getFieldValue(_Fields field) {
1881
    public Object getFieldValue(_Fields field) {
2075
      switch (field) {
1882
      switch (field) {
2076
      }
1883
      }
2077
      throw new IllegalStateException();
1884
      throw new IllegalStateException();
2078
    }
1885
    }
2079
 
1886
 
2080
    public Object getFieldValue(int fieldId) {
-
 
2081
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
2082
    }
-
 
2083
 
-
 
2084
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1887
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2085
    public boolean isSet(_Fields field) {
1888
    public boolean isSet(_Fields field) {
-
 
1889
      if (field == null) {
-
 
1890
        throw new IllegalArgumentException();
-
 
1891
      }
-
 
1892
 
2086
      switch (field) {
1893
      switch (field) {
2087
      }
1894
      }
2088
      throw new IllegalStateException();
1895
      throw new IllegalStateException();
2089
    }
1896
    }
2090
 
1897
 
2091
    public boolean isSet(int fieldID) {
-
 
2092
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
2093
    }
-
 
2094
 
-
 
2095
    @Override
1898
    @Override
2096
    public boolean equals(Object that) {
1899
    public boolean equals(Object that) {
2097
      if (that == null)
1900
      if (that == null)
2098
        return false;
1901
        return false;
2099
      if (that instanceof getAllPromotions_args)
1902
      if (that instanceof getAllPromotions_args)
Line 2122... Line 1925...
2122
      getAllPromotions_args typedOther = (getAllPromotions_args)other;
1925
      getAllPromotions_args typedOther = (getAllPromotions_args)other;
2123
 
1926
 
2124
      return 0;
1927
      return 0;
2125
    }
1928
    }
2126
 
1929
 
-
 
1930
    public _Fields fieldForId(int fieldId) {
-
 
1931
      return _Fields.findByThriftId(fieldId);
-
 
1932
    }
-
 
1933
 
2127
    public void read(TProtocol iprot) throws TException {
1934
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2128
      TField field;
1935
      org.apache.thrift.protocol.TField field;
2129
      iprot.readStructBegin();
1936
      iprot.readStructBegin();
2130
      while (true)
1937
      while (true)
2131
      {
1938
      {
2132
        field = iprot.readFieldBegin();
1939
        field = iprot.readFieldBegin();
2133
        if (field.type == TType.STOP) { 
1940
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2134
          break;
1941
          break;
2135
        }
1942
        }
2136
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
2137
        if (fieldId == null) {
-
 
2138
          TProtocolUtil.skip(iprot, field.type);
-
 
2139
        } else {
-
 
2140
          switch (fieldId) {
1943
        switch (field.id) {
2141
          }
1944
          default:
2142
          iprot.readFieldEnd();
1945
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2143
        }
1946
        }
-
 
1947
        iprot.readFieldEnd();
2144
      }
1948
      }
2145
      iprot.readStructEnd();
1949
      iprot.readStructEnd();
2146
      validate();
1950
      validate();
2147
    }
1951
    }
2148
 
1952
 
2149
    public void write(TProtocol oprot) throws TException {
1953
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2150
      validate();
1954
      validate();
2151
 
1955
 
2152
      oprot.writeStructBegin(STRUCT_DESC);
1956
      oprot.writeStructBegin(STRUCT_DESC);
2153
      oprot.writeFieldStop();
1957
      oprot.writeFieldStop();
2154
      oprot.writeStructEnd();
1958
      oprot.writeStructEnd();
Line 2161... Line 1965...
2161
 
1965
 
2162
      sb.append(")");
1966
      sb.append(")");
2163
      return sb.toString();
1967
      return sb.toString();
2164
    }
1968
    }
2165
 
1969
 
2166
    public void validate() throws TException {
1970
    public void validate() throws org.apache.thrift.TException {
2167
      // check for required fields
1971
      // check for required fields
2168
    }
1972
    }
2169
 
1973
 
-
 
1974
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
1975
      try {
-
 
1976
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
1977
      } catch (org.apache.thrift.TException te) {
-
 
1978
        throw new java.io.IOException(te);
-
 
1979
      }
-
 
1980
    }
-
 
1981
 
-
 
1982
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
1983
      try {
-
 
1984
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
1985
      } catch (org.apache.thrift.TException te) {
-
 
1986
        throw new java.io.IOException(te);
-
 
1987
      }
-
 
1988
    }
-
 
1989
 
2170
  }
1990
  }
2171
 
1991
 
2172
  public static class getAllPromotions_result implements TBase<getAllPromotions_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllPromotions_result>   {
1992
  public static class getAllPromotions_result implements org.apache.thrift.TBase<getAllPromotions_result, getAllPromotions_result._Fields>, java.io.Serializable, Cloneable   {
2173
    private static final TStruct STRUCT_DESC = new TStruct("getAllPromotions_result");
1993
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPromotions_result");
2174
 
1994
 
2175
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
1995
    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);
2176
    private static final TField PEX_FIELD_DESC = new TField("pex", TType.STRUCT, (short)1);
1996
    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);
2177
 
1997
 
2178
    private List<Promotion> success;
1998
    private List<Promotion> success; // required
2179
    private PromotionException pex;
1999
    private PromotionException pex; // required
2180
 
2000
 
2181
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2001
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2182
    public enum _Fields implements TFieldIdEnum {
2002
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2183
      SUCCESS((short)0, "success"),
2003
      SUCCESS((short)0, "success"),
2184
      PEX((short)1, "pex");
2004
      PEX((short)1, "pex");
2185
 
2005
 
2186
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
2187
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2006
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2188
 
2007
 
2189
      static {
2008
      static {
2190
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2009
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2191
          byId.put((int)field._thriftId, field);
-
 
2192
          byName.put(field.getFieldName(), field);
2010
          byName.put(field.getFieldName(), field);
2193
        }
2011
        }
2194
      }
2012
      }
2195
 
2013
 
2196
      /**
2014
      /**
2197
       * Find the _Fields constant that matches fieldId, or null if its not found.
2015
       * Find the _Fields constant that matches fieldId, or null if its not found.
2198
       */
2016
       */
2199
      public static _Fields findByThriftId(int fieldId) {
2017
      public static _Fields findByThriftId(int fieldId) {
2200
        return byId.get(fieldId);
2018
        switch(fieldId) {
-
 
2019
          case 0: // SUCCESS
-
 
2020
            return SUCCESS;
-
 
2021
          case 1: // PEX
-
 
2022
            return PEX;
-
 
2023
          default:
-
 
2024
            return null;
-
 
2025
        }
2201
      }
2026
      }
2202
 
2027
 
2203
      /**
2028
      /**
2204
       * Find the _Fields constant that matches fieldId, throwing an exception
2029
       * Find the _Fields constant that matches fieldId, throwing an exception
2205
       * if it is not found.
2030
       * if it is not found.
Line 2234... Line 2059...
2234
      }
2059
      }
2235
    }
2060
    }
2236
 
2061
 
2237
    // isset id assignments
2062
    // isset id assignments
2238
 
2063
 
2239
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2064
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2240
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
2241
          new ListMetaData(TType.LIST, 
-
 
2242
              new StructMetaData(TType.STRUCT, Promotion.class))));
-
 
2243
      put(_Fields.PEX, new FieldMetaData("pex", TFieldRequirementType.DEFAULT, 
-
 
2244
          new FieldValueMetaData(TType.STRUCT)));
-
 
2245
    }});
-
 
2246
 
-
 
2247
    static {
2065
    static {
-
 
2066
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
2067
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
2068
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
-
 
2069
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Promotion.class))));
-
 
2070
      tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
2071
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
2072
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2248
      FieldMetaData.addStructMetaDataMap(getAllPromotions_result.class, metaDataMap);
2073
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPromotions_result.class, metaDataMap);
2249
    }
2074
    }
2250
 
2075
 
2251
    public getAllPromotions_result() {
2076
    public getAllPromotions_result() {
2252
    }
2077
    }
2253
 
2078
 
Line 2278... Line 2103...
2278
 
2103
 
2279
    public getAllPromotions_result deepCopy() {
2104
    public getAllPromotions_result deepCopy() {
2280
      return new getAllPromotions_result(this);
2105
      return new getAllPromotions_result(this);
2281
    }
2106
    }
2282
 
2107
 
2283
    @Deprecated
2108
    @Override
2284
    public getAllPromotions_result clone() {
2109
    public void clear() {
2285
      return new getAllPromotions_result(this);
2110
      this.success = null;
-
 
2111
      this.pex = null;
2286
    }
2112
    }
2287
 
2113
 
2288
    public int getSuccessSize() {
2114
    public int getSuccessSize() {
2289
      return (this.success == null) ? 0 : this.success.size();
2115
      return (this.success == null) ? 0 : this.success.size();
2290
    }
2116
    }
Line 2302... Line 2128...
2302
 
2128
 
2303
    public List<Promotion> getSuccess() {
2129
    public List<Promotion> getSuccess() {
2304
      return this.success;
2130
      return this.success;
2305
    }
2131
    }
2306
 
2132
 
2307
    public getAllPromotions_result setSuccess(List<Promotion> success) {
2133
    public void setSuccess(List<Promotion> success) {
2308
      this.success = success;
2134
      this.success = success;
2309
      return this;
-
 
2310
    }
2135
    }
2311
 
2136
 
2312
    public void unsetSuccess() {
2137
    public void unsetSuccess() {
2313
      this.success = null;
2138
      this.success = null;
2314
    }
2139
    }
2315
 
2140
 
2316
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2141
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2317
    public boolean isSetSuccess() {
2142
    public boolean isSetSuccess() {
2318
      return this.success != null;
2143
      return this.success != null;
2319
    }
2144
    }
2320
 
2145
 
2321
    public void setSuccessIsSet(boolean value) {
2146
    public void setSuccessIsSet(boolean value) {
Line 2326... Line 2151...
2326
 
2151
 
2327
    public PromotionException getPex() {
2152
    public PromotionException getPex() {
2328
      return this.pex;
2153
      return this.pex;
2329
    }
2154
    }
2330
 
2155
 
2331
    public getAllPromotions_result setPex(PromotionException pex) {
2156
    public void setPex(PromotionException pex) {
2332
      this.pex = pex;
2157
      this.pex = pex;
2333
      return this;
-
 
2334
    }
2158
    }
2335
 
2159
 
2336
    public void unsetPex() {
2160
    public void unsetPex() {
2337
      this.pex = null;
2161
      this.pex = null;
2338
    }
2162
    }
2339
 
2163
 
2340
    /** Returns true if field pex is set (has been asigned a value) and false otherwise */
2164
    /** Returns true if field pex is set (has been assigned a value) and false otherwise */
2341
    public boolean isSetPex() {
2165
    public boolean isSetPex() {
2342
      return this.pex != null;
2166
      return this.pex != null;
2343
    }
2167
    }
2344
 
2168
 
2345
    public void setPexIsSet(boolean value) {
2169
    public void setPexIsSet(boolean value) {
Line 2367... Line 2191...
2367
        break;
2191
        break;
2368
 
2192
 
2369
      }
2193
      }
2370
    }
2194
    }
2371
 
2195
 
2372
    public void setFieldValue(int fieldID, Object value) {
-
 
2373
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
2374
    }
-
 
2375
 
-
 
2376
    public Object getFieldValue(_Fields field) {
2196
    public Object getFieldValue(_Fields field) {
2377
      switch (field) {
2197
      switch (field) {
2378
      case SUCCESS:
2198
      case SUCCESS:
2379
        return getSuccess();
2199
        return getSuccess();
2380
 
2200
 
Line 2383... Line 2203...
2383
 
2203
 
2384
      }
2204
      }
2385
      throw new IllegalStateException();
2205
      throw new IllegalStateException();
2386
    }
2206
    }
2387
 
2207
 
2388
    public Object getFieldValue(int fieldId) {
-
 
2389
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
2390
    }
-
 
2391
 
-
 
2392
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2208
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2393
    public boolean isSet(_Fields field) {
2209
    public boolean isSet(_Fields field) {
-
 
2210
      if (field == null) {
-
 
2211
        throw new IllegalArgumentException();
-
 
2212
      }
-
 
2213
 
2394
      switch (field) {
2214
      switch (field) {
2395
      case SUCCESS:
2215
      case SUCCESS:
2396
        return isSetSuccess();
2216
        return isSetSuccess();
2397
      case PEX:
2217
      case PEX:
2398
        return isSetPex();
2218
        return isSetPex();
2399
      }
2219
      }
2400
      throw new IllegalStateException();
2220
      throw new IllegalStateException();
2401
    }
2221
    }
2402
 
2222
 
2403
    public boolean isSet(int fieldID) {
-
 
2404
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
2405
    }
-
 
2406
 
-
 
2407
    @Override
2223
    @Override
2408
    public boolean equals(Object that) {
2224
    public boolean equals(Object that) {
2409
      if (that == null)
2225
      if (that == null)
2410
        return false;
2226
        return false;
2411
      if (that instanceof getAllPromotions_result)
2227
      if (that instanceof getAllPromotions_result)
Line 2449... Line 2265...
2449
      }
2265
      }
2450
 
2266
 
2451
      int lastComparison = 0;
2267
      int lastComparison = 0;
2452
      getAllPromotions_result typedOther = (getAllPromotions_result)other;
2268
      getAllPromotions_result typedOther = (getAllPromotions_result)other;
2453
 
2269
 
2454
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
2270
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2455
      if (lastComparison != 0) {
2271
      if (lastComparison != 0) {
2456
        return lastComparison;
2272
        return lastComparison;
2457
      }
2273
      }
-
 
2274
      if (isSetSuccess()) {
2458
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
2275
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
2459
      if (lastComparison != 0) {
2276
        if (lastComparison != 0) {
2460
        return lastComparison;
2277
          return lastComparison;
-
 
2278
        }
2461
      }
2279
      }
2462
      lastComparison = Boolean.valueOf(isSetPex()).compareTo(isSetPex());
2280
      lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
2463
      if (lastComparison != 0) {
2281
      if (lastComparison != 0) {
2464
        return lastComparison;
2282
        return lastComparison;
2465
      }
2283
      }
-
 
2284
      if (isSetPex()) {
2466
      lastComparison = TBaseHelper.compareTo(pex, typedOther.pex);
2285
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
2467
      if (lastComparison != 0) {
2286
        if (lastComparison != 0) {
2468
        return lastComparison;
2287
          return lastComparison;
-
 
2288
        }
2469
      }
2289
      }
2470
      return 0;
2290
      return 0;
2471
    }
2291
    }
2472
 
2292
 
-
 
2293
    public _Fields fieldForId(int fieldId) {
-
 
2294
      return _Fields.findByThriftId(fieldId);
-
 
2295
    }
-
 
2296
 
2473
    public void read(TProtocol iprot) throws TException {
2297
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2474
      TField field;
2298
      org.apache.thrift.protocol.TField field;
2475
      iprot.readStructBegin();
2299
      iprot.readStructBegin();
2476
      while (true)
2300
      while (true)
2477
      {
2301
      {
2478
        field = iprot.readFieldBegin();
2302
        field = iprot.readFieldBegin();
2479
        if (field.type == TType.STOP) { 
2303
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2480
          break;
2304
          break;
2481
        }
2305
        }
2482
        _Fields fieldId = _Fields.findByThriftId(field.id);
2306
        switch (field.id) {
2483
        if (fieldId == null) {
2307
          case 0: // SUCCESS
2484
          TProtocolUtil.skip(iprot, field.type);
2308
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
2485
        } else {
2309
              {
2486
          switch (fieldId) {
2310
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
2487
            case SUCCESS:
2311
                this.success = new ArrayList<Promotion>(_list12.size);
2488
              if (field.type == TType.LIST) {
2312
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
2489
                {
2313
                {
2490
                  TList _list12 = iprot.readListBegin();
-
 
2491
                  this.success = new ArrayList<Promotion>(_list12.size);
-
 
2492
                  for (int _i13 = 0; _i13 < _list12.size; ++_i13)
-
 
2493
                  {
-
 
2494
                    Promotion _elem14;
2314
                  Promotion _elem14; // required
2495
                    _elem14 = new Promotion();
2315
                  _elem14 = new Promotion();
2496
                    _elem14.read(iprot);
2316
                  _elem14.read(iprot);
2497
                    this.success.add(_elem14);
2317
                  this.success.add(_elem14);
2498
                  }
-
 
2499
                  iprot.readListEnd();
-
 
2500
                }
2318
                }
2501
              } else { 
-
 
2502
                TProtocolUtil.skip(iprot, field.type);
-
 
2503
              }
-
 
2504
              break;
-
 
2505
            case PEX:
-
 
2506
              if (field.type == TType.STRUCT) {
-
 
2507
                this.pex = new PromotionException();
-
 
2508
                this.pex.read(iprot);
2319
                iprot.readListEnd();
2509
              } else { 
-
 
2510
                TProtocolUtil.skip(iprot, field.type);
-
 
2511
              }
2320
              }
-
 
2321
            } else { 
-
 
2322
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
2323
            }
2512
              break;
2324
            break;
-
 
2325
          case 1: // PEX
-
 
2326
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
2327
              this.pex = new PromotionException();
-
 
2328
              this.pex.read(iprot);
-
 
2329
            } else { 
-
 
2330
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2513
          }
2331
            }
2514
          iprot.readFieldEnd();
2332
            break;
-
 
2333
          default:
-
 
2334
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2515
        }
2335
        }
-
 
2336
        iprot.readFieldEnd();
2516
      }
2337
      }
2517
      iprot.readStructEnd();
2338
      iprot.readStructEnd();
2518
      validate();
2339
      validate();
2519
    }
2340
    }
2520
 
2341
 
2521
    public void write(TProtocol oprot) throws TException {
2342
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2522
      oprot.writeStructBegin(STRUCT_DESC);
2343
      oprot.writeStructBegin(STRUCT_DESC);
2523
 
2344
 
2524
      if (this.isSetSuccess()) {
2345
      if (this.isSetSuccess()) {
2525
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2346
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2526
        {
2347
        {
2527
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
2348
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
2528
          for (Promotion _iter15 : this.success)
2349
          for (Promotion _iter15 : this.success)
2529
          {
2350
          {
2530
            _iter15.write(oprot);
2351
            _iter15.write(oprot);
2531
          }
2352
          }
2532
          oprot.writeListEnd();
2353
          oprot.writeListEnd();
Line 2563... Line 2384...
2563
      first = false;
2384
      first = false;
2564
      sb.append(")");
2385
      sb.append(")");
2565
      return sb.toString();
2386
      return sb.toString();
2566
    }
2387
    }
2567
 
2388
 
2568
    public void validate() throws TException {
2389
    public void validate() throws org.apache.thrift.TException {
2569
      // check for required fields
2390
      // check for required fields
2570
    }
2391
    }
2571
 
2392
 
-
 
2393
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
2394
      try {
-
 
2395
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
2396
      } catch (org.apache.thrift.TException te) {
-
 
2397
        throw new java.io.IOException(te);
-
 
2398
      }
-
 
2399
    }
-
 
2400
 
-
 
2401
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
2402
      try {
-
 
2403
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
2404
      } catch (org.apache.thrift.TException te) {
-
 
2405
        throw new java.io.IOException(te);
-
 
2406
      }
-
 
2407
    }
-
 
2408
 
2572
  }
2409
  }
2573
 
2410
 
2574
  public static class getPromotionById_args implements TBase<getPromotionById_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPromotionById_args>   {
2411
  public static class getPromotionById_args implements org.apache.thrift.TBase<getPromotionById_args, getPromotionById_args._Fields>, java.io.Serializable, Cloneable   {
2575
    private static final TStruct STRUCT_DESC = new TStruct("getPromotionById_args");
2412
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPromotionById_args");
2576
 
2413
 
2577
    private static final TField PROMOTION_ID_FIELD_DESC = new TField("promotionId", TType.I64, (short)1);
2414
    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);
2578
 
2415
 
2579
    private long promotionId;
2416
    private long promotionId; // required
2580
 
2417
 
2581
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2418
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2582
    public enum _Fields implements TFieldIdEnum {
2419
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2583
      PROMOTION_ID((short)1, "promotionId");
2420
      PROMOTION_ID((short)1, "promotionId");
2584
 
2421
 
2585
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
2586
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2422
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2587
 
2423
 
2588
      static {
2424
      static {
2589
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2425
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2590
          byId.put((int)field._thriftId, field);
-
 
2591
          byName.put(field.getFieldName(), field);
2426
          byName.put(field.getFieldName(), field);
2592
        }
2427
        }
2593
      }
2428
      }
2594
 
2429
 
2595
      /**
2430
      /**
2596
       * Find the _Fields constant that matches fieldId, or null if its not found.
2431
       * Find the _Fields constant that matches fieldId, or null if its not found.
2597
       */
2432
       */
2598
      public static _Fields findByThriftId(int fieldId) {
2433
      public static _Fields findByThriftId(int fieldId) {
2599
        return byId.get(fieldId);
2434
        switch(fieldId) {
-
 
2435
          case 1: // PROMOTION_ID
-
 
2436
            return PROMOTION_ID;
-
 
2437
          default:
-
 
2438
            return null;
-
 
2439
        }
2600
      }
2440
      }
2601
 
2441
 
2602
      /**
2442
      /**
2603
       * Find the _Fields constant that matches fieldId, throwing an exception
2443
       * Find the _Fields constant that matches fieldId, throwing an exception
2604
       * if it is not found.
2444
       * if it is not found.
Line 2635... Line 2475...
2635
 
2475
 
2636
    // isset id assignments
2476
    // isset id assignments
2637
    private static final int __PROMOTIONID_ISSET_ID = 0;
2477
    private static final int __PROMOTIONID_ISSET_ID = 0;
2638
    private BitSet __isset_bit_vector = new BitSet(1);
2478
    private BitSet __isset_bit_vector = new BitSet(1);
2639
 
2479
 
2640
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2480
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2641
      put(_Fields.PROMOTION_ID, new FieldMetaData("promotionId", TFieldRequirementType.DEFAULT, 
-
 
2642
          new FieldValueMetaData(TType.I64)));
-
 
2643
    }});
-
 
2644
 
-
 
2645
    static {
2481
    static {
-
 
2482
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
2483
      tmpMap.put(_Fields.PROMOTION_ID, new org.apache.thrift.meta_data.FieldMetaData("promotionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
2484
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
2485
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2646
      FieldMetaData.addStructMetaDataMap(getPromotionById_args.class, metaDataMap);
2486
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPromotionById_args.class, metaDataMap);
2647
    }
2487
    }
2648
 
2488
 
2649
    public getPromotionById_args() {
2489
    public getPromotionById_args() {
2650
    }
2490
    }
2651
 
2491
 
Line 2668... Line 2508...
2668
 
2508
 
2669
    public getPromotionById_args deepCopy() {
2509
    public getPromotionById_args deepCopy() {
2670
      return new getPromotionById_args(this);
2510
      return new getPromotionById_args(this);
2671
    }
2511
    }
2672
 
2512
 
2673
    @Deprecated
2513
    @Override
2674
    public getPromotionById_args clone() {
2514
    public void clear() {
2675
      return new getPromotionById_args(this);
2515
      setPromotionIdIsSet(false);
-
 
2516
      this.promotionId = 0;
2676
    }
2517
    }
2677
 
2518
 
2678
    public long getPromotionId() {
2519
    public long getPromotionId() {
2679
      return this.promotionId;
2520
      return this.promotionId;
2680
    }
2521
    }
2681
 
2522
 
2682
    public getPromotionById_args setPromotionId(long promotionId) {
2523
    public void setPromotionId(long promotionId) {
2683
      this.promotionId = promotionId;
2524
      this.promotionId = promotionId;
2684
      setPromotionIdIsSet(true);
2525
      setPromotionIdIsSet(true);
2685
      return this;
-
 
2686
    }
2526
    }
2687
 
2527
 
2688
    public void unsetPromotionId() {
2528
    public void unsetPromotionId() {
2689
      __isset_bit_vector.clear(__PROMOTIONID_ISSET_ID);
2529
      __isset_bit_vector.clear(__PROMOTIONID_ISSET_ID);
2690
    }
2530
    }
2691
 
2531
 
2692
    /** Returns true if field promotionId is set (has been asigned a value) and false otherwise */
2532
    /** Returns true if field promotionId is set (has been assigned a value) and false otherwise */
2693
    public boolean isSetPromotionId() {
2533
    public boolean isSetPromotionId() {
2694
      return __isset_bit_vector.get(__PROMOTIONID_ISSET_ID);
2534
      return __isset_bit_vector.get(__PROMOTIONID_ISSET_ID);
2695
    }
2535
    }
2696
 
2536
 
2697
    public void setPromotionIdIsSet(boolean value) {
2537
    public void setPromotionIdIsSet(boolean value) {
Line 2709... Line 2549...
2709
        break;
2549
        break;
2710
 
2550
 
2711
      }
2551
      }
2712
    }
2552
    }
2713
 
2553
 
2714
    public void setFieldValue(int fieldID, Object value) {
-
 
2715
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
2716
    }
-
 
2717
 
-
 
2718
    public Object getFieldValue(_Fields field) {
2554
    public Object getFieldValue(_Fields field) {
2719
      switch (field) {
2555
      switch (field) {
2720
      case PROMOTION_ID:
2556
      case PROMOTION_ID:
2721
        return new Long(getPromotionId());
2557
        return Long.valueOf(getPromotionId());
2722
 
2558
 
2723
      }
2559
      }
2724
      throw new IllegalStateException();
2560
      throw new IllegalStateException();
2725
    }
2561
    }
2726
 
2562
 
2727
    public Object getFieldValue(int fieldId) {
-
 
2728
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
2729
    }
-
 
2730
 
-
 
2731
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2563
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2732
    public boolean isSet(_Fields field) {
2564
    public boolean isSet(_Fields field) {
-
 
2565
      if (field == null) {
-
 
2566
        throw new IllegalArgumentException();
-
 
2567
      }
-
 
2568
 
2733
      switch (field) {
2569
      switch (field) {
2734
      case PROMOTION_ID:
2570
      case PROMOTION_ID:
2735
        return isSetPromotionId();
2571
        return isSetPromotionId();
2736
      }
2572
      }
2737
      throw new IllegalStateException();
2573
      throw new IllegalStateException();
2738
    }
2574
    }
2739
 
2575
 
2740
    public boolean isSet(int fieldID) {
-
 
2741
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
2742
    }
-
 
2743
 
-
 
2744
    @Override
2576
    @Override
2745
    public boolean equals(Object that) {
2577
    public boolean equals(Object that) {
2746
      if (that == null)
2578
      if (that == null)
2747
        return false;
2579
        return false;
2748
      if (that instanceof getPromotionById_args)
2580
      if (that instanceof getPromotionById_args)
Line 2777... Line 2609...
2777
      }
2609
      }
2778
 
2610
 
2779
      int lastComparison = 0;
2611
      int lastComparison = 0;
2780
      getPromotionById_args typedOther = (getPromotionById_args)other;
2612
      getPromotionById_args typedOther = (getPromotionById_args)other;
2781
 
2613
 
2782
      lastComparison = Boolean.valueOf(isSetPromotionId()).compareTo(isSetPromotionId());
2614
      lastComparison = Boolean.valueOf(isSetPromotionId()).compareTo(typedOther.isSetPromotionId());
2783
      if (lastComparison != 0) {
2615
      if (lastComparison != 0) {
2784
        return lastComparison;
2616
        return lastComparison;
2785
      }
2617
      }
-
 
2618
      if (isSetPromotionId()) {
2786
      lastComparison = TBaseHelper.compareTo(promotionId, typedOther.promotionId);
2619
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.promotionId, typedOther.promotionId);
2787
      if (lastComparison != 0) {
2620
        if (lastComparison != 0) {
2788
        return lastComparison;
2621
          return lastComparison;
-
 
2622
        }
2789
      }
2623
      }
2790
      return 0;
2624
      return 0;
2791
    }
2625
    }
2792
 
2626
 
-
 
2627
    public _Fields fieldForId(int fieldId) {
-
 
2628
      return _Fields.findByThriftId(fieldId);
-
 
2629
    }
-
 
2630
 
2793
    public void read(TProtocol iprot) throws TException {
2631
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2794
      TField field;
2632
      org.apache.thrift.protocol.TField field;
2795
      iprot.readStructBegin();
2633
      iprot.readStructBegin();
2796
      while (true)
2634
      while (true)
2797
      {
2635
      {
2798
        field = iprot.readFieldBegin();
2636
        field = iprot.readFieldBegin();
2799
        if (field.type == TType.STOP) { 
2637
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2800
          break;
2638
          break;
2801
        }
2639
        }
2802
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
2803
        if (fieldId == null) {
-
 
2804
          TProtocolUtil.skip(iprot, field.type);
-
 
2805
        } else {
-
 
2806
          switch (fieldId) {
2640
        switch (field.id) {
2807
            case PROMOTION_ID:
2641
          case 1: // PROMOTION_ID
2808
              if (field.type == TType.I64) {
2642
            if (field.type == org.apache.thrift.protocol.TType.I64) {
2809
                this.promotionId = iprot.readI64();
2643
              this.promotionId = iprot.readI64();
2810
                setPromotionIdIsSet(true);
2644
              setPromotionIdIsSet(true);
2811
              } else { 
2645
            } else { 
2812
                TProtocolUtil.skip(iprot, field.type);
2646
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2813
              }
2647
            }
2814
              break;
2648
            break;
2815
          }
2649
          default:
2816
          iprot.readFieldEnd();
2650
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2817
        }
2651
        }
-
 
2652
        iprot.readFieldEnd();
2818
      }
2653
      }
2819
      iprot.readStructEnd();
2654
      iprot.readStructEnd();
2820
      validate();
2655
      validate();
2821
    }
2656
    }
2822
 
2657
 
2823
    public void write(TProtocol oprot) throws TException {
2658
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2824
      validate();
2659
      validate();
2825
 
2660
 
2826
      oprot.writeStructBegin(STRUCT_DESC);
2661
      oprot.writeStructBegin(STRUCT_DESC);
2827
      oprot.writeFieldBegin(PROMOTION_ID_FIELD_DESC);
2662
      oprot.writeFieldBegin(PROMOTION_ID_FIELD_DESC);
2828
      oprot.writeI64(this.promotionId);
2663
      oprot.writeI64(this.promotionId);
Line 2841... Line 2676...
2841
      first = false;
2676
      first = false;
2842
      sb.append(")");
2677
      sb.append(")");
2843
      return sb.toString();
2678
      return sb.toString();
2844
    }
2679
    }
2845
 
2680
 
2846
    public void validate() throws TException {
2681
    public void validate() throws org.apache.thrift.TException {
2847
      // check for required fields
2682
      // check for required fields
2848
    }
2683
    }
2849
 
2684
 
-
 
2685
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
2686
      try {
-
 
2687
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
2688
      } catch (org.apache.thrift.TException te) {
-
 
2689
        throw new java.io.IOException(te);
-
 
2690
      }
-
 
2691
    }
-
 
2692
 
-
 
2693
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
2694
      try {
-
 
2695
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
2696
        __isset_bit_vector = new BitSet(1);
-
 
2697
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
2698
      } catch (org.apache.thrift.TException te) {
-
 
2699
        throw new java.io.IOException(te);
-
 
2700
      }
-
 
2701
    }
-
 
2702
 
2850
  }
2703
  }
2851
 
2704
 
2852
  public static class getPromotionById_result implements TBase<getPromotionById_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPromotionById_result>   {
2705
  public static class getPromotionById_result implements org.apache.thrift.TBase<getPromotionById_result, getPromotionById_result._Fields>, java.io.Serializable, Cloneable   {
2853
    private static final TStruct STRUCT_DESC = new TStruct("getPromotionById_result");
2706
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPromotionById_result");
2854
 
2707
 
2855
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
2708
    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);
2856
    private static final TField PEX_FIELD_DESC = new TField("pex", TType.STRUCT, (short)1);
2709
    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);
2857
 
2710
 
2858
    private Promotion success;
2711
    private Promotion success; // required
2859
    private PromotionException pex;
2712
    private PromotionException pex; // required
2860
 
2713
 
2861
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2714
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2862
    public enum _Fields implements TFieldIdEnum {
2715
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2863
      SUCCESS((short)0, "success"),
2716
      SUCCESS((short)0, "success"),
2864
      PEX((short)1, "pex");
2717
      PEX((short)1, "pex");
2865
 
2718
 
2866
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
2867
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2719
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2868
 
2720
 
2869
      static {
2721
      static {
2870
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2722
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2871
          byId.put((int)field._thriftId, field);
-
 
2872
          byName.put(field.getFieldName(), field);
2723
          byName.put(field.getFieldName(), field);
2873
        }
2724
        }
2874
      }
2725
      }
2875
 
2726
 
2876
      /**
2727
      /**
2877
       * Find the _Fields constant that matches fieldId, or null if its not found.
2728
       * Find the _Fields constant that matches fieldId, or null if its not found.
2878
       */
2729
       */
2879
      public static _Fields findByThriftId(int fieldId) {
2730
      public static _Fields findByThriftId(int fieldId) {
2880
        return byId.get(fieldId);
2731
        switch(fieldId) {
-
 
2732
          case 0: // SUCCESS
-
 
2733
            return SUCCESS;
-
 
2734
          case 1: // PEX
-
 
2735
            return PEX;
-
 
2736
          default:
-
 
2737
            return null;
-
 
2738
        }
2881
      }
2739
      }
2882
 
2740
 
2883
      /**
2741
      /**
2884
       * Find the _Fields constant that matches fieldId, throwing an exception
2742
       * Find the _Fields constant that matches fieldId, throwing an exception
2885
       * if it is not found.
2743
       * if it is not found.
Line 2914... Line 2772...
2914
      }
2772
      }
2915
    }
2773
    }
2916
 
2774
 
2917
    // isset id assignments
2775
    // isset id assignments
2918
 
2776
 
2919
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2777
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2920
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
2921
          new StructMetaData(TType.STRUCT, Promotion.class)));
-
 
2922
      put(_Fields.PEX, new FieldMetaData("pex", TFieldRequirementType.DEFAULT, 
-
 
2923
          new FieldValueMetaData(TType.STRUCT)));
-
 
2924
    }});
-
 
2925
 
-
 
2926
    static {
2778
    static {
-
 
2779
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
2780
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
2781
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Promotion.class)));
-
 
2782
      tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
2783
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
2784
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2927
      FieldMetaData.addStructMetaDataMap(getPromotionById_result.class, metaDataMap);
2785
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPromotionById_result.class, metaDataMap);
2928
    }
2786
    }
2929
 
2787
 
2930
    public getPromotionById_result() {
2788
    public getPromotionById_result() {
2931
    }
2789
    }
2932
 
2790
 
Line 2953... Line 2811...
2953
 
2811
 
2954
    public getPromotionById_result deepCopy() {
2812
    public getPromotionById_result deepCopy() {
2955
      return new getPromotionById_result(this);
2813
      return new getPromotionById_result(this);
2956
    }
2814
    }
2957
 
2815
 
2958
    @Deprecated
2816
    @Override
2959
    public getPromotionById_result clone() {
2817
    public void clear() {
2960
      return new getPromotionById_result(this);
2818
      this.success = null;
-
 
2819
      this.pex = null;
2961
    }
2820
    }
2962
 
2821
 
2963
    public Promotion getSuccess() {
2822
    public Promotion getSuccess() {
2964
      return this.success;
2823
      return this.success;
2965
    }
2824
    }
2966
 
2825
 
2967
    public getPromotionById_result setSuccess(Promotion success) {
2826
    public void setSuccess(Promotion success) {
2968
      this.success = success;
2827
      this.success = success;
2969
      return this;
-
 
2970
    }
2828
    }
2971
 
2829
 
2972
    public void unsetSuccess() {
2830
    public void unsetSuccess() {
2973
      this.success = null;
2831
      this.success = null;
2974
    }
2832
    }
2975
 
2833
 
2976
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2834
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2977
    public boolean isSetSuccess() {
2835
    public boolean isSetSuccess() {
2978
      return this.success != null;
2836
      return this.success != null;
2979
    }
2837
    }
2980
 
2838
 
2981
    public void setSuccessIsSet(boolean value) {
2839
    public void setSuccessIsSet(boolean value) {
Line 2986... Line 2844...
2986
 
2844
 
2987
    public PromotionException getPex() {
2845
    public PromotionException getPex() {
2988
      return this.pex;
2846
      return this.pex;
2989
    }
2847
    }
2990
 
2848
 
2991
    public getPromotionById_result setPex(PromotionException pex) {
2849
    public void setPex(PromotionException pex) {
2992
      this.pex = pex;
2850
      this.pex = pex;
2993
      return this;
-
 
2994
    }
2851
    }
2995
 
2852
 
2996
    public void unsetPex() {
2853
    public void unsetPex() {
2997
      this.pex = null;
2854
      this.pex = null;
2998
    }
2855
    }
2999
 
2856
 
3000
    /** Returns true if field pex is set (has been asigned a value) and false otherwise */
2857
    /** Returns true if field pex is set (has been assigned a value) and false otherwise */
3001
    public boolean isSetPex() {
2858
    public boolean isSetPex() {
3002
      return this.pex != null;
2859
      return this.pex != null;
3003
    }
2860
    }
3004
 
2861
 
3005
    public void setPexIsSet(boolean value) {
2862
    public void setPexIsSet(boolean value) {
Line 3027... Line 2884...
3027
        break;
2884
        break;
3028
 
2885
 
3029
      }
2886
      }
3030
    }
2887
    }
3031
 
2888
 
3032
    public void setFieldValue(int fieldID, Object value) {
-
 
3033
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
3034
    }
-
 
3035
 
-
 
3036
    public Object getFieldValue(_Fields field) {
2889
    public Object getFieldValue(_Fields field) {
3037
      switch (field) {
2890
      switch (field) {
3038
      case SUCCESS:
2891
      case SUCCESS:
3039
        return getSuccess();
2892
        return getSuccess();
3040
 
2893
 
Line 3043... Line 2896...
3043
 
2896
 
3044
      }
2897
      }
3045
      throw new IllegalStateException();
2898
      throw new IllegalStateException();
3046
    }
2899
    }
3047
 
2900
 
3048
    public Object getFieldValue(int fieldId) {
-
 
3049
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
3050
    }
-
 
3051
 
-
 
3052
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2901
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3053
    public boolean isSet(_Fields field) {
2902
    public boolean isSet(_Fields field) {
-
 
2903
      if (field == null) {
-
 
2904
        throw new IllegalArgumentException();
-
 
2905
      }
-
 
2906
 
3054
      switch (field) {
2907
      switch (field) {
3055
      case SUCCESS:
2908
      case SUCCESS:
3056
        return isSetSuccess();
2909
        return isSetSuccess();
3057
      case PEX:
2910
      case PEX:
3058
        return isSetPex();
2911
        return isSetPex();
3059
      }
2912
      }
3060
      throw new IllegalStateException();
2913
      throw new IllegalStateException();
3061
    }
2914
    }
3062
 
2915
 
3063
    public boolean isSet(int fieldID) {
-
 
3064
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
3065
    }
-
 
3066
 
-
 
3067
    @Override
2916
    @Override
3068
    public boolean equals(Object that) {
2917
    public boolean equals(Object that) {
3069
      if (that == null)
2918
      if (that == null)
3070
        return false;
2919
        return false;
3071
      if (that instanceof getPromotionById_result)
2920
      if (that instanceof getPromotionById_result)
Line 3109... Line 2958...
3109
      }
2958
      }
3110
 
2959
 
3111
      int lastComparison = 0;
2960
      int lastComparison = 0;
3112
      getPromotionById_result typedOther = (getPromotionById_result)other;
2961
      getPromotionById_result typedOther = (getPromotionById_result)other;
3113
 
2962
 
3114
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
2963
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3115
      if (lastComparison != 0) {
2964
      if (lastComparison != 0) {
3116
        return lastComparison;
2965
        return lastComparison;
3117
      }
2966
      }
-
 
2967
      if (isSetSuccess()) {
3118
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
2968
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3119
      if (lastComparison != 0) {
2969
        if (lastComparison != 0) {
3120
        return lastComparison;
2970
          return lastComparison;
-
 
2971
        }
3121
      }
2972
      }
3122
      lastComparison = Boolean.valueOf(isSetPex()).compareTo(isSetPex());
2973
      lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
3123
      if (lastComparison != 0) {
2974
      if (lastComparison != 0) {
3124
        return lastComparison;
2975
        return lastComparison;
3125
      }
2976
      }
-
 
2977
      if (isSetPex()) {
3126
      lastComparison = TBaseHelper.compareTo(pex, typedOther.pex);
2978
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
3127
      if (lastComparison != 0) {
2979
        if (lastComparison != 0) {
3128
        return lastComparison;
2980
          return lastComparison;
-
 
2981
        }
3129
      }
2982
      }
3130
      return 0;
2983
      return 0;
3131
    }
2984
    }
3132
 
2985
 
-
 
2986
    public _Fields fieldForId(int fieldId) {
-
 
2987
      return _Fields.findByThriftId(fieldId);
-
 
2988
    }
-
 
2989
 
3133
    public void read(TProtocol iprot) throws TException {
2990
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3134
      TField field;
2991
      org.apache.thrift.protocol.TField field;
3135
      iprot.readStructBegin();
2992
      iprot.readStructBegin();
3136
      while (true)
2993
      while (true)
3137
      {
2994
      {
3138
        field = iprot.readFieldBegin();
2995
        field = iprot.readFieldBegin();
3139
        if (field.type == TType.STOP) { 
2996
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3140
          break;
2997
          break;
3141
        }
2998
        }
3142
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
3143
        if (fieldId == null) {
-
 
3144
          TProtocolUtil.skip(iprot, field.type);
-
 
3145
        } else {
-
 
3146
          switch (fieldId) {
2999
        switch (field.id) {
3147
            case SUCCESS:
3000
          case 0: // SUCCESS
3148
              if (field.type == TType.STRUCT) {
3001
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3149
                this.success = new Promotion();
3002
              this.success = new Promotion();
3150
                this.success.read(iprot);
3003
              this.success.read(iprot);
3151
              } else { 
3004
            } else { 
3152
                TProtocolUtil.skip(iprot, field.type);
3005
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3153
              }
3006
            }
3154
              break;
3007
            break;
3155
            case PEX:
3008
          case 1: // PEX
3156
              if (field.type == TType.STRUCT) {
3009
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3157
                this.pex = new PromotionException();
3010
              this.pex = new PromotionException();
3158
                this.pex.read(iprot);
3011
              this.pex.read(iprot);
3159
              } else { 
3012
            } else { 
3160
                TProtocolUtil.skip(iprot, field.type);
3013
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3161
              }
3014
            }
3162
              break;
3015
            break;
3163
          }
3016
          default:
3164
          iprot.readFieldEnd();
3017
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3165
        }
3018
        }
-
 
3019
        iprot.readFieldEnd();
3166
      }
3020
      }
3167
      iprot.readStructEnd();
3021
      iprot.readStructEnd();
3168
      validate();
3022
      validate();
3169
    }
3023
    }
3170
 
3024
 
3171
    public void write(TProtocol oprot) throws TException {
3025
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3172
      oprot.writeStructBegin(STRUCT_DESC);
3026
      oprot.writeStructBegin(STRUCT_DESC);
3173
 
3027
 
3174
      if (this.isSetSuccess()) {
3028
      if (this.isSetSuccess()) {
3175
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3029
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3176
        this.success.write(oprot);
3030
        this.success.write(oprot);
Line 3206... Line 3060...
3206
      first = false;
3060
      first = false;
3207
      sb.append(")");
3061
      sb.append(")");
3208
      return sb.toString();
3062
      return sb.toString();
3209
    }
3063
    }
3210
 
3064
 
3211
    public void validate() throws TException {
3065
    public void validate() throws org.apache.thrift.TException {
3212
      // check for required fields
3066
      // check for required fields
3213
    }
3067
    }
3214
 
3068
 
-
 
3069
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
3070
      try {
-
 
3071
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
3072
      } catch (org.apache.thrift.TException te) {
-
 
3073
        throw new java.io.IOException(te);
-
 
3074
      }
-
 
3075
    }
-
 
3076
 
-
 
3077
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
3078
      try {
-
 
3079
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
3080
      } catch (org.apache.thrift.TException te) {
-
 
3081
        throw new java.io.IOException(te);
-
 
3082
      }
-
 
3083
    }
-
 
3084
 
3215
  }
3085
  }
3216
 
3086
 
3217
  public static class generateCouponsForPromotion_args implements TBase<generateCouponsForPromotion_args._Fields>, java.io.Serializable, Cloneable, Comparable<generateCouponsForPromotion_args>   {
3087
  public static class generateCouponsForPromotion_args implements org.apache.thrift.TBase<generateCouponsForPromotion_args, generateCouponsForPromotion_args._Fields>, java.io.Serializable, Cloneable   {
3218
    private static final TStruct STRUCT_DESC = new TStruct("generateCouponsForPromotion_args");
3088
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("generateCouponsForPromotion_args");
3219
 
3089
 
3220
    private static final TField PROMOTION_ID_FIELD_DESC = new TField("promotionId", TType.I64, (short)1);
3090
    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);
3221
    private static final TField COUPON_CODE_FIELD_DESC = new TField("couponCode", TType.STRING, (short)2);
3091
    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);
3222
 
3092
 
3223
    private long promotionId;
3093
    private long promotionId; // required
3224
    private String couponCode;
3094
    private String couponCode; // required
3225
 
3095
 
3226
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3096
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3227
    public enum _Fields implements TFieldIdEnum {
3097
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3228
      PROMOTION_ID((short)1, "promotionId"),
3098
      PROMOTION_ID((short)1, "promotionId"),
3229
      COUPON_CODE((short)2, "couponCode");
3099
      COUPON_CODE((short)2, "couponCode");
3230
 
3100
 
3231
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
3232
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3101
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3233
 
3102
 
3234
      static {
3103
      static {
3235
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3104
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3236
          byId.put((int)field._thriftId, field);
-
 
3237
          byName.put(field.getFieldName(), field);
3105
          byName.put(field.getFieldName(), field);
3238
        }
3106
        }
3239
      }
3107
      }
3240
 
3108
 
3241
      /**
3109
      /**
3242
       * Find the _Fields constant that matches fieldId, or null if its not found.
3110
       * Find the _Fields constant that matches fieldId, or null if its not found.
3243
       */
3111
       */
3244
      public static _Fields findByThriftId(int fieldId) {
3112
      public static _Fields findByThriftId(int fieldId) {
3245
        return byId.get(fieldId);
3113
        switch(fieldId) {
-
 
3114
          case 1: // PROMOTION_ID
-
 
3115
            return PROMOTION_ID;
-
 
3116
          case 2: // COUPON_CODE
-
 
3117
            return COUPON_CODE;
-
 
3118
          default:
-
 
3119
            return null;
-
 
3120
        }
3246
      }
3121
      }
3247
 
3122
 
3248
      /**
3123
      /**
3249
       * Find the _Fields constant that matches fieldId, throwing an exception
3124
       * Find the _Fields constant that matches fieldId, throwing an exception
3250
       * if it is not found.
3125
       * if it is not found.
Line 3281... Line 3156...
3281
 
3156
 
3282
    // isset id assignments
3157
    // isset id assignments
3283
    private static final int __PROMOTIONID_ISSET_ID = 0;
3158
    private static final int __PROMOTIONID_ISSET_ID = 0;
3284
    private BitSet __isset_bit_vector = new BitSet(1);
3159
    private BitSet __isset_bit_vector = new BitSet(1);
3285
 
3160
 
3286
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3161
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3287
      put(_Fields.PROMOTION_ID, new FieldMetaData("promotionId", TFieldRequirementType.DEFAULT, 
-
 
3288
          new FieldValueMetaData(TType.I64)));
-
 
3289
      put(_Fields.COUPON_CODE, new FieldMetaData("couponCode", TFieldRequirementType.DEFAULT, 
-
 
3290
          new FieldValueMetaData(TType.STRING)));
-
 
3291
    }});
-
 
3292
 
-
 
3293
    static {
3162
    static {
-
 
3163
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
3164
      tmpMap.put(_Fields.PROMOTION_ID, new org.apache.thrift.meta_data.FieldMetaData("promotionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
3165
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
3166
      tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
3167
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
3168
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3294
      FieldMetaData.addStructMetaDataMap(generateCouponsForPromotion_args.class, metaDataMap);
3169
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(generateCouponsForPromotion_args.class, metaDataMap);
3295
    }
3170
    }
3296
 
3171
 
3297
    public generateCouponsForPromotion_args() {
3172
    public generateCouponsForPromotion_args() {
3298
    }
3173
    }
3299
 
3174
 
Line 3321... Line 3196...
3321
 
3196
 
3322
    public generateCouponsForPromotion_args deepCopy() {
3197
    public generateCouponsForPromotion_args deepCopy() {
3323
      return new generateCouponsForPromotion_args(this);
3198
      return new generateCouponsForPromotion_args(this);
3324
    }
3199
    }
3325
 
3200
 
3326
    @Deprecated
3201
    @Override
3327
    public generateCouponsForPromotion_args clone() {
3202
    public void clear() {
3328
      return new generateCouponsForPromotion_args(this);
3203
      setPromotionIdIsSet(false);
-
 
3204
      this.promotionId = 0;
-
 
3205
      this.couponCode = null;
3329
    }
3206
    }
3330
 
3207
 
3331
    public long getPromotionId() {
3208
    public long getPromotionId() {
3332
      return this.promotionId;
3209
      return this.promotionId;
3333
    }
3210
    }
3334
 
3211
 
3335
    public generateCouponsForPromotion_args setPromotionId(long promotionId) {
3212
    public void setPromotionId(long promotionId) {
3336
      this.promotionId = promotionId;
3213
      this.promotionId = promotionId;
3337
      setPromotionIdIsSet(true);
3214
      setPromotionIdIsSet(true);
3338
      return this;
-
 
3339
    }
3215
    }
3340
 
3216
 
3341
    public void unsetPromotionId() {
3217
    public void unsetPromotionId() {
3342
      __isset_bit_vector.clear(__PROMOTIONID_ISSET_ID);
3218
      __isset_bit_vector.clear(__PROMOTIONID_ISSET_ID);
3343
    }
3219
    }
3344
 
3220
 
3345
    /** Returns true if field promotionId is set (has been asigned a value) and false otherwise */
3221
    /** Returns true if field promotionId is set (has been assigned a value) and false otherwise */
3346
    public boolean isSetPromotionId() {
3222
    public boolean isSetPromotionId() {
3347
      return __isset_bit_vector.get(__PROMOTIONID_ISSET_ID);
3223
      return __isset_bit_vector.get(__PROMOTIONID_ISSET_ID);
3348
    }
3224
    }
3349
 
3225
 
3350
    public void setPromotionIdIsSet(boolean value) {
3226
    public void setPromotionIdIsSet(boolean value) {
Line 3353... Line 3229...
3353
 
3229
 
3354
    public String getCouponCode() {
3230
    public String getCouponCode() {
3355
      return this.couponCode;
3231
      return this.couponCode;
3356
    }
3232
    }
3357
 
3233
 
3358
    public generateCouponsForPromotion_args setCouponCode(String couponCode) {
3234
    public void setCouponCode(String couponCode) {
3359
      this.couponCode = couponCode;
3235
      this.couponCode = couponCode;
3360
      return this;
-
 
3361
    }
3236
    }
3362
 
3237
 
3363
    public void unsetCouponCode() {
3238
    public void unsetCouponCode() {
3364
      this.couponCode = null;
3239
      this.couponCode = null;
3365
    }
3240
    }
3366
 
3241
 
3367
    /** Returns true if field couponCode is set (has been asigned a value) and false otherwise */
3242
    /** Returns true if field couponCode is set (has been assigned a value) and false otherwise */
3368
    public boolean isSetCouponCode() {
3243
    public boolean isSetCouponCode() {
3369
      return this.couponCode != null;
3244
      return this.couponCode != null;
3370
    }
3245
    }
3371
 
3246
 
3372
    public void setCouponCodeIsSet(boolean value) {
3247
    public void setCouponCodeIsSet(boolean value) {
Line 3394... Line 3269...
3394
        break;
3269
        break;
3395
 
3270
 
3396
      }
3271
      }
3397
    }
3272
    }
3398
 
3273
 
3399
    public void setFieldValue(int fieldID, Object value) {
-
 
3400
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
3401
    }
-
 
3402
 
-
 
3403
    public Object getFieldValue(_Fields field) {
3274
    public Object getFieldValue(_Fields field) {
3404
      switch (field) {
3275
      switch (field) {
3405
      case PROMOTION_ID:
3276
      case PROMOTION_ID:
3406
        return new Long(getPromotionId());
3277
        return Long.valueOf(getPromotionId());
3407
 
3278
 
3408
      case COUPON_CODE:
3279
      case COUPON_CODE:
3409
        return getCouponCode();
3280
        return getCouponCode();
3410
 
3281
 
3411
      }
3282
      }
3412
      throw new IllegalStateException();
3283
      throw new IllegalStateException();
3413
    }
3284
    }
3414
 
3285
 
3415
    public Object getFieldValue(int fieldId) {
-
 
3416
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
3417
    }
-
 
3418
 
-
 
3419
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3286
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3420
    public boolean isSet(_Fields field) {
3287
    public boolean isSet(_Fields field) {
-
 
3288
      if (field == null) {
-
 
3289
        throw new IllegalArgumentException();
-
 
3290
      }
-
 
3291
 
3421
      switch (field) {
3292
      switch (field) {
3422
      case PROMOTION_ID:
3293
      case PROMOTION_ID:
3423
        return isSetPromotionId();
3294
        return isSetPromotionId();
3424
      case COUPON_CODE:
3295
      case COUPON_CODE:
3425
        return isSetCouponCode();
3296
        return isSetCouponCode();
3426
      }
3297
      }
3427
      throw new IllegalStateException();
3298
      throw new IllegalStateException();
3428
    }
3299
    }
3429
 
3300
 
3430
    public boolean isSet(int fieldID) {
-
 
3431
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
3432
    }
-
 
3433
 
-
 
3434
    @Override
3301
    @Override
3435
    public boolean equals(Object that) {
3302
    public boolean equals(Object that) {
3436
      if (that == null)
3303
      if (that == null)
3437
        return false;
3304
        return false;
3438
      if (that instanceof generateCouponsForPromotion_args)
3305
      if (that instanceof generateCouponsForPromotion_args)
Line 3476... Line 3343...
3476
      }
3343
      }
3477
 
3344
 
3478
      int lastComparison = 0;
3345
      int lastComparison = 0;
3479
      generateCouponsForPromotion_args typedOther = (generateCouponsForPromotion_args)other;
3346
      generateCouponsForPromotion_args typedOther = (generateCouponsForPromotion_args)other;
3480
 
3347
 
3481
      lastComparison = Boolean.valueOf(isSetPromotionId()).compareTo(isSetPromotionId());
3348
      lastComparison = Boolean.valueOf(isSetPromotionId()).compareTo(typedOther.isSetPromotionId());
3482
      if (lastComparison != 0) {
3349
      if (lastComparison != 0) {
3483
        return lastComparison;
3350
        return lastComparison;
3484
      }
3351
      }
-
 
3352
      if (isSetPromotionId()) {
3485
      lastComparison = TBaseHelper.compareTo(promotionId, typedOther.promotionId);
3353
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.promotionId, typedOther.promotionId);
3486
      if (lastComparison != 0) {
3354
        if (lastComparison != 0) {
3487
        return lastComparison;
3355
          return lastComparison;
-
 
3356
        }
3488
      }
3357
      }
3489
      lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(isSetCouponCode());
3358
      lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
3490
      if (lastComparison != 0) {
3359
      if (lastComparison != 0) {
3491
        return lastComparison;
3360
        return lastComparison;
3492
      }
3361
      }
-
 
3362
      if (isSetCouponCode()) {
3493
      lastComparison = TBaseHelper.compareTo(couponCode, typedOther.couponCode);
3363
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);
3494
      if (lastComparison != 0) {
3364
        if (lastComparison != 0) {
3495
        return lastComparison;
3365
          return lastComparison;
-
 
3366
        }
3496
      }
3367
      }
3497
      return 0;
3368
      return 0;
3498
    }
3369
    }
3499
 
3370
 
-
 
3371
    public _Fields fieldForId(int fieldId) {
-
 
3372
      return _Fields.findByThriftId(fieldId);
-
 
3373
    }
-
 
3374
 
3500
    public void read(TProtocol iprot) throws TException {
3375
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3501
      TField field;
3376
      org.apache.thrift.protocol.TField field;
3502
      iprot.readStructBegin();
3377
      iprot.readStructBegin();
3503
      while (true)
3378
      while (true)
3504
      {
3379
      {
3505
        field = iprot.readFieldBegin();
3380
        field = iprot.readFieldBegin();
3506
        if (field.type == TType.STOP) { 
3381
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3507
          break;
3382
          break;
3508
        }
3383
        }
3509
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
3510
        if (fieldId == null) {
-
 
3511
          TProtocolUtil.skip(iprot, field.type);
-
 
3512
        } else {
-
 
3513
          switch (fieldId) {
3384
        switch (field.id) {
3514
            case PROMOTION_ID:
3385
          case 1: // PROMOTION_ID
3515
              if (field.type == TType.I64) {
3386
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3516
                this.promotionId = iprot.readI64();
3387
              this.promotionId = iprot.readI64();
3517
                setPromotionIdIsSet(true);
3388
              setPromotionIdIsSet(true);
3518
              } else { 
3389
            } else { 
3519
                TProtocolUtil.skip(iprot, field.type);
3390
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3520
              }
3391
            }
3521
              break;
3392
            break;
3522
            case COUPON_CODE:
3393
          case 2: // COUPON_CODE
3523
              if (field.type == TType.STRING) {
3394
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
3524
                this.couponCode = iprot.readString();
3395
              this.couponCode = iprot.readString();
3525
              } else { 
3396
            } else { 
3526
                TProtocolUtil.skip(iprot, field.type);
3397
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3527
              }
3398
            }
3528
              break;
3399
            break;
3529
          }
3400
          default:
3530
          iprot.readFieldEnd();
3401
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3531
        }
3402
        }
-
 
3403
        iprot.readFieldEnd();
3532
      }
3404
      }
3533
      iprot.readStructEnd();
3405
      iprot.readStructEnd();
3534
      validate();
3406
      validate();
3535
    }
3407
    }
3536
 
3408
 
3537
    public void write(TProtocol oprot) throws TException {
3409
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3538
      validate();
3410
      validate();
3539
 
3411
 
3540
      oprot.writeStructBegin(STRUCT_DESC);
3412
      oprot.writeStructBegin(STRUCT_DESC);
3541
      oprot.writeFieldBegin(PROMOTION_ID_FIELD_DESC);
3413
      oprot.writeFieldBegin(PROMOTION_ID_FIELD_DESC);
3542
      oprot.writeI64(this.promotionId);
3414
      oprot.writeI64(this.promotionId);
Line 3568... Line 3440...
3568
      first = false;
3440
      first = false;
3569
      sb.append(")");
3441
      sb.append(")");
3570
      return sb.toString();
3442
      return sb.toString();
3571
    }
3443
    }
3572
 
3444
 
3573
    public void validate() throws TException {
3445
    public void validate() throws org.apache.thrift.TException {
3574
      // check for required fields
3446
      // check for required fields
3575
    }
3447
    }
3576
 
3448
 
-
 
3449
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
3450
      try {
-
 
3451
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
3452
      } catch (org.apache.thrift.TException te) {
-
 
3453
        throw new java.io.IOException(te);
-
 
3454
      }
-
 
3455
    }
-
 
3456
 
-
 
3457
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
3458
      try {
-
 
3459
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
3460
        __isset_bit_vector = new BitSet(1);
-
 
3461
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
3462
      } catch (org.apache.thrift.TException te) {
-
 
3463
        throw new java.io.IOException(te);
-
 
3464
      }
-
 
3465
    }
-
 
3466
 
3577
  }
3467
  }
3578
 
3468
 
3579
  public static class generateCouponsForPromotion_result implements TBase<generateCouponsForPromotion_result._Fields>, java.io.Serializable, Cloneable, Comparable<generateCouponsForPromotion_result>   {
3469
  public static class generateCouponsForPromotion_result implements org.apache.thrift.TBase<generateCouponsForPromotion_result, generateCouponsForPromotion_result._Fields>, java.io.Serializable, Cloneable   {
3580
    private static final TStruct STRUCT_DESC = new TStruct("generateCouponsForPromotion_result");
3470
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("generateCouponsForPromotion_result");
3581
 
3471
 
3582
    private static final TField PEX_FIELD_DESC = new TField("pex", TType.STRUCT, (short)1);
3472
    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);
3583
 
3473
 
3584
    private PromotionException pex;
3474
    private PromotionException pex; // required
3585
 
3475
 
3586
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3476
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3587
    public enum _Fields implements TFieldIdEnum {
3477
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3588
      PEX((short)1, "pex");
3478
      PEX((short)1, "pex");
3589
 
3479
 
3590
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
3591
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3480
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3592
 
3481
 
3593
      static {
3482
      static {
3594
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3483
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3595
          byId.put((int)field._thriftId, field);
-
 
3596
          byName.put(field.getFieldName(), field);
3484
          byName.put(field.getFieldName(), field);
3597
        }
3485
        }
3598
      }
3486
      }
3599
 
3487
 
3600
      /**
3488
      /**
3601
       * Find the _Fields constant that matches fieldId, or null if its not found.
3489
       * Find the _Fields constant that matches fieldId, or null if its not found.
3602
       */
3490
       */
3603
      public static _Fields findByThriftId(int fieldId) {
3491
      public static _Fields findByThriftId(int fieldId) {
3604
        return byId.get(fieldId);
3492
        switch(fieldId) {
-
 
3493
          case 1: // PEX
-
 
3494
            return PEX;
-
 
3495
          default:
-
 
3496
            return null;
-
 
3497
        }
3605
      }
3498
      }
3606
 
3499
 
3607
      /**
3500
      /**
3608
       * Find the _Fields constant that matches fieldId, throwing an exception
3501
       * Find the _Fields constant that matches fieldId, throwing an exception
3609
       * if it is not found.
3502
       * if it is not found.
Line 3638... Line 3531...
3638
      }
3531
      }
3639
    }
3532
    }
3640
 
3533
 
3641
    // isset id assignments
3534
    // isset id assignments
3642
 
3535
 
3643
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3536
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3644
      put(_Fields.PEX, new FieldMetaData("pex", TFieldRequirementType.DEFAULT, 
-
 
3645
          new FieldValueMetaData(TType.STRUCT)));
-
 
3646
    }});
-
 
3647
 
-
 
3648
    static {
3537
    static {
-
 
3538
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
3539
      tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
3540
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
3541
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3649
      FieldMetaData.addStructMetaDataMap(generateCouponsForPromotion_result.class, metaDataMap);
3542
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(generateCouponsForPromotion_result.class, metaDataMap);
3650
    }
3543
    }
3651
 
3544
 
3652
    public generateCouponsForPromotion_result() {
3545
    public generateCouponsForPromotion_result() {
3653
    }
3546
    }
3654
 
3547
 
Line 3670... Line 3563...
3670
 
3563
 
3671
    public generateCouponsForPromotion_result deepCopy() {
3564
    public generateCouponsForPromotion_result deepCopy() {
3672
      return new generateCouponsForPromotion_result(this);
3565
      return new generateCouponsForPromotion_result(this);
3673
    }
3566
    }
3674
 
3567
 
3675
    @Deprecated
3568
    @Override
3676
    public generateCouponsForPromotion_result clone() {
3569
    public void clear() {
3677
      return new generateCouponsForPromotion_result(this);
3570
      this.pex = null;
3678
    }
3571
    }
3679
 
3572
 
3680
    public PromotionException getPex() {
3573
    public PromotionException getPex() {
3681
      return this.pex;
3574
      return this.pex;
3682
    }
3575
    }
3683
 
3576
 
3684
    public generateCouponsForPromotion_result setPex(PromotionException pex) {
3577
    public void setPex(PromotionException pex) {
3685
      this.pex = pex;
3578
      this.pex = pex;
3686
      return this;
-
 
3687
    }
3579
    }
3688
 
3580
 
3689
    public void unsetPex() {
3581
    public void unsetPex() {
3690
      this.pex = null;
3582
      this.pex = null;
3691
    }
3583
    }
3692
 
3584
 
3693
    /** Returns true if field pex is set (has been asigned a value) and false otherwise */
3585
    /** Returns true if field pex is set (has been assigned a value) and false otherwise */
3694
    public boolean isSetPex() {
3586
    public boolean isSetPex() {
3695
      return this.pex != null;
3587
      return this.pex != null;
3696
    }
3588
    }
3697
 
3589
 
3698
    public void setPexIsSet(boolean value) {
3590
    public void setPexIsSet(boolean value) {
Line 3712... Line 3604...
3712
        break;
3604
        break;
3713
 
3605
 
3714
      }
3606
      }
3715
    }
3607
    }
3716
 
3608
 
3717
    public void setFieldValue(int fieldID, Object value) {
-
 
3718
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
3719
    }
-
 
3720
 
-
 
3721
    public Object getFieldValue(_Fields field) {
3609
    public Object getFieldValue(_Fields field) {
3722
      switch (field) {
3610
      switch (field) {
3723
      case PEX:
3611
      case PEX:
3724
        return getPex();
3612
        return getPex();
3725
 
3613
 
3726
      }
3614
      }
3727
      throw new IllegalStateException();
3615
      throw new IllegalStateException();
3728
    }
3616
    }
3729
 
3617
 
3730
    public Object getFieldValue(int fieldId) {
-
 
3731
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
3732
    }
-
 
3733
 
-
 
3734
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3618
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3735
    public boolean isSet(_Fields field) {
3619
    public boolean isSet(_Fields field) {
-
 
3620
      if (field == null) {
-
 
3621
        throw new IllegalArgumentException();
-
 
3622
      }
-
 
3623
 
3736
      switch (field) {
3624
      switch (field) {
3737
      case PEX:
3625
      case PEX:
3738
        return isSetPex();
3626
        return isSetPex();
3739
      }
3627
      }
3740
      throw new IllegalStateException();
3628
      throw new IllegalStateException();
3741
    }
3629
    }
3742
 
3630
 
3743
    public boolean isSet(int fieldID) {
-
 
3744
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
3745
    }
-
 
3746
 
-
 
3747
    @Override
3631
    @Override
3748
    public boolean equals(Object that) {
3632
    public boolean equals(Object that) {
3749
      if (that == null)
3633
      if (that == null)
3750
        return false;
3634
        return false;
3751
      if (that instanceof generateCouponsForPromotion_result)
3635
      if (that instanceof generateCouponsForPromotion_result)
Line 3780... Line 3664...
3780
      }
3664
      }
3781
 
3665
 
3782
      int lastComparison = 0;
3666
      int lastComparison = 0;
3783
      generateCouponsForPromotion_result typedOther = (generateCouponsForPromotion_result)other;
3667
      generateCouponsForPromotion_result typedOther = (generateCouponsForPromotion_result)other;
3784
 
3668
 
3785
      lastComparison = Boolean.valueOf(isSetPex()).compareTo(isSetPex());
3669
      lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
3786
      if (lastComparison != 0) {
3670
      if (lastComparison != 0) {
3787
        return lastComparison;
3671
        return lastComparison;
3788
      }
3672
      }
-
 
3673
      if (isSetPex()) {
3789
      lastComparison = TBaseHelper.compareTo(pex, typedOther.pex);
3674
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
3790
      if (lastComparison != 0) {
3675
        if (lastComparison != 0) {
3791
        return lastComparison;
3676
          return lastComparison;
-
 
3677
        }
3792
      }
3678
      }
3793
      return 0;
3679
      return 0;
3794
    }
3680
    }
3795
 
3681
 
-
 
3682
    public _Fields fieldForId(int fieldId) {
-
 
3683
      return _Fields.findByThriftId(fieldId);
-
 
3684
    }
-
 
3685
 
3796
    public void read(TProtocol iprot) throws TException {
3686
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3797
      TField field;
3687
      org.apache.thrift.protocol.TField field;
3798
      iprot.readStructBegin();
3688
      iprot.readStructBegin();
3799
      while (true)
3689
      while (true)
3800
      {
3690
      {
3801
        field = iprot.readFieldBegin();
3691
        field = iprot.readFieldBegin();
3802
        if (field.type == TType.STOP) { 
3692
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3803
          break;
3693
          break;
3804
        }
3694
        }
3805
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
3806
        if (fieldId == null) {
-
 
3807
          TProtocolUtil.skip(iprot, field.type);
-
 
3808
        } else {
-
 
3809
          switch (fieldId) {
3695
        switch (field.id) {
3810
            case PEX:
3696
          case 1: // PEX
3811
              if (field.type == TType.STRUCT) {
3697
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3812
                this.pex = new PromotionException();
3698
              this.pex = new PromotionException();
3813
                this.pex.read(iprot);
3699
              this.pex.read(iprot);
3814
              } else { 
3700
            } else { 
3815
                TProtocolUtil.skip(iprot, field.type);
3701
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3816
              }
3702
            }
3817
              break;
3703
            break;
3818
          }
3704
          default:
3819
          iprot.readFieldEnd();
3705
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3820
        }
3706
        }
-
 
3707
        iprot.readFieldEnd();
3821
      }
3708
      }
3822
      iprot.readStructEnd();
3709
      iprot.readStructEnd();
3823
      validate();
3710
      validate();
3824
    }
3711
    }
3825
 
3712
 
3826
    public void write(TProtocol oprot) throws TException {
3713
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3827
      oprot.writeStructBegin(STRUCT_DESC);
3714
      oprot.writeStructBegin(STRUCT_DESC);
3828
 
3715
 
3829
      if (this.isSetPex()) {
3716
      if (this.isSetPex()) {
3830
        oprot.writeFieldBegin(PEX_FIELD_DESC);
3717
        oprot.writeFieldBegin(PEX_FIELD_DESC);
3831
        this.pex.write(oprot);
3718
        this.pex.write(oprot);
Line 3849... Line 3736...
3849
      first = false;
3736
      first = false;
3850
      sb.append(")");
3737
      sb.append(")");
3851
      return sb.toString();
3738
      return sb.toString();
3852
    }
3739
    }
3853
 
3740
 
3854
    public void validate() throws TException {
3741
    public void validate() throws org.apache.thrift.TException {
3855
      // check for required fields
3742
      // check for required fields
3856
    }
3743
    }
3857
 
3744
 
-
 
3745
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
3746
      try {
-
 
3747
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
3748
      } catch (org.apache.thrift.TException te) {
-
 
3749
        throw new java.io.IOException(te);
-
 
3750
      }
-
 
3751
    }
-
 
3752
 
-
 
3753
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
3754
      try {
-
 
3755
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
3756
      } catch (org.apache.thrift.TException te) {
-
 
3757
        throw new java.io.IOException(te);
-
 
3758
      }
-
 
3759
    }
-
 
3760
 
3858
  }
3761
  }
3859
 
3762
 
3860
  public static class applyCoupon_args implements TBase<applyCoupon_args._Fields>, java.io.Serializable, Cloneable, Comparable<applyCoupon_args>   {
3763
  public static class applyCoupon_args implements org.apache.thrift.TBase<applyCoupon_args, applyCoupon_args._Fields>, java.io.Serializable, Cloneable   {
3861
    private static final TStruct STRUCT_DESC = new TStruct("applyCoupon_args");
3764
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("applyCoupon_args");
3862
 
3765
 
3863
    private static final TField COUPON_CODE_FIELD_DESC = new TField("couponCode", TType.STRING, (short)1);
3766
    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);
3864
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)2);
3767
    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);
3865
 
3768
 
3866
    private String couponCode;
3769
    private String couponCode; // required
3867
    private long cartId;
3770
    private long cartId; // required
3868
 
3771
 
3869
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3772
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3870
    public enum _Fields implements TFieldIdEnum {
3773
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3871
      COUPON_CODE((short)1, "couponCode"),
3774
      COUPON_CODE((short)1, "couponCode"),
3872
      CART_ID((short)2, "cartId");
3775
      CART_ID((short)2, "cartId");
3873
 
3776
 
3874
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
3875
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3777
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3876
 
3778
 
3877
      static {
3779
      static {
3878
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3780
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3879
          byId.put((int)field._thriftId, field);
-
 
3880
          byName.put(field.getFieldName(), field);
3781
          byName.put(field.getFieldName(), field);
3881
        }
3782
        }
3882
      }
3783
      }
3883
 
3784
 
3884
      /**
3785
      /**
3885
       * Find the _Fields constant that matches fieldId, or null if its not found.
3786
       * Find the _Fields constant that matches fieldId, or null if its not found.
3886
       */
3787
       */
3887
      public static _Fields findByThriftId(int fieldId) {
3788
      public static _Fields findByThriftId(int fieldId) {
3888
        return byId.get(fieldId);
3789
        switch(fieldId) {
-
 
3790
          case 1: // COUPON_CODE
-
 
3791
            return COUPON_CODE;
-
 
3792
          case 2: // CART_ID
-
 
3793
            return CART_ID;
-
 
3794
          default:
-
 
3795
            return null;
-
 
3796
        }
3889
      }
3797
      }
3890
 
3798
 
3891
      /**
3799
      /**
3892
       * Find the _Fields constant that matches fieldId, throwing an exception
3800
       * Find the _Fields constant that matches fieldId, throwing an exception
3893
       * if it is not found.
3801
       * if it is not found.
Line 3924... Line 3832...
3924
 
3832
 
3925
    // isset id assignments
3833
    // isset id assignments
3926
    private static final int __CARTID_ISSET_ID = 0;
3834
    private static final int __CARTID_ISSET_ID = 0;
3927
    private BitSet __isset_bit_vector = new BitSet(1);
3835
    private BitSet __isset_bit_vector = new BitSet(1);
3928
 
3836
 
3929
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3837
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3930
      put(_Fields.COUPON_CODE, new FieldMetaData("couponCode", TFieldRequirementType.DEFAULT, 
-
 
3931
          new FieldValueMetaData(TType.STRING)));
-
 
3932
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
-
 
3933
          new FieldValueMetaData(TType.I64)));
-
 
3934
    }});
-
 
3935
 
-
 
3936
    static {
3838
    static {
-
 
3839
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
3840
      tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
3841
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
3842
      tmpMap.put(_Fields.CART_ID, new org.apache.thrift.meta_data.FieldMetaData("cartId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
3843
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
3844
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3937
      FieldMetaData.addStructMetaDataMap(applyCoupon_args.class, metaDataMap);
3845
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(applyCoupon_args.class, metaDataMap);
3938
    }
3846
    }
3939
 
3847
 
3940
    public applyCoupon_args() {
3848
    public applyCoupon_args() {
3941
    }
3849
    }
3942
 
3850
 
Line 3964... Line 3872...
3964
 
3872
 
3965
    public applyCoupon_args deepCopy() {
3873
    public applyCoupon_args deepCopy() {
3966
      return new applyCoupon_args(this);
3874
      return new applyCoupon_args(this);
3967
    }
3875
    }
3968
 
3876
 
3969
    @Deprecated
3877
    @Override
3970
    public applyCoupon_args clone() {
3878
    public void clear() {
3971
      return new applyCoupon_args(this);
3879
      this.couponCode = null;
-
 
3880
      setCartIdIsSet(false);
-
 
3881
      this.cartId = 0;
3972
    }
3882
    }
3973
 
3883
 
3974
    public String getCouponCode() {
3884
    public String getCouponCode() {
3975
      return this.couponCode;
3885
      return this.couponCode;
3976
    }
3886
    }
3977
 
3887
 
3978
    public applyCoupon_args setCouponCode(String couponCode) {
3888
    public void setCouponCode(String couponCode) {
3979
      this.couponCode = couponCode;
3889
      this.couponCode = couponCode;
3980
      return this;
-
 
3981
    }
3890
    }
3982
 
3891
 
3983
    public void unsetCouponCode() {
3892
    public void unsetCouponCode() {
3984
      this.couponCode = null;
3893
      this.couponCode = null;
3985
    }
3894
    }
3986
 
3895
 
3987
    /** Returns true if field couponCode is set (has been asigned a value) and false otherwise */
3896
    /** Returns true if field couponCode is set (has been assigned a value) and false otherwise */
3988
    public boolean isSetCouponCode() {
3897
    public boolean isSetCouponCode() {
3989
      return this.couponCode != null;
3898
      return this.couponCode != null;
3990
    }
3899
    }
3991
 
3900
 
3992
    public void setCouponCodeIsSet(boolean value) {
3901
    public void setCouponCodeIsSet(boolean value) {
Line 3997... Line 3906...
3997
 
3906
 
3998
    public long getCartId() {
3907
    public long getCartId() {
3999
      return this.cartId;
3908
      return this.cartId;
4000
    }
3909
    }
4001
 
3910
 
4002
    public applyCoupon_args setCartId(long cartId) {
3911
    public void setCartId(long cartId) {
4003
      this.cartId = cartId;
3912
      this.cartId = cartId;
4004
      setCartIdIsSet(true);
3913
      setCartIdIsSet(true);
4005
      return this;
-
 
4006
    }
3914
    }
4007
 
3915
 
4008
    public void unsetCartId() {
3916
    public void unsetCartId() {
4009
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
3917
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
4010
    }
3918
    }
4011
 
3919
 
4012
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
3920
    /** Returns true if field cartId is set (has been assigned a value) and false otherwise */
4013
    public boolean isSetCartId() {
3921
    public boolean isSetCartId() {
4014
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
3922
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
4015
    }
3923
    }
4016
 
3924
 
4017
    public void setCartIdIsSet(boolean value) {
3925
    public void setCartIdIsSet(boolean value) {
Line 4037... Line 3945...
4037
        break;
3945
        break;
4038
 
3946
 
4039
      }
3947
      }
4040
    }
3948
    }
4041
 
3949
 
4042
    public void setFieldValue(int fieldID, Object value) {
-
 
4043
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
4044
    }
-
 
4045
 
-
 
4046
    public Object getFieldValue(_Fields field) {
3950
    public Object getFieldValue(_Fields field) {
4047
      switch (field) {
3951
      switch (field) {
4048
      case COUPON_CODE:
3952
      case COUPON_CODE:
4049
        return getCouponCode();
3953
        return getCouponCode();
4050
 
3954
 
4051
      case CART_ID:
3955
      case CART_ID:
4052
        return new Long(getCartId());
3956
        return Long.valueOf(getCartId());
4053
 
3957
 
4054
      }
3958
      }
4055
      throw new IllegalStateException();
3959
      throw new IllegalStateException();
4056
    }
3960
    }
4057
 
3961
 
4058
    public Object getFieldValue(int fieldId) {
-
 
4059
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
4060
    }
-
 
4061
 
-
 
4062
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3962
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4063
    public boolean isSet(_Fields field) {
3963
    public boolean isSet(_Fields field) {
-
 
3964
      if (field == null) {
-
 
3965
        throw new IllegalArgumentException();
-
 
3966
      }
-
 
3967
 
4064
      switch (field) {
3968
      switch (field) {
4065
      case COUPON_CODE:
3969
      case COUPON_CODE:
4066
        return isSetCouponCode();
3970
        return isSetCouponCode();
4067
      case CART_ID:
3971
      case CART_ID:
4068
        return isSetCartId();
3972
        return isSetCartId();
4069
      }
3973
      }
4070
      throw new IllegalStateException();
3974
      throw new IllegalStateException();
4071
    }
3975
    }
4072
 
3976
 
4073
    public boolean isSet(int fieldID) {
-
 
4074
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
4075
    }
-
 
4076
 
-
 
4077
    @Override
3977
    @Override
4078
    public boolean equals(Object that) {
3978
    public boolean equals(Object that) {
4079
      if (that == null)
3979
      if (that == null)
4080
        return false;
3980
        return false;
4081
      if (that instanceof applyCoupon_args)
3981
      if (that instanceof applyCoupon_args)
Line 4119... Line 4019...
4119
      }
4019
      }
4120
 
4020
 
4121
      int lastComparison = 0;
4021
      int lastComparison = 0;
4122
      applyCoupon_args typedOther = (applyCoupon_args)other;
4022
      applyCoupon_args typedOther = (applyCoupon_args)other;
4123
 
4023
 
4124
      lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(isSetCouponCode());
4024
      lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
4125
      if (lastComparison != 0) {
4025
      if (lastComparison != 0) {
4126
        return lastComparison;
4026
        return lastComparison;
4127
      }
4027
      }
-
 
4028
      if (isSetCouponCode()) {
4128
      lastComparison = TBaseHelper.compareTo(couponCode, typedOther.couponCode);
4029
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);
4129
      if (lastComparison != 0) {
4030
        if (lastComparison != 0) {
4130
        return lastComparison;
4031
          return lastComparison;
-
 
4032
        }
4131
      }
4033
      }
4132
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
4034
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(typedOther.isSetCartId());
4133
      if (lastComparison != 0) {
4035
      if (lastComparison != 0) {
4134
        return lastComparison;
4036
        return lastComparison;
4135
      }
4037
      }
-
 
4038
      if (isSetCartId()) {
4136
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
4039
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cartId, typedOther.cartId);
4137
      if (lastComparison != 0) {
4040
        if (lastComparison != 0) {
4138
        return lastComparison;
4041
          return lastComparison;
-
 
4042
        }
4139
      }
4043
      }
4140
      return 0;
4044
      return 0;
4141
    }
4045
    }
4142
 
4046
 
-
 
4047
    public _Fields fieldForId(int fieldId) {
-
 
4048
      return _Fields.findByThriftId(fieldId);
-
 
4049
    }
-
 
4050
 
4143
    public void read(TProtocol iprot) throws TException {
4051
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4144
      TField field;
4052
      org.apache.thrift.protocol.TField field;
4145
      iprot.readStructBegin();
4053
      iprot.readStructBegin();
4146
      while (true)
4054
      while (true)
4147
      {
4055
      {
4148
        field = iprot.readFieldBegin();
4056
        field = iprot.readFieldBegin();
4149
        if (field.type == TType.STOP) { 
4057
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4150
          break;
4058
          break;
4151
        }
4059
        }
4152
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
4153
        if (fieldId == null) {
-
 
4154
          TProtocolUtil.skip(iprot, field.type);
-
 
4155
        } else {
-
 
4156
          switch (fieldId) {
4060
        switch (field.id) {
4157
            case COUPON_CODE:
4061
          case 1: // COUPON_CODE
4158
              if (field.type == TType.STRING) {
4062
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
4159
                this.couponCode = iprot.readString();
4063
              this.couponCode = iprot.readString();
4160
              } else { 
4064
            } else { 
4161
                TProtocolUtil.skip(iprot, field.type);
4065
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4162
              }
4066
            }
4163
              break;
4067
            break;
4164
            case CART_ID:
4068
          case 2: // CART_ID
4165
              if (field.type == TType.I64) {
4069
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4166
                this.cartId = iprot.readI64();
4070
              this.cartId = iprot.readI64();
4167
                setCartIdIsSet(true);
4071
              setCartIdIsSet(true);
4168
              } else { 
4072
            } else { 
4169
                TProtocolUtil.skip(iprot, field.type);
4073
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4170
              }
4074
            }
4171
              break;
4075
            break;
4172
          }
4076
          default:
4173
          iprot.readFieldEnd();
4077
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4174
        }
4078
        }
-
 
4079
        iprot.readFieldEnd();
4175
      }
4080
      }
4176
      iprot.readStructEnd();
4081
      iprot.readStructEnd();
4177
      validate();
4082
      validate();
4178
    }
4083
    }
4179
 
4084
 
4180
    public void write(TProtocol oprot) throws TException {
4085
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4181
      validate();
4086
      validate();
4182
 
4087
 
4183
      oprot.writeStructBegin(STRUCT_DESC);
4088
      oprot.writeStructBegin(STRUCT_DESC);
4184
      if (this.couponCode != null) {
4089
      if (this.couponCode != null) {
4185
        oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
4090
        oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
Line 4211... Line 4116...
4211
      first = false;
4116
      first = false;
4212
      sb.append(")");
4117
      sb.append(")");
4213
      return sb.toString();
4118
      return sb.toString();
4214
    }
4119
    }
4215
 
4120
 
4216
    public void validate() throws TException {
4121
    public void validate() throws org.apache.thrift.TException {
4217
      // check for required fields
4122
      // check for required fields
4218
    }
4123
    }
4219
 
4124
 
-
 
4125
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
4126
      try {
-
 
4127
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
4128
      } catch (org.apache.thrift.TException te) {
-
 
4129
        throw new java.io.IOException(te);
-
 
4130
      }
-
 
4131
    }
-
 
4132
 
-
 
4133
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
4134
      try {
-
 
4135
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
4136
        __isset_bit_vector = new BitSet(1);
-
 
4137
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
4138
      } catch (org.apache.thrift.TException te) {
-
 
4139
        throw new java.io.IOException(te);
-
 
4140
      }
-
 
4141
    }
-
 
4142
 
4220
  }
4143
  }
4221
 
4144
 
4222
  public static class applyCoupon_result implements TBase<applyCoupon_result._Fields>, java.io.Serializable, Cloneable, Comparable<applyCoupon_result>   {
4145
  public static class applyCoupon_result implements org.apache.thrift.TBase<applyCoupon_result, applyCoupon_result._Fields>, java.io.Serializable, Cloneable   {
4223
    private static final TStruct STRUCT_DESC = new TStruct("applyCoupon_result");
4146
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("applyCoupon_result");
4224
 
4147
 
4225
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
4148
    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);
4226
    private static final TField PEX_FIELD_DESC = new TField("pex", TType.STRUCT, (short)1);
4149
    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);
4227
 
4150
 
4228
    private Cart success;
4151
    private Cart success; // required
4229
    private PromotionException pex;
4152
    private PromotionException pex; // required
4230
 
4153
 
4231
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4154
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4232
    public enum _Fields implements TFieldIdEnum {
4155
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4233
      SUCCESS((short)0, "success"),
4156
      SUCCESS((short)0, "success"),
4234
      PEX((short)1, "pex");
4157
      PEX((short)1, "pex");
4235
 
4158
 
4236
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
4237
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4159
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4238
 
4160
 
4239
      static {
4161
      static {
4240
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4162
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4241
          byId.put((int)field._thriftId, field);
-
 
4242
          byName.put(field.getFieldName(), field);
4163
          byName.put(field.getFieldName(), field);
4243
        }
4164
        }
4244
      }
4165
      }
4245
 
4166
 
4246
      /**
4167
      /**
4247
       * Find the _Fields constant that matches fieldId, or null if its not found.
4168
       * Find the _Fields constant that matches fieldId, or null if its not found.
4248
       */
4169
       */
4249
      public static _Fields findByThriftId(int fieldId) {
4170
      public static _Fields findByThriftId(int fieldId) {
4250
        return byId.get(fieldId);
4171
        switch(fieldId) {
-
 
4172
          case 0: // SUCCESS
-
 
4173
            return SUCCESS;
-
 
4174
          case 1: // PEX
-
 
4175
            return PEX;
-
 
4176
          default:
-
 
4177
            return null;
-
 
4178
        }
4251
      }
4179
      }
4252
 
4180
 
4253
      /**
4181
      /**
4254
       * Find the _Fields constant that matches fieldId, throwing an exception
4182
       * Find the _Fields constant that matches fieldId, throwing an exception
4255
       * if it is not found.
4183
       * if it is not found.
Line 4284... Line 4212...
4284
      }
4212
      }
4285
    }
4213
    }
4286
 
4214
 
4287
    // isset id assignments
4215
    // isset id assignments
4288
 
4216
 
4289
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4217
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4290
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
4291
          new StructMetaData(TType.STRUCT, Cart.class)));
-
 
4292
      put(_Fields.PEX, new FieldMetaData("pex", TFieldRequirementType.DEFAULT, 
-
 
4293
          new FieldValueMetaData(TType.STRUCT)));
-
 
4294
    }});
-
 
4295
 
-
 
4296
    static {
4218
    static {
-
 
4219
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
4220
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
4221
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Cart.class)));
-
 
4222
      tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
4223
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
4224
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4297
      FieldMetaData.addStructMetaDataMap(applyCoupon_result.class, metaDataMap);
4225
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(applyCoupon_result.class, metaDataMap);
4298
    }
4226
    }
4299
 
4227
 
4300
    public applyCoupon_result() {
4228
    public applyCoupon_result() {
4301
    }
4229
    }
4302
 
4230
 
Line 4323... Line 4251...
4323
 
4251
 
4324
    public applyCoupon_result deepCopy() {
4252
    public applyCoupon_result deepCopy() {
4325
      return new applyCoupon_result(this);
4253
      return new applyCoupon_result(this);
4326
    }
4254
    }
4327
 
4255
 
4328
    @Deprecated
4256
    @Override
4329
    public applyCoupon_result clone() {
4257
    public void clear() {
-
 
4258
      this.success = null;
4330
      return new applyCoupon_result(this);
4259
      this.pex = null;
4331
    }
4260
    }
4332
 
4261
 
4333
    public Cart getSuccess() {
4262
    public Cart getSuccess() {
4334
      return this.success;
4263
      return this.success;
4335
    }
4264
    }
4336
 
4265
 
4337
    public applyCoupon_result setSuccess(Cart success) {
4266
    public void setSuccess(Cart success) {
4338
      this.success = success;
4267
      this.success = success;
4339
      return this;
-
 
4340
    }
4268
    }
4341
 
4269
 
4342
    public void unsetSuccess() {
4270
    public void unsetSuccess() {
4343
      this.success = null;
4271
      this.success = null;
4344
    }
4272
    }
4345
 
4273
 
4346
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4274
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
4347
    public boolean isSetSuccess() {
4275
    public boolean isSetSuccess() {
4348
      return this.success != null;
4276
      return this.success != null;
4349
    }
4277
    }
4350
 
4278
 
4351
    public void setSuccessIsSet(boolean value) {
4279
    public void setSuccessIsSet(boolean value) {
Line 4356... Line 4284...
4356
 
4284
 
4357
    public PromotionException getPex() {
4285
    public PromotionException getPex() {
4358
      return this.pex;
4286
      return this.pex;
4359
    }
4287
    }
4360
 
4288
 
4361
    public applyCoupon_result setPex(PromotionException pex) {
4289
    public void setPex(PromotionException pex) {
4362
      this.pex = pex;
4290
      this.pex = pex;
4363
      return this;
-
 
4364
    }
4291
    }
4365
 
4292
 
4366
    public void unsetPex() {
4293
    public void unsetPex() {
4367
      this.pex = null;
4294
      this.pex = null;
4368
    }
4295
    }
4369
 
4296
 
4370
    /** Returns true if field pex is set (has been asigned a value) and false otherwise */
4297
    /** Returns true if field pex is set (has been assigned a value) and false otherwise */
4371
    public boolean isSetPex() {
4298
    public boolean isSetPex() {
4372
      return this.pex != null;
4299
      return this.pex != null;
4373
    }
4300
    }
4374
 
4301
 
4375
    public void setPexIsSet(boolean value) {
4302
    public void setPexIsSet(boolean value) {
Line 4397... Line 4324...
4397
        break;
4324
        break;
4398
 
4325
 
4399
      }
4326
      }
4400
    }
4327
    }
4401
 
4328
 
4402
    public void setFieldValue(int fieldID, Object value) {
-
 
4403
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
4404
    }
-
 
4405
 
-
 
4406
    public Object getFieldValue(_Fields field) {
4329
    public Object getFieldValue(_Fields field) {
4407
      switch (field) {
4330
      switch (field) {
4408
      case SUCCESS:
4331
      case SUCCESS:
4409
        return getSuccess();
4332
        return getSuccess();
4410
 
4333
 
Line 4413... Line 4336...
4413
 
4336
 
4414
      }
4337
      }
4415
      throw new IllegalStateException();
4338
      throw new IllegalStateException();
4416
    }
4339
    }
4417
 
4340
 
4418
    public Object getFieldValue(int fieldId) {
-
 
4419
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
4420
    }
-
 
4421
 
-
 
4422
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4341
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4423
    public boolean isSet(_Fields field) {
4342
    public boolean isSet(_Fields field) {
-
 
4343
      if (field == null) {
-
 
4344
        throw new IllegalArgumentException();
-
 
4345
      }
-
 
4346
 
4424
      switch (field) {
4347
      switch (field) {
4425
      case SUCCESS:
4348
      case SUCCESS:
4426
        return isSetSuccess();
4349
        return isSetSuccess();
4427
      case PEX:
4350
      case PEX:
4428
        return isSetPex();
4351
        return isSetPex();
4429
      }
4352
      }
4430
      throw new IllegalStateException();
4353
      throw new IllegalStateException();
4431
    }
4354
    }
4432
 
4355
 
4433
    public boolean isSet(int fieldID) {
-
 
4434
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
4435
    }
-
 
4436
 
-
 
4437
    @Override
4356
    @Override
4438
    public boolean equals(Object that) {
4357
    public boolean equals(Object that) {
4439
      if (that == null)
4358
      if (that == null)
4440
        return false;
4359
        return false;
4441
      if (that instanceof applyCoupon_result)
4360
      if (that instanceof applyCoupon_result)
Line 4479... Line 4398...
4479
      }
4398
      }
4480
 
4399
 
4481
      int lastComparison = 0;
4400
      int lastComparison = 0;
4482
      applyCoupon_result typedOther = (applyCoupon_result)other;
4401
      applyCoupon_result typedOther = (applyCoupon_result)other;
4483
 
4402
 
4484
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4403
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
4485
      if (lastComparison != 0) {
4404
      if (lastComparison != 0) {
4486
        return lastComparison;
4405
        return lastComparison;
4487
      }
4406
      }
-
 
4407
      if (isSetSuccess()) {
4488
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4408
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4489
      if (lastComparison != 0) {
4409
        if (lastComparison != 0) {
4490
        return lastComparison;
4410
          return lastComparison;
-
 
4411
        }
4491
      }
4412
      }
4492
      lastComparison = Boolean.valueOf(isSetPex()).compareTo(isSetPex());
4413
      lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
4493
      if (lastComparison != 0) {
4414
      if (lastComparison != 0) {
4494
        return lastComparison;
4415
        return lastComparison;
4495
      }
4416
      }
-
 
4417
      if (isSetPex()) {
4496
      lastComparison = TBaseHelper.compareTo(pex, typedOther.pex);
4418
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
4497
      if (lastComparison != 0) {
4419
        if (lastComparison != 0) {
4498
        return lastComparison;
4420
          return lastComparison;
-
 
4421
        }
4499
      }
4422
      }
4500
      return 0;
4423
      return 0;
4501
    }
4424
    }
4502
 
4425
 
-
 
4426
    public _Fields fieldForId(int fieldId) {
-
 
4427
      return _Fields.findByThriftId(fieldId);
-
 
4428
    }
-
 
4429
 
4503
    public void read(TProtocol iprot) throws TException {
4430
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4504
      TField field;
4431
      org.apache.thrift.protocol.TField field;
4505
      iprot.readStructBegin();
4432
      iprot.readStructBegin();
4506
      while (true)
4433
      while (true)
4507
      {
4434
      {
4508
        field = iprot.readFieldBegin();
4435
        field = iprot.readFieldBegin();
4509
        if (field.type == TType.STOP) { 
4436
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4510
          break;
4437
          break;
4511
        }
4438
        }
4512
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
4513
        if (fieldId == null) {
-
 
4514
          TProtocolUtil.skip(iprot, field.type);
-
 
4515
        } else {
-
 
4516
          switch (fieldId) {
4439
        switch (field.id) {
4517
            case SUCCESS:
4440
          case 0: // SUCCESS
4518
              if (field.type == TType.STRUCT) {
4441
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4519
                this.success = new Cart();
4442
              this.success = new Cart();
4520
                this.success.read(iprot);
4443
              this.success.read(iprot);
4521
              } else { 
4444
            } else { 
4522
                TProtocolUtil.skip(iprot, field.type);
4445
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4523
              }
4446
            }
4524
              break;
4447
            break;
4525
            case PEX:
4448
          case 1: // PEX
4526
              if (field.type == TType.STRUCT) {
4449
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4527
                this.pex = new PromotionException();
4450
              this.pex = new PromotionException();
4528
                this.pex.read(iprot);
4451
              this.pex.read(iprot);
4529
              } else { 
4452
            } else { 
4530
                TProtocolUtil.skip(iprot, field.type);
4453
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4531
              }
4454
            }
4532
              break;
4455
            break;
4533
          }
4456
          default:
4534
          iprot.readFieldEnd();
4457
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4535
        }
4458
        }
-
 
4459
        iprot.readFieldEnd();
4536
      }
4460
      }
4537
      iprot.readStructEnd();
4461
      iprot.readStructEnd();
4538
      validate();
4462
      validate();
4539
    }
4463
    }
4540
 
4464
 
4541
    public void write(TProtocol oprot) throws TException {
4465
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4542
      oprot.writeStructBegin(STRUCT_DESC);
4466
      oprot.writeStructBegin(STRUCT_DESC);
4543
 
4467
 
4544
      if (this.isSetSuccess()) {
4468
      if (this.isSetSuccess()) {
4545
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4469
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4546
        this.success.write(oprot);
4470
        this.success.write(oprot);
Line 4576... Line 4500...
4576
      first = false;
4500
      first = false;
4577
      sb.append(")");
4501
      sb.append(")");
4578
      return sb.toString();
4502
      return sb.toString();
4579
    }
4503
    }
4580
 
4504
 
4581
    public void validate() throws TException {
4505
    public void validate() throws org.apache.thrift.TException {
4582
      // check for required fields
4506
      // check for required fields
4583
    }
4507
    }
4584
 
4508
 
-
 
4509
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
4510
      try {
-
 
4511
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
4512
      } catch (org.apache.thrift.TException te) {
-
 
4513
        throw new java.io.IOException(te);
-
 
4514
      }
-
 
4515
    }
-
 
4516
 
-
 
4517
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
4518
      try {
-
 
4519
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
4520
      } catch (org.apache.thrift.TException te) {
-
 
4521
        throw new java.io.IOException(te);
-
 
4522
      }
-
 
4523
    }
-
 
4524
 
4585
  }
4525
  }
4586
 
4526
 
4587
  public static class trackCouponUsage_args implements TBase<trackCouponUsage_args._Fields>, java.io.Serializable, Cloneable, Comparable<trackCouponUsage_args>   {
4527
  public static class trackCouponUsage_args implements org.apache.thrift.TBase<trackCouponUsage_args, trackCouponUsage_args._Fields>, java.io.Serializable, Cloneable   {
4588
    private static final TStruct STRUCT_DESC = new TStruct("trackCouponUsage_args");
4528
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("trackCouponUsage_args");
4589
 
4529
 
4590
    private static final TField COUPON_CODE_FIELD_DESC = new TField("couponCode", TType.STRING, (short)1);
4530
    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);
4591
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)2);
4531
    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);
4592
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)3);
4532
    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);
4593
 
4533
 
4594
    private String couponCode;
4534
    private String couponCode; // required
4595
    private long transactionId;
4535
    private long transactionId; // required
4596
    private long userId;
4536
    private long userId; // required
4597
 
4537
 
4598
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4538
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4599
    public enum _Fields implements TFieldIdEnum {
4539
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4600
      COUPON_CODE((short)1, "couponCode"),
4540
      COUPON_CODE((short)1, "couponCode"),
4601
      TRANSACTION_ID((short)2, "transactionId"),
4541
      TRANSACTION_ID((short)2, "transactionId"),
4602
      USER_ID((short)3, "userId");
4542
      USER_ID((short)3, "userId");
4603
 
4543
 
4604
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
4605
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4544
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4606
 
4545
 
4607
      static {
4546
      static {
4608
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4547
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4609
          byId.put((int)field._thriftId, field);
-
 
4610
          byName.put(field.getFieldName(), field);
4548
          byName.put(field.getFieldName(), field);
4611
        }
4549
        }
4612
      }
4550
      }
4613
 
4551
 
4614
      /**
4552
      /**
4615
       * Find the _Fields constant that matches fieldId, or null if its not found.
4553
       * Find the _Fields constant that matches fieldId, or null if its not found.
4616
       */
4554
       */
4617
      public static _Fields findByThriftId(int fieldId) {
4555
      public static _Fields findByThriftId(int fieldId) {
4618
        return byId.get(fieldId);
4556
        switch(fieldId) {
-
 
4557
          case 1: // COUPON_CODE
-
 
4558
            return COUPON_CODE;
-
 
4559
          case 2: // TRANSACTION_ID
-
 
4560
            return TRANSACTION_ID;
-
 
4561
          case 3: // USER_ID
-
 
4562
            return USER_ID;
-
 
4563
          default:
-
 
4564
            return null;
-
 
4565
        }
4619
      }
4566
      }
4620
 
4567
 
4621
      /**
4568
      /**
4622
       * Find the _Fields constant that matches fieldId, throwing an exception
4569
       * Find the _Fields constant that matches fieldId, throwing an exception
4623
       * if it is not found.
4570
       * if it is not found.
Line 4655... Line 4602...
4655
    // isset id assignments
4602
    // isset id assignments
4656
    private static final int __TRANSACTIONID_ISSET_ID = 0;
4603
    private static final int __TRANSACTIONID_ISSET_ID = 0;
4657
    private static final int __USERID_ISSET_ID = 1;
4604
    private static final int __USERID_ISSET_ID = 1;
4658
    private BitSet __isset_bit_vector = new BitSet(2);
4605
    private BitSet __isset_bit_vector = new BitSet(2);
4659
 
4606
 
4660
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4607
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4661
      put(_Fields.COUPON_CODE, new FieldMetaData("couponCode", TFieldRequirementType.DEFAULT, 
-
 
4662
          new FieldValueMetaData(TType.STRING)));
-
 
4663
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
-
 
4664
          new FieldValueMetaData(TType.I64)));
-
 
4665
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
-
 
4666
          new FieldValueMetaData(TType.I64)));
-
 
4667
    }});
-
 
4668
 
-
 
4669
    static {
4608
    static {
-
 
4609
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
4610
      tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
4611
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
4612
      tmpMap.put(_Fields.TRANSACTION_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
4613
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
4614
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
4615
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
4616
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4670
      FieldMetaData.addStructMetaDataMap(trackCouponUsage_args.class, metaDataMap);
4617
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(trackCouponUsage_args.class, metaDataMap);
4671
    }
4618
    }
4672
 
4619
 
4673
    public trackCouponUsage_args() {
4620
    public trackCouponUsage_args() {
4674
    }
4621
    }
4675
 
4622
 
Line 4701... Line 4648...
4701
 
4648
 
4702
    public trackCouponUsage_args deepCopy() {
4649
    public trackCouponUsage_args deepCopy() {
4703
      return new trackCouponUsage_args(this);
4650
      return new trackCouponUsage_args(this);
4704
    }
4651
    }
4705
 
4652
 
4706
    @Deprecated
4653
    @Override
4707
    public trackCouponUsage_args clone() {
4654
    public void clear() {
-
 
4655
      this.couponCode = null;
4708
      return new trackCouponUsage_args(this);
4656
      setTransactionIdIsSet(false);
-
 
4657
      this.transactionId = 0;
-
 
4658
      setUserIdIsSet(false);
-
 
4659
      this.userId = 0;
4709
    }
4660
    }
4710
 
4661
 
4711
    public String getCouponCode() {
4662
    public String getCouponCode() {
4712
      return this.couponCode;
4663
      return this.couponCode;
4713
    }
4664
    }
4714
 
4665
 
4715
    public trackCouponUsage_args setCouponCode(String couponCode) {
4666
    public void setCouponCode(String couponCode) {
4716
      this.couponCode = couponCode;
4667
      this.couponCode = couponCode;
4717
      return this;
-
 
4718
    }
4668
    }
4719
 
4669
 
4720
    public void unsetCouponCode() {
4670
    public void unsetCouponCode() {
4721
      this.couponCode = null;
4671
      this.couponCode = null;
4722
    }
4672
    }
4723
 
4673
 
4724
    /** Returns true if field couponCode is set (has been asigned a value) and false otherwise */
4674
    /** Returns true if field couponCode is set (has been assigned a value) and false otherwise */
4725
    public boolean isSetCouponCode() {
4675
    public boolean isSetCouponCode() {
4726
      return this.couponCode != null;
4676
      return this.couponCode != null;
4727
    }
4677
    }
4728
 
4678
 
4729
    public void setCouponCodeIsSet(boolean value) {
4679
    public void setCouponCodeIsSet(boolean value) {
Line 4734... Line 4684...
4734
 
4684
 
4735
    public long getTransactionId() {
4685
    public long getTransactionId() {
4736
      return this.transactionId;
4686
      return this.transactionId;
4737
    }
4687
    }
4738
 
4688
 
4739
    public trackCouponUsage_args setTransactionId(long transactionId) {
4689
    public void setTransactionId(long transactionId) {
4740
      this.transactionId = transactionId;
4690
      this.transactionId = transactionId;
4741
      setTransactionIdIsSet(true);
4691
      setTransactionIdIsSet(true);
4742
      return this;
-
 
4743
    }
4692
    }
4744
 
4693
 
4745
    public void unsetTransactionId() {
4694
    public void unsetTransactionId() {
4746
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
4695
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
4747
    }
4696
    }
4748
 
4697
 
4749
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
4698
    /** Returns true if field transactionId is set (has been assigned a value) and false otherwise */
4750
    public boolean isSetTransactionId() {
4699
    public boolean isSetTransactionId() {
4751
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
4700
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
4752
    }
4701
    }
4753
 
4702
 
4754
    public void setTransactionIdIsSet(boolean value) {
4703
    public void setTransactionIdIsSet(boolean value) {
Line 4757... Line 4706...
4757
 
4706
 
4758
    public long getUserId() {
4707
    public long getUserId() {
4759
      return this.userId;
4708
      return this.userId;
4760
    }
4709
    }
4761
 
4710
 
4762
    public trackCouponUsage_args setUserId(long userId) {
4711
    public void setUserId(long userId) {
4763
      this.userId = userId;
4712
      this.userId = userId;
4764
      setUserIdIsSet(true);
4713
      setUserIdIsSet(true);
4765
      return this;
-
 
4766
    }
4714
    }
4767
 
4715
 
4768
    public void unsetUserId() {
4716
    public void unsetUserId() {
4769
      __isset_bit_vector.clear(__USERID_ISSET_ID);
4717
      __isset_bit_vector.clear(__USERID_ISSET_ID);
4770
    }
4718
    }
4771
 
4719
 
4772
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
4720
    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
4773
    public boolean isSetUserId() {
4721
    public boolean isSetUserId() {
4774
      return __isset_bit_vector.get(__USERID_ISSET_ID);
4722
      return __isset_bit_vector.get(__USERID_ISSET_ID);
4775
    }
4723
    }
4776
 
4724
 
4777
    public void setUserIdIsSet(boolean value) {
4725
    public void setUserIdIsSet(boolean value) {
Line 4805... Line 4753...
4805
        break;
4753
        break;
4806
 
4754
 
4807
      }
4755
      }
4808
    }
4756
    }
4809
 
4757
 
4810
    public void setFieldValue(int fieldID, Object value) {
-
 
4811
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
4812
    }
-
 
4813
 
-
 
4814
    public Object getFieldValue(_Fields field) {
4758
    public Object getFieldValue(_Fields field) {
4815
      switch (field) {
4759
      switch (field) {
4816
      case COUPON_CODE:
4760
      case COUPON_CODE:
4817
        return getCouponCode();
4761
        return getCouponCode();
4818
 
4762
 
4819
      case TRANSACTION_ID:
4763
      case TRANSACTION_ID:
4820
        return new Long(getTransactionId());
4764
        return Long.valueOf(getTransactionId());
4821
 
4765
 
4822
      case USER_ID:
4766
      case USER_ID:
4823
        return new Long(getUserId());
4767
        return Long.valueOf(getUserId());
4824
 
4768
 
4825
      }
4769
      }
4826
      throw new IllegalStateException();
4770
      throw new IllegalStateException();
4827
    }
4771
    }
4828
 
4772
 
4829
    public Object getFieldValue(int fieldId) {
-
 
4830
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
4831
    }
-
 
4832
 
-
 
4833
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4773
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4834
    public boolean isSet(_Fields field) {
4774
    public boolean isSet(_Fields field) {
-
 
4775
      if (field == null) {
-
 
4776
        throw new IllegalArgumentException();
-
 
4777
      }
-
 
4778
 
4835
      switch (field) {
4779
      switch (field) {
4836
      case COUPON_CODE:
4780
      case COUPON_CODE:
4837
        return isSetCouponCode();
4781
        return isSetCouponCode();
4838
      case TRANSACTION_ID:
4782
      case TRANSACTION_ID:
4839
        return isSetTransactionId();
4783
        return isSetTransactionId();
Line 4841... Line 4785...
4841
        return isSetUserId();
4785
        return isSetUserId();
4842
      }
4786
      }
4843
      throw new IllegalStateException();
4787
      throw new IllegalStateException();
4844
    }
4788
    }
4845
 
4789
 
4846
    public boolean isSet(int fieldID) {
-
 
4847
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
4848
    }
-
 
4849
 
-
 
4850
    @Override
4790
    @Override
4851
    public boolean equals(Object that) {
4791
    public boolean equals(Object that) {
4852
      if (that == null)
4792
      if (that == null)
4853
        return false;
4793
        return false;
4854
      if (that instanceof trackCouponUsage_args)
4794
      if (that instanceof trackCouponUsage_args)
Line 4901... Line 4841...
4901
      }
4841
      }
4902
 
4842
 
4903
      int lastComparison = 0;
4843
      int lastComparison = 0;
4904
      trackCouponUsage_args typedOther = (trackCouponUsage_args)other;
4844
      trackCouponUsage_args typedOther = (trackCouponUsage_args)other;
4905
 
4845
 
4906
      lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(isSetCouponCode());
4846
      lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
4907
      if (lastComparison != 0) {
4847
      if (lastComparison != 0) {
4908
        return lastComparison;
4848
        return lastComparison;
4909
      }
4849
      }
-
 
4850
      if (isSetCouponCode()) {
4910
      lastComparison = TBaseHelper.compareTo(couponCode, typedOther.couponCode);
4851
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);
4911
      if (lastComparison != 0) {
4852
        if (lastComparison != 0) {
4912
        return lastComparison;
4853
          return lastComparison;
-
 
4854
        }
4913
      }
4855
      }
4914
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
4856
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(typedOther.isSetTransactionId());
4915
      if (lastComparison != 0) {
4857
      if (lastComparison != 0) {
4916
        return lastComparison;
4858
        return lastComparison;
4917
      }
4859
      }
-
 
4860
      if (isSetTransactionId()) {
4918
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
4861
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionId, typedOther.transactionId);
4919
      if (lastComparison != 0) {
4862
        if (lastComparison != 0) {
4920
        return lastComparison;
4863
          return lastComparison;
-
 
4864
        }
4921
      }
4865
      }
4922
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
4866
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
4923
      if (lastComparison != 0) {
4867
      if (lastComparison != 0) {
4924
        return lastComparison;
4868
        return lastComparison;
4925
      }
4869
      }
-
 
4870
      if (isSetUserId()) {
4926
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
4871
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
4927
      if (lastComparison != 0) {
4872
        if (lastComparison != 0) {
4928
        return lastComparison;
4873
          return lastComparison;
-
 
4874
        }
4929
      }
4875
      }
4930
      return 0;
4876
      return 0;
4931
    }
4877
    }
4932
 
4878
 
-
 
4879
    public _Fields fieldForId(int fieldId) {
-
 
4880
      return _Fields.findByThriftId(fieldId);
-
 
4881
    }
-
 
4882
 
4933
    public void read(TProtocol iprot) throws TException {
4883
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4934
      TField field;
4884
      org.apache.thrift.protocol.TField field;
4935
      iprot.readStructBegin();
4885
      iprot.readStructBegin();
4936
      while (true)
4886
      while (true)
4937
      {
4887
      {
4938
        field = iprot.readFieldBegin();
4888
        field = iprot.readFieldBegin();
4939
        if (field.type == TType.STOP) { 
4889
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4940
          break;
4890
          break;
4941
        }
4891
        }
4942
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
4943
        if (fieldId == null) {
-
 
4944
          TProtocolUtil.skip(iprot, field.type);
-
 
4945
        } else {
-
 
4946
          switch (fieldId) {
4892
        switch (field.id) {
4947
            case COUPON_CODE:
4893
          case 1: // COUPON_CODE
4948
              if (field.type == TType.STRING) {
4894
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
4949
                this.couponCode = iprot.readString();
4895
              this.couponCode = iprot.readString();
4950
              } else { 
4896
            } else { 
4951
                TProtocolUtil.skip(iprot, field.type);
4897
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4952
              }
4898
            }
4953
              break;
4899
            break;
4954
            case TRANSACTION_ID:
4900
          case 2: // TRANSACTION_ID
4955
              if (field.type == TType.I64) {
4901
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4956
                this.transactionId = iprot.readI64();
4902
              this.transactionId = iprot.readI64();
4957
                setTransactionIdIsSet(true);
4903
              setTransactionIdIsSet(true);
4958
              } else { 
4904
            } else { 
4959
                TProtocolUtil.skip(iprot, field.type);
4905
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4960
              }
4906
            }
4961
              break;
4907
            break;
4962
            case USER_ID:
4908
          case 3: // USER_ID
4963
              if (field.type == TType.I64) {
4909
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4964
                this.userId = iprot.readI64();
4910
              this.userId = iprot.readI64();
4965
                setUserIdIsSet(true);
4911
              setUserIdIsSet(true);
4966
              } else { 
4912
            } else { 
4967
                TProtocolUtil.skip(iprot, field.type);
4913
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4968
              }
4914
            }
4969
              break;
4915
            break;
4970
          }
4916
          default:
4971
          iprot.readFieldEnd();
4917
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4972
        }
4918
        }
-
 
4919
        iprot.readFieldEnd();
4973
      }
4920
      }
4974
      iprot.readStructEnd();
4921
      iprot.readStructEnd();
4975
      validate();
4922
      validate();
4976
    }
4923
    }
4977
 
4924
 
4978
    public void write(TProtocol oprot) throws TException {
4925
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
4979
      validate();
4926
      validate();
4980
 
4927
 
4981
      oprot.writeStructBegin(STRUCT_DESC);
4928
      oprot.writeStructBegin(STRUCT_DESC);
4982
      if (this.couponCode != null) {
4929
      if (this.couponCode != null) {
4983
        oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
4930
        oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
Line 5016... Line 4963...
5016
      first = false;
4963
      first = false;
5017
      sb.append(")");
4964
      sb.append(")");
5018
      return sb.toString();
4965
      return sb.toString();
5019
    }
4966
    }
5020
 
4967
 
5021
    public void validate() throws TException {
4968
    public void validate() throws org.apache.thrift.TException {
5022
      // check for required fields
4969
      // check for required fields
5023
    }
4970
    }
5024
 
4971
 
-
 
4972
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
4973
      try {
-
 
4974
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
4975
      } catch (org.apache.thrift.TException te) {
-
 
4976
        throw new java.io.IOException(te);
-
 
4977
      }
-
 
4978
    }
-
 
4979
 
-
 
4980
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
4981
      try {
-
 
4982
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
4983
        __isset_bit_vector = new BitSet(1);
-
 
4984
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
4985
      } catch (org.apache.thrift.TException te) {
-
 
4986
        throw new java.io.IOException(te);
-
 
4987
      }
-
 
4988
    }
-
 
4989
 
5025
  }
4990
  }
5026
 
4991
 
5027
  public static class trackCouponUsage_result implements TBase<trackCouponUsage_result._Fields>, java.io.Serializable, Cloneable, Comparable<trackCouponUsage_result>   {
4992
  public static class trackCouponUsage_result implements org.apache.thrift.TBase<trackCouponUsage_result, trackCouponUsage_result._Fields>, java.io.Serializable, Cloneable   {
5028
    private static final TStruct STRUCT_DESC = new TStruct("trackCouponUsage_result");
4993
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("trackCouponUsage_result");
5029
 
4994
 
5030
    private static final TField PEX_FIELD_DESC = new TField("pex", TType.STRUCT, (short)1);
4995
    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);
5031
 
4996
 
5032
    private PromotionException pex;
4997
    private PromotionException pex; // required
5033
 
4998
 
5034
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4999
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5035
    public enum _Fields implements TFieldIdEnum {
5000
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5036
      PEX((short)1, "pex");
5001
      PEX((short)1, "pex");
5037
 
5002
 
5038
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
5039
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5003
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5040
 
5004
 
5041
      static {
5005
      static {
5042
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5006
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5043
          byId.put((int)field._thriftId, field);
-
 
5044
          byName.put(field.getFieldName(), field);
5007
          byName.put(field.getFieldName(), field);
5045
        }
5008
        }
5046
      }
5009
      }
5047
 
5010
 
5048
      /**
5011
      /**
5049
       * Find the _Fields constant that matches fieldId, or null if its not found.
5012
       * Find the _Fields constant that matches fieldId, or null if its not found.
5050
       */
5013
       */
5051
      public static _Fields findByThriftId(int fieldId) {
5014
      public static _Fields findByThriftId(int fieldId) {
5052
        return byId.get(fieldId);
5015
        switch(fieldId) {
-
 
5016
          case 1: // PEX
-
 
5017
            return PEX;
-
 
5018
          default:
-
 
5019
            return null;
-
 
5020
        }
5053
      }
5021
      }
5054
 
5022
 
5055
      /**
5023
      /**
5056
       * Find the _Fields constant that matches fieldId, throwing an exception
5024
       * Find the _Fields constant that matches fieldId, throwing an exception
5057
       * if it is not found.
5025
       * if it is not found.
Line 5086... Line 5054...
5086
      }
5054
      }
5087
    }
5055
    }
5088
 
5056
 
5089
    // isset id assignments
5057
    // isset id assignments
5090
 
5058
 
5091
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5059
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5092
      put(_Fields.PEX, new FieldMetaData("pex", TFieldRequirementType.DEFAULT, 
-
 
5093
          new FieldValueMetaData(TType.STRUCT)));
-
 
5094
    }});
-
 
5095
 
-
 
5096
    static {
5060
    static {
-
 
5061
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
5062
      tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
5063
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
5064
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5097
      FieldMetaData.addStructMetaDataMap(trackCouponUsage_result.class, metaDataMap);
5065
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(trackCouponUsage_result.class, metaDataMap);
5098
    }
5066
    }
5099
 
5067
 
5100
    public trackCouponUsage_result() {
5068
    public trackCouponUsage_result() {
5101
    }
5069
    }
5102
 
5070
 
Line 5118... Line 5086...
5118
 
5086
 
5119
    public trackCouponUsage_result deepCopy() {
5087
    public trackCouponUsage_result deepCopy() {
5120
      return new trackCouponUsage_result(this);
5088
      return new trackCouponUsage_result(this);
5121
    }
5089
    }
5122
 
5090
 
5123
    @Deprecated
5091
    @Override
5124
    public trackCouponUsage_result clone() {
5092
    public void clear() {
5125
      return new trackCouponUsage_result(this);
5093
      this.pex = null;
5126
    }
5094
    }
5127
 
5095
 
5128
    public PromotionException getPex() {
5096
    public PromotionException getPex() {
5129
      return this.pex;
5097
      return this.pex;
5130
    }
5098
    }
5131
 
5099
 
5132
    public trackCouponUsage_result setPex(PromotionException pex) {
5100
    public void setPex(PromotionException pex) {
5133
      this.pex = pex;
5101
      this.pex = pex;
5134
      return this;
-
 
5135
    }
5102
    }
5136
 
5103
 
5137
    public void unsetPex() {
5104
    public void unsetPex() {
5138
      this.pex = null;
5105
      this.pex = null;
5139
    }
5106
    }
5140
 
5107
 
5141
    /** Returns true if field pex is set (has been asigned a value) and false otherwise */
5108
    /** Returns true if field pex is set (has been assigned a value) and false otherwise */
5142
    public boolean isSetPex() {
5109
    public boolean isSetPex() {
5143
      return this.pex != null;
5110
      return this.pex != null;
5144
    }
5111
    }
5145
 
5112
 
5146
    public void setPexIsSet(boolean value) {
5113
    public void setPexIsSet(boolean value) {
Line 5160... Line 5127...
5160
        break;
5127
        break;
5161
 
5128
 
5162
      }
5129
      }
5163
    }
5130
    }
5164
 
5131
 
5165
    public void setFieldValue(int fieldID, Object value) {
-
 
5166
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
5167
    }
-
 
5168
 
-
 
5169
    public Object getFieldValue(_Fields field) {
5132
    public Object getFieldValue(_Fields field) {
5170
      switch (field) {
5133
      switch (field) {
5171
      case PEX:
5134
      case PEX:
5172
        return getPex();
5135
        return getPex();
5173
 
5136
 
5174
      }
5137
      }
5175
      throw new IllegalStateException();
5138
      throw new IllegalStateException();
5176
    }
5139
    }
5177
 
5140
 
5178
    public Object getFieldValue(int fieldId) {
-
 
5179
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
5180
    }
-
 
5181
 
-
 
5182
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5141
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5183
    public boolean isSet(_Fields field) {
5142
    public boolean isSet(_Fields field) {
-
 
5143
      if (field == null) {
-
 
5144
        throw new IllegalArgumentException();
-
 
5145
      }
-
 
5146
 
5184
      switch (field) {
5147
      switch (field) {
5185
      case PEX:
5148
      case PEX:
5186
        return isSetPex();
5149
        return isSetPex();
5187
      }
5150
      }
5188
      throw new IllegalStateException();
5151
      throw new IllegalStateException();
5189
    }
5152
    }
5190
 
5153
 
5191
    public boolean isSet(int fieldID) {
-
 
5192
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
5193
    }
-
 
5194
 
-
 
5195
    @Override
5154
    @Override
5196
    public boolean equals(Object that) {
5155
    public boolean equals(Object that) {
5197
      if (that == null)
5156
      if (that == null)
5198
        return false;
5157
        return false;
5199
      if (that instanceof trackCouponUsage_result)
5158
      if (that instanceof trackCouponUsage_result)
Line 5228... Line 5187...
5228
      }
5187
      }
5229
 
5188
 
5230
      int lastComparison = 0;
5189
      int lastComparison = 0;
5231
      trackCouponUsage_result typedOther = (trackCouponUsage_result)other;
5190
      trackCouponUsage_result typedOther = (trackCouponUsage_result)other;
5232
 
5191
 
5233
      lastComparison = Boolean.valueOf(isSetPex()).compareTo(isSetPex());
5192
      lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
5234
      if (lastComparison != 0) {
5193
      if (lastComparison != 0) {
5235
        return lastComparison;
5194
        return lastComparison;
5236
      }
5195
      }
-
 
5196
      if (isSetPex()) {
5237
      lastComparison = TBaseHelper.compareTo(pex, typedOther.pex);
5197
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
5238
      if (lastComparison != 0) {
5198
        if (lastComparison != 0) {
5239
        return lastComparison;
5199
          return lastComparison;
-
 
5200
        }
5240
      }
5201
      }
5241
      return 0;
5202
      return 0;
5242
    }
5203
    }
5243
 
5204
 
-
 
5205
    public _Fields fieldForId(int fieldId) {
-
 
5206
      return _Fields.findByThriftId(fieldId);
-
 
5207
    }
-
 
5208
 
5244
    public void read(TProtocol iprot) throws TException {
5209
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5245
      TField field;
5210
      org.apache.thrift.protocol.TField field;
5246
      iprot.readStructBegin();
5211
      iprot.readStructBegin();
5247
      while (true)
5212
      while (true)
5248
      {
5213
      {
5249
        field = iprot.readFieldBegin();
5214
        field = iprot.readFieldBegin();
5250
        if (field.type == TType.STOP) { 
5215
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5251
          break;
5216
          break;
5252
        }
5217
        }
5253
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
5254
        if (fieldId == null) {
-
 
5255
          TProtocolUtil.skip(iprot, field.type);
-
 
5256
        } else {
-
 
5257
          switch (fieldId) {
5218
        switch (field.id) {
5258
            case PEX:
5219
          case 1: // PEX
5259
              if (field.type == TType.STRUCT) {
5220
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5260
                this.pex = new PromotionException();
5221
              this.pex = new PromotionException();
5261
                this.pex.read(iprot);
5222
              this.pex.read(iprot);
5262
              } else { 
5223
            } else { 
5263
                TProtocolUtil.skip(iprot, field.type);
5224
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5264
              }
5225
            }
5265
              break;
5226
            break;
5266
          }
5227
          default:
5267
          iprot.readFieldEnd();
5228
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5268
        }
5229
        }
-
 
5230
        iprot.readFieldEnd();
5269
      }
5231
      }
5270
      iprot.readStructEnd();
5232
      iprot.readStructEnd();
5271
      validate();
5233
      validate();
5272
    }
5234
    }
5273
 
5235
 
5274
    public void write(TProtocol oprot) throws TException {
5236
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5275
      oprot.writeStructBegin(STRUCT_DESC);
5237
      oprot.writeStructBegin(STRUCT_DESC);
5276
 
5238
 
5277
      if (this.isSetPex()) {
5239
      if (this.isSetPex()) {
5278
        oprot.writeFieldBegin(PEX_FIELD_DESC);
5240
        oprot.writeFieldBegin(PEX_FIELD_DESC);
5279
        this.pex.write(oprot);
5241
        this.pex.write(oprot);
Line 5297... Line 5259...
5297
      first = false;
5259
      first = false;
5298
      sb.append(")");
5260
      sb.append(")");
5299
      return sb.toString();
5261
      return sb.toString();
5300
    }
5262
    }
5301
 
5263
 
5302
    public void validate() throws TException {
5264
    public void validate() throws org.apache.thrift.TException {
5303
      // check for required fields
5265
      // check for required fields
5304
    }
5266
    }
5305
 
5267
 
-
 
5268
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
5269
      try {
-
 
5270
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
5271
      } catch (org.apache.thrift.TException te) {
-
 
5272
        throw new java.io.IOException(te);
-
 
5273
      }
-
 
5274
    }
-
 
5275
 
-
 
5276
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
5277
      try {
-
 
5278
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
5279
      } catch (org.apache.thrift.TException te) {
-
 
5280
        throw new java.io.IOException(te);
-
 
5281
      }
-
 
5282
    }
-
 
5283
 
5306
  }
5284
  }
5307
 
5285
 
5308
  public static class getCouponUsageCountByUser_args implements TBase<getCouponUsageCountByUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCouponUsageCountByUser_args>   {
5286
  public static class getCouponUsageCountByUser_args implements org.apache.thrift.TBase<getCouponUsageCountByUser_args, getCouponUsageCountByUser_args._Fields>, java.io.Serializable, Cloneable   {
5309
    private static final TStruct STRUCT_DESC = new TStruct("getCouponUsageCountByUser_args");
5287
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCouponUsageCountByUser_args");
5310
 
5288
 
5311
    private static final TField COUPON_CODE_FIELD_DESC = new TField("couponCode", TType.STRING, (short)1);
5289
    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);
5312
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)2);
5290
    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);
5313
 
5291
 
5314
    private String couponCode;
5292
    private String couponCode; // required
5315
    private long userId;
5293
    private long userId; // required
5316
 
5294
 
5317
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5295
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5318
    public enum _Fields implements TFieldIdEnum {
5296
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5319
      COUPON_CODE((short)1, "couponCode"),
5297
      COUPON_CODE((short)1, "couponCode"),
5320
      USER_ID((short)2, "userId");
5298
      USER_ID((short)2, "userId");
5321
 
5299
 
5322
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
5323
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5300
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5324
 
5301
 
5325
      static {
5302
      static {
5326
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5303
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5327
          byId.put((int)field._thriftId, field);
-
 
5328
          byName.put(field.getFieldName(), field);
5304
          byName.put(field.getFieldName(), field);
5329
        }
5305
        }
5330
      }
5306
      }
5331
 
5307
 
5332
      /**
5308
      /**
5333
       * Find the _Fields constant that matches fieldId, or null if its not found.
5309
       * Find the _Fields constant that matches fieldId, or null if its not found.
5334
       */
5310
       */
5335
      public static _Fields findByThriftId(int fieldId) {
5311
      public static _Fields findByThriftId(int fieldId) {
5336
        return byId.get(fieldId);
5312
        switch(fieldId) {
-
 
5313
          case 1: // COUPON_CODE
-
 
5314
            return COUPON_CODE;
-
 
5315
          case 2: // USER_ID
-
 
5316
            return USER_ID;
-
 
5317
          default:
-
 
5318
            return null;
-
 
5319
        }
5337
      }
5320
      }
5338
 
5321
 
5339
      /**
5322
      /**
5340
       * Find the _Fields constant that matches fieldId, throwing an exception
5323
       * Find the _Fields constant that matches fieldId, throwing an exception
5341
       * if it is not found.
5324
       * if it is not found.
Line 5372... Line 5355...
5372
 
5355
 
5373
    // isset id assignments
5356
    // isset id assignments
5374
    private static final int __USERID_ISSET_ID = 0;
5357
    private static final int __USERID_ISSET_ID = 0;
5375
    private BitSet __isset_bit_vector = new BitSet(1);
5358
    private BitSet __isset_bit_vector = new BitSet(1);
5376
 
5359
 
5377
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5360
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5378
      put(_Fields.COUPON_CODE, new FieldMetaData("couponCode", TFieldRequirementType.DEFAULT, 
-
 
5379
          new FieldValueMetaData(TType.STRING)));
-
 
5380
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
-
 
5381
          new FieldValueMetaData(TType.I64)));
-
 
5382
    }});
-
 
5383
 
-
 
5384
    static {
5361
    static {
-
 
5362
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
5363
      tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
5364
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
5365
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
5366
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
5367
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5385
      FieldMetaData.addStructMetaDataMap(getCouponUsageCountByUser_args.class, metaDataMap);
5368
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCouponUsageCountByUser_args.class, metaDataMap);
5386
    }
5369
    }
5387
 
5370
 
5388
    public getCouponUsageCountByUser_args() {
5371
    public getCouponUsageCountByUser_args() {
5389
    }
5372
    }
5390
 
5373
 
Line 5412... Line 5395...
5412
 
5395
 
5413
    public getCouponUsageCountByUser_args deepCopy() {
5396
    public getCouponUsageCountByUser_args deepCopy() {
5414
      return new getCouponUsageCountByUser_args(this);
5397
      return new getCouponUsageCountByUser_args(this);
5415
    }
5398
    }
5416
 
5399
 
5417
    @Deprecated
5400
    @Override
5418
    public getCouponUsageCountByUser_args clone() {
5401
    public void clear() {
5419
      return new getCouponUsageCountByUser_args(this);
5402
      this.couponCode = null;
-
 
5403
      setUserIdIsSet(false);
-
 
5404
      this.userId = 0;
5420
    }
5405
    }
5421
 
5406
 
5422
    public String getCouponCode() {
5407
    public String getCouponCode() {
5423
      return this.couponCode;
5408
      return this.couponCode;
5424
    }
5409
    }
5425
 
5410
 
5426
    public getCouponUsageCountByUser_args setCouponCode(String couponCode) {
5411
    public void setCouponCode(String couponCode) {
5427
      this.couponCode = couponCode;
5412
      this.couponCode = couponCode;
5428
      return this;
-
 
5429
    }
5413
    }
5430
 
5414
 
5431
    public void unsetCouponCode() {
5415
    public void unsetCouponCode() {
5432
      this.couponCode = null;
5416
      this.couponCode = null;
5433
    }
5417
    }
5434
 
5418
 
5435
    /** Returns true if field couponCode is set (has been asigned a value) and false otherwise */
5419
    /** Returns true if field couponCode is set (has been assigned a value) and false otherwise */
5436
    public boolean isSetCouponCode() {
5420
    public boolean isSetCouponCode() {
5437
      return this.couponCode != null;
5421
      return this.couponCode != null;
5438
    }
5422
    }
5439
 
5423
 
5440
    public void setCouponCodeIsSet(boolean value) {
5424
    public void setCouponCodeIsSet(boolean value) {
Line 5445... Line 5429...
5445
 
5429
 
5446
    public long getUserId() {
5430
    public long getUserId() {
5447
      return this.userId;
5431
      return this.userId;
5448
    }
5432
    }
5449
 
5433
 
5450
    public getCouponUsageCountByUser_args setUserId(long userId) {
5434
    public void setUserId(long userId) {
5451
      this.userId = userId;
5435
      this.userId = userId;
5452
      setUserIdIsSet(true);
5436
      setUserIdIsSet(true);
5453
      return this;
-
 
5454
    }
5437
    }
5455
 
5438
 
5456
    public void unsetUserId() {
5439
    public void unsetUserId() {
5457
      __isset_bit_vector.clear(__USERID_ISSET_ID);
5440
      __isset_bit_vector.clear(__USERID_ISSET_ID);
5458
    }
5441
    }
5459
 
5442
 
5460
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
5443
    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
5461
    public boolean isSetUserId() {
5444
    public boolean isSetUserId() {
5462
      return __isset_bit_vector.get(__USERID_ISSET_ID);
5445
      return __isset_bit_vector.get(__USERID_ISSET_ID);
5463
    }
5446
    }
5464
 
5447
 
5465
    public void setUserIdIsSet(boolean value) {
5448
    public void setUserIdIsSet(boolean value) {
Line 5485... Line 5468...
5485
        break;
5468
        break;
5486
 
5469
 
5487
      }
5470
      }
5488
    }
5471
    }
5489
 
5472
 
5490
    public void setFieldValue(int fieldID, Object value) {
-
 
5491
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
5492
    }
-
 
5493
 
-
 
5494
    public Object getFieldValue(_Fields field) {
5473
    public Object getFieldValue(_Fields field) {
5495
      switch (field) {
5474
      switch (field) {
5496
      case COUPON_CODE:
5475
      case COUPON_CODE:
5497
        return getCouponCode();
5476
        return getCouponCode();
5498
 
5477
 
5499
      case USER_ID:
5478
      case USER_ID:
5500
        return new Long(getUserId());
5479
        return Long.valueOf(getUserId());
5501
 
5480
 
5502
      }
5481
      }
5503
      throw new IllegalStateException();
5482
      throw new IllegalStateException();
5504
    }
5483
    }
5505
 
5484
 
5506
    public Object getFieldValue(int fieldId) {
-
 
5507
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
5508
    }
-
 
5509
 
-
 
5510
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5485
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5511
    public boolean isSet(_Fields field) {
5486
    public boolean isSet(_Fields field) {
-
 
5487
      if (field == null) {
-
 
5488
        throw new IllegalArgumentException();
-
 
5489
      }
-
 
5490
 
5512
      switch (field) {
5491
      switch (field) {
5513
      case COUPON_CODE:
5492
      case COUPON_CODE:
5514
        return isSetCouponCode();
5493
        return isSetCouponCode();
5515
      case USER_ID:
5494
      case USER_ID:
5516
        return isSetUserId();
5495
        return isSetUserId();
5517
      }
5496
      }
5518
      throw new IllegalStateException();
5497
      throw new IllegalStateException();
5519
    }
5498
    }
5520
 
5499
 
5521
    public boolean isSet(int fieldID) {
-
 
5522
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
5523
    }
-
 
5524
 
-
 
5525
    @Override
5500
    @Override
5526
    public boolean equals(Object that) {
5501
    public boolean equals(Object that) {
5527
      if (that == null)
5502
      if (that == null)
5528
        return false;
5503
        return false;
5529
      if (that instanceof getCouponUsageCountByUser_args)
5504
      if (that instanceof getCouponUsageCountByUser_args)
Line 5567... Line 5542...
5567
      }
5542
      }
5568
 
5543
 
5569
      int lastComparison = 0;
5544
      int lastComparison = 0;
5570
      getCouponUsageCountByUser_args typedOther = (getCouponUsageCountByUser_args)other;
5545
      getCouponUsageCountByUser_args typedOther = (getCouponUsageCountByUser_args)other;
5571
 
5546
 
5572
      lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(isSetCouponCode());
5547
      lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
5573
      if (lastComparison != 0) {
5548
      if (lastComparison != 0) {
5574
        return lastComparison;
5549
        return lastComparison;
5575
      }
5550
      }
-
 
5551
      if (isSetCouponCode()) {
5576
      lastComparison = TBaseHelper.compareTo(couponCode, typedOther.couponCode);
5552
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);
5577
      if (lastComparison != 0) {
5553
        if (lastComparison != 0) {
5578
        return lastComparison;
5554
          return lastComparison;
-
 
5555
        }
5579
      }
5556
      }
5580
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
5557
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
5581
      if (lastComparison != 0) {
5558
      if (lastComparison != 0) {
5582
        return lastComparison;
5559
        return lastComparison;
5583
      }
5560
      }
-
 
5561
      if (isSetUserId()) {
5584
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
5562
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
5585
      if (lastComparison != 0) {
5563
        if (lastComparison != 0) {
5586
        return lastComparison;
5564
          return lastComparison;
-
 
5565
        }
5587
      }
5566
      }
5588
      return 0;
5567
      return 0;
5589
    }
5568
    }
5590
 
5569
 
-
 
5570
    public _Fields fieldForId(int fieldId) {
-
 
5571
      return _Fields.findByThriftId(fieldId);
-
 
5572
    }
-
 
5573
 
5591
    public void read(TProtocol iprot) throws TException {
5574
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5592
      TField field;
5575
      org.apache.thrift.protocol.TField field;
5593
      iprot.readStructBegin();
5576
      iprot.readStructBegin();
5594
      while (true)
5577
      while (true)
5595
      {
5578
      {
5596
        field = iprot.readFieldBegin();
5579
        field = iprot.readFieldBegin();
5597
        if (field.type == TType.STOP) { 
5580
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5598
          break;
5581
          break;
5599
        }
5582
        }
5600
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
5601
        if (fieldId == null) {
-
 
5602
          TProtocolUtil.skip(iprot, field.type);
-
 
5603
        } else {
-
 
5604
          switch (fieldId) {
5583
        switch (field.id) {
5605
            case COUPON_CODE:
5584
          case 1: // COUPON_CODE
5606
              if (field.type == TType.STRING) {
5585
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
5607
                this.couponCode = iprot.readString();
5586
              this.couponCode = iprot.readString();
5608
              } else { 
5587
            } else { 
5609
                TProtocolUtil.skip(iprot, field.type);
5588
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5610
              }
5589
            }
5611
              break;
5590
            break;
5612
            case USER_ID:
5591
          case 2: // USER_ID
5613
              if (field.type == TType.I64) {
5592
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5614
                this.userId = iprot.readI64();
5593
              this.userId = iprot.readI64();
5615
                setUserIdIsSet(true);
5594
              setUserIdIsSet(true);
5616
              } else { 
5595
            } else { 
5617
                TProtocolUtil.skip(iprot, field.type);
5596
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5618
              }
5597
            }
5619
              break;
5598
            break;
5620
          }
5599
          default:
5621
          iprot.readFieldEnd();
5600
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5622
        }
5601
        }
-
 
5602
        iprot.readFieldEnd();
5623
      }
5603
      }
5624
      iprot.readStructEnd();
5604
      iprot.readStructEnd();
5625
      validate();
5605
      validate();
5626
    }
5606
    }
5627
 
5607
 
5628
    public void write(TProtocol oprot) throws TException {
5608
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5629
      validate();
5609
      validate();
5630
 
5610
 
5631
      oprot.writeStructBegin(STRUCT_DESC);
5611
      oprot.writeStructBegin(STRUCT_DESC);
5632
      if (this.couponCode != null) {
5612
      if (this.couponCode != null) {
5633
        oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
5613
        oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
Line 5659... Line 5639...
5659
      first = false;
5639
      first = false;
5660
      sb.append(")");
5640
      sb.append(")");
5661
      return sb.toString();
5641
      return sb.toString();
5662
    }
5642
    }
5663
 
5643
 
5664
    public void validate() throws TException {
5644
    public void validate() throws org.apache.thrift.TException {
5665
      // check for required fields
5645
      // check for required fields
5666
    }
5646
    }
5667
 
5647
 
-
 
5648
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
5649
      try {
-
 
5650
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
5651
      } catch (org.apache.thrift.TException te) {
-
 
5652
        throw new java.io.IOException(te);
-
 
5653
      }
-
 
5654
    }
-
 
5655
 
-
 
5656
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
5657
      try {
-
 
5658
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
5659
        __isset_bit_vector = new BitSet(1);
-
 
5660
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
5661
      } catch (org.apache.thrift.TException te) {
-
 
5662
        throw new java.io.IOException(te);
-
 
5663
      }
-
 
5664
    }
-
 
5665
 
5668
  }
5666
  }
5669
 
5667
 
5670
  public static class getCouponUsageCountByUser_result implements TBase<getCouponUsageCountByUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCouponUsageCountByUser_result>   {
5668
  public static class getCouponUsageCountByUser_result implements org.apache.thrift.TBase<getCouponUsageCountByUser_result, getCouponUsageCountByUser_result._Fields>, java.io.Serializable, Cloneable   {
5671
    private static final TStruct STRUCT_DESC = new TStruct("getCouponUsageCountByUser_result");
5669
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCouponUsageCountByUser_result");
5672
 
5670
 
5673
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
5671
    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);
5674
    private static final TField PEX_FIELD_DESC = new TField("pex", TType.STRUCT, (short)1);
5672
    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);
5675
 
5673
 
5676
    private long success;
5674
    private long success; // required
5677
    private PromotionException pex;
5675
    private PromotionException pex; // required
5678
 
5676
 
5679
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5677
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5680
    public enum _Fields implements TFieldIdEnum {
5678
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5681
      SUCCESS((short)0, "success"),
5679
      SUCCESS((short)0, "success"),
5682
      PEX((short)1, "pex");
5680
      PEX((short)1, "pex");
5683
 
5681
 
5684
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
5685
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5682
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5686
 
5683
 
5687
      static {
5684
      static {
5688
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5685
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5689
          byId.put((int)field._thriftId, field);
-
 
5690
          byName.put(field.getFieldName(), field);
5686
          byName.put(field.getFieldName(), field);
5691
        }
5687
        }
5692
      }
5688
      }
5693
 
5689
 
5694
      /**
5690
      /**
5695
       * Find the _Fields constant that matches fieldId, or null if its not found.
5691
       * Find the _Fields constant that matches fieldId, or null if its not found.
5696
       */
5692
       */
5697
      public static _Fields findByThriftId(int fieldId) {
5693
      public static _Fields findByThriftId(int fieldId) {
5698
        return byId.get(fieldId);
5694
        switch(fieldId) {
-
 
5695
          case 0: // SUCCESS
-
 
5696
            return SUCCESS;
-
 
5697
          case 1: // PEX
-
 
5698
            return PEX;
-
 
5699
          default:
-
 
5700
            return null;
-
 
5701
        }
5699
      }
5702
      }
5700
 
5703
 
5701
      /**
5704
      /**
5702
       * Find the _Fields constant that matches fieldId, throwing an exception
5705
       * Find the _Fields constant that matches fieldId, throwing an exception
5703
       * if it is not found.
5706
       * if it is not found.
Line 5734... Line 5737...
5734
 
5737
 
5735
    // isset id assignments
5738
    // isset id assignments
5736
    private static final int __SUCCESS_ISSET_ID = 0;
5739
    private static final int __SUCCESS_ISSET_ID = 0;
5737
    private BitSet __isset_bit_vector = new BitSet(1);
5740
    private BitSet __isset_bit_vector = new BitSet(1);
5738
 
5741
 
5739
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5742
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5740
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
5741
          new FieldValueMetaData(TType.I64)));
-
 
5742
      put(_Fields.PEX, new FieldMetaData("pex", TFieldRequirementType.DEFAULT, 
-
 
5743
          new FieldValueMetaData(TType.STRUCT)));
-
 
5744
    }});
-
 
5745
 
-
 
5746
    static {
5743
    static {
-
 
5744
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
5745
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
5746
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
5747
      tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
5748
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
5749
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5747
      FieldMetaData.addStructMetaDataMap(getCouponUsageCountByUser_result.class, metaDataMap);
5750
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCouponUsageCountByUser_result.class, metaDataMap);
5748
    }
5751
    }
5749
 
5752
 
5750
    public getCouponUsageCountByUser_result() {
5753
    public getCouponUsageCountByUser_result() {
5751
    }
5754
    }
5752
 
5755
 
Line 5774... Line 5777...
5774
 
5777
 
5775
    public getCouponUsageCountByUser_result deepCopy() {
5778
    public getCouponUsageCountByUser_result deepCopy() {
5776
      return new getCouponUsageCountByUser_result(this);
5779
      return new getCouponUsageCountByUser_result(this);
5777
    }
5780
    }
5778
 
5781
 
5779
    @Deprecated
5782
    @Override
5780
    public getCouponUsageCountByUser_result clone() {
5783
    public void clear() {
5781
      return new getCouponUsageCountByUser_result(this);
5784
      setSuccessIsSet(false);
-
 
5785
      this.success = 0;
-
 
5786
      this.pex = null;
5782
    }
5787
    }
5783
 
5788
 
5784
    public long getSuccess() {
5789
    public long getSuccess() {
5785
      return this.success;
5790
      return this.success;
5786
    }
5791
    }
5787
 
5792
 
5788
    public getCouponUsageCountByUser_result setSuccess(long success) {
5793
    public void setSuccess(long success) {
5789
      this.success = success;
5794
      this.success = success;
5790
      setSuccessIsSet(true);
5795
      setSuccessIsSet(true);
5791
      return this;
-
 
5792
    }
5796
    }
5793
 
5797
 
5794
    public void unsetSuccess() {
5798
    public void unsetSuccess() {
5795
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
5799
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
5796
    }
5800
    }
5797
 
5801
 
5798
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5802
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5799
    public boolean isSetSuccess() {
5803
    public boolean isSetSuccess() {
5800
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
5804
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
5801
    }
5805
    }
5802
 
5806
 
5803
    public void setSuccessIsSet(boolean value) {
5807
    public void setSuccessIsSet(boolean value) {
Line 5806... Line 5810...
5806
 
5810
 
5807
    public PromotionException getPex() {
5811
    public PromotionException getPex() {
5808
      return this.pex;
5812
      return this.pex;
5809
    }
5813
    }
5810
 
5814
 
5811
    public getCouponUsageCountByUser_result setPex(PromotionException pex) {
5815
    public void setPex(PromotionException pex) {
5812
      this.pex = pex;
5816
      this.pex = pex;
5813
      return this;
-
 
5814
    }
5817
    }
5815
 
5818
 
5816
    public void unsetPex() {
5819
    public void unsetPex() {
5817
      this.pex = null;
5820
      this.pex = null;
5818
    }
5821
    }
5819
 
5822
 
5820
    /** Returns true if field pex is set (has been asigned a value) and false otherwise */
5823
    /** Returns true if field pex is set (has been assigned a value) and false otherwise */
5821
    public boolean isSetPex() {
5824
    public boolean isSetPex() {
5822
      return this.pex != null;
5825
      return this.pex != null;
5823
    }
5826
    }
5824
 
5827
 
5825
    public void setPexIsSet(boolean value) {
5828
    public void setPexIsSet(boolean value) {
Line 5847... Line 5850...
5847
        break;
5850
        break;
5848
 
5851
 
5849
      }
5852
      }
5850
    }
5853
    }
5851
 
5854
 
5852
    public void setFieldValue(int fieldID, Object value) {
-
 
5853
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
5854
    }
-
 
5855
 
-
 
5856
    public Object getFieldValue(_Fields field) {
5855
    public Object getFieldValue(_Fields field) {
5857
      switch (field) {
5856
      switch (field) {
5858
      case SUCCESS:
5857
      case SUCCESS:
5859
        return new Long(getSuccess());
5858
        return Long.valueOf(getSuccess());
5860
 
5859
 
5861
      case PEX:
5860
      case PEX:
5862
        return getPex();
5861
        return getPex();
5863
 
5862
 
5864
      }
5863
      }
5865
      throw new IllegalStateException();
5864
      throw new IllegalStateException();
5866
    }
5865
    }
5867
 
5866
 
5868
    public Object getFieldValue(int fieldId) {
-
 
5869
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
5870
    }
-
 
5871
 
-
 
5872
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5867
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5873
    public boolean isSet(_Fields field) {
5868
    public boolean isSet(_Fields field) {
-
 
5869
      if (field == null) {
-
 
5870
        throw new IllegalArgumentException();
-
 
5871
      }
-
 
5872
 
5874
      switch (field) {
5873
      switch (field) {
5875
      case SUCCESS:
5874
      case SUCCESS:
5876
        return isSetSuccess();
5875
        return isSetSuccess();
5877
      case PEX:
5876
      case PEX:
5878
        return isSetPex();
5877
        return isSetPex();
5879
      }
5878
      }
5880
      throw new IllegalStateException();
5879
      throw new IllegalStateException();
5881
    }
5880
    }
5882
 
5881
 
5883
    public boolean isSet(int fieldID) {
-
 
5884
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
5885
    }
-
 
5886
 
-
 
5887
    @Override
5882
    @Override
5888
    public boolean equals(Object that) {
5883
    public boolean equals(Object that) {
5889
      if (that == null)
5884
      if (that == null)
5890
        return false;
5885
        return false;
5891
      if (that instanceof getCouponUsageCountByUser_result)
5886
      if (that instanceof getCouponUsageCountByUser_result)
Line 5929... Line 5924...
5929
      }
5924
      }
5930
 
5925
 
5931
      int lastComparison = 0;
5926
      int lastComparison = 0;
5932
      getCouponUsageCountByUser_result typedOther = (getCouponUsageCountByUser_result)other;
5927
      getCouponUsageCountByUser_result typedOther = (getCouponUsageCountByUser_result)other;
5933
 
5928
 
5934
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5929
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5935
      if (lastComparison != 0) {
5930
      if (lastComparison != 0) {
5936
        return lastComparison;
5931
        return lastComparison;
5937
      }
5932
      }
-
 
5933
      if (isSetSuccess()) {
5938
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5934
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5939
      if (lastComparison != 0) {
5935
        if (lastComparison != 0) {
5940
        return lastComparison;
5936
          return lastComparison;
-
 
5937
        }
5941
      }
5938
      }
5942
      lastComparison = Boolean.valueOf(isSetPex()).compareTo(isSetPex());
5939
      lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
5943
      if (lastComparison != 0) {
5940
      if (lastComparison != 0) {
5944
        return lastComparison;
5941
        return lastComparison;
5945
      }
5942
      }
-
 
5943
      if (isSetPex()) {
5946
      lastComparison = TBaseHelper.compareTo(pex, typedOther.pex);
5944
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
5947
      if (lastComparison != 0) {
5945
        if (lastComparison != 0) {
5948
        return lastComparison;
5946
          return lastComparison;
-
 
5947
        }
5949
      }
5948
      }
5950
      return 0;
5949
      return 0;
5951
    }
5950
    }
5952
 
5951
 
-
 
5952
    public _Fields fieldForId(int fieldId) {
-
 
5953
      return _Fields.findByThriftId(fieldId);
-
 
5954
    }
-
 
5955
 
5953
    public void read(TProtocol iprot) throws TException {
5956
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5954
      TField field;
5957
      org.apache.thrift.protocol.TField field;
5955
      iprot.readStructBegin();
5958
      iprot.readStructBegin();
5956
      while (true)
5959
      while (true)
5957
      {
5960
      {
5958
        field = iprot.readFieldBegin();
5961
        field = iprot.readFieldBegin();
5959
        if (field.type == TType.STOP) { 
5962
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5960
          break;
5963
          break;
5961
        }
5964
        }
5962
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
5963
        if (fieldId == null) {
-
 
5964
          TProtocolUtil.skip(iprot, field.type);
-
 
5965
        } else {
-
 
5966
          switch (fieldId) {
5965
        switch (field.id) {
5967
            case SUCCESS:
5966
          case 0: // SUCCESS
5968
              if (field.type == TType.I64) {
5967
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5969
                this.success = iprot.readI64();
5968
              this.success = iprot.readI64();
5970
                setSuccessIsSet(true);
5969
              setSuccessIsSet(true);
5971
              } else { 
5970
            } else { 
5972
                TProtocolUtil.skip(iprot, field.type);
5971
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5973
              }
5972
            }
5974
              break;
5973
            break;
5975
            case PEX:
5974
          case 1: // PEX
5976
              if (field.type == TType.STRUCT) {
5975
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5977
                this.pex = new PromotionException();
5976
              this.pex = new PromotionException();
5978
                this.pex.read(iprot);
5977
              this.pex.read(iprot);
5979
              } else { 
5978
            } else { 
5980
                TProtocolUtil.skip(iprot, field.type);
5979
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5981
              }
5980
            }
5982
              break;
5981
            break;
5983
          }
5982
          default:
5984
          iprot.readFieldEnd();
5983
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5985
        }
5984
        }
-
 
5985
        iprot.readFieldEnd();
5986
      }
5986
      }
5987
      iprot.readStructEnd();
5987
      iprot.readStructEnd();
5988
      validate();
5988
      validate();
5989
    }
5989
    }
5990
 
5990
 
5991
    public void write(TProtocol oprot) throws TException {
5991
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5992
      oprot.writeStructBegin(STRUCT_DESC);
5992
      oprot.writeStructBegin(STRUCT_DESC);
5993
 
5993
 
5994
      if (this.isSetSuccess()) {
5994
      if (this.isSetSuccess()) {
5995
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5995
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5996
        oprot.writeI64(this.success);
5996
        oprot.writeI64(this.success);
Line 6022... Line 6022...
6022
      first = false;
6022
      first = false;
6023
      sb.append(")");
6023
      sb.append(")");
6024
      return sb.toString();
6024
      return sb.toString();
6025
    }
6025
    }
6026
 
6026
 
6027
    public void validate() throws TException {
6027
    public void validate() throws org.apache.thrift.TException {
6028
      // check for required fields
6028
      // check for required fields
6029
    }
6029
    }
6030
 
6030
 
-
 
6031
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
6032
      try {
-
 
6033
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
6034
      } catch (org.apache.thrift.TException te) {
-
 
6035
        throw new java.io.IOException(te);
-
 
6036
      }
-
 
6037
    }
-
 
6038
 
-
 
6039
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
6040
      try {
-
 
6041
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
6042
      } catch (org.apache.thrift.TException te) {
-
 
6043
        throw new java.io.IOException(te);
-
 
6044
      }
-
 
6045
    }
-
 
6046
 
6031
  }
6047
  }
6032
 
6048
 
6033
  public static class getActiveCoupons_args implements TBase<getActiveCoupons_args._Fields>, java.io.Serializable, Cloneable, Comparable<getActiveCoupons_args>   {
6049
  public static class getActiveCoupons_args implements org.apache.thrift.TBase<getActiveCoupons_args, getActiveCoupons_args._Fields>, java.io.Serializable, Cloneable   {
6034
    private static final TStruct STRUCT_DESC = new TStruct("getActiveCoupons_args");
6050
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getActiveCoupons_args");
6035
 
6051
 
6036
 
6052
 
6037
 
6053
 
6038
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6054
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6039
    public enum _Fields implements TFieldIdEnum {
6055
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6040
;
6056
;
6041
 
6057
 
6042
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
6043
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6058
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6044
 
6059
 
6045
      static {
6060
      static {
6046
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6061
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6047
          byId.put((int)field._thriftId, field);
-
 
6048
          byName.put(field.getFieldName(), field);
6062
          byName.put(field.getFieldName(), field);
6049
        }
6063
        }
6050
      }
6064
      }
6051
 
6065
 
6052
      /**
6066
      /**
6053
       * Find the _Fields constant that matches fieldId, or null if its not found.
6067
       * Find the _Fields constant that matches fieldId, or null if its not found.
6054
       */
6068
       */
6055
      public static _Fields findByThriftId(int fieldId) {
6069
      public static _Fields findByThriftId(int fieldId) {
6056
        return byId.get(fieldId);
6070
        switch(fieldId) {
-
 
6071
          default:
-
 
6072
            return null;
-
 
6073
        }
6057
      }
6074
      }
6058
 
6075
 
6059
      /**
6076
      /**
6060
       * Find the _Fields constant that matches fieldId, throwing an exception
6077
       * Find the _Fields constant that matches fieldId, throwing an exception
6061
       * if it is not found.
6078
       * if it is not found.
Line 6087... Line 6104...
6087
 
6104
 
6088
      public String getFieldName() {
6105
      public String getFieldName() {
6089
        return _fieldName;
6106
        return _fieldName;
6090
      }
6107
      }
6091
    }
6108
    }
6092
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6109
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6093
    }});
-
 
6094
 
-
 
6095
    static {
6110
    static {
-
 
6111
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
6112
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6096
      FieldMetaData.addStructMetaDataMap(getActiveCoupons_args.class, metaDataMap);
6113
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getActiveCoupons_args.class, metaDataMap);
6097
    }
6114
    }
6098
 
6115
 
6099
    public getActiveCoupons_args() {
6116
    public getActiveCoupons_args() {
6100
    }
6117
    }
6101
 
6118
 
Line 6107... Line 6124...
6107
 
6124
 
6108
    public getActiveCoupons_args deepCopy() {
6125
    public getActiveCoupons_args deepCopy() {
6109
      return new getActiveCoupons_args(this);
6126
      return new getActiveCoupons_args(this);
6110
    }
6127
    }
6111
 
6128
 
6112
    @Deprecated
6129
    @Override
6113
    public getActiveCoupons_args clone() {
6130
    public void clear() {
6114
      return new getActiveCoupons_args(this);
-
 
6115
    }
6131
    }
6116
 
6132
 
6117
    public void setFieldValue(_Fields field, Object value) {
6133
    public void setFieldValue(_Fields field, Object value) {
6118
      switch (field) {
6134
      switch (field) {
6119
      }
6135
      }
6120
    }
6136
    }
6121
 
6137
 
6122
    public void setFieldValue(int fieldID, Object value) {
-
 
6123
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
6124
    }
-
 
6125
 
-
 
6126
    public Object getFieldValue(_Fields field) {
6138
    public Object getFieldValue(_Fields field) {
6127
      switch (field) {
6139
      switch (field) {
6128
      }
6140
      }
6129
      throw new IllegalStateException();
6141
      throw new IllegalStateException();
6130
    }
6142
    }
6131
 
6143
 
6132
    public Object getFieldValue(int fieldId) {
-
 
6133
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
6134
    }
-
 
6135
 
-
 
6136
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6144
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6137
    public boolean isSet(_Fields field) {
6145
    public boolean isSet(_Fields field) {
-
 
6146
      if (field == null) {
-
 
6147
        throw new IllegalArgumentException();
-
 
6148
      }
-
 
6149
 
6138
      switch (field) {
6150
      switch (field) {
6139
      }
6151
      }
6140
      throw new IllegalStateException();
6152
      throw new IllegalStateException();
6141
    }
6153
    }
6142
 
6154
 
6143
    public boolean isSet(int fieldID) {
-
 
6144
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
6145
    }
-
 
6146
 
-
 
6147
    @Override
6155
    @Override
6148
    public boolean equals(Object that) {
6156
    public boolean equals(Object that) {
6149
      if (that == null)
6157
      if (that == null)
6150
        return false;
6158
        return false;
6151
      if (that instanceof getActiveCoupons_args)
6159
      if (that instanceof getActiveCoupons_args)
Line 6174... Line 6182...
6174
      getActiveCoupons_args typedOther = (getActiveCoupons_args)other;
6182
      getActiveCoupons_args typedOther = (getActiveCoupons_args)other;
6175
 
6183
 
6176
      return 0;
6184
      return 0;
6177
    }
6185
    }
6178
 
6186
 
-
 
6187
    public _Fields fieldForId(int fieldId) {
-
 
6188
      return _Fields.findByThriftId(fieldId);
-
 
6189
    }
-
 
6190
 
6179
    public void read(TProtocol iprot) throws TException {
6191
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6180
      TField field;
6192
      org.apache.thrift.protocol.TField field;
6181
      iprot.readStructBegin();
6193
      iprot.readStructBegin();
6182
      while (true)
6194
      while (true)
6183
      {
6195
      {
6184
        field = iprot.readFieldBegin();
6196
        field = iprot.readFieldBegin();
6185
        if (field.type == TType.STOP) { 
6197
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6186
          break;
6198
          break;
6187
        }
6199
        }
6188
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
6189
        if (fieldId == null) {
-
 
6190
          TProtocolUtil.skip(iprot, field.type);
-
 
6191
        } else {
-
 
6192
          switch (fieldId) {
6200
        switch (field.id) {
6193
          }
6201
          default:
6194
          iprot.readFieldEnd();
6202
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6195
        }
6203
        }
-
 
6204
        iprot.readFieldEnd();
6196
      }
6205
      }
6197
      iprot.readStructEnd();
6206
      iprot.readStructEnd();
6198
      validate();
6207
      validate();
6199
    }
6208
    }
6200
 
6209
 
6201
    public void write(TProtocol oprot) throws TException {
6210
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6202
      validate();
6211
      validate();
6203
 
6212
 
6204
      oprot.writeStructBegin(STRUCT_DESC);
6213
      oprot.writeStructBegin(STRUCT_DESC);
6205
      oprot.writeFieldStop();
6214
      oprot.writeFieldStop();
6206
      oprot.writeStructEnd();
6215
      oprot.writeStructEnd();
Line 6213... Line 6222...
6213
 
6222
 
6214
      sb.append(")");
6223
      sb.append(")");
6215
      return sb.toString();
6224
      return sb.toString();
6216
    }
6225
    }
6217
 
6226
 
6218
    public void validate() throws TException {
6227
    public void validate() throws org.apache.thrift.TException {
6219
      // check for required fields
6228
      // check for required fields
6220
    }
6229
    }
6221
 
6230
 
-
 
6231
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
6232
      try {
-
 
6233
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
6234
      } catch (org.apache.thrift.TException te) {
-
 
6235
        throw new java.io.IOException(te);
-
 
6236
      }
-
 
6237
    }
-
 
6238
 
-
 
6239
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
6240
      try {
-
 
6241
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
6242
      } catch (org.apache.thrift.TException te) {
-
 
6243
        throw new java.io.IOException(te);
-
 
6244
      }
-
 
6245
    }
-
 
6246
 
6222
  }
6247
  }
6223
 
6248
 
6224
  public static class getActiveCoupons_result implements TBase<getActiveCoupons_result._Fields>, java.io.Serializable, Cloneable, Comparable<getActiveCoupons_result>   {
6249
  public static class getActiveCoupons_result implements org.apache.thrift.TBase<getActiveCoupons_result, getActiveCoupons_result._Fields>, java.io.Serializable, Cloneable   {
6225
    private static final TStruct STRUCT_DESC = new TStruct("getActiveCoupons_result");
6250
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getActiveCoupons_result");
6226
 
6251
 
6227
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
6252
    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);
6228
    private static final TField PEX_FIELD_DESC = new TField("pex", TType.STRUCT, (short)1);
6253
    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);
6229
 
6254
 
6230
    private List<Coupon> success;
6255
    private List<Coupon> success; // required
6231
    private PromotionException pex;
6256
    private PromotionException pex; // required
6232
 
6257
 
6233
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6258
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6234
    public enum _Fields implements TFieldIdEnum {
6259
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6235
      SUCCESS((short)0, "success"),
6260
      SUCCESS((short)0, "success"),
6236
      PEX((short)1, "pex");
6261
      PEX((short)1, "pex");
6237
 
6262
 
6238
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
6239
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6263
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6240
 
6264
 
6241
      static {
6265
      static {
6242
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6266
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6243
          byId.put((int)field._thriftId, field);
-
 
6244
          byName.put(field.getFieldName(), field);
6267
          byName.put(field.getFieldName(), field);
6245
        }
6268
        }
6246
      }
6269
      }
6247
 
6270
 
6248
      /**
6271
      /**
6249
       * Find the _Fields constant that matches fieldId, or null if its not found.
6272
       * Find the _Fields constant that matches fieldId, or null if its not found.
6250
       */
6273
       */
6251
      public static _Fields findByThriftId(int fieldId) {
6274
      public static _Fields findByThriftId(int fieldId) {
6252
        return byId.get(fieldId);
6275
        switch(fieldId) {
-
 
6276
          case 0: // SUCCESS
-
 
6277
            return SUCCESS;
-
 
6278
          case 1: // PEX
-
 
6279
            return PEX;
-
 
6280
          default:
-
 
6281
            return null;
-
 
6282
        }
6253
      }
6283
      }
6254
 
6284
 
6255
      /**
6285
      /**
6256
       * Find the _Fields constant that matches fieldId, throwing an exception
6286
       * Find the _Fields constant that matches fieldId, throwing an exception
6257
       * if it is not found.
6287
       * if it is not found.
Line 6286... Line 6316...
6286
      }
6316
      }
6287
    }
6317
    }
6288
 
6318
 
6289
    // isset id assignments
6319
    // isset id assignments
6290
 
6320
 
6291
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6321
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6292
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
6293
          new ListMetaData(TType.LIST, 
-
 
6294
              new StructMetaData(TType.STRUCT, Coupon.class))));
-
 
6295
      put(_Fields.PEX, new FieldMetaData("pex", TFieldRequirementType.DEFAULT, 
-
 
6296
          new FieldValueMetaData(TType.STRUCT)));
-
 
6297
    }});
-
 
6298
 
-
 
6299
    static {
6322
    static {
-
 
6323
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
6324
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
6325
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
-
 
6326
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Coupon.class))));
-
 
6327
      tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
6328
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
6329
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6300
      FieldMetaData.addStructMetaDataMap(getActiveCoupons_result.class, metaDataMap);
6330
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getActiveCoupons_result.class, metaDataMap);
6301
    }
6331
    }
6302
 
6332
 
6303
    public getActiveCoupons_result() {
6333
    public getActiveCoupons_result() {
6304
    }
6334
    }
6305
 
6335
 
Line 6330... Line 6360...
6330
 
6360
 
6331
    public getActiveCoupons_result deepCopy() {
6361
    public getActiveCoupons_result deepCopy() {
6332
      return new getActiveCoupons_result(this);
6362
      return new getActiveCoupons_result(this);
6333
    }
6363
    }
6334
 
6364
 
6335
    @Deprecated
6365
    @Override
6336
    public getActiveCoupons_result clone() {
6366
    public void clear() {
6337
      return new getActiveCoupons_result(this);
6367
      this.success = null;
-
 
6368
      this.pex = null;
6338
    }
6369
    }
6339
 
6370
 
6340
    public int getSuccessSize() {
6371
    public int getSuccessSize() {
6341
      return (this.success == null) ? 0 : this.success.size();
6372
      return (this.success == null) ? 0 : this.success.size();
6342
    }
6373
    }
Line 6354... Line 6385...
6354
 
6385
 
6355
    public List<Coupon> getSuccess() {
6386
    public List<Coupon> getSuccess() {
6356
      return this.success;
6387
      return this.success;
6357
    }
6388
    }
6358
 
6389
 
6359
    public getActiveCoupons_result setSuccess(List<Coupon> success) {
6390
    public void setSuccess(List<Coupon> success) {
6360
      this.success = success;
6391
      this.success = success;
6361
      return this;
-
 
6362
    }
6392
    }
6363
 
6393
 
6364
    public void unsetSuccess() {
6394
    public void unsetSuccess() {
6365
      this.success = null;
6395
      this.success = null;
6366
    }
6396
    }
6367
 
6397
 
6368
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6398
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
6369
    public boolean isSetSuccess() {
6399
    public boolean isSetSuccess() {
6370
      return this.success != null;
6400
      return this.success != null;
6371
    }
6401
    }
6372
 
6402
 
6373
    public void setSuccessIsSet(boolean value) {
6403
    public void setSuccessIsSet(boolean value) {
Line 6378... Line 6408...
6378
 
6408
 
6379
    public PromotionException getPex() {
6409
    public PromotionException getPex() {
6380
      return this.pex;
6410
      return this.pex;
6381
    }
6411
    }
6382
 
6412
 
6383
    public getActiveCoupons_result setPex(PromotionException pex) {
6413
    public void setPex(PromotionException pex) {
6384
      this.pex = pex;
6414
      this.pex = pex;
6385
      return this;
-
 
6386
    }
6415
    }
6387
 
6416
 
6388
    public void unsetPex() {
6417
    public void unsetPex() {
6389
      this.pex = null;
6418
      this.pex = null;
6390
    }
6419
    }
6391
 
6420
 
6392
    /** Returns true if field pex is set (has been asigned a value) and false otherwise */
6421
    /** Returns true if field pex is set (has been assigned a value) and false otherwise */
6393
    public boolean isSetPex() {
6422
    public boolean isSetPex() {
6394
      return this.pex != null;
6423
      return this.pex != null;
6395
    }
6424
    }
6396
 
6425
 
6397
    public void setPexIsSet(boolean value) {
6426
    public void setPexIsSet(boolean value) {
Line 6419... Line 6448...
6419
        break;
6448
        break;
6420
 
6449
 
6421
      }
6450
      }
6422
    }
6451
    }
6423
 
6452
 
6424
    public void setFieldValue(int fieldID, Object value) {
-
 
6425
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
6426
    }
-
 
6427
 
-
 
6428
    public Object getFieldValue(_Fields field) {
6453
    public Object getFieldValue(_Fields field) {
6429
      switch (field) {
6454
      switch (field) {
6430
      case SUCCESS:
6455
      case SUCCESS:
6431
        return getSuccess();
6456
        return getSuccess();
6432
 
6457
 
Line 6435... Line 6460...
6435
 
6460
 
6436
      }
6461
      }
6437
      throw new IllegalStateException();
6462
      throw new IllegalStateException();
6438
    }
6463
    }
6439
 
6464
 
6440
    public Object getFieldValue(int fieldId) {
-
 
6441
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
6442
    }
-
 
6443
 
-
 
6444
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6465
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6445
    public boolean isSet(_Fields field) {
6466
    public boolean isSet(_Fields field) {
-
 
6467
      if (field == null) {
-
 
6468
        throw new IllegalArgumentException();
-
 
6469
      }
-
 
6470
 
6446
      switch (field) {
6471
      switch (field) {
6447
      case SUCCESS:
6472
      case SUCCESS:
6448
        return isSetSuccess();
6473
        return isSetSuccess();
6449
      case PEX:
6474
      case PEX:
6450
        return isSetPex();
6475
        return isSetPex();
6451
      }
6476
      }
6452
      throw new IllegalStateException();
6477
      throw new IllegalStateException();
6453
    }
6478
    }
6454
 
6479
 
6455
    public boolean isSet(int fieldID) {
-
 
6456
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
6457
    }
-
 
6458
 
-
 
6459
    @Override
6480
    @Override
6460
    public boolean equals(Object that) {
6481
    public boolean equals(Object that) {
6461
      if (that == null)
6482
      if (that == null)
6462
        return false;
6483
        return false;
6463
      if (that instanceof getActiveCoupons_result)
6484
      if (that instanceof getActiveCoupons_result)
Line 6501... Line 6522...
6501
      }
6522
      }
6502
 
6523
 
6503
      int lastComparison = 0;
6524
      int lastComparison = 0;
6504
      getActiveCoupons_result typedOther = (getActiveCoupons_result)other;
6525
      getActiveCoupons_result typedOther = (getActiveCoupons_result)other;
6505
 
6526
 
6506
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6527
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6507
      if (lastComparison != 0) {
6528
      if (lastComparison != 0) {
6508
        return lastComparison;
6529
        return lastComparison;
6509
      }
6530
      }
-
 
6531
      if (isSetSuccess()) {
6510
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6532
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6511
      if (lastComparison != 0) {
6533
        if (lastComparison != 0) {
6512
        return lastComparison;
6534
          return lastComparison;
-
 
6535
        }
6513
      }
6536
      }
6514
      lastComparison = Boolean.valueOf(isSetPex()).compareTo(isSetPex());
6537
      lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
6515
      if (lastComparison != 0) {
6538
      if (lastComparison != 0) {
6516
        return lastComparison;
6539
        return lastComparison;
6517
      }
6540
      }
-
 
6541
      if (isSetPex()) {
6518
      lastComparison = TBaseHelper.compareTo(pex, typedOther.pex);
6542
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
6519
      if (lastComparison != 0) {
6543
        if (lastComparison != 0) {
6520
        return lastComparison;
6544
          return lastComparison;
-
 
6545
        }
6521
      }
6546
      }
6522
      return 0;
6547
      return 0;
6523
    }
6548
    }
6524
 
6549
 
-
 
6550
    public _Fields fieldForId(int fieldId) {
-
 
6551
      return _Fields.findByThriftId(fieldId);
-
 
6552
    }
-
 
6553
 
6525
    public void read(TProtocol iprot) throws TException {
6554
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6526
      TField field;
6555
      org.apache.thrift.protocol.TField field;
6527
      iprot.readStructBegin();
6556
      iprot.readStructBegin();
6528
      while (true)
6557
      while (true)
6529
      {
6558
      {
6530
        field = iprot.readFieldBegin();
6559
        field = iprot.readFieldBegin();
6531
        if (field.type == TType.STOP) { 
6560
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6532
          break;
6561
          break;
6533
        }
6562
        }
6534
        _Fields fieldId = _Fields.findByThriftId(field.id);
6563
        switch (field.id) {
6535
        if (fieldId == null) {
6564
          case 0: // SUCCESS
6536
          TProtocolUtil.skip(iprot, field.type);
6565
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
6537
        } else {
6566
              {
6538
          switch (fieldId) {
6567
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
6539
            case SUCCESS:
6568
                this.success = new ArrayList<Coupon>(_list16.size);
6540
              if (field.type == TType.LIST) {
6569
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
6541
                {
6570
                {
6542
                  TList _list16 = iprot.readListBegin();
-
 
6543
                  this.success = new ArrayList<Coupon>(_list16.size);
-
 
6544
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
-
 
6545
                  {
-
 
6546
                    Coupon _elem18;
6571
                  Coupon _elem18; // required
6547
                    _elem18 = new Coupon();
6572
                  _elem18 = new Coupon();
6548
                    _elem18.read(iprot);
6573
                  _elem18.read(iprot);
6549
                    this.success.add(_elem18);
6574
                  this.success.add(_elem18);
6550
                  }
-
 
6551
                  iprot.readListEnd();
-
 
6552
                }
6575
                }
6553
              } else { 
-
 
6554
                TProtocolUtil.skip(iprot, field.type);
-
 
6555
              }
-
 
6556
              break;
-
 
6557
            case PEX:
-
 
6558
              if (field.type == TType.STRUCT) {
-
 
6559
                this.pex = new PromotionException();
-
 
6560
                this.pex.read(iprot);
6576
                iprot.readListEnd();
6561
              } else { 
-
 
6562
                TProtocolUtil.skip(iprot, field.type);
-
 
6563
              }
6577
              }
-
 
6578
            } else { 
-
 
6579
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
6580
            }
6564
              break;
6581
            break;
-
 
6582
          case 1: // PEX
-
 
6583
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
6584
              this.pex = new PromotionException();
-
 
6585
              this.pex.read(iprot);
-
 
6586
            } else { 
-
 
6587
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6565
          }
6588
            }
6566
          iprot.readFieldEnd();
6589
            break;
-
 
6590
          default:
-
 
6591
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6567
        }
6592
        }
-
 
6593
        iprot.readFieldEnd();
6568
      }
6594
      }
6569
      iprot.readStructEnd();
6595
      iprot.readStructEnd();
6570
      validate();
6596
      validate();
6571
    }
6597
    }
6572
 
6598
 
6573
    public void write(TProtocol oprot) throws TException {
6599
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6574
      oprot.writeStructBegin(STRUCT_DESC);
6600
      oprot.writeStructBegin(STRUCT_DESC);
6575
 
6601
 
6576
      if (this.isSetSuccess()) {
6602
      if (this.isSetSuccess()) {
6577
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6603
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6578
        {
6604
        {
6579
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
6605
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6580
          for (Coupon _iter19 : this.success)
6606
          for (Coupon _iter19 : this.success)
6581
          {
6607
          {
6582
            _iter19.write(oprot);
6608
            _iter19.write(oprot);
6583
          }
6609
          }
6584
          oprot.writeListEnd();
6610
          oprot.writeListEnd();
Line 6615... Line 6641...
6615
      first = false;
6641
      first = false;
6616
      sb.append(")");
6642
      sb.append(")");
6617
      return sb.toString();
6643
      return sb.toString();
6618
    }
6644
    }
6619
 
6645
 
6620
    public void validate() throws TException {
6646
    public void validate() throws org.apache.thrift.TException {
6621
      // check for required fields
6647
      // check for required fields
6622
    }
6648
    }
6623
 
6649
 
-
 
6650
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
6651
      try {
-
 
6652
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
6653
      } catch (org.apache.thrift.TException te) {
-
 
6654
        throw new java.io.IOException(te);
-
 
6655
      }
-
 
6656
    }
-
 
6657
 
-
 
6658
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
6659
      try {
-
 
6660
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
6661
      } catch (org.apache.thrift.TException te) {
-
 
6662
        throw new java.io.IOException(te);
-
 
6663
      }
-
 
6664
    }
-
 
6665
 
6624
  }
6666
  }
6625
 
6667
 
6626
  public static class getSuccessfulPaymentCountForCoupon_args implements TBase<getSuccessfulPaymentCountForCoupon_args._Fields>, java.io.Serializable, Cloneable, Comparable<getSuccessfulPaymentCountForCoupon_args>   {
6668
  public static class getSuccessfulPaymentCountForCoupon_args implements org.apache.thrift.TBase<getSuccessfulPaymentCountForCoupon_args, getSuccessfulPaymentCountForCoupon_args._Fields>, java.io.Serializable, Cloneable   {
6627
    private static final TStruct STRUCT_DESC = new TStruct("getSuccessfulPaymentCountForCoupon_args");
6669
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuccessfulPaymentCountForCoupon_args");
6628
 
6670
 
6629
    private static final TField COUPON_CODE_FIELD_DESC = new TField("couponCode", TType.STRING, (short)1);
6671
    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);
6630
 
6672
 
6631
    private String couponCode;
6673
    private String couponCode; // required
6632
 
6674
 
6633
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6675
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6634
    public enum _Fields implements TFieldIdEnum {
6676
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6635
      COUPON_CODE((short)1, "couponCode");
6677
      COUPON_CODE((short)1, "couponCode");
6636
 
6678
 
6637
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
6638
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6679
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6639
 
6680
 
6640
      static {
6681
      static {
6641
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6682
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6642
          byId.put((int)field._thriftId, field);
-
 
6643
          byName.put(field.getFieldName(), field);
6683
          byName.put(field.getFieldName(), field);
6644
        }
6684
        }
6645
      }
6685
      }
6646
 
6686
 
6647
      /**
6687
      /**
6648
       * Find the _Fields constant that matches fieldId, or null if its not found.
6688
       * Find the _Fields constant that matches fieldId, or null if its not found.
6649
       */
6689
       */
6650
      public static _Fields findByThriftId(int fieldId) {
6690
      public static _Fields findByThriftId(int fieldId) {
6651
        return byId.get(fieldId);
6691
        switch(fieldId) {
-
 
6692
          case 1: // COUPON_CODE
-
 
6693
            return COUPON_CODE;
-
 
6694
          default:
-
 
6695
            return null;
-
 
6696
        }
6652
      }
6697
      }
6653
 
6698
 
6654
      /**
6699
      /**
6655
       * Find the _Fields constant that matches fieldId, throwing an exception
6700
       * Find the _Fields constant that matches fieldId, throwing an exception
6656
       * if it is not found.
6701
       * if it is not found.
Line 6685... Line 6730...
6685
      }
6730
      }
6686
    }
6731
    }
6687
 
6732
 
6688
    // isset id assignments
6733
    // isset id assignments
6689
 
6734
 
6690
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6735
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6691
      put(_Fields.COUPON_CODE, new FieldMetaData("couponCode", TFieldRequirementType.DEFAULT, 
-
 
6692
          new FieldValueMetaData(TType.STRING)));
-
 
6693
    }});
-
 
6694
 
-
 
6695
    static {
6736
    static {
-
 
6737
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
6738
      tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
6739
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
6740
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6696
      FieldMetaData.addStructMetaDataMap(getSuccessfulPaymentCountForCoupon_args.class, metaDataMap);
6741
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuccessfulPaymentCountForCoupon_args.class, metaDataMap);
6697
    }
6742
    }
6698
 
6743
 
6699
    public getSuccessfulPaymentCountForCoupon_args() {
6744
    public getSuccessfulPaymentCountForCoupon_args() {
6700
    }
6745
    }
6701
 
6746
 
Line 6717... Line 6762...
6717
 
6762
 
6718
    public getSuccessfulPaymentCountForCoupon_args deepCopy() {
6763
    public getSuccessfulPaymentCountForCoupon_args deepCopy() {
6719
      return new getSuccessfulPaymentCountForCoupon_args(this);
6764
      return new getSuccessfulPaymentCountForCoupon_args(this);
6720
    }
6765
    }
6721
 
6766
 
6722
    @Deprecated
6767
    @Override
6723
    public getSuccessfulPaymentCountForCoupon_args clone() {
6768
    public void clear() {
6724
      return new getSuccessfulPaymentCountForCoupon_args(this);
6769
      this.couponCode = null;
6725
    }
6770
    }
6726
 
6771
 
6727
    public String getCouponCode() {
6772
    public String getCouponCode() {
6728
      return this.couponCode;
6773
      return this.couponCode;
6729
    }
6774
    }
6730
 
6775
 
6731
    public getSuccessfulPaymentCountForCoupon_args setCouponCode(String couponCode) {
6776
    public void setCouponCode(String couponCode) {
6732
      this.couponCode = couponCode;
6777
      this.couponCode = couponCode;
6733
      return this;
-
 
6734
    }
6778
    }
6735
 
6779
 
6736
    public void unsetCouponCode() {
6780
    public void unsetCouponCode() {
6737
      this.couponCode = null;
6781
      this.couponCode = null;
6738
    }
6782
    }
6739
 
6783
 
6740
    /** Returns true if field couponCode is set (has been asigned a value) and false otherwise */
6784
    /** Returns true if field couponCode is set (has been assigned a value) and false otherwise */
6741
    public boolean isSetCouponCode() {
6785
    public boolean isSetCouponCode() {
6742
      return this.couponCode != null;
6786
      return this.couponCode != null;
6743
    }
6787
    }
6744
 
6788
 
6745
    public void setCouponCodeIsSet(boolean value) {
6789
    public void setCouponCodeIsSet(boolean value) {
Line 6759... Line 6803...
6759
        break;
6803
        break;
6760
 
6804
 
6761
      }
6805
      }
6762
    }
6806
    }
6763
 
6807
 
6764
    public void setFieldValue(int fieldID, Object value) {
-
 
6765
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
6766
    }
-
 
6767
 
-
 
6768
    public Object getFieldValue(_Fields field) {
6808
    public Object getFieldValue(_Fields field) {
6769
      switch (field) {
6809
      switch (field) {
6770
      case COUPON_CODE:
6810
      case COUPON_CODE:
6771
        return getCouponCode();
6811
        return getCouponCode();
6772
 
6812
 
6773
      }
6813
      }
6774
      throw new IllegalStateException();
6814
      throw new IllegalStateException();
6775
    }
6815
    }
6776
 
6816
 
6777
    public Object getFieldValue(int fieldId) {
-
 
6778
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
6779
    }
-
 
6780
 
-
 
6781
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6817
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6782
    public boolean isSet(_Fields field) {
6818
    public boolean isSet(_Fields field) {
-
 
6819
      if (field == null) {
-
 
6820
        throw new IllegalArgumentException();
-
 
6821
      }
-
 
6822
 
6783
      switch (field) {
6823
      switch (field) {
6784
      case COUPON_CODE:
6824
      case COUPON_CODE:
6785
        return isSetCouponCode();
6825
        return isSetCouponCode();
6786
      }
6826
      }
6787
      throw new IllegalStateException();
6827
      throw new IllegalStateException();
6788
    }
6828
    }
6789
 
6829
 
6790
    public boolean isSet(int fieldID) {
-
 
6791
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
6792
    }
-
 
6793
 
-
 
6794
    @Override
6830
    @Override
6795
    public boolean equals(Object that) {
6831
    public boolean equals(Object that) {
6796
      if (that == null)
6832
      if (that == null)
6797
        return false;
6833
        return false;
6798
      if (that instanceof getSuccessfulPaymentCountForCoupon_args)
6834
      if (that instanceof getSuccessfulPaymentCountForCoupon_args)
Line 6827... Line 6863...
6827
      }
6863
      }
6828
 
6864
 
6829
      int lastComparison = 0;
6865
      int lastComparison = 0;
6830
      getSuccessfulPaymentCountForCoupon_args typedOther = (getSuccessfulPaymentCountForCoupon_args)other;
6866
      getSuccessfulPaymentCountForCoupon_args typedOther = (getSuccessfulPaymentCountForCoupon_args)other;
6831
 
6867
 
6832
      lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(isSetCouponCode());
6868
      lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
6833
      if (lastComparison != 0) {
6869
      if (lastComparison != 0) {
6834
        return lastComparison;
6870
        return lastComparison;
6835
      }
6871
      }
-
 
6872
      if (isSetCouponCode()) {
6836
      lastComparison = TBaseHelper.compareTo(couponCode, typedOther.couponCode);
6873
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);
6837
      if (lastComparison != 0) {
6874
        if (lastComparison != 0) {
6838
        return lastComparison;
6875
          return lastComparison;
-
 
6876
        }
6839
      }
6877
      }
6840
      return 0;
6878
      return 0;
6841
    }
6879
    }
6842
 
6880
 
-
 
6881
    public _Fields fieldForId(int fieldId) {
-
 
6882
      return _Fields.findByThriftId(fieldId);
-
 
6883
    }
-
 
6884
 
6843
    public void read(TProtocol iprot) throws TException {
6885
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6844
      TField field;
6886
      org.apache.thrift.protocol.TField field;
6845
      iprot.readStructBegin();
6887
      iprot.readStructBegin();
6846
      while (true)
6888
      while (true)
6847
      {
6889
      {
6848
        field = iprot.readFieldBegin();
6890
        field = iprot.readFieldBegin();
6849
        if (field.type == TType.STOP) { 
6891
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6850
          break;
6892
          break;
6851
        }
6893
        }
6852
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
6853
        if (fieldId == null) {
-
 
6854
          TProtocolUtil.skip(iprot, field.type);
-
 
6855
        } else {
-
 
6856
          switch (fieldId) {
6894
        switch (field.id) {
6857
            case COUPON_CODE:
6895
          case 1: // COUPON_CODE
6858
              if (field.type == TType.STRING) {
6896
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
6859
                this.couponCode = iprot.readString();
6897
              this.couponCode = iprot.readString();
6860
              } else { 
6898
            } else { 
6861
                TProtocolUtil.skip(iprot, field.type);
6899
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6862
              }
6900
            }
6863
              break;
6901
            break;
6864
          }
6902
          default:
6865
          iprot.readFieldEnd();
6903
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6866
        }
6904
        }
-
 
6905
        iprot.readFieldEnd();
6867
      }
6906
      }
6868
      iprot.readStructEnd();
6907
      iprot.readStructEnd();
6869
      validate();
6908
      validate();
6870
    }
6909
    }
6871
 
6910
 
6872
    public void write(TProtocol oprot) throws TException {
6911
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6873
      validate();
6912
      validate();
6874
 
6913
 
6875
      oprot.writeStructBegin(STRUCT_DESC);
6914
      oprot.writeStructBegin(STRUCT_DESC);
6876
      if (this.couponCode != null) {
6915
      if (this.couponCode != null) {
6877
        oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
6916
        oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
Line 6896... Line 6935...
6896
      first = false;
6935
      first = false;
6897
      sb.append(")");
6936
      sb.append(")");
6898
      return sb.toString();
6937
      return sb.toString();
6899
    }
6938
    }
6900
 
6939
 
6901
    public void validate() throws TException {
6940
    public void validate() throws org.apache.thrift.TException {
6902
      // check for required fields
6941
      // check for required fields
6903
    }
6942
    }
6904
 
6943
 
-
 
6944
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
6945
      try {
-
 
6946
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
6947
      } catch (org.apache.thrift.TException te) {
-
 
6948
        throw new java.io.IOException(te);
-
 
6949
      }
-
 
6950
    }
-
 
6951
 
-
 
6952
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
6953
      try {
-
 
6954
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
6955
      } catch (org.apache.thrift.TException te) {
-
 
6956
        throw new java.io.IOException(te);
-
 
6957
      }
-
 
6958
    }
-
 
6959
 
6905
  }
6960
  }
6906
 
6961
 
6907
  public static class getSuccessfulPaymentCountForCoupon_result implements TBase<getSuccessfulPaymentCountForCoupon_result._Fields>, java.io.Serializable, Cloneable, Comparable<getSuccessfulPaymentCountForCoupon_result>   {
6962
  public static class getSuccessfulPaymentCountForCoupon_result implements org.apache.thrift.TBase<getSuccessfulPaymentCountForCoupon_result, getSuccessfulPaymentCountForCoupon_result._Fields>, java.io.Serializable, Cloneable   {
6908
    private static final TStruct STRUCT_DESC = new TStruct("getSuccessfulPaymentCountForCoupon_result");
6963
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuccessfulPaymentCountForCoupon_result");
6909
 
6964
 
6910
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
6965
    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);
6911
    private static final TField PEX_FIELD_DESC = new TField("pex", TType.STRUCT, (short)1);
6966
    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);
6912
 
6967
 
6913
    private long success;
6968
    private long success; // required
6914
    private PromotionException pex;
6969
    private PromotionException pex; // required
6915
 
6970
 
6916
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6971
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6917
    public enum _Fields implements TFieldIdEnum {
6972
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6918
      SUCCESS((short)0, "success"),
6973
      SUCCESS((short)0, "success"),
6919
      PEX((short)1, "pex");
6974
      PEX((short)1, "pex");
6920
 
6975
 
6921
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
6922
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6976
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6923
 
6977
 
6924
      static {
6978
      static {
6925
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6979
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6926
          byId.put((int)field._thriftId, field);
-
 
6927
          byName.put(field.getFieldName(), field);
6980
          byName.put(field.getFieldName(), field);
6928
        }
6981
        }
6929
      }
6982
      }
6930
 
6983
 
6931
      /**
6984
      /**
6932
       * Find the _Fields constant that matches fieldId, or null if its not found.
6985
       * Find the _Fields constant that matches fieldId, or null if its not found.
6933
       */
6986
       */
6934
      public static _Fields findByThriftId(int fieldId) {
6987
      public static _Fields findByThriftId(int fieldId) {
6935
        return byId.get(fieldId);
6988
        switch(fieldId) {
-
 
6989
          case 0: // SUCCESS
-
 
6990
            return SUCCESS;
-
 
6991
          case 1: // PEX
-
 
6992
            return PEX;
-
 
6993
          default:
-
 
6994
            return null;
-
 
6995
        }
6936
      }
6996
      }
6937
 
6997
 
6938
      /**
6998
      /**
6939
       * Find the _Fields constant that matches fieldId, throwing an exception
6999
       * Find the _Fields constant that matches fieldId, throwing an exception
6940
       * if it is not found.
7000
       * if it is not found.
Line 6971... Line 7031...
6971
 
7031
 
6972
    // isset id assignments
7032
    // isset id assignments
6973
    private static final int __SUCCESS_ISSET_ID = 0;
7033
    private static final int __SUCCESS_ISSET_ID = 0;
6974
    private BitSet __isset_bit_vector = new BitSet(1);
7034
    private BitSet __isset_bit_vector = new BitSet(1);
6975
 
7035
 
6976
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7036
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6977
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
6978
          new FieldValueMetaData(TType.I64)));
-
 
6979
      put(_Fields.PEX, new FieldMetaData("pex", TFieldRequirementType.DEFAULT, 
-
 
6980
          new FieldValueMetaData(TType.STRUCT)));
-
 
6981
    }});
-
 
6982
 
-
 
6983
    static {
7037
    static {
-
 
7038
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
7039
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
7040
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
7041
      tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
7042
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
7043
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6984
      FieldMetaData.addStructMetaDataMap(getSuccessfulPaymentCountForCoupon_result.class, metaDataMap);
7044
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuccessfulPaymentCountForCoupon_result.class, metaDataMap);
6985
    }
7045
    }
6986
 
7046
 
6987
    public getSuccessfulPaymentCountForCoupon_result() {
7047
    public getSuccessfulPaymentCountForCoupon_result() {
6988
    }
7048
    }
6989
 
7049
 
Line 7011... Line 7071...
7011
 
7071
 
7012
    public getSuccessfulPaymentCountForCoupon_result deepCopy() {
7072
    public getSuccessfulPaymentCountForCoupon_result deepCopy() {
7013
      return new getSuccessfulPaymentCountForCoupon_result(this);
7073
      return new getSuccessfulPaymentCountForCoupon_result(this);
7014
    }
7074
    }
7015
 
7075
 
7016
    @Deprecated
7076
    @Override
7017
    public getSuccessfulPaymentCountForCoupon_result clone() {
7077
    public void clear() {
7018
      return new getSuccessfulPaymentCountForCoupon_result(this);
7078
      setSuccessIsSet(false);
-
 
7079
      this.success = 0;
-
 
7080
      this.pex = null;
7019
    }
7081
    }
7020
 
7082
 
7021
    public long getSuccess() {
7083
    public long getSuccess() {
7022
      return this.success;
7084
      return this.success;
7023
    }
7085
    }
7024
 
7086
 
7025
    public getSuccessfulPaymentCountForCoupon_result setSuccess(long success) {
7087
    public void setSuccess(long success) {
7026
      this.success = success;
7088
      this.success = success;
7027
      setSuccessIsSet(true);
7089
      setSuccessIsSet(true);
7028
      return this;
-
 
7029
    }
7090
    }
7030
 
7091
 
7031
    public void unsetSuccess() {
7092
    public void unsetSuccess() {
7032
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7093
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7033
    }
7094
    }
7034
 
7095
 
7035
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7096
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7036
    public boolean isSetSuccess() {
7097
    public boolean isSetSuccess() {
7037
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7098
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7038
    }
7099
    }
7039
 
7100
 
7040
    public void setSuccessIsSet(boolean value) {
7101
    public void setSuccessIsSet(boolean value) {
Line 7043... Line 7104...
7043
 
7104
 
7044
    public PromotionException getPex() {
7105
    public PromotionException getPex() {
7045
      return this.pex;
7106
      return this.pex;
7046
    }
7107
    }
7047
 
7108
 
7048
    public getSuccessfulPaymentCountForCoupon_result setPex(PromotionException pex) {
7109
    public void setPex(PromotionException pex) {
7049
      this.pex = pex;
7110
      this.pex = pex;
7050
      return this;
-
 
7051
    }
7111
    }
7052
 
7112
 
7053
    public void unsetPex() {
7113
    public void unsetPex() {
7054
      this.pex = null;
7114
      this.pex = null;
7055
    }
7115
    }
7056
 
7116
 
7057
    /** Returns true if field pex is set (has been asigned a value) and false otherwise */
7117
    /** Returns true if field pex is set (has been assigned a value) and false otherwise */
7058
    public boolean isSetPex() {
7118
    public boolean isSetPex() {
7059
      return this.pex != null;
7119
      return this.pex != null;
7060
    }
7120
    }
7061
 
7121
 
7062
    public void setPexIsSet(boolean value) {
7122
    public void setPexIsSet(boolean value) {
Line 7084... Line 7144...
7084
        break;
7144
        break;
7085
 
7145
 
7086
      }
7146
      }
7087
    }
7147
    }
7088
 
7148
 
7089
    public void setFieldValue(int fieldID, Object value) {
-
 
7090
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
7091
    }
-
 
7092
 
-
 
7093
    public Object getFieldValue(_Fields field) {
7149
    public Object getFieldValue(_Fields field) {
7094
      switch (field) {
7150
      switch (field) {
7095
      case SUCCESS:
7151
      case SUCCESS:
7096
        return new Long(getSuccess());
7152
        return Long.valueOf(getSuccess());
7097
 
7153
 
7098
      case PEX:
7154
      case PEX:
7099
        return getPex();
7155
        return getPex();
7100
 
7156
 
7101
      }
7157
      }
7102
      throw new IllegalStateException();
7158
      throw new IllegalStateException();
7103
    }
7159
    }
7104
 
7160
 
7105
    public Object getFieldValue(int fieldId) {
-
 
7106
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
7107
    }
-
 
7108
 
-
 
7109
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7161
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7110
    public boolean isSet(_Fields field) {
7162
    public boolean isSet(_Fields field) {
-
 
7163
      if (field == null) {
-
 
7164
        throw new IllegalArgumentException();
-
 
7165
      }
-
 
7166
 
7111
      switch (field) {
7167
      switch (field) {
7112
      case SUCCESS:
7168
      case SUCCESS:
7113
        return isSetSuccess();
7169
        return isSetSuccess();
7114
      case PEX:
7170
      case PEX:
7115
        return isSetPex();
7171
        return isSetPex();
7116
      }
7172
      }
7117
      throw new IllegalStateException();
7173
      throw new IllegalStateException();
7118
    }
7174
    }
7119
 
7175
 
7120
    public boolean isSet(int fieldID) {
-
 
7121
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
7122
    }
-
 
7123
 
-
 
7124
    @Override
7176
    @Override
7125
    public boolean equals(Object that) {
7177
    public boolean equals(Object that) {
7126
      if (that == null)
7178
      if (that == null)
7127
        return false;
7179
        return false;
7128
      if (that instanceof getSuccessfulPaymentCountForCoupon_result)
7180
      if (that instanceof getSuccessfulPaymentCountForCoupon_result)
Line 7166... Line 7218...
7166
      }
7218
      }
7167
 
7219
 
7168
      int lastComparison = 0;
7220
      int lastComparison = 0;
7169
      getSuccessfulPaymentCountForCoupon_result typedOther = (getSuccessfulPaymentCountForCoupon_result)other;
7221
      getSuccessfulPaymentCountForCoupon_result typedOther = (getSuccessfulPaymentCountForCoupon_result)other;
7170
 
7222
 
7171
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7223
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7172
      if (lastComparison != 0) {
7224
      if (lastComparison != 0) {
7173
        return lastComparison;
7225
        return lastComparison;
7174
      }
7226
      }
-
 
7227
      if (isSetSuccess()) {
7175
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7228
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7176
      if (lastComparison != 0) {
7229
        if (lastComparison != 0) {
7177
        return lastComparison;
7230
          return lastComparison;
-
 
7231
        }
7178
      }
7232
      }
7179
      lastComparison = Boolean.valueOf(isSetPex()).compareTo(isSetPex());
7233
      lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
7180
      if (lastComparison != 0) {
7234
      if (lastComparison != 0) {
7181
        return lastComparison;
7235
        return lastComparison;
7182
      }
7236
      }
-
 
7237
      if (isSetPex()) {
7183
      lastComparison = TBaseHelper.compareTo(pex, typedOther.pex);
7238
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
7184
      if (lastComparison != 0) {
7239
        if (lastComparison != 0) {
7185
        return lastComparison;
7240
          return lastComparison;
-
 
7241
        }
7186
      }
7242
      }
7187
      return 0;
7243
      return 0;
7188
    }
7244
    }
7189
 
7245
 
-
 
7246
    public _Fields fieldForId(int fieldId) {
-
 
7247
      return _Fields.findByThriftId(fieldId);
-
 
7248
    }
-
 
7249
 
7190
    public void read(TProtocol iprot) throws TException {
7250
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7191
      TField field;
7251
      org.apache.thrift.protocol.TField field;
7192
      iprot.readStructBegin();
7252
      iprot.readStructBegin();
7193
      while (true)
7253
      while (true)
7194
      {
7254
      {
7195
        field = iprot.readFieldBegin();
7255
        field = iprot.readFieldBegin();
7196
        if (field.type == TType.STOP) { 
7256
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7197
          break;
7257
          break;
7198
        }
7258
        }
7199
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
7200
        if (fieldId == null) {
-
 
7201
          TProtocolUtil.skip(iprot, field.type);
-
 
7202
        } else {
-
 
7203
          switch (fieldId) {
7259
        switch (field.id) {
7204
            case SUCCESS:
7260
          case 0: // SUCCESS
7205
              if (field.type == TType.I64) {
7261
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7206
                this.success = iprot.readI64();
7262
              this.success = iprot.readI64();
7207
                setSuccessIsSet(true);
7263
              setSuccessIsSet(true);
7208
              } else { 
7264
            } else { 
7209
                TProtocolUtil.skip(iprot, field.type);
7265
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7210
              }
7266
            }
7211
              break;
7267
            break;
7212
            case PEX:
7268
          case 1: // PEX
7213
              if (field.type == TType.STRUCT) {
7269
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7214
                this.pex = new PromotionException();
7270
              this.pex = new PromotionException();
7215
                this.pex.read(iprot);
7271
              this.pex.read(iprot);
7216
              } else { 
7272
            } else { 
7217
                TProtocolUtil.skip(iprot, field.type);
7273
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7218
              }
7274
            }
7219
              break;
7275
            break;
7220
          }
7276
          default:
7221
          iprot.readFieldEnd();
7277
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7222
        }
7278
        }
-
 
7279
        iprot.readFieldEnd();
7223
      }
7280
      }
7224
      iprot.readStructEnd();
7281
      iprot.readStructEnd();
7225
      validate();
7282
      validate();
7226
    }
7283
    }
7227
 
7284
 
7228
    public void write(TProtocol oprot) throws TException {
7285
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7229
      oprot.writeStructBegin(STRUCT_DESC);
7286
      oprot.writeStructBegin(STRUCT_DESC);
7230
 
7287
 
7231
      if (this.isSetSuccess()) {
7288
      if (this.isSetSuccess()) {
7232
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7289
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7233
        oprot.writeI64(this.success);
7290
        oprot.writeI64(this.success);
Line 7259... Line 7316...
7259
      first = false;
7316
      first = false;
7260
      sb.append(")");
7317
      sb.append(")");
7261
      return sb.toString();
7318
      return sb.toString();
7262
    }
7319
    }
7263
 
7320
 
7264
    public void validate() throws TException {
7321
    public void validate() throws org.apache.thrift.TException {
7265
      // check for required fields
7322
      // check for required fields
7266
    }
7323
    }
7267
 
7324
 
-
 
7325
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
7326
      try {
-
 
7327
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
7328
      } catch (org.apache.thrift.TException te) {
-
 
7329
        throw new java.io.IOException(te);
-
 
7330
      }
-
 
7331
    }
-
 
7332
 
-
 
7333
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
7334
      try {
-
 
7335
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
7336
      } catch (org.apache.thrift.TException te) {
-
 
7337
        throw new java.io.IOException(te);
-
 
7338
      }
-
 
7339
    }
-
 
7340
 
7268
  }
7341
  }
7269
 
7342
 
7270
  public static class getRuleDocString_args implements TBase<getRuleDocString_args._Fields>, java.io.Serializable, Cloneable, Comparable<getRuleDocString_args>   {
7343
  public static class getRuleDocString_args implements org.apache.thrift.TBase<getRuleDocString_args, getRuleDocString_args._Fields>, java.io.Serializable, Cloneable   {
7271
    private static final TStruct STRUCT_DESC = new TStruct("getRuleDocString_args");
7344
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRuleDocString_args");
7272
 
7345
 
7273
    private static final TField RULE_NAME_FIELD_DESC = new TField("ruleName", TType.STRING, (short)1);
7346
    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);
7274
 
7347
 
7275
    private String ruleName;
7348
    private String ruleName; // required
7276
 
7349
 
7277
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7350
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7278
    public enum _Fields implements TFieldIdEnum {
7351
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7279
      RULE_NAME((short)1, "ruleName");
7352
      RULE_NAME((short)1, "ruleName");
7280
 
7353
 
7281
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
7282
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7354
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7283
 
7355
 
7284
      static {
7356
      static {
7285
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7357
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7286
          byId.put((int)field._thriftId, field);
-
 
7287
          byName.put(field.getFieldName(), field);
7358
          byName.put(field.getFieldName(), field);
7288
        }
7359
        }
7289
      }
7360
      }
7290
 
7361
 
7291
      /**
7362
      /**
7292
       * Find the _Fields constant that matches fieldId, or null if its not found.
7363
       * Find the _Fields constant that matches fieldId, or null if its not found.
7293
       */
7364
       */
7294
      public static _Fields findByThriftId(int fieldId) {
7365
      public static _Fields findByThriftId(int fieldId) {
7295
        return byId.get(fieldId);
7366
        switch(fieldId) {
-
 
7367
          case 1: // RULE_NAME
-
 
7368
            return RULE_NAME;
-
 
7369
          default:
-
 
7370
            return null;
-
 
7371
        }
7296
      }
7372
      }
7297
 
7373
 
7298
      /**
7374
      /**
7299
       * Find the _Fields constant that matches fieldId, throwing an exception
7375
       * Find the _Fields constant that matches fieldId, throwing an exception
7300
       * if it is not found.
7376
       * if it is not found.
Line 7329... Line 7405...
7329
      }
7405
      }
7330
    }
7406
    }
7331
 
7407
 
7332
    // isset id assignments
7408
    // isset id assignments
7333
 
7409
 
7334
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7410
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7335
      put(_Fields.RULE_NAME, new FieldMetaData("ruleName", TFieldRequirementType.DEFAULT, 
-
 
7336
          new FieldValueMetaData(TType.STRING)));
-
 
7337
    }});
-
 
7338
 
-
 
7339
    static {
7411
    static {
-
 
7412
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
7413
      tmpMap.put(_Fields.RULE_NAME, new org.apache.thrift.meta_data.FieldMetaData("ruleName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
7414
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
7415
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7340
      FieldMetaData.addStructMetaDataMap(getRuleDocString_args.class, metaDataMap);
7416
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRuleDocString_args.class, metaDataMap);
7341
    }
7417
    }
7342
 
7418
 
7343
    public getRuleDocString_args() {
7419
    public getRuleDocString_args() {
7344
    }
7420
    }
7345
 
7421
 
Line 7361... Line 7437...
7361
 
7437
 
7362
    public getRuleDocString_args deepCopy() {
7438
    public getRuleDocString_args deepCopy() {
7363
      return new getRuleDocString_args(this);
7439
      return new getRuleDocString_args(this);
7364
    }
7440
    }
7365
 
7441
 
7366
    @Deprecated
7442
    @Override
7367
    public getRuleDocString_args clone() {
7443
    public void clear() {
7368
      return new getRuleDocString_args(this);
7444
      this.ruleName = null;
7369
    }
7445
    }
7370
 
7446
 
7371
    public String getRuleName() {
7447
    public String getRuleName() {
7372
      return this.ruleName;
7448
      return this.ruleName;
7373
    }
7449
    }
7374
 
7450
 
7375
    public getRuleDocString_args setRuleName(String ruleName) {
7451
    public void setRuleName(String ruleName) {
7376
      this.ruleName = ruleName;
7452
      this.ruleName = ruleName;
7377
      return this;
-
 
7378
    }
7453
    }
7379
 
7454
 
7380
    public void unsetRuleName() {
7455
    public void unsetRuleName() {
7381
      this.ruleName = null;
7456
      this.ruleName = null;
7382
    }
7457
    }
7383
 
7458
 
7384
    /** Returns true if field ruleName is set (has been asigned a value) and false otherwise */
7459
    /** Returns true if field ruleName is set (has been assigned a value) and false otherwise */
7385
    public boolean isSetRuleName() {
7460
    public boolean isSetRuleName() {
7386
      return this.ruleName != null;
7461
      return this.ruleName != null;
7387
    }
7462
    }
7388
 
7463
 
7389
    public void setRuleNameIsSet(boolean value) {
7464
    public void setRuleNameIsSet(boolean value) {
Line 7403... Line 7478...
7403
        break;
7478
        break;
7404
 
7479
 
7405
      }
7480
      }
7406
    }
7481
    }
7407
 
7482
 
7408
    public void setFieldValue(int fieldID, Object value) {
-
 
7409
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
7410
    }
-
 
7411
 
-
 
7412
    public Object getFieldValue(_Fields field) {
7483
    public Object getFieldValue(_Fields field) {
7413
      switch (field) {
7484
      switch (field) {
7414
      case RULE_NAME:
7485
      case RULE_NAME:
7415
        return getRuleName();
7486
        return getRuleName();
7416
 
7487
 
7417
      }
7488
      }
7418
      throw new IllegalStateException();
7489
      throw new IllegalStateException();
7419
    }
7490
    }
7420
 
7491
 
7421
    public Object getFieldValue(int fieldId) {
-
 
7422
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
7423
    }
-
 
7424
 
-
 
7425
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7492
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7426
    public boolean isSet(_Fields field) {
7493
    public boolean isSet(_Fields field) {
-
 
7494
      if (field == null) {
-
 
7495
        throw new IllegalArgumentException();
-
 
7496
      }
-
 
7497
 
7427
      switch (field) {
7498
      switch (field) {
7428
      case RULE_NAME:
7499
      case RULE_NAME:
7429
        return isSetRuleName();
7500
        return isSetRuleName();
7430
      }
7501
      }
7431
      throw new IllegalStateException();
7502
      throw new IllegalStateException();
7432
    }
7503
    }
7433
 
7504
 
7434
    public boolean isSet(int fieldID) {
-
 
7435
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
7436
    }
-
 
7437
 
-
 
7438
    @Override
7505
    @Override
7439
    public boolean equals(Object that) {
7506
    public boolean equals(Object that) {
7440
      if (that == null)
7507
      if (that == null)
7441
        return false;
7508
        return false;
7442
      if (that instanceof getRuleDocString_args)
7509
      if (that instanceof getRuleDocString_args)
Line 7471... Line 7538...
7471
      }
7538
      }
7472
 
7539
 
7473
      int lastComparison = 0;
7540
      int lastComparison = 0;
7474
      getRuleDocString_args typedOther = (getRuleDocString_args)other;
7541
      getRuleDocString_args typedOther = (getRuleDocString_args)other;
7475
 
7542
 
7476
      lastComparison = Boolean.valueOf(isSetRuleName()).compareTo(isSetRuleName());
7543
      lastComparison = Boolean.valueOf(isSetRuleName()).compareTo(typedOther.isSetRuleName());
7477
      if (lastComparison != 0) {
7544
      if (lastComparison != 0) {
7478
        return lastComparison;
7545
        return lastComparison;
7479
      }
7546
      }
-
 
7547
      if (isSetRuleName()) {
7480
      lastComparison = TBaseHelper.compareTo(ruleName, typedOther.ruleName);
7548
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ruleName, typedOther.ruleName);
7481
      if (lastComparison != 0) {
7549
        if (lastComparison != 0) {
7482
        return lastComparison;
7550
          return lastComparison;
-
 
7551
        }
7483
      }
7552
      }
7484
      return 0;
7553
      return 0;
7485
    }
7554
    }
7486
 
7555
 
-
 
7556
    public _Fields fieldForId(int fieldId) {
-
 
7557
      return _Fields.findByThriftId(fieldId);
-
 
7558
    }
-
 
7559
 
7487
    public void read(TProtocol iprot) throws TException {
7560
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7488
      TField field;
7561
      org.apache.thrift.protocol.TField field;
7489
      iprot.readStructBegin();
7562
      iprot.readStructBegin();
7490
      while (true)
7563
      while (true)
7491
      {
7564
      {
7492
        field = iprot.readFieldBegin();
7565
        field = iprot.readFieldBegin();
7493
        if (field.type == TType.STOP) { 
7566
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7494
          break;
7567
          break;
7495
        }
7568
        }
7496
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
7497
        if (fieldId == null) {
-
 
7498
          TProtocolUtil.skip(iprot, field.type);
-
 
7499
        } else {
-
 
7500
          switch (fieldId) {
7569
        switch (field.id) {
7501
            case RULE_NAME:
7570
          case 1: // RULE_NAME
7502
              if (field.type == TType.STRING) {
7571
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
7503
                this.ruleName = iprot.readString();
7572
              this.ruleName = iprot.readString();
7504
              } else { 
7573
            } else { 
7505
                TProtocolUtil.skip(iprot, field.type);
7574
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7506
              }
7575
            }
7507
              break;
7576
            break;
7508
          }
7577
          default:
7509
          iprot.readFieldEnd();
7578
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7510
        }
7579
        }
-
 
7580
        iprot.readFieldEnd();
7511
      }
7581
      }
7512
      iprot.readStructEnd();
7582
      iprot.readStructEnd();
7513
      validate();
7583
      validate();
7514
    }
7584
    }
7515
 
7585
 
7516
    public void write(TProtocol oprot) throws TException {
7586
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7517
      validate();
7587
      validate();
7518
 
7588
 
7519
      oprot.writeStructBegin(STRUCT_DESC);
7589
      oprot.writeStructBegin(STRUCT_DESC);
7520
      if (this.ruleName != null) {
7590
      if (this.ruleName != null) {
7521
        oprot.writeFieldBegin(RULE_NAME_FIELD_DESC);
7591
        oprot.writeFieldBegin(RULE_NAME_FIELD_DESC);
Line 7540... Line 7610...
7540
      first = false;
7610
      first = false;
7541
      sb.append(")");
7611
      sb.append(")");
7542
      return sb.toString();
7612
      return sb.toString();
7543
    }
7613
    }
7544
 
7614
 
7545
    public void validate() throws TException {
7615
    public void validate() throws org.apache.thrift.TException {
7546
      // check for required fields
7616
      // check for required fields
7547
    }
7617
    }
7548
 
7618
 
-
 
7619
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
7620
      try {
-
 
7621
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
7622
      } catch (org.apache.thrift.TException te) {
-
 
7623
        throw new java.io.IOException(te);
-
 
7624
      }
-
 
7625
    }
-
 
7626
 
-
 
7627
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
7628
      try {
-
 
7629
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
7630
      } catch (org.apache.thrift.TException te) {
-
 
7631
        throw new java.io.IOException(te);
-
 
7632
      }
-
 
7633
    }
-
 
7634
 
7549
  }
7635
  }
7550
 
7636
 
7551
  public static class getRuleDocString_result implements TBase<getRuleDocString_result._Fields>, java.io.Serializable, Cloneable, Comparable<getRuleDocString_result>   {
7637
  public static class getRuleDocString_result implements org.apache.thrift.TBase<getRuleDocString_result, getRuleDocString_result._Fields>, java.io.Serializable, Cloneable   {
7552
    private static final TStruct STRUCT_DESC = new TStruct("getRuleDocString_result");
7638
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRuleDocString_result");
7553
 
7639
 
7554
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
7640
    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);
7555
 
7641
 
7556
    private String success;
7642
    private String success; // required
7557
 
7643
 
7558
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7644
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7559
    public enum _Fields implements TFieldIdEnum {
7645
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7560
      SUCCESS((short)0, "success");
7646
      SUCCESS((short)0, "success");
7561
 
7647
 
7562
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
7563
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7648
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7564
 
7649
 
7565
      static {
7650
      static {
7566
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7651
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7567
          byId.put((int)field._thriftId, field);
-
 
7568
          byName.put(field.getFieldName(), field);
7652
          byName.put(field.getFieldName(), field);
7569
        }
7653
        }
7570
      }
7654
      }
7571
 
7655
 
7572
      /**
7656
      /**
7573
       * Find the _Fields constant that matches fieldId, or null if its not found.
7657
       * Find the _Fields constant that matches fieldId, or null if its not found.
7574
       */
7658
       */
7575
      public static _Fields findByThriftId(int fieldId) {
7659
      public static _Fields findByThriftId(int fieldId) {
7576
        return byId.get(fieldId);
7660
        switch(fieldId) {
-
 
7661
          case 0: // SUCCESS
-
 
7662
            return SUCCESS;
-
 
7663
          default:
-
 
7664
            return null;
-
 
7665
        }
7577
      }
7666
      }
7578
 
7667
 
7579
      /**
7668
      /**
7580
       * Find the _Fields constant that matches fieldId, throwing an exception
7669
       * Find the _Fields constant that matches fieldId, throwing an exception
7581
       * if it is not found.
7670
       * if it is not found.
Line 7610... Line 7699...
7610
      }
7699
      }
7611
    }
7700
    }
7612
 
7701
 
7613
    // isset id assignments
7702
    // isset id assignments
7614
 
7703
 
7615
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7704
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7616
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
7617
          new FieldValueMetaData(TType.STRING)));
-
 
7618
    }});
-
 
7619
 
-
 
7620
    static {
7705
    static {
-
 
7706
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
7707
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
7708
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
7709
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7621
      FieldMetaData.addStructMetaDataMap(getRuleDocString_result.class, metaDataMap);
7710
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRuleDocString_result.class, metaDataMap);
7622
    }
7711
    }
7623
 
7712
 
7624
    public getRuleDocString_result() {
7713
    public getRuleDocString_result() {
7625
    }
7714
    }
7626
 
7715
 
Line 7642... Line 7731...
7642
 
7731
 
7643
    public getRuleDocString_result deepCopy() {
7732
    public getRuleDocString_result deepCopy() {
7644
      return new getRuleDocString_result(this);
7733
      return new getRuleDocString_result(this);
7645
    }
7734
    }
7646
 
7735
 
7647
    @Deprecated
7736
    @Override
7648
    public getRuleDocString_result clone() {
7737
    public void clear() {
7649
      return new getRuleDocString_result(this);
7738
      this.success = null;
7650
    }
7739
    }
7651
 
7740
 
7652
    public String getSuccess() {
7741
    public String getSuccess() {
7653
      return this.success;
7742
      return this.success;
7654
    }
7743
    }
7655
 
7744
 
7656
    public getRuleDocString_result setSuccess(String success) {
7745
    public void setSuccess(String success) {
7657
      this.success = success;
7746
      this.success = success;
7658
      return this;
-
 
7659
    }
7747
    }
7660
 
7748
 
7661
    public void unsetSuccess() {
7749
    public void unsetSuccess() {
7662
      this.success = null;
7750
      this.success = null;
7663
    }
7751
    }
7664
 
7752
 
7665
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7753
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7666
    public boolean isSetSuccess() {
7754
    public boolean isSetSuccess() {
7667
      return this.success != null;
7755
      return this.success != null;
7668
    }
7756
    }
7669
 
7757
 
7670
    public void setSuccessIsSet(boolean value) {
7758
    public void setSuccessIsSet(boolean value) {
Line 7684... Line 7772...
7684
        break;
7772
        break;
7685
 
7773
 
7686
      }
7774
      }
7687
    }
7775
    }
7688
 
7776
 
7689
    public void setFieldValue(int fieldID, Object value) {
-
 
7690
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
7691
    }
-
 
7692
 
-
 
7693
    public Object getFieldValue(_Fields field) {
7777
    public Object getFieldValue(_Fields field) {
7694
      switch (field) {
7778
      switch (field) {
7695
      case SUCCESS:
7779
      case SUCCESS:
7696
        return getSuccess();
7780
        return getSuccess();
7697
 
7781
 
7698
      }
7782
      }
7699
      throw new IllegalStateException();
7783
      throw new IllegalStateException();
7700
    }
7784
    }
7701
 
7785
 
7702
    public Object getFieldValue(int fieldId) {
-
 
7703
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
7704
    }
-
 
7705
 
-
 
7706
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7786
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7707
    public boolean isSet(_Fields field) {
7787
    public boolean isSet(_Fields field) {
-
 
7788
      if (field == null) {
-
 
7789
        throw new IllegalArgumentException();
-
 
7790
      }
-
 
7791
 
7708
      switch (field) {
7792
      switch (field) {
7709
      case SUCCESS:
7793
      case SUCCESS:
7710
        return isSetSuccess();
7794
        return isSetSuccess();
7711
      }
7795
      }
7712
      throw new IllegalStateException();
7796
      throw new IllegalStateException();
7713
    }
7797
    }
7714
 
7798
 
7715
    public boolean isSet(int fieldID) {
-
 
7716
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
7717
    }
-
 
7718
 
-
 
7719
    @Override
7799
    @Override
7720
    public boolean equals(Object that) {
7800
    public boolean equals(Object that) {
7721
      if (that == null)
7801
      if (that == null)
7722
        return false;
7802
        return false;
7723
      if (that instanceof getRuleDocString_result)
7803
      if (that instanceof getRuleDocString_result)
Line 7752... Line 7832...
7752
      }
7832
      }
7753
 
7833
 
7754
      int lastComparison = 0;
7834
      int lastComparison = 0;
7755
      getRuleDocString_result typedOther = (getRuleDocString_result)other;
7835
      getRuleDocString_result typedOther = (getRuleDocString_result)other;
7756
 
7836
 
7757
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7837
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7758
      if (lastComparison != 0) {
7838
      if (lastComparison != 0) {
7759
        return lastComparison;
7839
        return lastComparison;
7760
      }
7840
      }
-
 
7841
      if (isSetSuccess()) {
7761
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7842
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7762
      if (lastComparison != 0) {
7843
        if (lastComparison != 0) {
7763
        return lastComparison;
7844
          return lastComparison;
-
 
7845
        }
7764
      }
7846
      }
7765
      return 0;
7847
      return 0;
7766
    }
7848
    }
7767
 
7849
 
-
 
7850
    public _Fields fieldForId(int fieldId) {
-
 
7851
      return _Fields.findByThriftId(fieldId);
-
 
7852
    }
-
 
7853
 
7768
    public void read(TProtocol iprot) throws TException {
7854
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7769
      TField field;
7855
      org.apache.thrift.protocol.TField field;
7770
      iprot.readStructBegin();
7856
      iprot.readStructBegin();
7771
      while (true)
7857
      while (true)
7772
      {
7858
      {
7773
        field = iprot.readFieldBegin();
7859
        field = iprot.readFieldBegin();
7774
        if (field.type == TType.STOP) { 
7860
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7775
          break;
7861
          break;
7776
        }
7862
        }
7777
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
7778
        if (fieldId == null) {
-
 
7779
          TProtocolUtil.skip(iprot, field.type);
-
 
7780
        } else {
-
 
7781
          switch (fieldId) {
7863
        switch (field.id) {
7782
            case SUCCESS:
7864
          case 0: // SUCCESS
7783
              if (field.type == TType.STRING) {
7865
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
7784
                this.success = iprot.readString();
7866
              this.success = iprot.readString();
7785
              } else { 
7867
            } else { 
7786
                TProtocolUtil.skip(iprot, field.type);
7868
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7787
              }
7869
            }
7788
              break;
7870
            break;
7789
          }
7871
          default:
7790
          iprot.readFieldEnd();
7872
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7791
        }
7873
        }
-
 
7874
        iprot.readFieldEnd();
7792
      }
7875
      }
7793
      iprot.readStructEnd();
7876
      iprot.readStructEnd();
7794
      validate();
7877
      validate();
7795
    }
7878
    }
7796
 
7879
 
7797
    public void write(TProtocol oprot) throws TException {
7880
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7798
      oprot.writeStructBegin(STRUCT_DESC);
7881
      oprot.writeStructBegin(STRUCT_DESC);
7799
 
7882
 
7800
      if (this.isSetSuccess()) {
7883
      if (this.isSetSuccess()) {
7801
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7884
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7802
        oprot.writeString(this.success);
7885
        oprot.writeString(this.success);
Line 7820... Line 7903...
7820
      first = false;
7903
      first = false;
7821
      sb.append(")");
7904
      sb.append(")");
7822
      return sb.toString();
7905
      return sb.toString();
7823
    }
7906
    }
7824
 
7907
 
7825
    public void validate() throws TException {
7908
    public void validate() throws org.apache.thrift.TException {
7826
      // check for required fields
7909
      // check for required fields
7827
    }
7910
    }
7828
 
7911
 
-
 
7912
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
7913
      try {
-
 
7914
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
7915
      } catch (org.apache.thrift.TException te) {
-
 
7916
        throw new java.io.IOException(te);
-
 
7917
      }
-
 
7918
    }
-
 
7919
 
-
 
7920
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
7921
      try {
-
 
7922
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
7923
      } catch (org.apache.thrift.TException te) {
-
 
7924
        throw new java.io.IOException(te);
-
 
7925
      }
-
 
7926
    }
-
 
7927
 
7829
  }
7928
  }
7830
 
7929
 
7831
}
7930
}