Subversion Repositories SmartDukaan

Rev

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

Rev 5327 Rev 5469
Line 62... Line 62...
62
 
62
 
63
    public List<ItemCouponDiscount> getItemDiscountMap(List<Long> itemIds) throws PromotionException, org.apache.thrift.TException;
63
    public List<ItemCouponDiscount> getItemDiscountMap(List<Long> itemIds) throws PromotionException, org.apache.thrift.TException;
64
 
64
 
65
    public Map<String,Double> getDiscountsForEntity(long entityId) throws org.apache.thrift.TException;
65
    public Map<String,Double> getDiscountsForEntity(long entityId) throws org.apache.thrift.TException;
66
 
66
 
-
 
67
    public void addVoucher(Voucher voucher) throws org.apache.thrift.TException;
-
 
68
 
-
 
69
    public Voucher assignVoucher(long userId, String userEmail, VoucherType voucherType, long amount) throws org.apache.thrift.TException;
-
 
70
 
-
 
71
    public boolean markVoucherAsRedeemed(String voucherCode, long redeemedOn) throws org.apache.thrift.TException;
-
 
72
 
67
  }
73
  }
68
 
74
 
69
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
75
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
70
 
76
 
71
    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;
77
    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;
Line 90... Line 96...
90
 
96
 
91
    public void getItemDiscountMap(List<Long> itemIds, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemDiscountMap_call> resultHandler) throws org.apache.thrift.TException;
97
    public void getItemDiscountMap(List<Long> itemIds, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemDiscountMap_call> resultHandler) throws org.apache.thrift.TException;
92
 
98
 
93
    public void getDiscountsForEntity(long entityId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getDiscountsForEntity_call> resultHandler) throws org.apache.thrift.TException;
99
    public void getDiscountsForEntity(long entityId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getDiscountsForEntity_call> resultHandler) throws org.apache.thrift.TException;
94
 
100
 
-
 
101
    public void addVoucher(Voucher voucher, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addVoucher_call> resultHandler) throws org.apache.thrift.TException;
-
 
102
 
-
 
103
    public void assignVoucher(long userId, String userEmail, VoucherType voucherType, long amount, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.assignVoucher_call> resultHandler) throws org.apache.thrift.TException;
-
 
104
 
-
 
105
    public void markVoucherAsRedeemed(String voucherCode, long redeemedOn, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.markVoucherAsRedeemed_call> resultHandler) throws org.apache.thrift.TException;
-
 
106
 
95
  }
107
  }
96
 
108
 
97
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
109
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
98
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
110
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
99
      public Factory() {}
111
      public Factory() {}
Line 415... Line 427...
415
        return result.success;
427
        return result.success;
416
      }
428
      }
417
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getDiscountsForEntity failed: unknown result");
429
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getDiscountsForEntity failed: unknown result");
418
    }
430
    }
419
 
431
 
-
 
432
    public void addVoucher(Voucher voucher) throws org.apache.thrift.TException
-
 
433
    {
-
 
434
      send_addVoucher(voucher);
-
 
435
      recv_addVoucher();
-
 
436
    }
-
 
437
 
-
 
438
    public void send_addVoucher(Voucher voucher) throws org.apache.thrift.TException
-
 
439
    {
-
 
440
      addVoucher_args args = new addVoucher_args();
-
 
441
      args.setVoucher(voucher);
-
 
442
      sendBase("addVoucher", args);
-
 
443
    }
-
 
444
 
-
 
445
    public void recv_addVoucher() throws org.apache.thrift.TException
-
 
446
    {
-
 
447
      addVoucher_result result = new addVoucher_result();
-
 
448
      receiveBase(result, "addVoucher");
-
 
449
      return;
-
 
450
    }
-
 
451
 
-
 
452
    public Voucher assignVoucher(long userId, String userEmail, VoucherType voucherType, long amount) throws org.apache.thrift.TException
-
 
453
    {
-
 
454
      send_assignVoucher(userId, userEmail, voucherType, amount);
-
 
455
      return recv_assignVoucher();
-
 
456
    }
-
 
457
 
-
 
458
    public void send_assignVoucher(long userId, String userEmail, VoucherType voucherType, long amount) throws org.apache.thrift.TException
-
 
459
    {
-
 
460
      assignVoucher_args args = new assignVoucher_args();
-
 
461
      args.setUserId(userId);
-
 
462
      args.setUserEmail(userEmail);
-
 
463
      args.setVoucherType(voucherType);
-
 
464
      args.setAmount(amount);
-
 
465
      sendBase("assignVoucher", args);
-
 
466
    }
-
 
467
 
-
 
468
    public Voucher recv_assignVoucher() throws org.apache.thrift.TException
-
 
469
    {
-
 
470
      assignVoucher_result result = new assignVoucher_result();
-
 
471
      receiveBase(result, "assignVoucher");
-
 
472
      if (result.isSetSuccess()) {
-
 
473
        return result.success;
-
 
474
      }
-
 
475
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "assignVoucher failed: unknown result");
-
 
476
    }
-
 
477
 
-
 
478
    public boolean markVoucherAsRedeemed(String voucherCode, long redeemedOn) throws org.apache.thrift.TException
-
 
479
    {
-
 
480
      send_markVoucherAsRedeemed(voucherCode, redeemedOn);
-
 
481
      return recv_markVoucherAsRedeemed();
-
 
482
    }
-
 
483
 
-
 
484
    public void send_markVoucherAsRedeemed(String voucherCode, long redeemedOn) throws org.apache.thrift.TException
-
 
485
    {
-
 
486
      markVoucherAsRedeemed_args args = new markVoucherAsRedeemed_args();
-
 
487
      args.setVoucherCode(voucherCode);
-
 
488
      args.setRedeemedOn(redeemedOn);
-
 
489
      sendBase("markVoucherAsRedeemed", args);
-
 
490
    }
-
 
491
 
-
 
492
    public boolean recv_markVoucherAsRedeemed() throws org.apache.thrift.TException
-
 
493
    {
-
 
494
      markVoucherAsRedeemed_result result = new markVoucherAsRedeemed_result();
-
 
495
      receiveBase(result, "markVoucherAsRedeemed");
-
 
496
      if (result.isSetSuccess()) {
-
 
497
        return result.success;
-
 
498
      }
-
 
499
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "markVoucherAsRedeemed failed: unknown result");
-
 
500
    }
-
 
501
 
420
  }
502
  }
421
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
503
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
422
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
504
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
423
      private org.apache.thrift.async.TAsyncClientManager clientManager;
505
      private org.apache.thrift.async.TAsyncClientManager clientManager;
424
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
506
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
Line 835... Line 917...
835
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
917
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
836
        return (new Client(prot)).recv_getDiscountsForEntity();
918
        return (new Client(prot)).recv_getDiscountsForEntity();
837
      }
919
      }
838
    }
920
    }
839
 
921
 
-
 
922
    public void addVoucher(Voucher voucher, org.apache.thrift.async.AsyncMethodCallback<addVoucher_call> resultHandler) throws org.apache.thrift.TException {
-
 
923
      checkReady();
-
 
924
      addVoucher_call method_call = new addVoucher_call(voucher, resultHandler, this, ___protocolFactory, ___transport);
-
 
925
      this.___currentMethod = method_call;
-
 
926
      ___manager.call(method_call);
-
 
927
    }
-
 
928
 
-
 
929
    public static class addVoucher_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
930
      private Voucher voucher;
-
 
931
      public addVoucher_call(Voucher voucher, org.apache.thrift.async.AsyncMethodCallback<addVoucher_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
-
 
932
        super(client, protocolFactory, transport, resultHandler, false);
-
 
933
        this.voucher = voucher;
-
 
934
      }
-
 
935
 
-
 
936
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
937
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addVoucher", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
938
        addVoucher_args args = new addVoucher_args();
-
 
939
        args.setVoucher(voucher);
-
 
940
        args.write(prot);
-
 
941
        prot.writeMessageEnd();
-
 
942
      }
-
 
943
 
-
 
944
      public void getResult() throws org.apache.thrift.TException {
-
 
945
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
946
          throw new IllegalStateException("Method call not finished!");
-
 
947
        }
-
 
948
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
949
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
950
        (new Client(prot)).recv_addVoucher();
-
 
951
      }
-
 
952
    }
-
 
953
 
-
 
954
    public void assignVoucher(long userId, String userEmail, VoucherType voucherType, long amount, org.apache.thrift.async.AsyncMethodCallback<assignVoucher_call> resultHandler) throws org.apache.thrift.TException {
-
 
955
      checkReady();
-
 
956
      assignVoucher_call method_call = new assignVoucher_call(userId, userEmail, voucherType, amount, resultHandler, this, ___protocolFactory, ___transport);
-
 
957
      this.___currentMethod = method_call;
-
 
958
      ___manager.call(method_call);
-
 
959
    }
-
 
960
 
-
 
961
    public static class assignVoucher_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
962
      private long userId;
-
 
963
      private String userEmail;
-
 
964
      private VoucherType voucherType;
-
 
965
      private long amount;
-
 
966
      public assignVoucher_call(long userId, String userEmail, VoucherType voucherType, long amount, org.apache.thrift.async.AsyncMethodCallback<assignVoucher_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
-
 
967
        super(client, protocolFactory, transport, resultHandler, false);
-
 
968
        this.userId = userId;
-
 
969
        this.userEmail = userEmail;
-
 
970
        this.voucherType = voucherType;
-
 
971
        this.amount = amount;
-
 
972
      }
-
 
973
 
-
 
974
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
975
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("assignVoucher", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
976
        assignVoucher_args args = new assignVoucher_args();
-
 
977
        args.setUserId(userId);
-
 
978
        args.setUserEmail(userEmail);
-
 
979
        args.setVoucherType(voucherType);
-
 
980
        args.setAmount(amount);
-
 
981
        args.write(prot);
-
 
982
        prot.writeMessageEnd();
-
 
983
      }
-
 
984
 
-
 
985
      public Voucher getResult() throws org.apache.thrift.TException {
-
 
986
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
987
          throw new IllegalStateException("Method call not finished!");
-
 
988
        }
-
 
989
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
990
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
991
        return (new Client(prot)).recv_assignVoucher();
-
 
992
      }
-
 
993
    }
-
 
994
 
-
 
995
    public void markVoucherAsRedeemed(String voucherCode, long redeemedOn, org.apache.thrift.async.AsyncMethodCallback<markVoucherAsRedeemed_call> resultHandler) throws org.apache.thrift.TException {
-
 
996
      checkReady();
-
 
997
      markVoucherAsRedeemed_call method_call = new markVoucherAsRedeemed_call(voucherCode, redeemedOn, resultHandler, this, ___protocolFactory, ___transport);
-
 
998
      this.___currentMethod = method_call;
-
 
999
      ___manager.call(method_call);
-
 
1000
    }
-
 
1001
 
-
 
1002
    public static class markVoucherAsRedeemed_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
1003
      private String voucherCode;
-
 
1004
      private long redeemedOn;
-
 
1005
      public markVoucherAsRedeemed_call(String voucherCode, long redeemedOn, org.apache.thrift.async.AsyncMethodCallback<markVoucherAsRedeemed_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
-
 
1006
        super(client, protocolFactory, transport, resultHandler, false);
-
 
1007
        this.voucherCode = voucherCode;
-
 
1008
        this.redeemedOn = redeemedOn;
-
 
1009
      }
-
 
1010
 
-
 
1011
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
1012
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("markVoucherAsRedeemed", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
1013
        markVoucherAsRedeemed_args args = new markVoucherAsRedeemed_args();
-
 
1014
        args.setVoucherCode(voucherCode);
-
 
1015
        args.setRedeemedOn(redeemedOn);
-
 
1016
        args.write(prot);
-
 
1017
        prot.writeMessageEnd();
-
 
1018
      }
-
 
1019
 
-
 
1020
      public boolean getResult() throws org.apache.thrift.TException {
-
 
1021
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
1022
          throw new IllegalStateException("Method call not finished!");
-
 
1023
        }
-
 
1024
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
1025
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
1026
        return (new Client(prot)).recv_markVoucherAsRedeemed();
-
 
1027
      }
-
 
1028
    }
-
 
1029
 
840
  }
1030
  }
841
 
1031
 
842
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1032
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
843
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1033
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
844
    public Processor(I iface) {
1034
    public Processor(I iface) {
Line 860... Line 1050...
860
      processMap.put("getActiveCoupons", new getActiveCoupons());
1050
      processMap.put("getActiveCoupons", new getActiveCoupons());
861
      processMap.put("getSuccessfulPaymentCountForCoupon", new getSuccessfulPaymentCountForCoupon());
1051
      processMap.put("getSuccessfulPaymentCountForCoupon", new getSuccessfulPaymentCountForCoupon());
862
      processMap.put("getRuleDocString", new getRuleDocString());
1052
      processMap.put("getRuleDocString", new getRuleDocString());
863
      processMap.put("getItemDiscountMap", new getItemDiscountMap());
1053
      processMap.put("getItemDiscountMap", new getItemDiscountMap());
864
      processMap.put("getDiscountsForEntity", new getDiscountsForEntity());
1054
      processMap.put("getDiscountsForEntity", new getDiscountsForEntity());
-
 
1055
      processMap.put("addVoucher", new addVoucher());
-
 
1056
      processMap.put("assignVoucher", new assignVoucher());
-
 
1057
      processMap.put("markVoucherAsRedeemed", new markVoucherAsRedeemed());
865
      return processMap;
1058
      return processMap;
866
    }
1059
    }
867
 
1060
 
868
    private static class createPromotion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPromotion_args> {
1061
    private static class createPromotion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPromotion_args> {
869
      public createPromotion() {
1062
      public createPromotion() {
Line 1097... Line 1290...
1097
        result.success = iface.getDiscountsForEntity(args.entityId);
1290
        result.success = iface.getDiscountsForEntity(args.entityId);
1098
        return result;
1291
        return result;
1099
      }
1292
      }
1100
    }
1293
    }
1101
 
1294
 
-
 
1295
    private static class addVoucher<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addVoucher_args> {
-
 
1296
      public addVoucher() {
-
 
1297
        super("addVoucher");
-
 
1298
      }
-
 
1299
 
-
 
1300
      protected addVoucher_args getEmptyArgsInstance() {
-
 
1301
        return new addVoucher_args();
-
 
1302
      }
-
 
1303
 
-
 
1304
      protected addVoucher_result getResult(I iface, addVoucher_args args) throws org.apache.thrift.TException {
-
 
1305
        addVoucher_result result = new addVoucher_result();
-
 
1306
        iface.addVoucher(args.voucher);
-
 
1307
        return result;
-
 
1308
      }
-
 
1309
    }
-
 
1310
 
-
 
1311
    private static class assignVoucher<I extends Iface> extends org.apache.thrift.ProcessFunction<I, assignVoucher_args> {
-
 
1312
      public assignVoucher() {
-
 
1313
        super("assignVoucher");
-
 
1314
      }
-
 
1315
 
-
 
1316
      protected assignVoucher_args getEmptyArgsInstance() {
-
 
1317
        return new assignVoucher_args();
-
 
1318
      }
-
 
1319
 
-
 
1320
      protected assignVoucher_result getResult(I iface, assignVoucher_args args) throws org.apache.thrift.TException {
-
 
1321
        assignVoucher_result result = new assignVoucher_result();
-
 
1322
        result.success = iface.assignVoucher(args.userId, args.userEmail, args.voucherType, args.amount);
-
 
1323
        return result;
-
 
1324
      }
-
 
1325
    }
-
 
1326
 
-
 
1327
    private static class markVoucherAsRedeemed<I extends Iface> extends org.apache.thrift.ProcessFunction<I, markVoucherAsRedeemed_args> {
-
 
1328
      public markVoucherAsRedeemed() {
-
 
1329
        super("markVoucherAsRedeemed");
-
 
1330
      }
-
 
1331
 
-
 
1332
      protected markVoucherAsRedeemed_args getEmptyArgsInstance() {
-
 
1333
        return new markVoucherAsRedeemed_args();
-
 
1334
      }
-
 
1335
 
-
 
1336
      protected markVoucherAsRedeemed_result getResult(I iface, markVoucherAsRedeemed_args args) throws org.apache.thrift.TException {
-
 
1337
        markVoucherAsRedeemed_result result = new markVoucherAsRedeemed_result();
-
 
1338
        result.success = iface.markVoucherAsRedeemed(args.voucherCode, args.redeemedOn);
-
 
1339
        result.setSuccessIsSet(true);
-
 
1340
        return result;
-
 
1341
      }
-
 
1342
    }
-
 
1343
 
1102
  }
1344
  }
1103
 
1345
 
1104
  public static class createPromotion_args implements org.apache.thrift.TBase<createPromotion_args, createPromotion_args._Fields>, java.io.Serializable, Cloneable   {
1346
  public static class createPromotion_args implements org.apache.thrift.TBase<createPromotion_args, createPromotion_args._Fields>, java.io.Serializable, Cloneable   {
1105
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPromotion_args");
1347
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPromotion_args");
1106
 
1348
 
Line 9444... Line 9686...
9444
      first = false;
9686
      first = false;
9445
      sb.append(")");
9687
      sb.append(")");
9446
      return sb.toString();
9688
      return sb.toString();
9447
    }
9689
    }
9448
 
9690
 
-
 
9691
    public void validate() throws org.apache.thrift.TException {
-
 
9692
      // check for required fields
-
 
9693
    }
-
 
9694
 
-
 
9695
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
9696
      try {
-
 
9697
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
9698
      } catch (org.apache.thrift.TException te) {
-
 
9699
        throw new java.io.IOException(te);
-
 
9700
      }
-
 
9701
    }
-
 
9702
 
-
 
9703
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
9704
      try {
-
 
9705
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
9706
      } catch (org.apache.thrift.TException te) {
-
 
9707
        throw new java.io.IOException(te);
-
 
9708
      }
-
 
9709
    }
-
 
9710
 
-
 
9711
  }
-
 
9712
 
-
 
9713
  public static class addVoucher_args implements org.apache.thrift.TBase<addVoucher_args, addVoucher_args._Fields>, java.io.Serializable, Cloneable   {
-
 
9714
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addVoucher_args");
-
 
9715
 
-
 
9716
    private static final org.apache.thrift.protocol.TField VOUCHER_FIELD_DESC = new org.apache.thrift.protocol.TField("voucher", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
 
9717
 
-
 
9718
    private Voucher voucher; // required
-
 
9719
 
-
 
9720
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
9721
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
9722
      VOUCHER((short)1, "voucher");
-
 
9723
 
-
 
9724
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
9725
 
-
 
9726
      static {
-
 
9727
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
9728
          byName.put(field.getFieldName(), field);
-
 
9729
        }
-
 
9730
      }
-
 
9731
 
-
 
9732
      /**
-
 
9733
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
9734
       */
-
 
9735
      public static _Fields findByThriftId(int fieldId) {
-
 
9736
        switch(fieldId) {
-
 
9737
          case 1: // VOUCHER
-
 
9738
            return VOUCHER;
-
 
9739
          default:
-
 
9740
            return null;
-
 
9741
        }
-
 
9742
      }
-
 
9743
 
-
 
9744
      /**
-
 
9745
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
9746
       * if it is not found.
-
 
9747
       */
-
 
9748
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
9749
        _Fields fields = findByThriftId(fieldId);
-
 
9750
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
9751
        return fields;
-
 
9752
      }
-
 
9753
 
-
 
9754
      /**
-
 
9755
       * Find the _Fields constant that matches name, or null if its not found.
-
 
9756
       */
-
 
9757
      public static _Fields findByName(String name) {
-
 
9758
        return byName.get(name);
-
 
9759
      }
-
 
9760
 
-
 
9761
      private final short _thriftId;
-
 
9762
      private final String _fieldName;
-
 
9763
 
-
 
9764
      _Fields(short thriftId, String fieldName) {
-
 
9765
        _thriftId = thriftId;
-
 
9766
        _fieldName = fieldName;
-
 
9767
      }
-
 
9768
 
-
 
9769
      public short getThriftFieldId() {
-
 
9770
        return _thriftId;
-
 
9771
      }
-
 
9772
 
-
 
9773
      public String getFieldName() {
-
 
9774
        return _fieldName;
-
 
9775
      }
-
 
9776
    }
-
 
9777
 
-
 
9778
    // isset id assignments
-
 
9779
 
-
 
9780
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
9781
    static {
-
 
9782
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
9783
      tmpMap.put(_Fields.VOUCHER, new org.apache.thrift.meta_data.FieldMetaData("voucher", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
9784
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Voucher.class)));
-
 
9785
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
9786
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addVoucher_args.class, metaDataMap);
-
 
9787
    }
-
 
9788
 
-
 
9789
    public addVoucher_args() {
-
 
9790
    }
-
 
9791
 
-
 
9792
    public addVoucher_args(
-
 
9793
      Voucher voucher)
-
 
9794
    {
-
 
9795
      this();
-
 
9796
      this.voucher = voucher;
-
 
9797
    }
-
 
9798
 
-
 
9799
    /**
-
 
9800
     * Performs a deep copy on <i>other</i>.
-
 
9801
     */
-
 
9802
    public addVoucher_args(addVoucher_args other) {
-
 
9803
      if (other.isSetVoucher()) {
-
 
9804
        this.voucher = new Voucher(other.voucher);
-
 
9805
      }
-
 
9806
    }
-
 
9807
 
-
 
9808
    public addVoucher_args deepCopy() {
-
 
9809
      return new addVoucher_args(this);
-
 
9810
    }
-
 
9811
 
-
 
9812
    @Override
-
 
9813
    public void clear() {
-
 
9814
      this.voucher = null;
-
 
9815
    }
-
 
9816
 
-
 
9817
    public Voucher getVoucher() {
-
 
9818
      return this.voucher;
-
 
9819
    }
-
 
9820
 
-
 
9821
    public void setVoucher(Voucher voucher) {
-
 
9822
      this.voucher = voucher;
-
 
9823
    }
-
 
9824
 
-
 
9825
    public void unsetVoucher() {
-
 
9826
      this.voucher = null;
-
 
9827
    }
-
 
9828
 
-
 
9829
    /** Returns true if field voucher is set (has been assigned a value) and false otherwise */
-
 
9830
    public boolean isSetVoucher() {
-
 
9831
      return this.voucher != null;
-
 
9832
    }
-
 
9833
 
-
 
9834
    public void setVoucherIsSet(boolean value) {
-
 
9835
      if (!value) {
-
 
9836
        this.voucher = null;
-
 
9837
      }
-
 
9838
    }
-
 
9839
 
-
 
9840
    public void setFieldValue(_Fields field, Object value) {
-
 
9841
      switch (field) {
-
 
9842
      case VOUCHER:
-
 
9843
        if (value == null) {
-
 
9844
          unsetVoucher();
-
 
9845
        } else {
-
 
9846
          setVoucher((Voucher)value);
-
 
9847
        }
-
 
9848
        break;
-
 
9849
 
-
 
9850
      }
-
 
9851
    }
-
 
9852
 
-
 
9853
    public Object getFieldValue(_Fields field) {
-
 
9854
      switch (field) {
-
 
9855
      case VOUCHER:
-
 
9856
        return getVoucher();
-
 
9857
 
-
 
9858
      }
-
 
9859
      throw new IllegalStateException();
-
 
9860
    }
-
 
9861
 
-
 
9862
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
9863
    public boolean isSet(_Fields field) {
-
 
9864
      if (field == null) {
-
 
9865
        throw new IllegalArgumentException();
-
 
9866
      }
-
 
9867
 
-
 
9868
      switch (field) {
-
 
9869
      case VOUCHER:
-
 
9870
        return isSetVoucher();
-
 
9871
      }
-
 
9872
      throw new IllegalStateException();
-
 
9873
    }
-
 
9874
 
-
 
9875
    @Override
-
 
9876
    public boolean equals(Object that) {
-
 
9877
      if (that == null)
-
 
9878
        return false;
-
 
9879
      if (that instanceof addVoucher_args)
-
 
9880
        return this.equals((addVoucher_args)that);
-
 
9881
      return false;
-
 
9882
    }
-
 
9883
 
-
 
9884
    public boolean equals(addVoucher_args that) {
-
 
9885
      if (that == null)
-
 
9886
        return false;
-
 
9887
 
-
 
9888
      boolean this_present_voucher = true && this.isSetVoucher();
-
 
9889
      boolean that_present_voucher = true && that.isSetVoucher();
-
 
9890
      if (this_present_voucher || that_present_voucher) {
-
 
9891
        if (!(this_present_voucher && that_present_voucher))
-
 
9892
          return false;
-
 
9893
        if (!this.voucher.equals(that.voucher))
-
 
9894
          return false;
-
 
9895
      }
-
 
9896
 
-
 
9897
      return true;
-
 
9898
    }
-
 
9899
 
-
 
9900
    @Override
-
 
9901
    public int hashCode() {
-
 
9902
      return 0;
-
 
9903
    }
-
 
9904
 
-
 
9905
    public int compareTo(addVoucher_args other) {
-
 
9906
      if (!getClass().equals(other.getClass())) {
-
 
9907
        return getClass().getName().compareTo(other.getClass().getName());
-
 
9908
      }
-
 
9909
 
-
 
9910
      int lastComparison = 0;
-
 
9911
      addVoucher_args typedOther = (addVoucher_args)other;
-
 
9912
 
-
 
9913
      lastComparison = Boolean.valueOf(isSetVoucher()).compareTo(typedOther.isSetVoucher());
-
 
9914
      if (lastComparison != 0) {
-
 
9915
        return lastComparison;
-
 
9916
      }
-
 
9917
      if (isSetVoucher()) {
-
 
9918
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.voucher, typedOther.voucher);
-
 
9919
        if (lastComparison != 0) {
-
 
9920
          return lastComparison;
-
 
9921
        }
-
 
9922
      }
-
 
9923
      return 0;
-
 
9924
    }
-
 
9925
 
-
 
9926
    public _Fields fieldForId(int fieldId) {
-
 
9927
      return _Fields.findByThriftId(fieldId);
-
 
9928
    }
-
 
9929
 
-
 
9930
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
9931
      org.apache.thrift.protocol.TField field;
-
 
9932
      iprot.readStructBegin();
-
 
9933
      while (true)
-
 
9934
      {
-
 
9935
        field = iprot.readFieldBegin();
-
 
9936
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
9937
          break;
-
 
9938
        }
-
 
9939
        switch (field.id) {
-
 
9940
          case 1: // VOUCHER
-
 
9941
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
9942
              this.voucher = new Voucher();
-
 
9943
              this.voucher.read(iprot);
-
 
9944
            } else { 
-
 
9945
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
9946
            }
-
 
9947
            break;
-
 
9948
          default:
-
 
9949
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
9950
        }
-
 
9951
        iprot.readFieldEnd();
-
 
9952
      }
-
 
9953
      iprot.readStructEnd();
-
 
9954
      validate();
-
 
9955
    }
-
 
9956
 
-
 
9957
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
9958
      validate();
-
 
9959
 
-
 
9960
      oprot.writeStructBegin(STRUCT_DESC);
-
 
9961
      if (this.voucher != null) {
-
 
9962
        oprot.writeFieldBegin(VOUCHER_FIELD_DESC);
-
 
9963
        this.voucher.write(oprot);
-
 
9964
        oprot.writeFieldEnd();
-
 
9965
      }
-
 
9966
      oprot.writeFieldStop();
-
 
9967
      oprot.writeStructEnd();
-
 
9968
    }
-
 
9969
 
-
 
9970
    @Override
-
 
9971
    public String toString() {
-
 
9972
      StringBuilder sb = new StringBuilder("addVoucher_args(");
-
 
9973
      boolean first = true;
-
 
9974
 
-
 
9975
      sb.append("voucher:");
-
 
9976
      if (this.voucher == null) {
-
 
9977
        sb.append("null");
-
 
9978
      } else {
-
 
9979
        sb.append(this.voucher);
-
 
9980
      }
-
 
9981
      first = false;
-
 
9982
      sb.append(")");
-
 
9983
      return sb.toString();
-
 
9984
    }
-
 
9985
 
-
 
9986
    public void validate() throws org.apache.thrift.TException {
-
 
9987
      // check for required fields
-
 
9988
    }
-
 
9989
 
-
 
9990
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
9991
      try {
-
 
9992
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
9993
      } catch (org.apache.thrift.TException te) {
-
 
9994
        throw new java.io.IOException(te);
-
 
9995
      }
-
 
9996
    }
-
 
9997
 
-
 
9998
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
9999
      try {
-
 
10000
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
10001
      } catch (org.apache.thrift.TException te) {
-
 
10002
        throw new java.io.IOException(te);
-
 
10003
      }
-
 
10004
    }
-
 
10005
 
-
 
10006
  }
-
 
10007
 
-
 
10008
  public static class addVoucher_result implements org.apache.thrift.TBase<addVoucher_result, addVoucher_result._Fields>, java.io.Serializable, Cloneable   {
-
 
10009
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addVoucher_result");
-
 
10010
 
-
 
10011
 
-
 
10012
 
-
 
10013
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
10014
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
10015
;
-
 
10016
 
-
 
10017
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
10018
 
-
 
10019
      static {
-
 
10020
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
10021
          byName.put(field.getFieldName(), field);
-
 
10022
        }
-
 
10023
      }
-
 
10024
 
-
 
10025
      /**
-
 
10026
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
10027
       */
-
 
10028
      public static _Fields findByThriftId(int fieldId) {
-
 
10029
        switch(fieldId) {
-
 
10030
          default:
-
 
10031
            return null;
-
 
10032
        }
-
 
10033
      }
-
 
10034
 
-
 
10035
      /**
-
 
10036
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
10037
       * if it is not found.
-
 
10038
       */
-
 
10039
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
10040
        _Fields fields = findByThriftId(fieldId);
-
 
10041
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
10042
        return fields;
-
 
10043
      }
-
 
10044
 
-
 
10045
      /**
-
 
10046
       * Find the _Fields constant that matches name, or null if its not found.
-
 
10047
       */
-
 
10048
      public static _Fields findByName(String name) {
-
 
10049
        return byName.get(name);
-
 
10050
      }
-
 
10051
 
-
 
10052
      private final short _thriftId;
-
 
10053
      private final String _fieldName;
-
 
10054
 
-
 
10055
      _Fields(short thriftId, String fieldName) {
-
 
10056
        _thriftId = thriftId;
-
 
10057
        _fieldName = fieldName;
-
 
10058
      }
-
 
10059
 
-
 
10060
      public short getThriftFieldId() {
-
 
10061
        return _thriftId;
-
 
10062
      }
-
 
10063
 
-
 
10064
      public String getFieldName() {
-
 
10065
        return _fieldName;
-
 
10066
      }
-
 
10067
    }
-
 
10068
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
10069
    static {
-
 
10070
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
10071
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
10072
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addVoucher_result.class, metaDataMap);
-
 
10073
    }
-
 
10074
 
-
 
10075
    public addVoucher_result() {
-
 
10076
    }
-
 
10077
 
-
 
10078
    /**
-
 
10079
     * Performs a deep copy on <i>other</i>.
-
 
10080
     */
-
 
10081
    public addVoucher_result(addVoucher_result other) {
-
 
10082
    }
-
 
10083
 
-
 
10084
    public addVoucher_result deepCopy() {
-
 
10085
      return new addVoucher_result(this);
-
 
10086
    }
-
 
10087
 
-
 
10088
    @Override
-
 
10089
    public void clear() {
-
 
10090
    }
-
 
10091
 
-
 
10092
    public void setFieldValue(_Fields field, Object value) {
-
 
10093
      switch (field) {
-
 
10094
      }
-
 
10095
    }
-
 
10096
 
-
 
10097
    public Object getFieldValue(_Fields field) {
-
 
10098
      switch (field) {
-
 
10099
      }
-
 
10100
      throw new IllegalStateException();
-
 
10101
    }
-
 
10102
 
-
 
10103
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
10104
    public boolean isSet(_Fields field) {
-
 
10105
      if (field == null) {
-
 
10106
        throw new IllegalArgumentException();
-
 
10107
      }
-
 
10108
 
-
 
10109
      switch (field) {
-
 
10110
      }
-
 
10111
      throw new IllegalStateException();
-
 
10112
    }
-
 
10113
 
-
 
10114
    @Override
-
 
10115
    public boolean equals(Object that) {
-
 
10116
      if (that == null)
-
 
10117
        return false;
-
 
10118
      if (that instanceof addVoucher_result)
-
 
10119
        return this.equals((addVoucher_result)that);
-
 
10120
      return false;
-
 
10121
    }
-
 
10122
 
-
 
10123
    public boolean equals(addVoucher_result that) {
-
 
10124
      if (that == null)
-
 
10125
        return false;
-
 
10126
 
-
 
10127
      return true;
-
 
10128
    }
-
 
10129
 
-
 
10130
    @Override
-
 
10131
    public int hashCode() {
-
 
10132
      return 0;
-
 
10133
    }
-
 
10134
 
-
 
10135
    public int compareTo(addVoucher_result other) {
-
 
10136
      if (!getClass().equals(other.getClass())) {
-
 
10137
        return getClass().getName().compareTo(other.getClass().getName());
-
 
10138
      }
-
 
10139
 
-
 
10140
      int lastComparison = 0;
-
 
10141
      addVoucher_result typedOther = (addVoucher_result)other;
-
 
10142
 
-
 
10143
      return 0;
-
 
10144
    }
-
 
10145
 
-
 
10146
    public _Fields fieldForId(int fieldId) {
-
 
10147
      return _Fields.findByThriftId(fieldId);
-
 
10148
    }
-
 
10149
 
-
 
10150
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
10151
      org.apache.thrift.protocol.TField field;
-
 
10152
      iprot.readStructBegin();
-
 
10153
      while (true)
-
 
10154
      {
-
 
10155
        field = iprot.readFieldBegin();
-
 
10156
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
10157
          break;
-
 
10158
        }
-
 
10159
        switch (field.id) {
-
 
10160
          default:
-
 
10161
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
10162
        }
-
 
10163
        iprot.readFieldEnd();
-
 
10164
      }
-
 
10165
      iprot.readStructEnd();
-
 
10166
      validate();
-
 
10167
    }
-
 
10168
 
-
 
10169
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
10170
      oprot.writeStructBegin(STRUCT_DESC);
-
 
10171
 
-
 
10172
      oprot.writeFieldStop();
-
 
10173
      oprot.writeStructEnd();
-
 
10174
    }
-
 
10175
 
-
 
10176
    @Override
-
 
10177
    public String toString() {
-
 
10178
      StringBuilder sb = new StringBuilder("addVoucher_result(");
-
 
10179
      boolean first = true;
-
 
10180
 
-
 
10181
      sb.append(")");
-
 
10182
      return sb.toString();
-
 
10183
    }
-
 
10184
 
-
 
10185
    public void validate() throws org.apache.thrift.TException {
-
 
10186
      // check for required fields
-
 
10187
    }
-
 
10188
 
-
 
10189
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
10190
      try {
-
 
10191
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
10192
      } catch (org.apache.thrift.TException te) {
-
 
10193
        throw new java.io.IOException(te);
-
 
10194
      }
-
 
10195
    }
-
 
10196
 
-
 
10197
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
10198
      try {
-
 
10199
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
10200
      } catch (org.apache.thrift.TException te) {
-
 
10201
        throw new java.io.IOException(te);
-
 
10202
      }
-
 
10203
    }
-
 
10204
 
-
 
10205
  }
-
 
10206
 
-
 
10207
  public static class assignVoucher_args implements org.apache.thrift.TBase<assignVoucher_args, assignVoucher_args._Fields>, java.io.Serializable, Cloneable   {
-
 
10208
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("assignVoucher_args");
-
 
10209
 
-
 
10210
    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);
-
 
10211
    private static final org.apache.thrift.protocol.TField USER_EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("userEmail", org.apache.thrift.protocol.TType.STRING, (short)2);
-
 
10212
    private static final org.apache.thrift.protocol.TField VOUCHER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("voucherType", org.apache.thrift.protocol.TType.I32, (short)3);
-
 
10213
    private static final org.apache.thrift.protocol.TField AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("amount", org.apache.thrift.protocol.TType.I64, (short)4);
-
 
10214
 
-
 
10215
    private long userId; // required
-
 
10216
    private String userEmail; // required
-
 
10217
    private VoucherType voucherType; // required
-
 
10218
    private long amount; // required
-
 
10219
 
-
 
10220
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
10221
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
10222
      USER_ID((short)1, "userId"),
-
 
10223
      USER_EMAIL((short)2, "userEmail"),
-
 
10224
      /**
-
 
10225
       * 
-
 
10226
       * @see VoucherType
-
 
10227
       */
-
 
10228
      VOUCHER_TYPE((short)3, "voucherType"),
-
 
10229
      AMOUNT((short)4, "amount");
-
 
10230
 
-
 
10231
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
10232
 
-
 
10233
      static {
-
 
10234
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
10235
          byName.put(field.getFieldName(), field);
-
 
10236
        }
-
 
10237
      }
-
 
10238
 
-
 
10239
      /**
-
 
10240
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
10241
       */
-
 
10242
      public static _Fields findByThriftId(int fieldId) {
-
 
10243
        switch(fieldId) {
-
 
10244
          case 1: // USER_ID
-
 
10245
            return USER_ID;
-
 
10246
          case 2: // USER_EMAIL
-
 
10247
            return USER_EMAIL;
-
 
10248
          case 3: // VOUCHER_TYPE
-
 
10249
            return VOUCHER_TYPE;
-
 
10250
          case 4: // AMOUNT
-
 
10251
            return AMOUNT;
-
 
10252
          default:
-
 
10253
            return null;
-
 
10254
        }
-
 
10255
      }
-
 
10256
 
-
 
10257
      /**
-
 
10258
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
10259
       * if it is not found.
-
 
10260
       */
-
 
10261
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
10262
        _Fields fields = findByThriftId(fieldId);
-
 
10263
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
10264
        return fields;
-
 
10265
      }
-
 
10266
 
-
 
10267
      /**
-
 
10268
       * Find the _Fields constant that matches name, or null if its not found.
-
 
10269
       */
-
 
10270
      public static _Fields findByName(String name) {
-
 
10271
        return byName.get(name);
-
 
10272
      }
-
 
10273
 
-
 
10274
      private final short _thriftId;
-
 
10275
      private final String _fieldName;
-
 
10276
 
-
 
10277
      _Fields(short thriftId, String fieldName) {
-
 
10278
        _thriftId = thriftId;
-
 
10279
        _fieldName = fieldName;
-
 
10280
      }
-
 
10281
 
-
 
10282
      public short getThriftFieldId() {
-
 
10283
        return _thriftId;
-
 
10284
      }
-
 
10285
 
-
 
10286
      public String getFieldName() {
-
 
10287
        return _fieldName;
-
 
10288
      }
-
 
10289
    }
-
 
10290
 
-
 
10291
    // isset id assignments
-
 
10292
    private static final int __USERID_ISSET_ID = 0;
-
 
10293
    private static final int __AMOUNT_ISSET_ID = 1;
-
 
10294
    private BitSet __isset_bit_vector = new BitSet(2);
-
 
10295
 
-
 
10296
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
10297
    static {
-
 
10298
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
10299
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
10300
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
10301
      tmpMap.put(_Fields.USER_EMAIL, new org.apache.thrift.meta_data.FieldMetaData("userEmail", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
10302
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
10303
      tmpMap.put(_Fields.VOUCHER_TYPE, new org.apache.thrift.meta_data.FieldMetaData("voucherType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
10304
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, VoucherType.class)));
-
 
10305
      tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
10306
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
10307
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
10308
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(assignVoucher_args.class, metaDataMap);
-
 
10309
    }
-
 
10310
 
-
 
10311
    public assignVoucher_args() {
-
 
10312
    }
-
 
10313
 
-
 
10314
    public assignVoucher_args(
-
 
10315
      long userId,
-
 
10316
      String userEmail,
-
 
10317
      VoucherType voucherType,
-
 
10318
      long amount)
-
 
10319
    {
-
 
10320
      this();
-
 
10321
      this.userId = userId;
-
 
10322
      setUserIdIsSet(true);
-
 
10323
      this.userEmail = userEmail;
-
 
10324
      this.voucherType = voucherType;
-
 
10325
      this.amount = amount;
-
 
10326
      setAmountIsSet(true);
-
 
10327
    }
-
 
10328
 
-
 
10329
    /**
-
 
10330
     * Performs a deep copy on <i>other</i>.
-
 
10331
     */
-
 
10332
    public assignVoucher_args(assignVoucher_args other) {
-
 
10333
      __isset_bit_vector.clear();
-
 
10334
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
10335
      this.userId = other.userId;
-
 
10336
      if (other.isSetUserEmail()) {
-
 
10337
        this.userEmail = other.userEmail;
-
 
10338
      }
-
 
10339
      if (other.isSetVoucherType()) {
-
 
10340
        this.voucherType = other.voucherType;
-
 
10341
      }
-
 
10342
      this.amount = other.amount;
-
 
10343
    }
-
 
10344
 
-
 
10345
    public assignVoucher_args deepCopy() {
-
 
10346
      return new assignVoucher_args(this);
-
 
10347
    }
-
 
10348
 
-
 
10349
    @Override
-
 
10350
    public void clear() {
-
 
10351
      setUserIdIsSet(false);
-
 
10352
      this.userId = 0;
-
 
10353
      this.userEmail = null;
-
 
10354
      this.voucherType = null;
-
 
10355
      setAmountIsSet(false);
-
 
10356
      this.amount = 0;
-
 
10357
    }
-
 
10358
 
-
 
10359
    public long getUserId() {
-
 
10360
      return this.userId;
-
 
10361
    }
-
 
10362
 
-
 
10363
    public void setUserId(long userId) {
-
 
10364
      this.userId = userId;
-
 
10365
      setUserIdIsSet(true);
-
 
10366
    }
-
 
10367
 
-
 
10368
    public void unsetUserId() {
-
 
10369
      __isset_bit_vector.clear(__USERID_ISSET_ID);
-
 
10370
    }
-
 
10371
 
-
 
10372
    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
-
 
10373
    public boolean isSetUserId() {
-
 
10374
      return __isset_bit_vector.get(__USERID_ISSET_ID);
-
 
10375
    }
-
 
10376
 
-
 
10377
    public void setUserIdIsSet(boolean value) {
-
 
10378
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
-
 
10379
    }
-
 
10380
 
-
 
10381
    public String getUserEmail() {
-
 
10382
      return this.userEmail;
-
 
10383
    }
-
 
10384
 
-
 
10385
    public void setUserEmail(String userEmail) {
-
 
10386
      this.userEmail = userEmail;
-
 
10387
    }
-
 
10388
 
-
 
10389
    public void unsetUserEmail() {
-
 
10390
      this.userEmail = null;
-
 
10391
    }
-
 
10392
 
-
 
10393
    /** Returns true if field userEmail is set (has been assigned a value) and false otherwise */
-
 
10394
    public boolean isSetUserEmail() {
-
 
10395
      return this.userEmail != null;
-
 
10396
    }
-
 
10397
 
-
 
10398
    public void setUserEmailIsSet(boolean value) {
-
 
10399
      if (!value) {
-
 
10400
        this.userEmail = null;
-
 
10401
      }
-
 
10402
    }
-
 
10403
 
-
 
10404
    /**
-
 
10405
     * 
-
 
10406
     * @see VoucherType
-
 
10407
     */
-
 
10408
    public VoucherType getVoucherType() {
-
 
10409
      return this.voucherType;
-
 
10410
    }
-
 
10411
 
-
 
10412
    /**
-
 
10413
     * 
-
 
10414
     * @see VoucherType
-
 
10415
     */
-
 
10416
    public void setVoucherType(VoucherType voucherType) {
-
 
10417
      this.voucherType = voucherType;
-
 
10418
    }
-
 
10419
 
-
 
10420
    public void unsetVoucherType() {
-
 
10421
      this.voucherType = null;
-
 
10422
    }
-
 
10423
 
-
 
10424
    /** Returns true if field voucherType is set (has been assigned a value) and false otherwise */
-
 
10425
    public boolean isSetVoucherType() {
-
 
10426
      return this.voucherType != null;
-
 
10427
    }
-
 
10428
 
-
 
10429
    public void setVoucherTypeIsSet(boolean value) {
-
 
10430
      if (!value) {
-
 
10431
        this.voucherType = null;
-
 
10432
      }
-
 
10433
    }
-
 
10434
 
-
 
10435
    public long getAmount() {
-
 
10436
      return this.amount;
-
 
10437
    }
-
 
10438
 
-
 
10439
    public void setAmount(long amount) {
-
 
10440
      this.amount = amount;
-
 
10441
      setAmountIsSet(true);
-
 
10442
    }
-
 
10443
 
-
 
10444
    public void unsetAmount() {
-
 
10445
      __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
-
 
10446
    }
-
 
10447
 
-
 
10448
    /** Returns true if field amount is set (has been assigned a value) and false otherwise */
-
 
10449
    public boolean isSetAmount() {
-
 
10450
      return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
-
 
10451
    }
-
 
10452
 
-
 
10453
    public void setAmountIsSet(boolean value) {
-
 
10454
      __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
-
 
10455
    }
-
 
10456
 
-
 
10457
    public void setFieldValue(_Fields field, Object value) {
-
 
10458
      switch (field) {
-
 
10459
      case USER_ID:
-
 
10460
        if (value == null) {
-
 
10461
          unsetUserId();
-
 
10462
        } else {
-
 
10463
          setUserId((Long)value);
-
 
10464
        }
-
 
10465
        break;
-
 
10466
 
-
 
10467
      case USER_EMAIL:
-
 
10468
        if (value == null) {
-
 
10469
          unsetUserEmail();
-
 
10470
        } else {
-
 
10471
          setUserEmail((String)value);
-
 
10472
        }
-
 
10473
        break;
-
 
10474
 
-
 
10475
      case VOUCHER_TYPE:
-
 
10476
        if (value == null) {
-
 
10477
          unsetVoucherType();
-
 
10478
        } else {
-
 
10479
          setVoucherType((VoucherType)value);
-
 
10480
        }
-
 
10481
        break;
-
 
10482
 
-
 
10483
      case AMOUNT:
-
 
10484
        if (value == null) {
-
 
10485
          unsetAmount();
-
 
10486
        } else {
-
 
10487
          setAmount((Long)value);
-
 
10488
        }
-
 
10489
        break;
-
 
10490
 
-
 
10491
      }
-
 
10492
    }
-
 
10493
 
-
 
10494
    public Object getFieldValue(_Fields field) {
-
 
10495
      switch (field) {
-
 
10496
      case USER_ID:
-
 
10497
        return Long.valueOf(getUserId());
-
 
10498
 
-
 
10499
      case USER_EMAIL:
-
 
10500
        return getUserEmail();
-
 
10501
 
-
 
10502
      case VOUCHER_TYPE:
-
 
10503
        return getVoucherType();
-
 
10504
 
-
 
10505
      case AMOUNT:
-
 
10506
        return Long.valueOf(getAmount());
-
 
10507
 
-
 
10508
      }
-
 
10509
      throw new IllegalStateException();
-
 
10510
    }
-
 
10511
 
-
 
10512
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
10513
    public boolean isSet(_Fields field) {
-
 
10514
      if (field == null) {
-
 
10515
        throw new IllegalArgumentException();
-
 
10516
      }
-
 
10517
 
-
 
10518
      switch (field) {
-
 
10519
      case USER_ID:
-
 
10520
        return isSetUserId();
-
 
10521
      case USER_EMAIL:
-
 
10522
        return isSetUserEmail();
-
 
10523
      case VOUCHER_TYPE:
-
 
10524
        return isSetVoucherType();
-
 
10525
      case AMOUNT:
-
 
10526
        return isSetAmount();
-
 
10527
      }
-
 
10528
      throw new IllegalStateException();
-
 
10529
    }
-
 
10530
 
-
 
10531
    @Override
-
 
10532
    public boolean equals(Object that) {
-
 
10533
      if (that == null)
-
 
10534
        return false;
-
 
10535
      if (that instanceof assignVoucher_args)
-
 
10536
        return this.equals((assignVoucher_args)that);
-
 
10537
      return false;
-
 
10538
    }
-
 
10539
 
-
 
10540
    public boolean equals(assignVoucher_args that) {
-
 
10541
      if (that == null)
-
 
10542
        return false;
-
 
10543
 
-
 
10544
      boolean this_present_userId = true;
-
 
10545
      boolean that_present_userId = true;
-
 
10546
      if (this_present_userId || that_present_userId) {
-
 
10547
        if (!(this_present_userId && that_present_userId))
-
 
10548
          return false;
-
 
10549
        if (this.userId != that.userId)
-
 
10550
          return false;
-
 
10551
      }
-
 
10552
 
-
 
10553
      boolean this_present_userEmail = true && this.isSetUserEmail();
-
 
10554
      boolean that_present_userEmail = true && that.isSetUserEmail();
-
 
10555
      if (this_present_userEmail || that_present_userEmail) {
-
 
10556
        if (!(this_present_userEmail && that_present_userEmail))
-
 
10557
          return false;
-
 
10558
        if (!this.userEmail.equals(that.userEmail))
-
 
10559
          return false;
-
 
10560
      }
-
 
10561
 
-
 
10562
      boolean this_present_voucherType = true && this.isSetVoucherType();
-
 
10563
      boolean that_present_voucherType = true && that.isSetVoucherType();
-
 
10564
      if (this_present_voucherType || that_present_voucherType) {
-
 
10565
        if (!(this_present_voucherType && that_present_voucherType))
-
 
10566
          return false;
-
 
10567
        if (!this.voucherType.equals(that.voucherType))
-
 
10568
          return false;
-
 
10569
      }
-
 
10570
 
-
 
10571
      boolean this_present_amount = true;
-
 
10572
      boolean that_present_amount = true;
-
 
10573
      if (this_present_amount || that_present_amount) {
-
 
10574
        if (!(this_present_amount && that_present_amount))
-
 
10575
          return false;
-
 
10576
        if (this.amount != that.amount)
-
 
10577
          return false;
-
 
10578
      }
-
 
10579
 
-
 
10580
      return true;
-
 
10581
    }
-
 
10582
 
-
 
10583
    @Override
-
 
10584
    public int hashCode() {
-
 
10585
      return 0;
-
 
10586
    }
-
 
10587
 
-
 
10588
    public int compareTo(assignVoucher_args other) {
-
 
10589
      if (!getClass().equals(other.getClass())) {
-
 
10590
        return getClass().getName().compareTo(other.getClass().getName());
-
 
10591
      }
-
 
10592
 
-
 
10593
      int lastComparison = 0;
-
 
10594
      assignVoucher_args typedOther = (assignVoucher_args)other;
-
 
10595
 
-
 
10596
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
-
 
10597
      if (lastComparison != 0) {
-
 
10598
        return lastComparison;
-
 
10599
      }
-
 
10600
      if (isSetUserId()) {
-
 
10601
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
-
 
10602
        if (lastComparison != 0) {
-
 
10603
          return lastComparison;
-
 
10604
        }
-
 
10605
      }
-
 
10606
      lastComparison = Boolean.valueOf(isSetUserEmail()).compareTo(typedOther.isSetUserEmail());
-
 
10607
      if (lastComparison != 0) {
-
 
10608
        return lastComparison;
-
 
10609
      }
-
 
10610
      if (isSetUserEmail()) {
-
 
10611
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userEmail, typedOther.userEmail);
-
 
10612
        if (lastComparison != 0) {
-
 
10613
          return lastComparison;
-
 
10614
        }
-
 
10615
      }
-
 
10616
      lastComparison = Boolean.valueOf(isSetVoucherType()).compareTo(typedOther.isSetVoucherType());
-
 
10617
      if (lastComparison != 0) {
-
 
10618
        return lastComparison;
-
 
10619
      }
-
 
10620
      if (isSetVoucherType()) {
-
 
10621
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.voucherType, typedOther.voucherType);
-
 
10622
        if (lastComparison != 0) {
-
 
10623
          return lastComparison;
-
 
10624
        }
-
 
10625
      }
-
 
10626
      lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
-
 
10627
      if (lastComparison != 0) {
-
 
10628
        return lastComparison;
-
 
10629
      }
-
 
10630
      if (isSetAmount()) {
-
 
10631
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
-
 
10632
        if (lastComparison != 0) {
-
 
10633
          return lastComparison;
-
 
10634
        }
-
 
10635
      }
-
 
10636
      return 0;
-
 
10637
    }
-
 
10638
 
-
 
10639
    public _Fields fieldForId(int fieldId) {
-
 
10640
      return _Fields.findByThriftId(fieldId);
-
 
10641
    }
-
 
10642
 
-
 
10643
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
10644
      org.apache.thrift.protocol.TField field;
-
 
10645
      iprot.readStructBegin();
-
 
10646
      while (true)
-
 
10647
      {
-
 
10648
        field = iprot.readFieldBegin();
-
 
10649
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
10650
          break;
-
 
10651
        }
-
 
10652
        switch (field.id) {
-
 
10653
          case 1: // USER_ID
-
 
10654
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
10655
              this.userId = iprot.readI64();
-
 
10656
              setUserIdIsSet(true);
-
 
10657
            } else { 
-
 
10658
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
10659
            }
-
 
10660
            break;
-
 
10661
          case 2: // USER_EMAIL
-
 
10662
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
10663
              this.userEmail = iprot.readString();
-
 
10664
            } else { 
-
 
10665
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
10666
            }
-
 
10667
            break;
-
 
10668
          case 3: // VOUCHER_TYPE
-
 
10669
            if (field.type == org.apache.thrift.protocol.TType.I32) {
-
 
10670
              this.voucherType = VoucherType.findByValue(iprot.readI32());
-
 
10671
            } else { 
-
 
10672
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
10673
            }
-
 
10674
            break;
-
 
10675
          case 4: // AMOUNT
-
 
10676
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
10677
              this.amount = iprot.readI64();
-
 
10678
              setAmountIsSet(true);
-
 
10679
            } else { 
-
 
10680
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
10681
            }
-
 
10682
            break;
-
 
10683
          default:
-
 
10684
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
10685
        }
-
 
10686
        iprot.readFieldEnd();
-
 
10687
      }
-
 
10688
      iprot.readStructEnd();
-
 
10689
      validate();
-
 
10690
    }
-
 
10691
 
-
 
10692
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
10693
      validate();
-
 
10694
 
-
 
10695
      oprot.writeStructBegin(STRUCT_DESC);
-
 
10696
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
-
 
10697
      oprot.writeI64(this.userId);
-
 
10698
      oprot.writeFieldEnd();
-
 
10699
      if (this.userEmail != null) {
-
 
10700
        oprot.writeFieldBegin(USER_EMAIL_FIELD_DESC);
-
 
10701
        oprot.writeString(this.userEmail);
-
 
10702
        oprot.writeFieldEnd();
-
 
10703
      }
-
 
10704
      if (this.voucherType != null) {
-
 
10705
        oprot.writeFieldBegin(VOUCHER_TYPE_FIELD_DESC);
-
 
10706
        oprot.writeI32(this.voucherType.getValue());
-
 
10707
        oprot.writeFieldEnd();
-
 
10708
      }
-
 
10709
      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
-
 
10710
      oprot.writeI64(this.amount);
-
 
10711
      oprot.writeFieldEnd();
-
 
10712
      oprot.writeFieldStop();
-
 
10713
      oprot.writeStructEnd();
-
 
10714
    }
-
 
10715
 
-
 
10716
    @Override
-
 
10717
    public String toString() {
-
 
10718
      StringBuilder sb = new StringBuilder("assignVoucher_args(");
-
 
10719
      boolean first = true;
-
 
10720
 
-
 
10721
      sb.append("userId:");
-
 
10722
      sb.append(this.userId);
-
 
10723
      first = false;
-
 
10724
      if (!first) sb.append(", ");
-
 
10725
      sb.append("userEmail:");
-
 
10726
      if (this.userEmail == null) {
-
 
10727
        sb.append("null");
-
 
10728
      } else {
-
 
10729
        sb.append(this.userEmail);
-
 
10730
      }
-
 
10731
      first = false;
-
 
10732
      if (!first) sb.append(", ");
-
 
10733
      sb.append("voucherType:");
-
 
10734
      if (this.voucherType == null) {
-
 
10735
        sb.append("null");
-
 
10736
      } else {
-
 
10737
        sb.append(this.voucherType);
-
 
10738
      }
-
 
10739
      first = false;
-
 
10740
      if (!first) sb.append(", ");
-
 
10741
      sb.append("amount:");
-
 
10742
      sb.append(this.amount);
-
 
10743
      first = false;
-
 
10744
      sb.append(")");
-
 
10745
      return sb.toString();
-
 
10746
    }
-
 
10747
 
-
 
10748
    public void validate() throws org.apache.thrift.TException {
-
 
10749
      // check for required fields
-
 
10750
    }
-
 
10751
 
-
 
10752
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
10753
      try {
-
 
10754
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
10755
      } catch (org.apache.thrift.TException te) {
-
 
10756
        throw new java.io.IOException(te);
-
 
10757
      }
-
 
10758
    }
-
 
10759
 
-
 
10760
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
10761
      try {
-
 
10762
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
10763
        __isset_bit_vector = new BitSet(1);
-
 
10764
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
10765
      } catch (org.apache.thrift.TException te) {
-
 
10766
        throw new java.io.IOException(te);
-
 
10767
      }
-
 
10768
    }
-
 
10769
 
-
 
10770
  }
-
 
10771
 
-
 
10772
  public static class assignVoucher_result implements org.apache.thrift.TBase<assignVoucher_result, assignVoucher_result._Fields>, java.io.Serializable, Cloneable   {
-
 
10773
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("assignVoucher_result");
-
 
10774
 
-
 
10775
    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);
-
 
10776
 
-
 
10777
    private Voucher success; // required
-
 
10778
 
-
 
10779
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
10780
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
10781
      SUCCESS((short)0, "success");
-
 
10782
 
-
 
10783
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
10784
 
-
 
10785
      static {
-
 
10786
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
10787
          byName.put(field.getFieldName(), field);
-
 
10788
        }
-
 
10789
      }
-
 
10790
 
-
 
10791
      /**
-
 
10792
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
10793
       */
-
 
10794
      public static _Fields findByThriftId(int fieldId) {
-
 
10795
        switch(fieldId) {
-
 
10796
          case 0: // SUCCESS
-
 
10797
            return SUCCESS;
-
 
10798
          default:
-
 
10799
            return null;
-
 
10800
        }
-
 
10801
      }
-
 
10802
 
-
 
10803
      /**
-
 
10804
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
10805
       * if it is not found.
-
 
10806
       */
-
 
10807
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
10808
        _Fields fields = findByThriftId(fieldId);
-
 
10809
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
10810
        return fields;
-
 
10811
      }
-
 
10812
 
-
 
10813
      /**
-
 
10814
       * Find the _Fields constant that matches name, or null if its not found.
-
 
10815
       */
-
 
10816
      public static _Fields findByName(String name) {
-
 
10817
        return byName.get(name);
-
 
10818
      }
-
 
10819
 
-
 
10820
      private final short _thriftId;
-
 
10821
      private final String _fieldName;
-
 
10822
 
-
 
10823
      _Fields(short thriftId, String fieldName) {
-
 
10824
        _thriftId = thriftId;
-
 
10825
        _fieldName = fieldName;
-
 
10826
      }
-
 
10827
 
-
 
10828
      public short getThriftFieldId() {
-
 
10829
        return _thriftId;
-
 
10830
      }
-
 
10831
 
-
 
10832
      public String getFieldName() {
-
 
10833
        return _fieldName;
-
 
10834
      }
-
 
10835
    }
-
 
10836
 
-
 
10837
    // isset id assignments
-
 
10838
 
-
 
10839
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
10840
    static {
-
 
10841
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
10842
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
10843
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Voucher.class)));
-
 
10844
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
10845
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(assignVoucher_result.class, metaDataMap);
-
 
10846
    }
-
 
10847
 
-
 
10848
    public assignVoucher_result() {
-
 
10849
    }
-
 
10850
 
-
 
10851
    public assignVoucher_result(
-
 
10852
      Voucher success)
-
 
10853
    {
-
 
10854
      this();
-
 
10855
      this.success = success;
-
 
10856
    }
-
 
10857
 
-
 
10858
    /**
-
 
10859
     * Performs a deep copy on <i>other</i>.
-
 
10860
     */
-
 
10861
    public assignVoucher_result(assignVoucher_result other) {
-
 
10862
      if (other.isSetSuccess()) {
-
 
10863
        this.success = new Voucher(other.success);
-
 
10864
      }
-
 
10865
    }
-
 
10866
 
-
 
10867
    public assignVoucher_result deepCopy() {
-
 
10868
      return new assignVoucher_result(this);
-
 
10869
    }
-
 
10870
 
-
 
10871
    @Override
-
 
10872
    public void clear() {
-
 
10873
      this.success = null;
-
 
10874
    }
-
 
10875
 
-
 
10876
    public Voucher getSuccess() {
-
 
10877
      return this.success;
-
 
10878
    }
-
 
10879
 
-
 
10880
    public void setSuccess(Voucher success) {
-
 
10881
      this.success = success;
-
 
10882
    }
-
 
10883
 
-
 
10884
    public void unsetSuccess() {
-
 
10885
      this.success = null;
-
 
10886
    }
-
 
10887
 
-
 
10888
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
10889
    public boolean isSetSuccess() {
-
 
10890
      return this.success != null;
-
 
10891
    }
-
 
10892
 
-
 
10893
    public void setSuccessIsSet(boolean value) {
-
 
10894
      if (!value) {
-
 
10895
        this.success = null;
-
 
10896
      }
-
 
10897
    }
-
 
10898
 
-
 
10899
    public void setFieldValue(_Fields field, Object value) {
-
 
10900
      switch (field) {
-
 
10901
      case SUCCESS:
-
 
10902
        if (value == null) {
-
 
10903
          unsetSuccess();
-
 
10904
        } else {
-
 
10905
          setSuccess((Voucher)value);
-
 
10906
        }
-
 
10907
        break;
-
 
10908
 
-
 
10909
      }
-
 
10910
    }
-
 
10911
 
-
 
10912
    public Object getFieldValue(_Fields field) {
-
 
10913
      switch (field) {
-
 
10914
      case SUCCESS:
-
 
10915
        return getSuccess();
-
 
10916
 
-
 
10917
      }
-
 
10918
      throw new IllegalStateException();
-
 
10919
    }
-
 
10920
 
-
 
10921
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
10922
    public boolean isSet(_Fields field) {
-
 
10923
      if (field == null) {
-
 
10924
        throw new IllegalArgumentException();
-
 
10925
      }
-
 
10926
 
-
 
10927
      switch (field) {
-
 
10928
      case SUCCESS:
-
 
10929
        return isSetSuccess();
-
 
10930
      }
-
 
10931
      throw new IllegalStateException();
-
 
10932
    }
-
 
10933
 
-
 
10934
    @Override
-
 
10935
    public boolean equals(Object that) {
-
 
10936
      if (that == null)
-
 
10937
        return false;
-
 
10938
      if (that instanceof assignVoucher_result)
-
 
10939
        return this.equals((assignVoucher_result)that);
-
 
10940
      return false;
-
 
10941
    }
-
 
10942
 
-
 
10943
    public boolean equals(assignVoucher_result that) {
-
 
10944
      if (that == null)
-
 
10945
        return false;
-
 
10946
 
-
 
10947
      boolean this_present_success = true && this.isSetSuccess();
-
 
10948
      boolean that_present_success = true && that.isSetSuccess();
-
 
10949
      if (this_present_success || that_present_success) {
-
 
10950
        if (!(this_present_success && that_present_success))
-
 
10951
          return false;
-
 
10952
        if (!this.success.equals(that.success))
-
 
10953
          return false;
-
 
10954
      }
-
 
10955
 
-
 
10956
      return true;
-
 
10957
    }
-
 
10958
 
-
 
10959
    @Override
-
 
10960
    public int hashCode() {
-
 
10961
      return 0;
-
 
10962
    }
-
 
10963
 
-
 
10964
    public int compareTo(assignVoucher_result other) {
-
 
10965
      if (!getClass().equals(other.getClass())) {
-
 
10966
        return getClass().getName().compareTo(other.getClass().getName());
-
 
10967
      }
-
 
10968
 
-
 
10969
      int lastComparison = 0;
-
 
10970
      assignVoucher_result typedOther = (assignVoucher_result)other;
-
 
10971
 
-
 
10972
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
10973
      if (lastComparison != 0) {
-
 
10974
        return lastComparison;
-
 
10975
      }
-
 
10976
      if (isSetSuccess()) {
-
 
10977
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
10978
        if (lastComparison != 0) {
-
 
10979
          return lastComparison;
-
 
10980
        }
-
 
10981
      }
-
 
10982
      return 0;
-
 
10983
    }
-
 
10984
 
-
 
10985
    public _Fields fieldForId(int fieldId) {
-
 
10986
      return _Fields.findByThriftId(fieldId);
-
 
10987
    }
-
 
10988
 
-
 
10989
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
10990
      org.apache.thrift.protocol.TField field;
-
 
10991
      iprot.readStructBegin();
-
 
10992
      while (true)
-
 
10993
      {
-
 
10994
        field = iprot.readFieldBegin();
-
 
10995
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
10996
          break;
-
 
10997
        }
-
 
10998
        switch (field.id) {
-
 
10999
          case 0: // SUCCESS
-
 
11000
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
11001
              this.success = new Voucher();
-
 
11002
              this.success.read(iprot);
-
 
11003
            } else { 
-
 
11004
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
11005
            }
-
 
11006
            break;
-
 
11007
          default:
-
 
11008
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
11009
        }
-
 
11010
        iprot.readFieldEnd();
-
 
11011
      }
-
 
11012
      iprot.readStructEnd();
-
 
11013
      validate();
-
 
11014
    }
-
 
11015
 
-
 
11016
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
11017
      oprot.writeStructBegin(STRUCT_DESC);
-
 
11018
 
-
 
11019
      if (this.isSetSuccess()) {
-
 
11020
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
11021
        this.success.write(oprot);
-
 
11022
        oprot.writeFieldEnd();
-
 
11023
      }
-
 
11024
      oprot.writeFieldStop();
-
 
11025
      oprot.writeStructEnd();
-
 
11026
    }
-
 
11027
 
-
 
11028
    @Override
-
 
11029
    public String toString() {
-
 
11030
      StringBuilder sb = new StringBuilder("assignVoucher_result(");
-
 
11031
      boolean first = true;
-
 
11032
 
-
 
11033
      sb.append("success:");
-
 
11034
      if (this.success == null) {
-
 
11035
        sb.append("null");
-
 
11036
      } else {
-
 
11037
        sb.append(this.success);
-
 
11038
      }
-
 
11039
      first = false;
-
 
11040
      sb.append(")");
-
 
11041
      return sb.toString();
-
 
11042
    }
-
 
11043
 
-
 
11044
    public void validate() throws org.apache.thrift.TException {
-
 
11045
      // check for required fields
-
 
11046
    }
-
 
11047
 
-
 
11048
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
11049
      try {
-
 
11050
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
11051
      } catch (org.apache.thrift.TException te) {
-
 
11052
        throw new java.io.IOException(te);
-
 
11053
      }
-
 
11054
    }
-
 
11055
 
-
 
11056
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
11057
      try {
-
 
11058
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
11059
      } catch (org.apache.thrift.TException te) {
-
 
11060
        throw new java.io.IOException(te);
-
 
11061
      }
-
 
11062
    }
-
 
11063
 
-
 
11064
  }
-
 
11065
 
-
 
11066
  public static class markVoucherAsRedeemed_args implements org.apache.thrift.TBase<markVoucherAsRedeemed_args, markVoucherAsRedeemed_args._Fields>, java.io.Serializable, Cloneable   {
-
 
11067
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markVoucherAsRedeemed_args");
-
 
11068
 
-
 
11069
    private static final org.apache.thrift.protocol.TField VOUCHER_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("voucherCode", org.apache.thrift.protocol.TType.STRING, (short)1);
-
 
11070
    private static final org.apache.thrift.protocol.TField REDEEMED_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("redeemedOn", org.apache.thrift.protocol.TType.I64, (short)2);
-
 
11071
 
-
 
11072
    private String voucherCode; // required
-
 
11073
    private long redeemedOn; // required
-
 
11074
 
-
 
11075
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
11076
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
11077
      VOUCHER_CODE((short)1, "voucherCode"),
-
 
11078
      REDEEMED_ON((short)2, "redeemedOn");
-
 
11079
 
-
 
11080
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
11081
 
-
 
11082
      static {
-
 
11083
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
11084
          byName.put(field.getFieldName(), field);
-
 
11085
        }
-
 
11086
      }
-
 
11087
 
-
 
11088
      /**
-
 
11089
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
11090
       */
-
 
11091
      public static _Fields findByThriftId(int fieldId) {
-
 
11092
        switch(fieldId) {
-
 
11093
          case 1: // VOUCHER_CODE
-
 
11094
            return VOUCHER_CODE;
-
 
11095
          case 2: // REDEEMED_ON
-
 
11096
            return REDEEMED_ON;
-
 
11097
          default:
-
 
11098
            return null;
-
 
11099
        }
-
 
11100
      }
-
 
11101
 
-
 
11102
      /**
-
 
11103
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
11104
       * if it is not found.
-
 
11105
       */
-
 
11106
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
11107
        _Fields fields = findByThriftId(fieldId);
-
 
11108
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
11109
        return fields;
-
 
11110
      }
-
 
11111
 
-
 
11112
      /**
-
 
11113
       * Find the _Fields constant that matches name, or null if its not found.
-
 
11114
       */
-
 
11115
      public static _Fields findByName(String name) {
-
 
11116
        return byName.get(name);
-
 
11117
      }
-
 
11118
 
-
 
11119
      private final short _thriftId;
-
 
11120
      private final String _fieldName;
-
 
11121
 
-
 
11122
      _Fields(short thriftId, String fieldName) {
-
 
11123
        _thriftId = thriftId;
-
 
11124
        _fieldName = fieldName;
-
 
11125
      }
-
 
11126
 
-
 
11127
      public short getThriftFieldId() {
-
 
11128
        return _thriftId;
-
 
11129
      }
-
 
11130
 
-
 
11131
      public String getFieldName() {
-
 
11132
        return _fieldName;
-
 
11133
      }
-
 
11134
    }
-
 
11135
 
-
 
11136
    // isset id assignments
-
 
11137
    private static final int __REDEEMEDON_ISSET_ID = 0;
-
 
11138
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
11139
 
-
 
11140
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
11141
    static {
-
 
11142
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
11143
      tmpMap.put(_Fields.VOUCHER_CODE, new org.apache.thrift.meta_data.FieldMetaData("voucherCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
11144
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
11145
      tmpMap.put(_Fields.REDEEMED_ON, new org.apache.thrift.meta_data.FieldMetaData("redeemedOn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
11146
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
11147
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
11148
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markVoucherAsRedeemed_args.class, metaDataMap);
-
 
11149
    }
-
 
11150
 
-
 
11151
    public markVoucherAsRedeemed_args() {
-
 
11152
    }
-
 
11153
 
-
 
11154
    public markVoucherAsRedeemed_args(
-
 
11155
      String voucherCode,
-
 
11156
      long redeemedOn)
-
 
11157
    {
-
 
11158
      this();
-
 
11159
      this.voucherCode = voucherCode;
-
 
11160
      this.redeemedOn = redeemedOn;
-
 
11161
      setRedeemedOnIsSet(true);
-
 
11162
    }
-
 
11163
 
-
 
11164
    /**
-
 
11165
     * Performs a deep copy on <i>other</i>.
-
 
11166
     */
-
 
11167
    public markVoucherAsRedeemed_args(markVoucherAsRedeemed_args other) {
-
 
11168
      __isset_bit_vector.clear();
-
 
11169
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
11170
      if (other.isSetVoucherCode()) {
-
 
11171
        this.voucherCode = other.voucherCode;
-
 
11172
      }
-
 
11173
      this.redeemedOn = other.redeemedOn;
-
 
11174
    }
-
 
11175
 
-
 
11176
    public markVoucherAsRedeemed_args deepCopy() {
-
 
11177
      return new markVoucherAsRedeemed_args(this);
-
 
11178
    }
-
 
11179
 
-
 
11180
    @Override
-
 
11181
    public void clear() {
-
 
11182
      this.voucherCode = null;
-
 
11183
      setRedeemedOnIsSet(false);
-
 
11184
      this.redeemedOn = 0;
-
 
11185
    }
-
 
11186
 
-
 
11187
    public String getVoucherCode() {
-
 
11188
      return this.voucherCode;
-
 
11189
    }
-
 
11190
 
-
 
11191
    public void setVoucherCode(String voucherCode) {
-
 
11192
      this.voucherCode = voucherCode;
-
 
11193
    }
-
 
11194
 
-
 
11195
    public void unsetVoucherCode() {
-
 
11196
      this.voucherCode = null;
-
 
11197
    }
-
 
11198
 
-
 
11199
    /** Returns true if field voucherCode is set (has been assigned a value) and false otherwise */
-
 
11200
    public boolean isSetVoucherCode() {
-
 
11201
      return this.voucherCode != null;
-
 
11202
    }
-
 
11203
 
-
 
11204
    public void setVoucherCodeIsSet(boolean value) {
-
 
11205
      if (!value) {
-
 
11206
        this.voucherCode = null;
-
 
11207
      }
-
 
11208
    }
-
 
11209
 
-
 
11210
    public long getRedeemedOn() {
-
 
11211
      return this.redeemedOn;
-
 
11212
    }
-
 
11213
 
-
 
11214
    public void setRedeemedOn(long redeemedOn) {
-
 
11215
      this.redeemedOn = redeemedOn;
-
 
11216
      setRedeemedOnIsSet(true);
-
 
11217
    }
-
 
11218
 
-
 
11219
    public void unsetRedeemedOn() {
-
 
11220
      __isset_bit_vector.clear(__REDEEMEDON_ISSET_ID);
-
 
11221
    }
-
 
11222
 
-
 
11223
    /** Returns true if field redeemedOn is set (has been assigned a value) and false otherwise */
-
 
11224
    public boolean isSetRedeemedOn() {
-
 
11225
      return __isset_bit_vector.get(__REDEEMEDON_ISSET_ID);
-
 
11226
    }
-
 
11227
 
-
 
11228
    public void setRedeemedOnIsSet(boolean value) {
-
 
11229
      __isset_bit_vector.set(__REDEEMEDON_ISSET_ID, value);
-
 
11230
    }
-
 
11231
 
-
 
11232
    public void setFieldValue(_Fields field, Object value) {
-
 
11233
      switch (field) {
-
 
11234
      case VOUCHER_CODE:
-
 
11235
        if (value == null) {
-
 
11236
          unsetVoucherCode();
-
 
11237
        } else {
-
 
11238
          setVoucherCode((String)value);
-
 
11239
        }
-
 
11240
        break;
-
 
11241
 
-
 
11242
      case REDEEMED_ON:
-
 
11243
        if (value == null) {
-
 
11244
          unsetRedeemedOn();
-
 
11245
        } else {
-
 
11246
          setRedeemedOn((Long)value);
-
 
11247
        }
-
 
11248
        break;
-
 
11249
 
-
 
11250
      }
-
 
11251
    }
-
 
11252
 
-
 
11253
    public Object getFieldValue(_Fields field) {
-
 
11254
      switch (field) {
-
 
11255
      case VOUCHER_CODE:
-
 
11256
        return getVoucherCode();
-
 
11257
 
-
 
11258
      case REDEEMED_ON:
-
 
11259
        return Long.valueOf(getRedeemedOn());
-
 
11260
 
-
 
11261
      }
-
 
11262
      throw new IllegalStateException();
-
 
11263
    }
-
 
11264
 
-
 
11265
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
11266
    public boolean isSet(_Fields field) {
-
 
11267
      if (field == null) {
-
 
11268
        throw new IllegalArgumentException();
-
 
11269
      }
-
 
11270
 
-
 
11271
      switch (field) {
-
 
11272
      case VOUCHER_CODE:
-
 
11273
        return isSetVoucherCode();
-
 
11274
      case REDEEMED_ON:
-
 
11275
        return isSetRedeemedOn();
-
 
11276
      }
-
 
11277
      throw new IllegalStateException();
-
 
11278
    }
-
 
11279
 
-
 
11280
    @Override
-
 
11281
    public boolean equals(Object that) {
-
 
11282
      if (that == null)
-
 
11283
        return false;
-
 
11284
      if (that instanceof markVoucherAsRedeemed_args)
-
 
11285
        return this.equals((markVoucherAsRedeemed_args)that);
-
 
11286
      return false;
-
 
11287
    }
-
 
11288
 
-
 
11289
    public boolean equals(markVoucherAsRedeemed_args that) {
-
 
11290
      if (that == null)
-
 
11291
        return false;
-
 
11292
 
-
 
11293
      boolean this_present_voucherCode = true && this.isSetVoucherCode();
-
 
11294
      boolean that_present_voucherCode = true && that.isSetVoucherCode();
-
 
11295
      if (this_present_voucherCode || that_present_voucherCode) {
-
 
11296
        if (!(this_present_voucherCode && that_present_voucherCode))
-
 
11297
          return false;
-
 
11298
        if (!this.voucherCode.equals(that.voucherCode))
-
 
11299
          return false;
-
 
11300
      }
-
 
11301
 
-
 
11302
      boolean this_present_redeemedOn = true;
-
 
11303
      boolean that_present_redeemedOn = true;
-
 
11304
      if (this_present_redeemedOn || that_present_redeemedOn) {
-
 
11305
        if (!(this_present_redeemedOn && that_present_redeemedOn))
-
 
11306
          return false;
-
 
11307
        if (this.redeemedOn != that.redeemedOn)
-
 
11308
          return false;
-
 
11309
      }
-
 
11310
 
-
 
11311
      return true;
-
 
11312
    }
-
 
11313
 
-
 
11314
    @Override
-
 
11315
    public int hashCode() {
-
 
11316
      return 0;
-
 
11317
    }
-
 
11318
 
-
 
11319
    public int compareTo(markVoucherAsRedeemed_args other) {
-
 
11320
      if (!getClass().equals(other.getClass())) {
-
 
11321
        return getClass().getName().compareTo(other.getClass().getName());
-
 
11322
      }
-
 
11323
 
-
 
11324
      int lastComparison = 0;
-
 
11325
      markVoucherAsRedeemed_args typedOther = (markVoucherAsRedeemed_args)other;
-
 
11326
 
-
 
11327
      lastComparison = Boolean.valueOf(isSetVoucherCode()).compareTo(typedOther.isSetVoucherCode());
-
 
11328
      if (lastComparison != 0) {
-
 
11329
        return lastComparison;
-
 
11330
      }
-
 
11331
      if (isSetVoucherCode()) {
-
 
11332
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.voucherCode, typedOther.voucherCode);
-
 
11333
        if (lastComparison != 0) {
-
 
11334
          return lastComparison;
-
 
11335
        }
-
 
11336
      }
-
 
11337
      lastComparison = Boolean.valueOf(isSetRedeemedOn()).compareTo(typedOther.isSetRedeemedOn());
-
 
11338
      if (lastComparison != 0) {
-
 
11339
        return lastComparison;
-
 
11340
      }
-
 
11341
      if (isSetRedeemedOn()) {
-
 
11342
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.redeemedOn, typedOther.redeemedOn);
-
 
11343
        if (lastComparison != 0) {
-
 
11344
          return lastComparison;
-
 
11345
        }
-
 
11346
      }
-
 
11347
      return 0;
-
 
11348
    }
-
 
11349
 
-
 
11350
    public _Fields fieldForId(int fieldId) {
-
 
11351
      return _Fields.findByThriftId(fieldId);
-
 
11352
    }
-
 
11353
 
-
 
11354
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
11355
      org.apache.thrift.protocol.TField field;
-
 
11356
      iprot.readStructBegin();
-
 
11357
      while (true)
-
 
11358
      {
-
 
11359
        field = iprot.readFieldBegin();
-
 
11360
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
11361
          break;
-
 
11362
        }
-
 
11363
        switch (field.id) {
-
 
11364
          case 1: // VOUCHER_CODE
-
 
11365
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
11366
              this.voucherCode = iprot.readString();
-
 
11367
            } else { 
-
 
11368
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
11369
            }
-
 
11370
            break;
-
 
11371
          case 2: // REDEEMED_ON
-
 
11372
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
11373
              this.redeemedOn = iprot.readI64();
-
 
11374
              setRedeemedOnIsSet(true);
-
 
11375
            } else { 
-
 
11376
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
11377
            }
-
 
11378
            break;
-
 
11379
          default:
-
 
11380
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
11381
        }
-
 
11382
        iprot.readFieldEnd();
-
 
11383
      }
-
 
11384
      iprot.readStructEnd();
-
 
11385
      validate();
-
 
11386
    }
-
 
11387
 
-
 
11388
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
11389
      validate();
-
 
11390
 
-
 
11391
      oprot.writeStructBegin(STRUCT_DESC);
-
 
11392
      if (this.voucherCode != null) {
-
 
11393
        oprot.writeFieldBegin(VOUCHER_CODE_FIELD_DESC);
-
 
11394
        oprot.writeString(this.voucherCode);
-
 
11395
        oprot.writeFieldEnd();
-
 
11396
      }
-
 
11397
      oprot.writeFieldBegin(REDEEMED_ON_FIELD_DESC);
-
 
11398
      oprot.writeI64(this.redeemedOn);
-
 
11399
      oprot.writeFieldEnd();
-
 
11400
      oprot.writeFieldStop();
-
 
11401
      oprot.writeStructEnd();
-
 
11402
    }
-
 
11403
 
-
 
11404
    @Override
-
 
11405
    public String toString() {
-
 
11406
      StringBuilder sb = new StringBuilder("markVoucherAsRedeemed_args(");
-
 
11407
      boolean first = true;
-
 
11408
 
-
 
11409
      sb.append("voucherCode:");
-
 
11410
      if (this.voucherCode == null) {
-
 
11411
        sb.append("null");
-
 
11412
      } else {
-
 
11413
        sb.append(this.voucherCode);
-
 
11414
      }
-
 
11415
      first = false;
-
 
11416
      if (!first) sb.append(", ");
-
 
11417
      sb.append("redeemedOn:");
-
 
11418
      sb.append(this.redeemedOn);
-
 
11419
      first = false;
-
 
11420
      sb.append(")");
-
 
11421
      return sb.toString();
-
 
11422
    }
-
 
11423
 
-
 
11424
    public void validate() throws org.apache.thrift.TException {
-
 
11425
      // check for required fields
-
 
11426
    }
-
 
11427
 
-
 
11428
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
11429
      try {
-
 
11430
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
11431
      } catch (org.apache.thrift.TException te) {
-
 
11432
        throw new java.io.IOException(te);
-
 
11433
      }
-
 
11434
    }
-
 
11435
 
-
 
11436
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
11437
      try {
-
 
11438
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
11439
        __isset_bit_vector = new BitSet(1);
-
 
11440
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
11441
      } catch (org.apache.thrift.TException te) {
-
 
11442
        throw new java.io.IOException(te);
-
 
11443
      }
-
 
11444
    }
-
 
11445
 
-
 
11446
  }
-
 
11447
 
-
 
11448
  public static class markVoucherAsRedeemed_result implements org.apache.thrift.TBase<markVoucherAsRedeemed_result, markVoucherAsRedeemed_result._Fields>, java.io.Serializable, Cloneable   {
-
 
11449
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markVoucherAsRedeemed_result");
-
 
11450
 
-
 
11451
    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);
-
 
11452
 
-
 
11453
    private boolean success; // required
-
 
11454
 
-
 
11455
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
11456
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
11457
      SUCCESS((short)0, "success");
-
 
11458
 
-
 
11459
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
11460
 
-
 
11461
      static {
-
 
11462
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
11463
          byName.put(field.getFieldName(), field);
-
 
11464
        }
-
 
11465
      }
-
 
11466
 
-
 
11467
      /**
-
 
11468
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
11469
       */
-
 
11470
      public static _Fields findByThriftId(int fieldId) {
-
 
11471
        switch(fieldId) {
-
 
11472
          case 0: // SUCCESS
-
 
11473
            return SUCCESS;
-
 
11474
          default:
-
 
11475
            return null;
-
 
11476
        }
-
 
11477
      }
-
 
11478
 
-
 
11479
      /**
-
 
11480
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
11481
       * if it is not found.
-
 
11482
       */
-
 
11483
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
11484
        _Fields fields = findByThriftId(fieldId);
-
 
11485
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
11486
        return fields;
-
 
11487
      }
-
 
11488
 
-
 
11489
      /**
-
 
11490
       * Find the _Fields constant that matches name, or null if its not found.
-
 
11491
       */
-
 
11492
      public static _Fields findByName(String name) {
-
 
11493
        return byName.get(name);
-
 
11494
      }
-
 
11495
 
-
 
11496
      private final short _thriftId;
-
 
11497
      private final String _fieldName;
-
 
11498
 
-
 
11499
      _Fields(short thriftId, String fieldName) {
-
 
11500
        _thriftId = thriftId;
-
 
11501
        _fieldName = fieldName;
-
 
11502
      }
-
 
11503
 
-
 
11504
      public short getThriftFieldId() {
-
 
11505
        return _thriftId;
-
 
11506
      }
-
 
11507
 
-
 
11508
      public String getFieldName() {
-
 
11509
        return _fieldName;
-
 
11510
      }
-
 
11511
    }
-
 
11512
 
-
 
11513
    // isset id assignments
-
 
11514
    private static final int __SUCCESS_ISSET_ID = 0;
-
 
11515
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
11516
 
-
 
11517
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
11518
    static {
-
 
11519
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
11520
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
11521
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
-
 
11522
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
11523
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markVoucherAsRedeemed_result.class, metaDataMap);
-
 
11524
    }
-
 
11525
 
-
 
11526
    public markVoucherAsRedeemed_result() {
-
 
11527
    }
-
 
11528
 
-
 
11529
    public markVoucherAsRedeemed_result(
-
 
11530
      boolean success)
-
 
11531
    {
-
 
11532
      this();
-
 
11533
      this.success = success;
-
 
11534
      setSuccessIsSet(true);
-
 
11535
    }
-
 
11536
 
-
 
11537
    /**
-
 
11538
     * Performs a deep copy on <i>other</i>.
-
 
11539
     */
-
 
11540
    public markVoucherAsRedeemed_result(markVoucherAsRedeemed_result other) {
-
 
11541
      __isset_bit_vector.clear();
-
 
11542
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
11543
      this.success = other.success;
-
 
11544
    }
-
 
11545
 
-
 
11546
    public markVoucherAsRedeemed_result deepCopy() {
-
 
11547
      return new markVoucherAsRedeemed_result(this);
-
 
11548
    }
-
 
11549
 
-
 
11550
    @Override
-
 
11551
    public void clear() {
-
 
11552
      setSuccessIsSet(false);
-
 
11553
      this.success = false;
-
 
11554
    }
-
 
11555
 
-
 
11556
    public boolean isSuccess() {
-
 
11557
      return this.success;
-
 
11558
    }
-
 
11559
 
-
 
11560
    public void setSuccess(boolean success) {
-
 
11561
      this.success = success;
-
 
11562
      setSuccessIsSet(true);
-
 
11563
    }
-
 
11564
 
-
 
11565
    public void unsetSuccess() {
-
 
11566
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
-
 
11567
    }
-
 
11568
 
-
 
11569
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
11570
    public boolean isSetSuccess() {
-
 
11571
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
-
 
11572
    }
-
 
11573
 
-
 
11574
    public void setSuccessIsSet(boolean value) {
-
 
11575
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
-
 
11576
    }
-
 
11577
 
-
 
11578
    public void setFieldValue(_Fields field, Object value) {
-
 
11579
      switch (field) {
-
 
11580
      case SUCCESS:
-
 
11581
        if (value == null) {
-
 
11582
          unsetSuccess();
-
 
11583
        } else {
-
 
11584
          setSuccess((Boolean)value);
-
 
11585
        }
-
 
11586
        break;
-
 
11587
 
-
 
11588
      }
-
 
11589
    }
-
 
11590
 
-
 
11591
    public Object getFieldValue(_Fields field) {
-
 
11592
      switch (field) {
-
 
11593
      case SUCCESS:
-
 
11594
        return Boolean.valueOf(isSuccess());
-
 
11595
 
-
 
11596
      }
-
 
11597
      throw new IllegalStateException();
-
 
11598
    }
-
 
11599
 
-
 
11600
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
11601
    public boolean isSet(_Fields field) {
-
 
11602
      if (field == null) {
-
 
11603
        throw new IllegalArgumentException();
-
 
11604
      }
-
 
11605
 
-
 
11606
      switch (field) {
-
 
11607
      case SUCCESS:
-
 
11608
        return isSetSuccess();
-
 
11609
      }
-
 
11610
      throw new IllegalStateException();
-
 
11611
    }
-
 
11612
 
-
 
11613
    @Override
-
 
11614
    public boolean equals(Object that) {
-
 
11615
      if (that == null)
-
 
11616
        return false;
-
 
11617
      if (that instanceof markVoucherAsRedeemed_result)
-
 
11618
        return this.equals((markVoucherAsRedeemed_result)that);
-
 
11619
      return false;
-
 
11620
    }
-
 
11621
 
-
 
11622
    public boolean equals(markVoucherAsRedeemed_result that) {
-
 
11623
      if (that == null)
-
 
11624
        return false;
-
 
11625
 
-
 
11626
      boolean this_present_success = true;
-
 
11627
      boolean that_present_success = true;
-
 
11628
      if (this_present_success || that_present_success) {
-
 
11629
        if (!(this_present_success && that_present_success))
-
 
11630
          return false;
-
 
11631
        if (this.success != that.success)
-
 
11632
          return false;
-
 
11633
      }
-
 
11634
 
-
 
11635
      return true;
-
 
11636
    }
-
 
11637
 
-
 
11638
    @Override
-
 
11639
    public int hashCode() {
-
 
11640
      return 0;
-
 
11641
    }
-
 
11642
 
-
 
11643
    public int compareTo(markVoucherAsRedeemed_result other) {
-
 
11644
      if (!getClass().equals(other.getClass())) {
-
 
11645
        return getClass().getName().compareTo(other.getClass().getName());
-
 
11646
      }
-
 
11647
 
-
 
11648
      int lastComparison = 0;
-
 
11649
      markVoucherAsRedeemed_result typedOther = (markVoucherAsRedeemed_result)other;
-
 
11650
 
-
 
11651
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
11652
      if (lastComparison != 0) {
-
 
11653
        return lastComparison;
-
 
11654
      }
-
 
11655
      if (isSetSuccess()) {
-
 
11656
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
11657
        if (lastComparison != 0) {
-
 
11658
          return lastComparison;
-
 
11659
        }
-
 
11660
      }
-
 
11661
      return 0;
-
 
11662
    }
-
 
11663
 
-
 
11664
    public _Fields fieldForId(int fieldId) {
-
 
11665
      return _Fields.findByThriftId(fieldId);
-
 
11666
    }
-
 
11667
 
-
 
11668
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
11669
      org.apache.thrift.protocol.TField field;
-
 
11670
      iprot.readStructBegin();
-
 
11671
      while (true)
-
 
11672
      {
-
 
11673
        field = iprot.readFieldBegin();
-
 
11674
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
11675
          break;
-
 
11676
        }
-
 
11677
        switch (field.id) {
-
 
11678
          case 0: // SUCCESS
-
 
11679
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-
 
11680
              this.success = iprot.readBool();
-
 
11681
              setSuccessIsSet(true);
-
 
11682
            } else { 
-
 
11683
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
11684
            }
-
 
11685
            break;
-
 
11686
          default:
-
 
11687
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
11688
        }
-
 
11689
        iprot.readFieldEnd();
-
 
11690
      }
-
 
11691
      iprot.readStructEnd();
-
 
11692
      validate();
-
 
11693
    }
-
 
11694
 
-
 
11695
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
11696
      oprot.writeStructBegin(STRUCT_DESC);
-
 
11697
 
-
 
11698
      if (this.isSetSuccess()) {
-
 
11699
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
11700
        oprot.writeBool(this.success);
-
 
11701
        oprot.writeFieldEnd();
-
 
11702
      }
-
 
11703
      oprot.writeFieldStop();
-
 
11704
      oprot.writeStructEnd();
-
 
11705
    }
-
 
11706
 
-
 
11707
    @Override
-
 
11708
    public String toString() {
-
 
11709
      StringBuilder sb = new StringBuilder("markVoucherAsRedeemed_result(");
-
 
11710
      boolean first = true;
-
 
11711
 
-
 
11712
      sb.append("success:");
-
 
11713
      sb.append(this.success);
-
 
11714
      first = false;
-
 
11715
      sb.append(")");
-
 
11716
      return sb.toString();
-
 
11717
    }
-
 
11718
 
9449
    public void validate() throws org.apache.thrift.TException {
11719
    public void validate() throws org.apache.thrift.TException {
9450
      // check for required fields
11720
      // check for required fields
9451
    }
11721
    }
9452
 
11722
 
9453
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11723
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {