Subversion Repositories SmartDukaan

Rev

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

Rev 21092 Rev 21101
Line 1274... Line 1274...
1274
 
1274
 
1275
    public List<Long> getStatsForAssociates(String associateEmail) throws org.apache.thrift.TException;
1275
    public List<Long> getStatsForAssociates(String associateEmail) throws org.apache.thrift.TException;
1276
 
1276
 
1277
    public Pmsa getmypmsaprofile(String associateEmail) throws org.apache.thrift.TException;
1277
    public Pmsa getmypmsaprofile(String associateEmail) throws org.apache.thrift.TException;
1278
 
1278
 
-
 
1279
    public boolean creditUserWallet(long userId, long amount) throws org.apache.thrift.TException;
-
 
1280
 
1279
  }
1281
  }
1280
 
1282
 
1281
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
1283
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
1282
 
1284
 
1283
    public void createTransaction(Transaction transaction, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createTransaction_call> resultHandler) throws org.apache.thrift.TException;
1285
    public void createTransaction(Transaction transaction, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createTransaction_call> resultHandler) throws org.apache.thrift.TException;
Line 1916... Line 1918...
1916
 
1918
 
1917
    public void getStatsForAssociates(String associateEmail, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getStatsForAssociates_call> resultHandler) throws org.apache.thrift.TException;
1919
    public void getStatsForAssociates(String associateEmail, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getStatsForAssociates_call> resultHandler) throws org.apache.thrift.TException;
1918
 
1920
 
1919
    public void getmypmsaprofile(String associateEmail, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getmypmsaprofile_call> resultHandler) throws org.apache.thrift.TException;
1921
    public void getmypmsaprofile(String associateEmail, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getmypmsaprofile_call> resultHandler) throws org.apache.thrift.TException;
1920
 
1922
 
-
 
1923
    public void creditUserWallet(long userId, long amount, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.creditUserWallet_call> resultHandler) throws org.apache.thrift.TException;
-
 
1924
 
1921
  }
1925
  }
1922
 
1926
 
1923
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
1927
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
1924
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
1928
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
1925
      public Factory() {}
1929
      public Factory() {}
Line 9820... Line 9824...
9820
        return result.success;
9824
        return result.success;
9821
      }
9825
      }
9822
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getmypmsaprofile failed: unknown result");
9826
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getmypmsaprofile failed: unknown result");
9823
    }
9827
    }
9824
 
9828
 
-
 
9829
    public boolean creditUserWallet(long userId, long amount) throws org.apache.thrift.TException
-
 
9830
    {
-
 
9831
      send_creditUserWallet(userId, amount);
-
 
9832
      return recv_creditUserWallet();
-
 
9833
    }
-
 
9834
 
-
 
9835
    public void send_creditUserWallet(long userId, long amount) throws org.apache.thrift.TException
-
 
9836
    {
-
 
9837
      creditUserWallet_args args = new creditUserWallet_args();
-
 
9838
      args.setUserId(userId);
-
 
9839
      args.setAmount(amount);
-
 
9840
      sendBase("creditUserWallet", args);
-
 
9841
    }
-
 
9842
 
-
 
9843
    public boolean recv_creditUserWallet() throws org.apache.thrift.TException
-
 
9844
    {
-
 
9845
      creditUserWallet_result result = new creditUserWallet_result();
-
 
9846
      receiveBase(result, "creditUserWallet");
-
 
9847
      if (result.isSetSuccess()) {
-
 
9848
        return result.success;
-
 
9849
      }
-
 
9850
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "creditUserWallet failed: unknown result");
-
 
9851
    }
-
 
9852
 
9825
  }
9853
  }
9826
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
9854
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
9827
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
9855
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
9828
      private org.apache.thrift.async.TAsyncClientManager clientManager;
9856
      private org.apache.thrift.async.TAsyncClientManager clientManager;
9829
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
9857
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
Line 20943... Line 20971...
20943
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
20971
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
20944
        return (new Client(prot)).recv_getmypmsaprofile();
20972
        return (new Client(prot)).recv_getmypmsaprofile();
20945
      }
20973
      }
20946
    }
20974
    }
20947
 
20975
 
-
 
