Subversion Repositories SmartDukaan

Rev

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

Rev 6250 Rev 6301
Line 27... Line 27...
27
   */
27
   */
28
  public interface Iface extends in.shop2020.generic.GenericService.Iface {
28
  public interface Iface extends in.shop2020.generic.GenericService.Iface {
29
 
29
 
30
    public void createPromotion(String name, String ruleExecutionSrc, long startOn, long endOn) throws PromotionException, org.apache.thrift.TException;
30
    public void createPromotion(String name, String ruleExecutionSrc, long startOn, long endOn) throws PromotionException, org.apache.thrift.TException;
31
 
31
 
-
 
32
    public Coupon getCoupon(String couponCode) throws PromotionException, org.apache.thrift.TException;
-
 
33
 
-
 
34
    public boolean isGiftVoucher(String couponCode) throws PromotionException, org.apache.thrift.TException;
-
 
35
 
32
    public List<Promotion> getAllPromotions() throws PromotionException, org.apache.thrift.TException;
36
    public List<Promotion> getAllPromotions() throws PromotionException, org.apache.thrift.TException;
33
 
37
 
34
    public Promotion getPromotionById(long promotionId) throws PromotionException, org.apache.thrift.TException;
38
    public Promotion getPromotionById(long promotionId) throws PromotionException, org.apache.thrift.TException;
35
 
39
 
36
    public void generateCouponsForPromotion(long promotionId, String couponCode) throws PromotionException, org.apache.thrift.TException;
40
    public void generateCouponsForPromotion(long promotionId, String couponCode) throws PromotionException, org.apache.thrift.TException;
Line 85... Line 89...
85
 
89
 
86
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
90
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
87
 
91
 
88
    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;
92
    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;
89
 
93
 
-
 
94
    public void getCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCoupon_call> resultHandler) throws org.apache.thrift.TException;
-
 
95
 
-
 
96
    public void isGiftVoucher(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isGiftVoucher_call> resultHandler) throws org.apache.thrift.TException;
-
 
97
 
90
    public void getAllPromotions(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPromotions_call> resultHandler) throws org.apache.thrift.TException;
98
    public void getAllPromotions(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPromotions_call> resultHandler) throws org.apache.thrift.TException;
91
 
99
 
92
    public void getPromotionById(long promotionId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPromotionById_call> resultHandler) throws org.apache.thrift.TException;
100
    public void getPromotionById(long promotionId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPromotionById_call> resultHandler) throws org.apache.thrift.TException;
93
 
101
 
94
    public void generateCouponsForPromotion(long promotionId, String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.generateCouponsForPromotion_call> resultHandler) throws org.apache.thrift.TException;
102
    public void generateCouponsForPromotion(long promotionId, String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.generateCouponsForPromotion_call> resultHandler) throws org.apache.thrift.TException;
Line 163... Line 171...
163
        throw result.pex;
171
        throw result.pex;
164
      }
172
      }
165
      return;
173
      return;
166
    }
174
    }
167
 
175
 
-
 
176
    public Coupon getCoupon(String couponCode) throws PromotionException, org.apache.thrift.TException
-
 
177
    {
-
 
178
      send_getCoupon(couponCode);
-
 
179
      return recv_getCoupon();
-
 
180
    }
-
 
181
 
-
 
182
    public void send_getCoupon(String couponCode) throws org.apache.thrift.TException
-
 
183
    {
-
 
184
      getCoupon_args args = new getCoupon_args();
-
 
185
      args.setCouponCode(couponCode);
-
 
186
      sendBase("getCoupon", args);
-
 
187
    }
-
 
188
 
-
 
189
    public Coupon recv_getCoupon() throws PromotionException, org.apache.thrift.TException
-
 
190
    {
-
 
191
      getCoupon_result result = new getCoupon_result();
-
 
192
      receiveBase(result, "getCoupon");
-
 
193
      if (result.isSetSuccess()) {
-
 
194
        return result.success;
-
 
195
      }
-
 
196
      if (result.pex != null) {
-
 
197
        throw result.pex;
-
 
198
      }
-
 
199
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCoupon failed: unknown result");
-
 
200
    }
-
 
201
 
-
 
202
    public boolean isGiftVoucher(String couponCode) throws PromotionException, org.apache.thrift.TException
-
 
203
    {
-
 
204
      send_isGiftVoucher(couponCode);
-
 
205
      return recv_isGiftVoucher();
-
 
206
    }
-
 
207
 
-
 
208
    public void send_isGiftVoucher(String couponCode) throws org.apache.thrift.TException
-
 
209
    {
-
 
210
      isGiftVoucher_args args = new isGiftVoucher_args();
-
 
211
      args.setCouponCode(couponCode);
-
 
212
      sendBase("isGiftVoucher", args);
-
 
213
    }
-
 
214
 
-
 
215
    public boolean recv_isGiftVoucher() throws PromotionException, org.apache.thrift.TException
-
 
216
    {
-
 
217
      isGiftVoucher_result result = new isGiftVoucher_result();
-
 
218
      receiveBase(result, "isGiftVoucher");
-
 
219
      if (result.isSetSuccess()) {
-
 
220
        return result.success;
-
 
221
      }
-
 
222
      if (result.pex != null) {
-
 
223
        throw result.pex;
-
 
224
      }
-
 
225
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isGiftVoucher failed: unknown result");
-
 
226
    }
-
 
227
 
168
    public List<Promotion> getAllPromotions() throws PromotionException, org.apache.thrift.TException
228
    public List<Promotion> getAllPromotions() throws PromotionException, org.apache.thrift.TException
169
    {
229
    {
170
      send_getAllPromotions();
230
      send_getAllPromotions();
171
      return recv_getAllPromotions();
231
      return recv_getAllPromotions();
172
    }
232
    }
Line 599... Line 659...
599
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
659
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
600
        (new Client(prot)).recv_createPromotion();
660
        (new Client(prot)).recv_createPromotion();
601
      }
661
      }
602
    }
662
    }
603
 
663
 
-
 
664
    public void getCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<getCoupon_call> resultHandler) throws org.apache.thrift.TException {
-
 
665
      checkReady();
-
 
666
      getCoupon_call method_call = new getCoupon_call(couponCode, resultHandler, this, ___protocolFactory, ___transport);
-
 
667
      this.___currentMethod = method_call;
-
 
668
      ___manager.call(method_call);
-
 
669
    }
-
 
670
 
-
 
671
    public static class getCoupon_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
672
      private String couponCode;
-
 
673
      public getCoupon_call(String couponCode, org.apache.thrift.async.AsyncMethodCallback<getCoupon_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
-
 
674
        super(client, protocolFactory, transport, resultHandler, false);
-
 
675
        this.couponCode = couponCode;
-
 
676
      }
-
 
677
 
-
 
678
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
679
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCoupon", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
680
        getCoupon_args args = new getCoupon_args();
-
 
681
        args.setCouponCode(couponCode);
-
 
682
        args.write(prot);
-
 
683
        prot.writeMessageEnd();
-
 
684
      }
-
 
685
 
-
 
686
      public Coupon getResult() throws PromotionException, org.apache.thrift.TException {
-
 
687
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
688
          throw new IllegalStateException("Method call not finished!");
-
 
689
        }
-
 
690
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
691
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
692
        return (new Client(prot)).recv_getCoupon();
-
 
693
      }
-
 
694
    }
-
 
695
 
-
 
696
    public void isGiftVoucher(String couponCode, org.apache.thrift.async.AsyncMethodCallback<isGiftVoucher_call> resultHandler) throws org.apache.thrift.TException {
-
 
697
      checkReady();
-
 
698
      isGiftVoucher_call method_call = new isGiftVoucher_call(couponCode, resultHandler, this, ___protocolFactory, ___transport);
-
 
699
      this.___currentMethod = method_call;
-
 
700
      ___manager.call(method_call);
-
 
701
    }
-
 
702
 
-
 
703
    public static class isGiftVoucher_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
704
      private String couponCode;
-
 
705
      public isGiftVoucher_call(String couponCode, org.apache.thrift.async.AsyncMethodCallback<isGiftVoucher_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
-
 
706
        super(client, protocolFactory, transport, resultHandler, false);
-
 
707
        this.couponCode = couponCode;
-
 
708
      }
-
 
709
 
-
 
710
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
711
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isGiftVoucher", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
712
        isGiftVoucher_args args = new isGiftVoucher_args();
-
 
713
        args.setCouponCode(couponCode);
-
 
714
        args.write(prot);
-
 
715
        prot.writeMessageEnd();
-
 
716
      }
-
 
717
 
-
 
718
      public boolean getResult() throws PromotionException, org.apache.thrift.TException {
-
 
719
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
720
          throw new IllegalStateException("Method call not finished!");
-
 
721
        }
-
 
722
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
723
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
724
        return (new Client(prot)).recv_isGiftVoucher();
-
 
725
      }
-
 
726
    }
-
 
727
 
604
    public void getAllPromotions(org.apache.thrift.async.AsyncMethodCallback<getAllPromotions_call> resultHandler) throws org.apache.thrift.TException {
728
    public void getAllPromotions(org.apache.thrift.async.AsyncMethodCallback<getAllPromotions_call> resultHandler) throws org.apache.thrift.TException {
605
      checkReady();
729
      checkReady();
606
      getAllPromotions_call method_call = new getAllPromotions_call(resultHandler, this, ___protocolFactory, ___transport);
730
      getAllPromotions_call method_call = new getAllPromotions_call(resultHandler, this, ___protocolFactory, ___transport);
607
      this.___currentMethod = method_call;
731
      this.___currentMethod = method_call;
608
      ___manager.call(method_call);
732
      ___manager.call(method_call);
Line 1126... Line 1250...
1126
      super(iface, getProcessMap(processMap));
1250
      super(iface, getProcessMap(processMap));
1127
    }
1251
    }
1128
 
1252
 
1129
    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) {
1253
    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) {
1130
      processMap.put("createPromotion", new createPromotion());
1254
      processMap.put("createPromotion", new createPromotion());
-
 
1255
      processMap.put("getCoupon", new getCoupon());
-
 
1256
      processMap.put("isGiftVoucher", new isGiftVoucher());
1131
      processMap.put("getAllPromotions", new getAllPromotions());
1257
      processMap.put("getAllPromotions", new getAllPromotions());
1132
      processMap.put("getPromotionById", new getPromotionById());
1258
      processMap.put("getPromotionById", new getPromotionById());
1133
      processMap.put("generateCouponsForPromotion", new generateCouponsForPromotion());
1259
      processMap.put("generateCouponsForPromotion", new generateCouponsForPromotion());
1134
      processMap.put("applyCoupon", new applyCoupon());
1260
      processMap.put("applyCoupon", new applyCoupon());
1135
      processMap.put("trackCouponUsage", new trackCouponUsage());
1261
      processMap.put("trackCouponUsage", new trackCouponUsage());
Line 1164... Line 1290...
1164
        }
1290
        }
1165
        return result;
1291
        return result;
1166
      }
1292
      }
1167
    }
1293
    }
1168
 
1294
 
-
 
1295
    private static class getCoupon<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCoupon_args> {
-
 
1296
      public getCoupon() {
-
 
1297
        super("getCoupon");
-
 
1298
      }
-
 
1299
 
-
 
1300
      protected getCoupon_args getEmptyArgsInstance() {
-
 
1301
        return new getCoupon_args();
-
 
1302
      }
-
 
1303
 
-
 
1304
      protected getCoupon_result getResult(I iface, getCoupon_args args) throws org.apache.thrift.TException {
-
 
1305
        getCoupon_result result = new getCoupon_result();
-
 
1306
        try {
-
 
1307
          result.success = iface.getCoupon(args.couponCode);
-
 
1308
        } catch (PromotionException pex) {
-
 
1309
          result.pex = pex;
-
 
1310
        }
-
 
1311
        return result;
-
 
1312
      }
-
 
1313
    }
-
 
1314
 
-
 
1315
    private static class isGiftVoucher<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isGiftVoucher_args> {
-
 
1316
      public isGiftVoucher() {
-
 
1317
        super("isGiftVoucher");
-
 
1318
      }
-
 
1319
 
-
 
1320
      protected isGiftVoucher_args getEmptyArgsInstance() {
-
 
1321
        return new isGiftVoucher_args();
-
 
1322
      }
-
 
1323
 
-
 
1324
      protected isGiftVoucher_result getResult(I iface, isGiftVoucher_args args) throws org.apache.thrift.TException {
-
 
1325
        isGiftVoucher_result result = new isGiftVoucher_result();
-
 
1326
        try {
-
 
1327
          result.success = iface.isGiftVoucher(args.couponCode);
-
 
1328
          result.setSuccessIsSet(true);
-
 
1329
        } catch (PromotionException pex) {
-
 
1330
          result.pex = pex;
-
 
1331
        }
-
 
1332
        return result;
-
 
1333
      }
-
 
1334
    }
-
 
1335
 
1169
    private static class getAllPromotions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPromotions_args> {
1336
    private static class getAllPromotions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPromotions_args> {
1170
      public getAllPromotions() {
1337
      public getAllPromotions() {
1171
        super("getAllPromotions");
1338
        super("getAllPromotions");
1172
      }
1339
      }
1173
 
1340
 
Line 2268... Line 2435...
2268
      sb.append("pex:");
2435
      sb.append("pex:");
2269
      if (this.pex == null) {
2436
      if (this.pex == null) {
2270
        sb.append("null");
2437
        sb.append("null");
2271
      } else {
2438
      } else {
2272
        sb.append(this.pex);
2439
        sb.append(this.pex);
-
 
2440
      }
-
 
2441
      first = false;
-
 
2442
      sb.append(")");
-
 
2443
      return sb.toString();
-
 
2444
    }
-
 
2445
 
-
 
2446
    public void validate() throws org.apache.thrift.TException {
-
 
2447
      // check for required fields
-
 
2448
    }
-
 
2449
 
-
 
2450
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
2451
      try {
-
 
2452
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
2453
      } catch (org.apache.thrift.TException te) {
-
 
2454
        throw new java.io.IOException(te);
-
 
2455
      }
-
 
2456
    }
-
 
2457
 
-
 
2458
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
2459
      try {
-
 
2460
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
2461
      } catch (org.apache.thrift.TException te) {
-
 
2462
        throw new java.io.IOException(te);
-
 
2463
      }
-
 
2464
    }
-
 
2465
 
-
 
2466
  }
-
 
2467
 
-
 
2468
  public static class getCoupon_args implements org.apache.thrift.TBase<getCoupon_args, getCoupon_args._Fields>, java.io.Serializable, Cloneable   {
-
 
2469
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCoupon_args");
-
 
2470
 
-
 
2471
    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);
-
 
2472
 
-
 
2473
    private String couponCode; // required
-
 
2474
 
-
 
2475
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
2476
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
2477
      COUPON_CODE((short)1, "couponCode");
-
 
2478
 
-
 
2479
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
2480
 
-
 
2481
      static {
-
 
2482
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
2483
          byName.put(field.getFieldName(), field);
-
 
2484
        }
-
 
2485
      }
-
 
2486
 
-
 
2487
      /**
-
 
2488
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
2489
       */
-
 
2490
      public static _Fields findByThriftId(int fieldId) {
-
 
2491
        switch(fieldId) {
-
 
2492
          case 1: // COUPON_CODE
-
 
2493
            return COUPON_CODE;
-
 
2494
          default:
-
 
2495
            return null;
-
 
2496
        }
-
 
2497
      }
-
 
2498
 
-
 
2499
      /**
-
 
2500
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
2501
       * if it is not found.
-
 
2502
       */
-
 
2503
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
2504
        _Fields fields = findByThriftId(fieldId);
-
 
2505
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
2506
        return fields;
-
 
2507
      }
-
 
2508
 
-
 
2509
      /**
-
 
2510
       * Find the _Fields constant that matches name, or null if its not found.
-
 
2511
       */
-
 
2512
      public static _Fields findByName(String name) {
-
 
2513
        return byName.get(name);
-
 
2514
      }
-
 
2515
 
-
 
2516
      private final short _thriftId;
-
 
2517
      private final String _fieldName;
-
 
2518
 
-
 
2519
      _Fields(short thriftId, String fieldName) {
-
 
2520
        _thriftId = thriftId;
-
 
2521
        _fieldName = fieldName;
-
 
2522
      }
-
 
2523
 
-
 
2524
      public short getThriftFieldId() {
-
 
2525
        return _thriftId;
-
 
2526
      }
-
 
2527
 
-
 
2528
      public String getFieldName() {
-
 
2529
        return _fieldName;
-
 
2530
      }
-
 
2531
    }
-
 
2532
 
-
 
2533
    // isset id assignments
-
 
2534
 
-
 
2535
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
2536
    static {
-
 
2537
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
2538
      tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
2539
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
2540
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
2541
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCoupon_args.class, metaDataMap);
-
 
2542
    }
-
 
2543
 
-
 
2544
    public getCoupon_args() {
-
 
2545
    }
-
 
2546
 
-
 
2547
    public getCoupon_args(
-
 
2548
      String couponCode)
-
 
2549
    {
-
 
2550
      this();
-
 
2551
      this.couponCode = couponCode;
-
 
2552
    }
-
 
2553
 
-
 
2554
    /**
-
 
2555
     * Performs a deep copy on <i>other</i>.
-
 
2556
     */
-
 
2557
    public getCoupon_args(getCoupon_args other) {
-
 
2558
      if (other.isSetCouponCode()) {
-
 
2559
        this.couponCode = other.couponCode;
-
 
2560
      }
-
 
2561
    }
-
 
2562
 
-
 
2563
    public getCoupon_args deepCopy() {
-
 
2564
      return new getCoupon_args(this);
-
 
2565
    }
-
 
2566
 
-
 
2567
    @Override
-
 
2568
    public void clear() {
-
 
2569
      this.couponCode = null;
-
 
2570
    }
-
 
2571
 
-
 
2572
    public String getCouponCode() {
-
 
2573
      return this.couponCode;
-
 
2574
    }
-
 
2575
 
-
 
2576
    public void setCouponCode(String couponCode) {
-
 
2577
      this.couponCode = couponCode;
-
 
2578
    }
-
 
2579
 
-
 
2580
    public void unsetCouponCode() {
-
 
2581
      this.couponCode = null;
-
 
2582
    }
-
 
2583
 
-
 
2584
    /** Returns true if field couponCode is set (has been assigned a value) and false otherwise */
-
 
2585
    public boolean isSetCouponCode() {
-
 
2586
      return this.couponCode != null;
-
 
2587
    }
-
 
2588
 
-
 
2589
    public void setCouponCodeIsSet(boolean value) {
-
 
2590
      if (!value) {
-
 
2591
        this.couponCode = null;
-
 
2592
      }
-
 
2593
    }
-
 
2594
 
-
 
2595
    public void setFieldValue(_Fields field, Object value) {
-
 
2596
      switch (field) {
-
 
2597
      case COUPON_CODE:
-
 
2598
        if (value == null) {
-
 
2599
          unsetCouponCode();
-
 
2600
        } else {
-
 
2601
          setCouponCode((String)value);
-
 
2602
        }
-
 
2603
        break;
-
 
2604
 
-
 
2605
      }
-
 
2606
    }
-
 
2607
 
-
 
2608
    public Object getFieldValue(_Fields field) {
-
 
2609
      switch (field) {
-
 
2610
      case COUPON_CODE:
-
 
2611
        return getCouponCode();
-
 
2612
 
-
 
2613
      }
-
 
2614
      throw new IllegalStateException();
-
 
2615
    }
-
 
2616
 
-
 
2617
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
2618
    public boolean isSet(_Fields field) {
-
 
2619
      if (field == null) {
-
 
2620
        throw new IllegalArgumentException();
-
 
2621
      }
-
 
2622
 
-
 
2623
      switch (field) {
-
 
2624
      case COUPON_CODE:
-
 
2625
        return isSetCouponCode();
-
 
2626
      }
-
 
2627
      throw new IllegalStateException();
-
 
2628
    }
-
 
2629
 
-
 
2630
    @Override
-
 
2631
    public boolean equals(Object that) {
-
 
2632
      if (that == null)
-
 
2633
        return false;
-
 
2634
      if (that instanceof getCoupon_args)
-
 
2635
        return this.equals((getCoupon_args)that);
-
 
2636
      return false;
-
 
2637
    }
-
 
2638
 
-
 
2639
    public boolean equals(getCoupon_args that) {
-
 
2640
      if (that == null)
-
 
2641
        return false;
-
 
2642
 
-
 
2643
      boolean this_present_couponCode = true && this.isSetCouponCode();
-
 
2644
      boolean that_present_couponCode = true && that.isSetCouponCode();
-
 
2645
      if (this_present_couponCode || that_present_couponCode) {
-
 
2646
        if (!(this_present_couponCode && that_present_couponCode))
-
 
2647
          return false;
-
 
2648
        if (!this.couponCode.equals(that.couponCode))
-
 
2649
          return false;
-
 
2650
      }
-
 
2651
 
-
 
2652
      return true;
-
 
2653
    }
-
 
2654
 
-
 
2655
    @Override
-
 
2656
    public int hashCode() {
-
 
2657
      return 0;
-
 
2658
    }
-
 
2659
 
-
 
2660
    public int compareTo(getCoupon_args other) {
-
 
2661
      if (!getClass().equals(other.getClass())) {
-
 
2662
        return getClass().getName().compareTo(other.getClass().getName());
-
 
2663
      }
-
 
2664
 
-
 
2665
      int lastComparison = 0;
-
 
2666
      getCoupon_args typedOther = (getCoupon_args)other;
-
 
2667
 
-
 
2668
      lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
-
 
2669
      if (lastComparison != 0) {
-
 
2670
        return lastComparison;
-
 
2671
      }
-
 
2672
      if (isSetCouponCode()) {
-
 
2673
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);
-
 
2674
        if (lastComparison != 0) {
-
 
2675
          return lastComparison;
-
 
2676
        }
-
 
2677
      }
-
 
2678
      return 0;
-
 
2679
    }
-
 
2680
 
-
 
2681
    public _Fields fieldForId(int fieldId) {
-
 
2682
      return _Fields.findByThriftId(fieldId);
-
 
2683
    }
-
 
2684
 
-
 
2685
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
2686
      org.apache.thrift.protocol.TField field;
-
 
2687
      iprot.readStructBegin();
-
 
2688
      while (true)
-
 
2689
      {
-
 
2690
        field = iprot.readFieldBegin();
-
 
2691
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
2692
          break;
-
 
2693
        }
-
 
2694
        switch (field.id) {
-
 
2695
          case 1: // COUPON_CODE
-
 
2696
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
2697
              this.couponCode = iprot.readString();
-
 
2698
            } else { 
-
 
2699
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
2700
            }
-
 
2701
            break;
-
 
2702
          default:
-
 
2703
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
2704
        }
-
 
2705
        iprot.readFieldEnd();
-
 
2706
      }
-
 
2707
      iprot.readStructEnd();
-
 
2708
      validate();
-
 
2709
    }
-
 
2710
 
-
 
2711
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
2712
      validate();
-
 
2713
 
-
 
2714
      oprot.writeStructBegin(STRUCT_DESC);
-
 
2715
      if (this.couponCode != null) {
-
 
2716
        oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
-
 
2717
        oprot.writeString(this.couponCode);
-
 
2718
        oprot.writeFieldEnd();
-
 
2719
      }
-
 
2720
      oprot.writeFieldStop();
-
 
2721
      oprot.writeStructEnd();
-
 
2722
    }
-
 
2723
 
-
 
2724
    @Override
-
 
2725
    public String toString() {
-
 
2726
      StringBuilder sb = new StringBuilder("getCoupon_args(");
-
 
2727
      boolean first = true;
-
 
2728
 
-
 
2729
      sb.append("couponCode:");
-
 
2730
      if (this.couponCode == null) {
-
 
2731
        sb.append("null");
-
 
2732
      } else {
-
 
2733
        sb.append(this.couponCode);
-
 
2734
      }
-
 
2735
      first = false;
-
 
2736
      sb.append(")");
-
 
2737
      return sb.toString();
-
 
2738
    }
-
 
2739
 
-
 
2740
    public void validate() throws org.apache.thrift.TException {
-
 
2741
      // check for required fields
-
 
2742
    }
-
 
2743
 
-
 
2744
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
2745
      try {
-
 
2746
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
2747
      } catch (org.apache.thrift.TException te) {
-
 
2748
        throw new java.io.IOException(te);
-
 
2749
      }
-
 
2750
    }
-
 
2751
 
-
 
2752
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
2753
      try {
-
 
2754
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
2755
      } catch (org.apache.thrift.TException te) {
-
 
2756
        throw new java.io.IOException(te);
-
 
2757
      }
-
 
2758
    }
-
 
2759
 
-
 
2760
  }
-
 
2761
 
-
 
2762
  public static class getCoupon_result implements org.apache.thrift.TBase<getCoupon_result, getCoupon_result._Fields>, java.io.Serializable, Cloneable   {
-
 
2763
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCoupon_result");
-
 
2764
 
-
 
2765
    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);
-
 
2766
    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);
-
 
2767
 
-
 
2768
    private Coupon success; // required
-
 
2769
    private PromotionException pex; // required
-
 
2770
 
-
 
2771
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
2772
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
2773
      SUCCESS((short)0, "success"),
-
 
2774
      PEX((short)1, "pex");
-
 
2775
 
-
 
2776
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
2777
 
-
 
2778
      static {
-
 
2779
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
2780
          byName.put(field.getFieldName(), field);
-
 
2781
        }
-
 
2782
      }
-
 
2783
 
-
 
2784
      /**
-
 
2785
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
2786
       */
-
 
2787
      public static _Fields findByThriftId(int fieldId) {
-
 
2788
        switch(fieldId) {
-
 
2789
          case 0: // SUCCESS
-
 
2790
            return SUCCESS;
-
 
2791
          case 1: // PEX
-
 
2792
            return PEX;
-
 
2793
          default:
-
 
2794
            return null;
-
 
2795
        }
-
 
2796
      }
-
 
2797
 
-
 
2798
      /**
-
 
2799
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
2800
       * if it is not found.
-
 
2801
       */
-
 
2802
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
2803
        _Fields fields = findByThriftId(fieldId);
-
 
2804
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
2805
        return fields;
-
 
2806
      }
-
 
2807
 
-
 
2808
      /**
-
 
2809
       * Find the _Fields constant that matches name, or null if its not found.
-
 
2810
       */
-
 
2811
      public static _Fields findByName(String name) {
-
 
2812
        return byName.get(name);
-
 
2813
      }
-
 
2814
 
-
 
2815
      private final short _thriftId;
-
 
2816
      private final String _fieldName;
-
 
2817
 
-
 
2818
      _Fields(short thriftId, String fieldName) {
-
 
2819
        _thriftId = thriftId;
-
 
2820
        _fieldName = fieldName;
-
 
2821
      }
-
 
2822
 
-
 
2823
      public short getThriftFieldId() {
-
 
2824
        return _thriftId;
-
 
2825
      }
-
 
2826
 
-
 
2827
      public String getFieldName() {
-
 
2828
        return _fieldName;
-
 
2829
      }
-
 
2830
    }
-
 
2831
 
-
 
2832
    // isset id assignments
-
 
2833
 
-
 
2834
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
2835
    static {
-
 
2836
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
2837
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
2838
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Coupon.class)));
-
 
2839
      tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
2840
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
2841
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
2842
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCoupon_result.class, metaDataMap);
-
 
2843
    }
-
 
2844
 
-
 
2845
    public getCoupon_result() {
-
 
2846
    }
-
 
2847
 
-
 
2848
    public getCoupon_result(
-
 
2849
      Coupon success,
-
 
2850
      PromotionException pex)
-
 
2851
    {
-
 
2852
      this();
-
 
2853
      this.success = success;
-
 
2854
      this.pex = pex;
-
 
2855
    }
-
 
2856
 
-
 
2857
    /**
-
 
2858
     * Performs a deep copy on <i>other</i>.
-
 
2859
     */
-
 
2860
    public getCoupon_result(getCoupon_result other) {
-
 
2861
      if (other.isSetSuccess()) {
-
 
2862
        this.success = new Coupon(other.success);
-
 
2863
      }
-
 
2864
      if (other.isSetPex()) {
-
 
2865
        this.pex = new PromotionException(other.pex);
-
 
2866
      }
-
 
2867
    }
-
 
2868
 
-
 
2869
    public getCoupon_result deepCopy() {
-
 
2870
      return new getCoupon_result(this);
-
 
2871
    }
-
 
2872
 
-
 
2873
    @Override
-
 
2874
    public void clear() {
-
 
2875
      this.success = null;
-
 
2876
      this.pex = null;
-
 
2877
    }
-
 
2878
 
-
 
2879
    public Coupon getSuccess() {
-
 
2880
      return this.success;
-
 
2881
    }
-
 
2882
 
-
 
2883
    public void setSuccess(Coupon success) {
-
 
2884
      this.success = success;
-
 
2885
    }
-
 
2886
 
-
 
2887
    public void unsetSuccess() {
-
 
2888
      this.success = null;
-
 
2889
    }
-
 
2890
 
-
 
2891
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
2892
    public boolean isSetSuccess() {
-
 
2893
      return this.success != null;
-
 
2894
    }
-
 
2895
 
-
 
2896
    public void setSuccessIsSet(boolean value) {
-
 
2897
      if (!value) {
-
 
2898
        this.success = null;
-
 
2899
      }
-
 
2900
    }
-
 
2901
 
-
 
2902
    public PromotionException getPex() {
-
 
2903
      return this.pex;
-
 
2904
    }
-
 
2905
 
-
 
2906
    public void setPex(PromotionException pex) {
-
 
2907
      this.pex = pex;
-
 
2908
    }
-
 
2909
 
-
 
2910
    public void unsetPex() {
-
 
2911
      this.pex = null;
-
 
2912
    }
-
 
2913
 
-
 
2914
    /** Returns true if field pex is set (has been assigned a value) and false otherwise */
-
 
2915
    public boolean isSetPex() {
-
 
2916
      return this.pex != null;
-
 
2917
    }
-
 
2918
 
-
 
2919
    public void setPexIsSet(boolean value) {
-
 
2920
      if (!value) {
-
 
2921
        this.pex = null;
-
 
2922
      }
-
 
2923
    }
-
 
2924
 
-
 
2925
    public void setFieldValue(_Fields field, Object value) {
-
 
2926
      switch (field) {
-
 
2927
      case SUCCESS:
-
 
2928
        if (value == null) {
-
 
2929
          unsetSuccess();
-
 
2930
        } else {
-
 
2931
          setSuccess((Coupon)value);
-
 
2932
        }
-
 
2933
        break;
-
 
2934
 
-
 
2935
      case PEX:
-
 
2936
        if (value == null) {
-
 
2937
          unsetPex();
-
 
2938
        } else {
-
 
2939
          setPex((PromotionException)value);
-
 
2940
        }
-
 
2941
        break;
-
 
2942
 
-
 
2943
      }
-
 
2944
    }
-
 
2945
 
-
 
2946
    public Object getFieldValue(_Fields field) {
-
 
2947
      switch (field) {
-
 
2948
      case SUCCESS:
-
 
2949
        return getSuccess();
-
 
2950
 
-
 
2951
      case PEX:
-
 
2952
        return getPex();
-
 
2953
 
-
 
2954
      }
-
 
2955
      throw new IllegalStateException();
-
 
2956
    }
-
 
2957
 
-
 
2958
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
2959
    public boolean isSet(_Fields field) {
-
 
2960
      if (field == null) {
-
 
2961
        throw new IllegalArgumentException();
-
 
2962
      }
-
 
2963
 
-
 
2964
      switch (field) {
-
 
2965
      case SUCCESS:
-
 
2966
        return isSetSuccess();
-
 
2967
      case PEX:
-
 
2968
        return isSetPex();
-
 
2969
      }
-
 
2970
      throw new IllegalStateException();
-
 
2971
    }
-
 
2972
 
-
 
2973
    @Override
-
 
2974
    public boolean equals(Object that) {
-
 
2975
      if (that == null)
-
 
2976
        return false;
-
 
2977
      if (that instanceof getCoupon_result)
-
 
2978
        return this.equals((getCoupon_result)that);
-
 
2979
      return false;
-
 
2980
    }
-
 
2981
 
-
 
2982
    public boolean equals(getCoupon_result that) {
-
 
2983
      if (that == null)
-
 
2984
        return false;
-
 
2985
 
-
 
2986
      boolean this_present_success = true && this.isSetSuccess();
-
 
2987
      boolean that_present_success = true && that.isSetSuccess();
-
 
2988
      if (this_present_success || that_present_success) {
-
 
2989
        if (!(this_present_success && that_present_success))
-
 
2990
          return false;
-
 
2991
        if (!this.success.equals(that.success))
-
 
2992
          return false;
-
 
2993
      }
-
 
2994
 
-
 
2995
      boolean this_present_pex = true && this.isSetPex();
-
 
2996
      boolean that_present_pex = true && that.isSetPex();
-
 
2997
      if (this_present_pex || that_present_pex) {
-
 
2998
        if (!(this_present_pex && that_present_pex))
-
 
2999
          return false;
-
 
3000
        if (!this.pex.equals(that.pex))
-
 
3001
          return false;
-
 
3002
      }
-
 
3003
 
-
 
3004
      return true;
-
 
3005
    }
-
 
3006
 
-
 
3007
    @Override
-
 
3008
    public int hashCode() {
-
 
3009
      return 0;
-
 
3010
    }
-
 
3011
 
-
 
3012
    public int compareTo(getCoupon_result other) {
-
 
3013
      if (!getClass().equals(other.getClass())) {
-
 
3014
        return getClass().getName().compareTo(other.getClass().getName());
-
 
3015
      }
-
 
3016
 
-
 
3017
      int lastComparison = 0;
-
 
3018
      getCoupon_result typedOther = (getCoupon_result)other;
-
 
3019
 
-
 
3020
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
3021
      if (lastComparison != 0) {
-
 
3022
        return lastComparison;
-
 
3023
      }
-
 
3024
      if (isSetSuccess()) {
-
 
3025
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
3026
        if (lastComparison != 0) {
-
 
3027
          return lastComparison;
-
 
3028
        }
-
 
3029
      }
-
 
3030
      lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
-
 
3031
      if (lastComparison != 0) {
-
 
3032
        return lastComparison;
-
 
3033
      }
-
 
3034
      if (isSetPex()) {
-
 
3035
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
-
 
3036
        if (lastComparison != 0) {
-
 
3037
          return lastComparison;
-
 
3038
        }
-
 
3039
      }
-
 
3040
      return 0;
-
 
3041
    }
-
 
3042
 
-
 
3043
    public _Fields fieldForId(int fieldId) {
-
 
3044
      return _Fields.findByThriftId(fieldId);
-
 
3045
    }
-
 
3046
 
-
 
3047
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
3048
      org.apache.thrift.protocol.TField field;
-
 
3049
      iprot.readStructBegin();
-
 
3050
      while (true)
-
 
3051
      {
-
 
3052
        field = iprot.readFieldBegin();
-
 
3053
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
3054
          break;
-
 
3055
        }
-
 
3056
        switch (field.id) {
-
 
3057
          case 0: // SUCCESS
-
 
3058
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
3059
              this.success = new Coupon();
-
 
3060
              this.success.read(iprot);
-
 
3061
            } else { 
-
 
3062
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
3063
            }
-
 
3064
            break;
-
 
3065
          case 1: // PEX
-
 
3066
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
3067
              this.pex = new PromotionException();
-
 
3068
              this.pex.read(iprot);
-
 
3069
            } else { 
-
 
3070
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
3071
            }
-
 
3072
            break;
-
 
3073
          default:
-
 
3074
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
3075
        }
-
 
3076
        iprot.readFieldEnd();
-
 
3077
      }
-
 
3078
      iprot.readStructEnd();
-
 
3079
      validate();
-
 
3080
    }
-
 
3081
 
-
 
3082
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
3083
      oprot.writeStructBegin(STRUCT_DESC);
-
 
3084
 
-
 
3085
      if (this.isSetSuccess()) {
-
 
3086
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
3087
        this.success.write(oprot);
-
 
3088
        oprot.writeFieldEnd();
-
 
3089
      } else if (this.isSetPex()) {
-
 
3090
        oprot.writeFieldBegin(PEX_FIELD_DESC);
-
 
3091
        this.pex.write(oprot);
-
 
3092
        oprot.writeFieldEnd();
-
 
3093
      }
-
 
3094
      oprot.writeFieldStop();
-
 
3095
      oprot.writeStructEnd();
-
 
3096
    }
-
 
3097
 
-
 
3098
    @Override
-
 
3099
    public String toString() {
-
 
3100
      StringBuilder sb = new StringBuilder("getCoupon_result(");
-
 
3101
      boolean first = true;
-
 
3102
 
-
 
3103
      sb.append("success:");
-
 
3104
      if (this.success == null) {
-
 
3105
        sb.append("null");
-
 
3106
      } else {
-
 
3107
        sb.append(this.success);
-
 
3108
      }
-
 
3109
      first = false;
-
 
3110
      if (!first) sb.append(", ");
-
 
3111
      sb.append("pex:");
-
 
3112
      if (this.pex == null) {
-
 
3113
        sb.append("null");
-
 
3114
      } else {
-
 
3115
        sb.append(this.pex);
-
 
3116
      }
-
 
3117
      first = false;
-
 
3118
      sb.append(")");
-
 
3119
      return sb.toString();
-
 
3120
    }
-
 
3121
 
-
 
3122
    public void validate() throws org.apache.thrift.TException {
-
 
3123
      // check for required fields
-
 
3124
    }
-
 
3125
 
-
 
3126
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
3127
      try {
-
 
3128
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
3129
      } catch (org.apache.thrift.TException te) {
-
 
3130
        throw new java.io.IOException(te);
-
 
3131
      }
-
 
3132
    }
-
 
3133
 
-
 
3134
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
3135
      try {
-
 
3136
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
3137
      } catch (org.apache.thrift.TException te) {
-
 
3138
        throw new java.io.IOException(te);
-
 
3139
      }
-
 
3140
    }
-
 
3141
 
-
 
3142
  }
-
 
3143
 
-
 
3144
  public static class isGiftVoucher_args implements org.apache.thrift.TBase<isGiftVoucher_args, isGiftVoucher_args._Fields>, java.io.Serializable, Cloneable   {
-
 
3145
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isGiftVoucher_args");
-
 
3146
 
-
 
3147
    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);
-
 
3148
 
-
 
3149
    private String couponCode; // required
-
 
3150
 
-
 
3151
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
3152
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
3153
      COUPON_CODE((short)1, "couponCode");
-
 
3154
 
-
 
3155
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
3156
 
-
 
3157
      static {
-
 
3158
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
3159
          byName.put(field.getFieldName(), field);
-
 
3160
        }
-
 
3161
      }
-
 
3162
 
-
 
3163
      /**
-
 
3164
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
3165
       */
-
 
3166
      public static _Fields findByThriftId(int fieldId) {
-
 
3167
        switch(fieldId) {
-
 
3168
          case 1: // COUPON_CODE
-
 
3169
            return COUPON_CODE;
-
 
3170
          default:
-
 
3171
            return null;
-
 
3172
        }
-
 
3173
      }
-
 
3174
 
-
 
3175
      /**
-
 
3176
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
3177
       * if it is not found.
-
 
3178
       */
-
 
3179
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
3180
        _Fields fields = findByThriftId(fieldId);
-
 
3181
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
3182
        return fields;
-
 
3183
      }
-
 
3184
 
-
 
3185
      /**
-
 
3186
       * Find the _Fields constant that matches name, or null if its not found.
-
 
3187
       */
-
 
3188
      public static _Fields findByName(String name) {
-
 
3189
        return byName.get(name);
-
 
3190
      }
-
 
3191
 
-
 
3192
      private final short _thriftId;
-
 
3193
      private final String _fieldName;
-
 
3194
 
-
 
3195
      _Fields(short thriftId, String fieldName) {
-
 
3196
        _thriftId = thriftId;
-
 
3197
        _fieldName = fieldName;
-
 
3198
      }
-
 
3199
 
-
 
3200
      public short getThriftFieldId() {
-
 
3201
        return _thriftId;
-
 
3202
      }
-
 
3203
 
-
 
3204
      public String getFieldName() {
-
 
3205
        return _fieldName;
-
 
3206
      }
-
 
3207
    }
-
 
3208
 
-
 
3209
    // isset id assignments
-
 
3210
 
-
 
3211
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
3212
    static {
-
 
3213
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
3214
      tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
3215
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
3216
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
3217
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isGiftVoucher_args.class, metaDataMap);
-
 
3218
    }
-
 
3219
 
-
 
3220
    public isGiftVoucher_args() {
-
 
3221
    }
-
 
3222
 
-
 
3223
    public isGiftVoucher_args(
-
 
3224
      String couponCode)
-
 
3225
    {
-
 
3226
      this();
-
 
3227
      this.couponCode = couponCode;
-
 
3228
    }
-
 
3229
 
-
 
3230
    /**
-
 
3231
     * Performs a deep copy on <i>other</i>.
-
 
3232
     */
-
 
3233
    public isGiftVoucher_args(isGiftVoucher_args other) {
-
 
3234
      if (other.isSetCouponCode()) {
-
 
3235
        this.couponCode = other.couponCode;
-
 
3236
      }
-
 
3237
    }
-
 
3238
 
-
 
3239
    public isGiftVoucher_args deepCopy() {
-
 
3240
      return new isGiftVoucher_args(this);
-
 
3241
    }
-
 
3242
 
-
 
3243
    @Override
-
 
3244
    public void clear() {
-
 
3245
      this.couponCode = null;
-
 
3246
    }
-
 
3247
 
-
 
3248
    public String getCouponCode() {
-
 
3249
      return this.couponCode;
-
 
3250
    }
-
 
3251
 
-
 
3252
    public void setCouponCode(String couponCode) {
-
 
3253
      this.couponCode = couponCode;
-
 
3254
    }
-
 
3255
 
-
 
3256
    public void unsetCouponCode() {
-
 
3257
      this.couponCode = null;
-
 
3258
    }
-
 
3259
 
-
 
3260
    /** Returns true if field couponCode is set (has been assigned a value) and false otherwise */
-
 
3261
    public boolean isSetCouponCode() {
-
 
3262
      return this.couponCode != null;
-
 
3263
    }
-
 
3264
 
-
 
3265
    public void setCouponCodeIsSet(boolean value) {
-
 
3266
      if (!value) {
-
 
3267
        this.couponCode = null;
-
 
3268
      }
-
 
3269
    }
-
 
3270
 
-
 
3271
    public void setFieldValue(_Fields field, Object value) {
-
 
3272
      switch (field) {
-
 
3273
      case COUPON_CODE:
-
 
3274
        if (value == null) {
-
 
3275
          unsetCouponCode();
-
 
3276
        } else {
-
 
3277
          setCouponCode((String)value);
-
 
3278
        }
-
 
3279
        break;
-
 
3280
 
-
 
3281
      }
-
 
3282
    }
-
 
3283
 
-
 
3284
    public Object getFieldValue(_Fields field) {
-
 
3285
      switch (field) {
-
 
3286
      case COUPON_CODE:
-
 
3287
        return getCouponCode();
-
 
3288
 
-
 
3289
      }
-
 
3290
      throw new IllegalStateException();
-
 
3291
    }
-
 
3292
 
-
 
3293
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
3294
    public boolean isSet(_Fields field) {
-
 
3295
      if (field == null) {
-
 
3296
        throw new IllegalArgumentException();
-
 
3297
      }
-
 
3298
 
-
 
3299
      switch (field) {
-
 
3300
      case COUPON_CODE:
-
 
3301
        return isSetCouponCode();
-
 
3302
      }
-
 
3303
      throw new IllegalStateException();
-
 
3304
    }
-
 
3305
 
-
 
3306
    @Override
-
 
3307
    public boolean equals(Object that) {
-
 
3308
      if (that == null)
-
 
3309
        return false;
-
 
3310
      if (that instanceof isGiftVoucher_args)
-
 
3311
        return this.equals((isGiftVoucher_args)that);
-
 
3312
      return false;
-
 
3313
    }
-
 
3314
 
-
 
3315
    public boolean equals(isGiftVoucher_args that) {
-
 
3316
      if (that == null)
-
 
3317
        return false;
-
 
3318
 
-
 
3319
      boolean this_present_couponCode = true && this.isSetCouponCode();
-
 
3320
      boolean that_present_couponCode = true && that.isSetCouponCode();
-
 
3321
      if (this_present_couponCode || that_present_couponCode) {
-
 
3322
        if (!(this_present_couponCode && that_present_couponCode))
-
 
3323
          return false;
-
 
3324
        if (!this.couponCode.equals(that.couponCode))
-
 
3325
          return false;
-
 
3326
      }
-
 
3327
 
-
 
3328
      return true;
-
 
3329
    }
-
 
3330
 
-
 
3331
    @Override
-
 
3332
    public int hashCode() {
-
 
3333
      return 0;
-
 
3334
    }
-
 
3335
 
-
 
3336
    public int compareTo(isGiftVoucher_args other) {
-
 
3337
      if (!getClass().equals(other.getClass())) {
-
 
3338
        return getClass().getName().compareTo(other.getClass().getName());
-
 
3339
      }
-
 
3340
 
-
 
3341
      int lastComparison = 0;
-
 
3342
      isGiftVoucher_args typedOther = (isGiftVoucher_args)other;
-
 
3343
 
-
 
3344
      lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
-
 
3345
      if (lastComparison != 0) {
-
 
3346
        return lastComparison;
-
 
3347
      }
-
 
3348
      if (isSetCouponCode()) {
-
 
3349
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);
-
 
3350
        if (lastComparison != 0) {
-
 
3351
          return lastComparison;
-
 
3352
        }
-
 
3353
      }
-
 
3354
      return 0;
-
 
3355
    }
-
 
3356
 
-
 
3357
    public _Fields fieldForId(int fieldId) {
-
 
3358
      return _Fields.findByThriftId(fieldId);
-
 
3359
    }
-
 
3360
 
-
 
3361
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
3362
      org.apache.thrift.protocol.TField field;
-
 
3363
      iprot.readStructBegin();
-
 
3364
      while (true)
-
 
3365
      {
-
 
3366
        field = iprot.readFieldBegin();
-
 
3367
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
3368
          break;
-
 
3369
        }
-
 
3370
        switch (field.id) {
-
 
3371
          case 1: // COUPON_CODE
-
 
3372
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
3373
              this.couponCode = iprot.readString();
-
 
3374
            } else { 
-
 
3375
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
3376
            }
-
 
3377
            break;
-
 
3378
          default:
-
 
3379
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
3380
        }
-
 
3381
        iprot.readFieldEnd();
-
 
3382
      }
-
 
3383
      iprot.readStructEnd();
-
 
3384
      validate();
-
 
3385
    }
-
 
3386
 
-
 
3387
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
3388
      validate();
-
 
3389
 
-
 
3390
      oprot.writeStructBegin(STRUCT_DESC);
-
 
3391
      if (this.couponCode != null) {
-
 
3392
        oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
-
 
3393
        oprot.writeString(this.couponCode);
-
 
3394
        oprot.writeFieldEnd();
-
 
3395
      }
-
 
3396
      oprot.writeFieldStop();
-
 
3397
      oprot.writeStructEnd();
-
 
3398
    }
-
 
3399
 
-
 
3400
    @Override
-
 
3401
    public String toString() {
-
 
3402
      StringBuilder sb = new StringBuilder("isGiftVoucher_args(");
-
 
3403
      boolean first = true;
-
 
3404
 
-
 
3405
      sb.append("couponCode:");
-
 
3406
      if (this.couponCode == null) {
-
 
3407
        sb.append("null");
-
 
3408
      } else {
-
 
3409
        sb.append(this.couponCode);
-
 
3410
      }
-
 
3411
      first = false;
-
 
3412
      sb.append(")");
-
 
3413
      return sb.toString();
-
 
3414
    }
-
 
3415
 
-
 
3416
    public void validate() throws org.apache.thrift.TException {
-
 
3417
      // check for required fields
-
 
3418
    }
-
 
3419
 
-
 
3420
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
3421
      try {
-
 
3422
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
3423
      } catch (org.apache.thrift.TException te) {
-
 
3424
        throw new java.io.IOException(te);
-
 
3425
      }
-
 
3426
    }
-
 
3427
 
-
 
3428
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
3429
      try {
-
 
3430
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
3431
      } catch (org.apache.thrift.TException te) {
-
 
3432
        throw new java.io.IOException(te);
-
 
3433
      }
-
 
3434
    }
-
 
3435
 
-
 
3436
  }
-
 
3437
 
-
 
3438
  public static class isGiftVoucher_result implements org.apache.thrift.TBase<isGiftVoucher_result, isGiftVoucher_result._Fields>, java.io.Serializable, Cloneable   {
-
 
3439
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isGiftVoucher_result");
-
 
3440
 
-
 
3441
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
 
3442
    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);
-
 
3443
 
-
 
3444
    private boolean success; // required
-
 
3445
    private PromotionException pex; // required
-
 
3446
 
-
 
3447
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
3448
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
3449
      SUCCESS((short)0, "success"),
-
 
3450
      PEX((short)1, "pex");
-
 
3451
 
-
 
3452
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
3453
 
-
 
3454
      static {
-
 
3455
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
3456
          byName.put(field.getFieldName(), field);
-
 
3457
        }
-
 
3458
      }
-
 
3459
 
-
 
3460
      /**
-
 
3461
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
3462
       */
-
 
3463
      public static _Fields findByThriftId(int fieldId) {
-
 
3464
        switch(fieldId) {
-
 
3465
          case 0: // SUCCESS
-
 
3466
            return SUCCESS;
-
 
3467
          case 1: // PEX
-
 
3468
            return PEX;
-
 
3469
          default:
-
 
3470
            return null;
-
 
3471
        }
-
 
3472
      }
-
 
3473
 
-
 
3474
      /**
-
 
3475
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
3476
       * if it is not found.
-
 
3477
       */
-
 
3478
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
3479
        _Fields fields = findByThriftId(fieldId);
-
 
3480
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
3481
        return fields;
-
 
3482
      }
-
 
3483
 
-
 
3484
      /**
-
 
3485
       * Find the _Fields constant that matches name, or null if its not found.
-
 
3486
       */
-
 
3487
      public static _Fields findByName(String name) {
-
 
3488
        return byName.get(name);
-
 
3489
      }
-
 
3490
 
-
 
3491
      private final short _thriftId;
-
 
3492
      private final String _fieldName;
-
 
3493
 
-
 
3494
      _Fields(short thriftId, String fieldName) {
-
 
3495
        _thriftId = thriftId;
-
 
3496
        _fieldName = fieldName;
-
 
3497
      }
-
 
3498
 
-
 
3499
      public short getThriftFieldId() {
-
 
3500
        return _thriftId;
-
 
3501
      }
-
 
3502
 
-
 
3503
      public String getFieldName() {
-
 
3504
        return _fieldName;
-
 
3505
      }
-
 
3506
    }
-
 
3507
 
-
 
3508
    // isset id assignments
-
 
3509
    private static final int __SUCCESS_ISSET_ID = 0;
-
 
3510
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
3511
 
-
 
3512
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
3513
    static {
-
 
3514
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
3515
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
3516
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
-
 
3517
      tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
3518
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
3519
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
3520
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isGiftVoucher_result.class, metaDataMap);
-
 
3521
    }
-
 
3522
 
-
 
3523
    public isGiftVoucher_result() {
-
 
3524
    }
-
 
3525
 
-
 
3526
    public isGiftVoucher_result(
-
 
3527
      boolean success,
-
 
3528
      PromotionException pex)
-
 
3529
    {
-
 
3530
      this();
-
 
3531
      this.success = success;
-
 
3532
      setSuccessIsSet(true);
-
 
3533
      this.pex = pex;
-
 
3534
    }
-
 
3535
 
-
 
3536
    /**
-
 
3537
     * Performs a deep copy on <i>other</i>.
-
 
3538
     */
-
 
3539
    public isGiftVoucher_result(isGiftVoucher_result other) {
-
 
3540
      __isset_bit_vector.clear();
-
 
3541
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
3542
      this.success = other.success;
-
 
3543
      if (other.isSetPex()) {
-
 
3544
        this.pex = new PromotionException(other.pex);
-
 
3545
      }
-
 
3546
    }
-
 
3547
 
-
 
3548
    public isGiftVoucher_result deepCopy() {
-
 
3549
      return new isGiftVoucher_result(this);
-
 
3550
    }
-
 
3551
 
-
 
3552
    @Override
-
 
3553
    public void clear() {
-
 
3554
      setSuccessIsSet(false);
-
 
3555
      this.success = false;
-
 
3556
      this.pex = null;
-
 
3557
    }
-
 
3558
 
-
 
3559
    public boolean isSuccess() {
-
 
3560
      return this.success;
-
 
3561
    }
-
 
3562
 
-
 
3563
    public void setSuccess(boolean success) {
-
 
3564
      this.success = success;
-
 
3565
      setSuccessIsSet(true);
-
 
3566
    }
-
 
3567
 
-
 
3568
    public void unsetSuccess() {
-
 
3569
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
-
 
3570
    }
-
 
3571
 
-
 
3572
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
3573
    public boolean isSetSuccess() {
-
 
3574
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
-
 
3575
    }
-
 
3576
 
-
 
3577
    public void setSuccessIsSet(boolean value) {
-
 
3578
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
-
 
3579
    }
-
 
3580
 
-
 
3581
    public PromotionException getPex() {
-
 
3582
      return this.pex;
-
 
3583
    }
-
 
3584
 
-
 
3585
    public void setPex(PromotionException pex) {
-
 
3586
      this.pex = pex;
-
 
3587
    }
-
 
3588
 
-
 
3589
    public void unsetPex() {
-
 
3590
      this.pex = null;
-
 
3591
    }
-
 
3592
 
-
 
3593
    /** Returns true if field pex is set (has been assigned a value) and false otherwise */
-
 
3594
    public boolean isSetPex() {
-
 
3595
      return this.pex != null;
-
 
3596
    }
-
 
3597
 
-
 
3598
    public void setPexIsSet(boolean value) {
-
 
3599
      if (!value) {
-
 
3600
        this.pex = null;
-
 
3601
      }
-
 
3602
    }
-
 
3603
 
-
 
3604
    public void setFieldValue(_Fields field, Object value) {
-
 
3605
      switch (field) {
-
 
3606
      case SUCCESS:
-
 
3607
        if (value == null) {
-
 
3608
          unsetSuccess();
-
 
3609
        } else {
-
 
3610
          setSuccess((Boolean)value);
-
 
3611
        }
-
 
3612
        break;
-
 
3613
 
-
 
3614
      case PEX:
-
 
3615
        if (value == null) {
-
 
3616
          unsetPex();
-
 
3617
        } else {
-
 
3618
          setPex((PromotionException)value);
-
 
3619
        }
-
 
3620
        break;
-
 
3621
 
-
 
3622
      }
-
 
3623
    }
-
 
3624
 
-
 
3625
    public Object getFieldValue(_Fields field) {
-
 
3626
      switch (field) {
-
 
3627
      case SUCCESS:
-
 
3628
        return Boolean.valueOf(isSuccess());
-
 
3629
 
-
 
3630
      case PEX:
-
 
3631
        return getPex();
-
 
3632
 
-
 
3633
      }
-
 
3634
      throw new IllegalStateException();
-
 
3635
    }
-
 
3636
 
-
 
3637
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
3638
    public boolean isSet(_Fields field) {
-
 
3639
      if (field == null) {
-
 
3640
        throw new IllegalArgumentException();
-
 
3641
      }
-
 
3642
 
-
 
3643
      switch (field) {
-
 
3644
      case SUCCESS:
-
 
3645
        return isSetSuccess();
-
 
3646
      case PEX:
-
 
3647
        return isSetPex();
-
 
3648
      }
-
 
3649
      throw new IllegalStateException();
-
 
3650
    }
-
 
3651
 
-
 
3652
    @Override
-
 
3653
    public boolean equals(Object that) {
-
 
3654
      if (that == null)
-
 
3655
        return false;
-
 
3656
      if (that instanceof isGiftVoucher_result)
-
 
3657
        return this.equals((isGiftVoucher_result)that);
-
 
3658
      return false;
-
 
3659
    }
-
 
3660
 
-
 
3661
    public boolean equals(isGiftVoucher_result that) {
-
 
3662
      if (that == null)
-
 
3663
        return false;
-
 
3664
 
-
 
3665
      boolean this_present_success = true;
-
 
3666
      boolean that_present_success = true;
-
 
3667
      if (this_present_success || that_present_success) {
-
 
3668
        if (!(this_present_success && that_present_success))
-
 
3669
          return false;
-
 
3670
        if (this.success != that.success)
-
 
3671
          return false;
-
 
3672
      }
-
 
3673
 
-
 
3674
      boolean this_present_pex = true && this.isSetPex();
-
 
3675
      boolean that_present_pex = true && that.isSetPex();
-
 
3676
      if (this_present_pex || that_present_pex) {
-
 
3677
        if (!(this_present_pex && that_present_pex))
-
 
3678
          return false;
-
 
3679
        if (!this.pex.equals(that.pex))
-
 
3680
          return false;
-
 
3681
      }
-
 
3682
 
-
 
3683
      return true;
-
 
3684
    }
-
 
3685
 
-
 
3686
    @Override
-
 
3687
    public int hashCode() {
-
 
3688
      return 0;
-
 
3689
    }
-
 
3690
 
-
 
3691
    public int compareTo(isGiftVoucher_result other) {
-
 
3692
      if (!getClass().equals(other.getClass())) {
-
 
3693
        return getClass().getName().compareTo(other.getClass().getName());
-
 
3694
      }
-
 
3695
 
-
 
3696
      int lastComparison = 0;
-
 
3697
      isGiftVoucher_result typedOther = (isGiftVoucher_result)other;
-
 
3698
 
-
 
3699
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
3700
      if (lastComparison != 0) {
-
 
3701
        return lastComparison;
-
 
3702
      }
-
 
3703
      if (isSetSuccess()) {
-
 
3704
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
3705
        if (lastComparison != 0) {
-
 
3706
          return lastComparison;
-
 
3707
        }
-
 
3708
      }
-
 
3709
      lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
-
 
3710
      if (lastComparison != 0) {
-
 
3711
        return lastComparison;
-
 
3712
      }
-
 
3713
      if (isSetPex()) {
-
 
3714
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
-
 
3715
        if (lastComparison != 0) {
-
 
3716
          return lastComparison;
-
 
3717
        }
-
 
3718
      }
-
 
3719
      return 0;
-
 
3720
    }
-
 
3721
 
-
 
3722
    public _Fields fieldForId(int fieldId) {
-
 
3723
      return _Fields.findByThriftId(fieldId);
-
 
3724
    }
-
 
3725
 
-
 
3726
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
3727
      org.apache.thrift.protocol.TField field;
-
 
3728
      iprot.readStructBegin();
-
 
3729
      while (true)
-
 
3730
      {
-
 
3731
        field = iprot.readFieldBegin();
-
 
3732
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
3733
          break;
-
 
3734
        }
-
 
3735
        switch (field.id) {
-
 
3736
          case 0: // SUCCESS
-
 
3737
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-
 
3738
              this.success = iprot.readBool();
-
 
3739
              setSuccessIsSet(true);
-
 
3740
            } else { 
-
 
3741
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
3742
            }
-
 
3743
            break;
-
 
3744
          case 1: // PEX
-
 
3745
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
3746
              this.pex = new PromotionException();
-
 
3747
              this.pex.read(iprot);
-
 
3748
            } else { 
-
 
3749
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
3750
            }
-
 
3751
            break;
-
 
3752
          default:
-
 
3753
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
3754
        }
-
 
3755
        iprot.readFieldEnd();
-
 
3756
      }
-
 
3757
      iprot.readStructEnd();
-
 
3758
      validate();
-
 
3759
    }
-
 
3760
 
-
 
3761
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
3762
      oprot.writeStructBegin(STRUCT_DESC);
-
 
3763
 
-
 
3764
      if (this.isSetSuccess()) {
-
 
3765
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
3766
        oprot.writeBool(this.success);
-
 
3767
        oprot.writeFieldEnd();
-
 
3768
      } else if (this.isSetPex()) {
-
 
3769
        oprot.writeFieldBegin(PEX_FIELD_DESC);
-
 
3770
        this.pex.write(oprot);
-
 
3771
        oprot.writeFieldEnd();
-
 
3772
      }
-
 
3773
      oprot.writeFieldStop();
-
 
3774
      oprot.writeStructEnd();
-
 
3775
    }
-
 
3776
 
-
 
3777
    @Override
-
 
3778
    public String toString() {
-
 
3779
      StringBuilder sb = new StringBuilder("isGiftVoucher_result(");
-
 
3780
      boolean first = true;
-
 
3781
 
-
 
3782
      sb.append("success:");
-
 
3783
      sb.append(this.success);
-
 
3784
      first = false;
-
 
3785
      if (!first) sb.append(", ");
-
 
3786
      sb.append("pex:");
-
 
3787
      if (this.pex == null) {
-
 
3788
        sb.append("null");
-
 
3789
      } else {
-
 
3790
        sb.append(this.pex);
2273
      }
3791
      }
2274
      first = false;
3792
      first = false;
2275
      sb.append(")");
3793
      sb.append(")");
2276
      return sb.toString();
3794
      return sb.toString();
2277
    }
3795
    }