20976
    public void creditUserWallet(long userId, long amount, org.apache.thrift.async.AsyncMethodCallback<creditUserWallet_call> resultHandler) throws org.apache.thrift.TException {
-
 
20977
      checkReady();
-
 
20978
      creditUserWallet_call method_call = new creditUserWallet_call(userId, amount, resultHandler, this, ___protocolFactory, ___transport);
-
 
20979
      this.___currentMethod = method_call;
-
 
20980
      ___manager.call(method_call);
-
 
20981
    }
-
 
20982
 
-
 
20983
    public static class creditUserWallet_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
20984
      private long userId;
-
 
20985
      private long amount;
-
 
20986
      public creditUserWallet_call(long userId, long amount, org.apache.thrift.async.AsyncMethodCallback<creditUserWallet_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 {
-
 
20987
        super(client, protocolFactory, transport, resultHandler, false);
-
 
20988
        this.userId = userId;
-
 
20989
        this.amount = amount;
-
 
20990
      }
-
 
20991
 
-
 
20992
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
20993
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("creditUserWallet", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
20994
        creditUserWallet_args args = new creditUserWallet_args();
-
 
20995
        args.setUserId(userId);
-
 
20996
        args.setAmount(amount);
-
 
20997
        args.write(prot);
-
 
20998
        prot.writeMessageEnd();
-
 
20999
      }
-
 
21000
 
-
 
21001
      public boolean getResult() throws org.apache.thrift.TException {
-
 
21002
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
21003
          throw new IllegalStateException("Method call not finished!");
-
 
21004
        }
-
 
21005
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
21006
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
21007
        return (new Client(prot)).recv_creditUserWallet();
-
 
21008
      }
-
 
21009
    }
-
 
21010
 
20948
  }
21011
  }
20949
 
21012
 
20950
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
21013
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
20951
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
21014
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
20952
    public Processor(I iface) {
21015
    public Processor(I iface) {
Line 21275... Line 21338...
21275
      processMap.put("updatePmsaUser", new updatePmsaUser());
21338
      processMap.put("updatePmsaUser", new updatePmsaUser());
21276
      processMap.put("getPmsaUsers", new getPmsaUsers());
21339
      processMap.put("getPmsaUsers", new getPmsaUsers());
21277
      processMap.put("getPendingAssociates", new getPendingAssociates());
21340
      processMap.put("getPendingAssociates", new getPendingAssociates());
21278
      processMap.put("getStatsForAssociates", new getStatsForAssociates());
21341
      processMap.put("getStatsForAssociates", new getStatsForAssociates());
21279
      processMap.put("getmypmsaprofile", new getmypmsaprofile());
21342
      processMap.put("getmypmsaprofile", new getmypmsaprofile());
-
 
21343
      processMap.put("creditUserWallet", new creditUserWallet());
21280
      return processMap;
21344
      return processMap;
21281
    }
21345
    }
21282
 
21346
 
21283
    private static class createTransaction<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createTransaction_args> {
21347
    private static class createTransaction<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createTransaction_args> {
21284
      public createTransaction() {
21348
      public createTransaction() {
Line 27021... Line 27085...
27021
        result.success = iface.getmypmsaprofile(args.associateEmail);
27085
        result.success = iface.getmypmsaprofile(args.associateEmail);
27022
        return result;
27086
        return result;
27023
      }
27087
      }
27024
    }
27088
    }
27025
 
27089
 
-
 
27090
    private static class creditUserWallet<I extends Iface> extends org.apache.thrift.ProcessFunction<I, creditUserWallet_args> {
-
 
27091
      public creditUserWallet() {
-
 
27092
        super("creditUserWallet");
-
 
27093
      }
-
 
27094
 
-
 
27095
      protected creditUserWallet_args getEmptyArgsInstance() {
-
 
27096
        return new creditUserWallet_args();
-
 
27097
      }
-
 
27098
 
-
 
27099
      protected creditUserWallet_result getResult(I iface, creditUserWallet_args args) throws org.apache.thrift.TException {
-
 
27100
        creditUserWallet_result result = new creditUserWallet_result();
-
 
27101
        result.success = iface.creditUserWallet(args.userId, args.amount);
-
 
27102
        result.setSuccessIsSet(true);
-
 
27103
        return result;
-
 
27104
      }
-
 
27105
    }
-
 
27106
 
27026
  }
27107
  }
27027
 
27108
 
27028
  public static class createTransaction_args implements org.apache.thrift.TBase<createTransaction_args, createTransaction_args._Fields>, java.io.Serializable, Cloneable   {
27109
  public static class createTransaction_args implements org.apache.thrift.TBase<createTransaction_args, createTransaction_args._Fields>, java.io.Serializable, Cloneable   {
27029
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createTransaction_args");
27110
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createTransaction_args");
27030
 
27111
 
Line 254204... Line 254285...
254204
      first = false;
254285
      first = false;
254205
      sb.append(")");
254286
      sb.append(")");
254206
      return sb.toString();
254287
      return sb.toString();
254207
    }
254288
    }
254208
 
254289
 
-
 
254290
    public void validate() throws org.apache.thrift.TException {
-
 
254291
      // check for required fields
-
 
254292
    }
-
 
254293
 
-
 
254294
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
254295
      try {
-
 
254296
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
254297
      } catch (org.apache.thrift.TException te) {
-
 
254298
        throw new java.io.IOException(te);
-
 
254299
      }
-
 
254300
    }
-
 
254301
 
-
 
254302
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
254303
      try {
-
 
254304
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
254305
      } catch (org.apache.thrift.TException te) {
-
 
254306
        throw new java.io.IOException(te);
-
 
254307
      }
-
 
254308
    }
-
 
254309
 
-
 
254310
  }
-
 
254311
 
-
 
254312
  public static class creditUserWallet_args implements org.apache.thrift.TBase<creditUserWallet_args, creditUserWallet_args._Fields>, java.io.Serializable, Cloneable   {
-
 
254313
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("creditUserWallet_args");
-
 
254314
 
-
 
254315
    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);
-
 
254316
    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)2);
-
 
254317
 
-
 
254318
    private long userId; // required
-
 
254319
    private long amount; // required
-
 
254320
 
-
 
254321
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
254322
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
254323
      USER_ID((short)1, "userId"),
-
 
254324
      AMOUNT((short)2, "amount");
-
 
254325
 
-
 
254326
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
254327
 
-
 
254328
      static {
-
 
254329
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
254330
          byName.put(field.getFieldName(), field);
-
 
254331
        }
-
 
254332
      }
-
 
254333
 
-
 
254334
      /**
-
 
254335
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
254336
       */
-
 
254337
      public static _Fields findByThriftId(int fieldId) {
-
 
254338
        switch(fieldId) {
-
 
254339
          case 1: // USER_ID
-
 
254340
            return USER_ID;
-
 
254341
          case 2: // AMOUNT
-
 
254342
            return AMOUNT;
-
 
254343
          default:
-
 
254344
            return null;
-
 
254345
        }
-
 
254346
      }
-
 
254347
 
-
 
254348
      /**
-
 
254349
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
254350
       * if it is not found.
-
 
254351
       */
-
 
254352
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
254353
        _Fields fields = findByThriftId(fieldId);
-
 
254354
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
254355
        return fields;
-
 
254356
      }
-
 
254357
 
-
 
254358
      /**
-
 
254359
       * Find the _Fields constant that matches name, or null if its not found.
-
 
254360
       */
-
 
254361
      public static _Fields findByName(String name) {
-
 
254362
        return byName.get(name);
-
 
254363
      }
-
 
254364
 
-
 
254365
      private final short _thriftId;
-
 
254366
      private final String _fieldName;
-
 
254367
 
-
 
254368
      _Fields(short thriftId, String fieldName) {
-
 
254369
        _thriftId = thriftId;
-
 
254370
        _fieldName = fieldName;
-
 
254371
      }
-
 
254372
 
-
 
254373
      public short getThriftFieldId() {
-
 
254374
        return _thriftId;
-
 
254375
      }
-
 
254376
 
-
 
254377
      public String getFieldName() {
-
 
254378
        return _fieldName;
-
 
254379
      }
-
 
254380
    }
-
 
254381
 
-
 
254382
    // isset id assignments
-
 
254383
    private static final int __USERID_ISSET_ID = 0;
-
 
254384
    private static final int __AMOUNT_ISSET_ID = 1;
-
 
254385
    private BitSet __isset_bit_vector = new BitSet(2);
-
 
254386
 
-
 
254387
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
254388
    static {
-
 
254389
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
254390
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
254391
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
254392
      tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
254393
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
254394
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
254395
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(creditUserWallet_args.class, metaDataMap);
-
 
254396
    }
-
 
254397
 
-
 
254398
    public creditUserWallet_args() {
-
 
254399
    }
-
 
254400
 
-
 
254401
    public creditUserWallet_args(
-
 
254402
      long userId,
-
 
254403
      long amount)
-
 
254404
    {
-
 
254405
      this();
-
 
254406
      this.userId = userId;
-
 
254407
      setUserIdIsSet(true);
-
 
254408
      this.amount = amount;
-
 
254409
      setAmountIsSet(true);
-
 
254410
    }
-
 
254411
 
-
 
254412
    /**
-
 
254413
     * Performs a deep copy on <i>other</i>.
-
 
254414
     */
-
 
254415
    public creditUserWallet_args(creditUserWallet_args other) {
-
 
254416
      __isset_bit_vector.clear();
-
 
254417
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
254418
      this.userId = other.userId;
-
 
254419
      this.amount = other.amount;
-
 
254420
    }
-
 
254421
 
-
 
254422
    public creditUserWallet_args deepCopy() {
-
 
254423
      return new creditUserWallet_args(this);
-
 
254424
    }
-
 
254425
 
-
 
254426
    @Override
-
 
254427
    public void clear() {
-
 
254428
      setUserIdIsSet(false);
-
 
254429
      this.userId = 0;
-
 
254430
      setAmountIsSet(false);
-
 
254431
      this.amount = 0;
-
 
254432
    }
-
 
254433
 
-
 
254434
    public long getUserId() {
-
 
254435
      return this.userId;
-
 
254436
    }
-
 
254437
 
-
 
254438
    public void setUserId(long userId) {
-
 
254439
      this.userId = userId;
-
 
254440
      setUserIdIsSet(true);
-
 
254441
    }
-
 
254442
 
-
 
254443
    public void unsetUserId() {
-
 
254444
      __isset_bit_vector.clear(__USERID_ISSET_ID);
-
 
254445
    }
-
 
254446
 
-
 
254447
    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
-
 
254448
    public boolean isSetUserId() {
-
 
254449
      return __isset_bit_vector.get(__USERID_ISSET_ID);
-
 
254450
    }
-
 
254451
 
-
 
254452
    public void setUserIdIsSet(boolean value) {
-
 
254453
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
-
 
254454
    }
-
 
254455
 
-
 
254456
    public long getAmount() {
-
 
254457
      return this.amount;
-
 
254458
    }
-
 
254459
 
-
 
254460
    public void setAmount(long amount) {
-
 
254461
      this.amount = amount;
-
 
254462
      setAmountIsSet(true);
-
 
254463
    }
-
 
254464
 
-
 
254465
    public void unsetAmount() {
-
 
254466
      __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
-
 
254467
    }
-
 
254468
 
-
 
254469
    /** Returns true if field amount is set (has been assigned a value) and false otherwise */
-
 
254470
    public boolean isSetAmount() {
-
 
254471
      return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
-
 
254472
    }
-
 
254473
 
-
 
254474
    public void setAmountIsSet(boolean value) {
-
 
254475
      __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
-
 
254476
    }
-
 
254477
 
-
 
254478
    public void setFieldValue(_Fields field, Object value) {
-
 
254479
      switch (field) {
-
 
254480
      case USER_ID:
-
 
254481
        if (value == null) {
-
 
254482
          unsetUserId();
-
 
254483
        } else {
-
 
254484
          setUserId((Long)value);
-
 
254485
        }
-
 
254486
        break;
-
 
254487
 
-
 
254488
      case AMOUNT:
-
 
254489
        if (value == null) {
-
 
254490
          unsetAmount();
-
 
254491
        } else {
-
 
254492
          setAmount((Long)value);
-
 
254493
        }
-
 
254494
        break;
-
 
254495
 
-
 
254496
      }
-
 
254497
    }
-
 
254498
 
-
 
254499
    public Object getFieldValue(_Fields field) {
-
 
254500
      switch (field) {
-
 
254501
      case USER_ID:
-
 
254502
        return Long.valueOf(getUserId());
-
 
254503
 
-
 
254504
      case AMOUNT:
-
 
254505
        return Long.valueOf(getAmount());
-
 
254506
 
-
 
254507
      }
-
 
254508
      throw new IllegalStateException();
-
 
254509
    }
-
 
254510
 
-
 
254511
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
254512
    public boolean isSet(_Fields field) {
-
 
254513
      if (field == null) {
-
 
254514
        throw new IllegalArgumentException();
-
 
254515
      }
-
 
254516
 
-
 
254517
      switch (field) {
-
 
254518
      case USER_ID:
-
 
254519
        return isSetUserId();
-
 
254520
      case AMOUNT:
-
 
254521
        return isSetAmount();
-
 
254522
      }
-
 
254523
      throw new IllegalStateException();
-
 
254524
    }
-
 
254525
 
-
 
254526
    @Override
-
 
254527
    public boolean equals(Object that) {
-
 
254528
      if (that == null)
-
 
254529
        return false;
-
 
254530
      if (that instanceof creditUserWallet_args)
-
 
254531
        return this.equals((creditUserWallet_args)that);
-
 
254532
      return false;
-
 
254533
    }
-
 
254534
 
-
 
254535
    public boolean equals(creditUserWallet_args that) {
-
 
254536
      if (that == null)
-
 
254537
        return false;
-
 
254538
 
-
 
254539
      boolean this_present_userId = true;
-
 
254540
      boolean that_present_userId = true;
-
 
254541
      if (this_present_userId || that_present_userId) {
-
 
254542
        if (!(this_present_userId && that_present_userId))
-
 
254543
          return false;
-
 
254544
        if (this.userId != that.userId)
-
 
254545
          return false;
-
 
254546
      }
-
 
254547
 
-
 
254548
      boolean this_present_amount = true;
-
 
254549
      boolean that_present_amount = true;
-
 
254550
      if (this_present_amount || that_present_amount) {
-
 
254551
        if (!(this_present_amount && that_present_amount))
-
 
254552
          return false;
-
 
254553
        if (this.amount != that.amount)
-
 
254554
          return false;
-
 
254555
      }
-
 
254556
 
-
 
254557
      return true;
-
 
254558
    }
-
 
254559
 
-
 
254560
    @Override
-
 
254561
    public int hashCode() {
-
 
254562
      return 0;
-
 
254563
    }
-
 
254564
 
-
 
254565
    public int compareTo(creditUserWallet_args other) {
-
 
254566
      if (!getClass().equals(other.getClass())) {
-
 
254567
        return getClass().getName().compareTo(other.getClass().getName());
-
 
254568
      }
-
 
254569
 
-
 
254570
      int lastComparison = 0;
-
 
254571
      creditUserWallet_args typedOther = (creditUserWallet_args)other;
-
 
254572
 
-
 
254573
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
-
 
254574
      if (lastComparison != 0) {
-
 
254575
        return lastComparison;
-
 
254576
      }
-
 
254577
      if (isSetUserId()) {
-
 
254578
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
-
 
254579
        if (lastComparison != 0) {
-
 
254580
          return lastComparison;
-
 
254581
        }
-
 
254582
      }
-
 
254583
      lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
-
 
254584
      if (lastComparison != 0) {
-
 
254585
        return lastComparison;
-
 
254586
      }
-
 
254587
      if (isSetAmount()) {
-
 
254588
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
-
 
254589
        if (lastComparison != 0) {
-
 
254590
          return lastComparison;
-
 
254591
        }
-
 
254592
      }
-
 
254593
      return 0;
-
 
254594
    }
-
 
254595
 
-
 
254596
    public _Fields fieldForId(int fieldId) {
-
 
254597
      return _Fields.findByThriftId(fieldId);
-
 
254598
    }
-
 
254599
 
-
 
254600
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
254601
      org.apache.thrift.protocol.TField field;
-
 
254602
      iprot.readStructBegin();
-
 
254603
      while (true)
-
 
254604
      {
-
 
254605
        field = iprot.readFieldBegin();
-
 
254606
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
254607
          break;
-
 
254608
        }
-
 
254609
        switch (field.id) {
-
 
254610
          case 1: // USER_ID
-
 
254611
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
254612
              this.userId = iprot.readI64();
-
 
254613
              setUserIdIsSet(true);
-
 
254614
            } else { 
-
 
254615
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
254616
            }
-
 
254617
            break;
-
 
254618
          case 2: // AMOUNT
-
 
254619
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
254620
              this.amount = iprot.readI64();
-
 
254621
              setAmountIsSet(true);
-
 
254622
            } else { 
-
 
254623
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
254624
            }
-
 
254625
            break;
-
 
254626
          default:
-
 
254627
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
254628
        }
-
 
254629
        iprot.readFieldEnd();
-
 
254630
      }
-
 
254631
      iprot.readStructEnd();
-
 
254632
      validate();
-
 
254633
    }
-
 
254634
 
-
 
254635
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
254636
      validate();
-
 
254637
 
-
 
254638
      oprot.writeStructBegin(STRUCT_DESC);
-
 
254639
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
-
 
254640
      oprot.writeI64(this.userId);
-
 
254641
      oprot.writeFieldEnd();
-
 
254642
      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
-
 
254643
      oprot.writeI64(this.amount);
-
 
254644
      oprot.writeFieldEnd();
-
 
254645
      oprot.writeFieldStop();
-
 
254646
      oprot.writeStructEnd();
-
 
254647
    }
-
 
254648
 
-
 
254649
    @Override
-
 
254650
    public String toString() {
-
 
254651
      StringBuilder sb = new StringBuilder("creditUserWallet_args(");
-
 
254652
      boolean first = true;
-
 
254653
 
-
 
254654
      sb.append("userId:");
-
 
254655
      sb.append(this.userId);
-
 
254656
      first = false;
-
 
254657
      if (!first) sb.append(", ");
-
 
254658
      sb.append("amount:");
-
 
254659
      sb.append(this.amount);
-
 
254660
      first = false;
-
 
254661
      sb.append(")");
-
 
254662
      return sb.toString();
-
 
254663
    }
-
 
254664
 
-
 
254665
    public void validate() throws org.apache.thrift.TException {
-
 
254666
      // check for required fields
-
 
254667
    }
-
 
254668
 
-
 
254669
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
254670
      try {
-
 
254671
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
254672
      } catch (org.apache.thrift.TException te) {
-
 
254673
        throw new java.io.IOException(te);
-
 
254674
      }
-
 
254675
    }
-
 
254676
 
-
 
254677
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
254678
      try {
-
 
254679
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
254680
        __isset_bit_vector = new BitSet(1);
-
 
254681
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
254682
      } catch (org.apache.thrift.TException te) {
-
 
254683
        throw new java.io.IOException(te);
-
 
254684
      }
-
 
254685
    }
-
 
254686
 
-
 
254687
  }
-
 
254688
 
-
 
254689
  public static class creditUserWallet_result implements org.apache.thrift.TBase<creditUserWallet_result, creditUserWallet_result._Fields>, java.io.Serializable, Cloneable   {
-
 
254690
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("creditUserWallet_result");
-
 
254691
 
-
 
254692
    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);
-
 
254693
 
-
 
254694
    private boolean success; // required
-
 
254695
 
-
 
254696
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
254697
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
254698
      SUCCESS((short)0, "success");
-
 
254699
 
-
 
254700
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
254701
 
-
 
254702
      static {
-
 
254703
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
254704
          byName.put(field.getFieldName(), field);
-
 
254705
        }
-
 
254706
      }
-
 
254707
 
-
 
254708
      /**
-
 
254709
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
254710
       */
-
 
254711
      public static _Fields findByThriftId(int fieldId) {
-
 
254712
        switch(fieldId) {
-
 
254713
          case 0: // SUCCESS
-
 
254714
            return SUCCESS;
-
 
254715
          default:
-
 
254716
            return null;
-
 
254717
        }
-
 
254718
      }
-
 
254719
 
-
 
254720
      /**
-
 
254721
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
254722
       * if it is not found.
-
 
254723
       */
-
 
254724
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
254725
        _Fields fields = findByThriftId(fieldId);
-
 
254726
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
254727
        return fields;
-
 
254728
      }
-
 
254729
 
-
 
254730
      /**
-
 
254731
       * Find the _Fields constant that matches name, or null if its not found.
-
 
254732
       */
-
 
254733
      public static _Fields findByName(String name) {
-
 
254734
        return byName.get(name);
-
 
254735
      }
-
 
254736
 
-
 
254737
      private final short _thriftId;
-
 
254738
      private final String _fieldName;
-
 
254739
 
-
 
254740
      _Fields(short thriftId, String fieldName) {
-
 
254741
        _thriftId = thriftId;
-
 
254742
        _fieldName = fieldName;
-
 
254743
      }
-
 
254744
 
-
 
254745
      public short getThriftFieldId() {
-
 
254746
        return _thriftId;
-
 
254747
      }
-
 
254748
 
-
 
254749
      public String getFieldName() {
-
 
254750
        return _fieldName;
-
 
254751
      }
-
 
254752
    }
-
 
254753
 
-
 
254754
    // isset id assignments
-
 
254755
    private static final int __SUCCESS_ISSET_ID = 0;
-
 
254756
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
254757
 
-
 
254758
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
254759
    static {
-
 
254760
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
254761
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
254762
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
-
 
254763
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
254764
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(creditUserWallet_result.class, metaDataMap);
-
 
254765
    }
-
 
254766
 
-
 
254767
    public creditUserWallet_result() {
-
 
254768
    }
-
 
254769
 
-
 
254770
    public creditUserWallet_result(
-
 
254771
      boolean success)
-
 
254772
    {
-
 
254773
      this();
-
 
254774
      this.success = success;
-
 
254775
      setSuccessIsSet(true);
-
 
254776
    }
-
 
254777
 
-
 
254778
    /**
-
 
254779
     * Performs a deep copy on <i>other</i>.
-
 
254780
     */
-
 
254781
    public creditUserWallet_result(creditUserWallet_result other) {
-
 
254782
      __isset_bit_vector.clear();
-
 
254783
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
254784
      this.success = other.success;
-
 
254785
    }
-
 
254786
 
-
 
254787
    public creditUserWallet_result deepCopy() {
-
 
254788
      return new creditUserWallet_result(this);
-
 
254789
    }
-
 
254790
 
-
 
254791
    @Override
-
 
254792
    public void clear() {
-
 
254793
      setSuccessIsSet(false);
-
 
254794
      this.success = false;
-
 
254795
    }
-
 
254796
 
-
 
254797
    public boolean isSuccess() {
-
 
254798
      return this.success;
-
 
254799
    }
-
 
254800
 
-
 
254801
    public void setSuccess(boolean success) {
-
 
254802
      this.success = success;
-
 
254803
      setSuccessIsSet(true);
-
 
254804
    }
-
 
254805
 
-
 
254806
    public void unsetSuccess() {
-
 
254807
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
-
 
254808
    }
-
 
254809
 
-
 
254810
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
254811
    public boolean isSetSuccess() {
-
 
254812
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
-
 
254813
    }
-
 
254814
 
-
 
254815
    public void setSuccessIsSet(boolean value) {
-
 
254816
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
-
 
254817
    }
-
 
254818
 
-
 
254819
    public void setFieldValue(_Fields field, Object value) {
-
 
254820
      switch (field) {
-
 
254821
      case SUCCESS:
-
 
254822
        if (value == null) {
-
 
254823
          unsetSuccess();
-
 
254824
        } else {
-
 
254825
          setSuccess((Boolean)value);
-
 
254826
        }
-
 
254827
        break;
-
 
254828
 
-
 
254829
      }
-
 
254830
    }
-
 
254831
 
-
 
254832
    public Object getFieldValue(_Fields field) {
-
 
254833
      switch (field) {
-
 
254834
      case SUCCESS:
-
 
254835
        return Boolean.valueOf(isSuccess());
-
 
254836
 
-
 
254837
      }
-
 
254838
      throw new IllegalStateException();
-
 
254839
    }
-
 
254840
 
-
 
254841
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
254842
    public boolean isSet(_Fields field) {
-
 
254843
      if (field == null) {
-
 
254844
        throw new IllegalArgumentException();
-
 
254845
      }
-
 
254846
 
-
 
254847
      switch (field) {
-
 
254848
      case SUCCESS:
-
 
254849
        return isSetSuccess();
-
 
254850
      }
-
 
254851
      throw new IllegalStateException();
-
 
254852
    }
-
 
254853
 
-
 
254854
    @Override
-
 
254855
    public boolean equals(Object that) {
-
 
254856
      if (that == null)
-
 
254857
        return false;
-
 
254858
      if (that instanceof creditUserWallet_result)
-
 
254859
        return this.equals((creditUserWallet_result)that);
-
 
254860
      return false;
-
 
254861
    }
-
 
254862
 
-
 
254863
    public boolean equals(creditUserWallet_result that) {
-
 
254864
      if (that == null)
-
 
254865
        return false;
-
 
254866
 
-
 
254867
      boolean this_present_success = true;
-
 
254868
      boolean that_present_success = true;
-
 
254869
      if (this_present_success || that_present_success) {
-
 
254870
        if (!(this_present_success && that_present_success))
-
 
254871
          return false;
-
 
254872
        if (this.success != that.success)
-
 
254873
          return false;
-
 
254874
      }
-
 
254875
 
-
 
254876
      return true;
-
 
254877
    }
-
 
254878
 
-
 
254879
    @Override
-
 
254880
    public int hashCode() {
-
 
254881
      return 0;
-
 
254882
    }
-
 
254883
 
-
 
254884
    public int compareTo(creditUserWallet_result other) {
-
 
254885
      if (!getClass().equals(other.getClass())) {
-
 
254886
        return getClass().getName().compareTo(other.getClass().getName());
-
 
254887
      }
-
 
254888
 
-
 
254889
      int lastComparison = 0;
-
 
254890
      creditUserWallet_result typedOther = (creditUserWallet_result)other;
-
 
254891
 
-
 
254892
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
254893
      if (lastComparison != 0) {
-
 
254894
        return lastComparison;
-
 
254895
      }
-
 
254896
      if (isSetSuccess()) {
-
 
254897
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
254898
        if (lastComparison != 0) {
-
 
254899
          return lastComparison;
-
 
254900
        }
-
 
254901
      }
-
 
254902
      return 0;
-
 
254903
    }
-
 
254904
 
-
 
254905
    public _Fields fieldForId(int fieldId) {
-
 
254906
      return _Fields.findByThriftId(fieldId);
-
 
254907
    }
-
 
254908
 
-
 
254909
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
254910
      org.apache.thrift.protocol.TField field;
-
 
254911
      iprot.readStructBegin();
-
 
254912
      while (true)
-
 
254913
      {
-
 
254914
        field = iprot.readFieldBegin();
-
 
254915
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
254916
          break;
-
 
254917
        }
-
 
254918
        switch (field.id) {
-
 
254919
          case 0: // SUCCESS
-
 
254920
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-
 
254921
              this.success = iprot.readBool();
-
 
254922
              setSuccessIsSet(true);
-
 
254923
            } else { 
-
 
254924
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
254925
            }
-
 
254926
            break;
-
 
254927
          default:
-
 
254928
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
254929
        }
-
 
254930
        iprot.readFieldEnd();
-
 
254931
      }
-
 
254932
      iprot.readStructEnd();
-
 
254933
      validate();
-
 
254934
    }
-
 
254935
 
-
 
254936
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
254937
      oprot.writeStructBegin(STRUCT_DESC);
-
 
254938
 
-
 
254939
      if (this.isSetSuccess()) {
-
 
254940
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
254941
        oprot.writeBool(this.success);
-
 
254942
        oprot.writeFieldEnd();
-
 
254943
      }
-
 
254944
      oprot.writeFieldStop();
-
 
254945
      oprot.writeStructEnd();
-
 
254946
    }
-
 
254947
 
-
 
254948
    @Override
-
 
254949
    public String toString() {
-
 
254950
      StringBuilder sb = new StringBuilder("creditUserWallet_result(");
-
 
254951
      boolean first = true;
-
 
254952
 
-
 
254953
      sb.append("success:");
-
 
254954
      sb.append(this.success);
-
 
254955
      first = false;
-
 
254956
      sb.append(")");
-
 
254957
      return sb.toString();
-
 
254958
    }
-
 
254959
 
254209
    public void validate() throws org.apache.thrift.TException {
254960
    public void validate() throws org.apache.thrift.TException {
254210
      // check for required fields
254961
      // check for required fields
254211
    }
254962
    }
254212
 
254963
 
254213
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
254964
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {