Subversion Repositories SmartDukaan

Rev

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

Rev 6206 Rev 6269
Line 875... Line 875...
875
 
875
 
876
    public Map<Long,String> getServiceProviders(RechargeType rechargeType, boolean onlyActive) throws org.apache.thrift.TException;
876
    public Map<Long,String> getServiceProviders(RechargeType rechargeType, boolean onlyActive) throws org.apache.thrift.TException;
877
 
877
 
878
    public long getServiceProviderForDevice(RechargeType rechargeType, String deviceNumber) throws org.apache.thrift.TException;
878
    public long getServiceProviderForDevice(RechargeType rechargeType, String deviceNumber) throws org.apache.thrift.TException;
879
 
879
 
-
 
880
    public String validateRecharge(RechargeType rechargeType, String deviceNumber) throws org.apache.thrift.TException;
-
 
881
 
880
    public List<RechargeOrder> getRechargeOrdersForDevice(String deviceNumber) throws org.apache.thrift.TException;
882
    public List<RechargeOrder> getRechargeOrdersForDevice(String deviceNumber) throws org.apache.thrift.TException;
881
 
883
 
882
    public void addAmountToWallet(long userId, long orderId, long amount) throws org.apache.thrift.TException;
884
    public void addAmountToWallet(long userId, long orderId, long amount) throws org.apache.thrift.TException;
883
 
885
 
884
    public RechargeStatistics getRechargeStatistics() throws org.apache.thrift.TException;
886
    public RechargeStatistics getRechargeStatistics() throws org.apache.thrift.TException;
Line 1163... Line 1165...
1163
 
1165
 
1164
    public void getServiceProviders(RechargeType rechargeType, boolean onlyActive, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getServiceProviders_call> resultHandler) throws org.apache.thrift.TException;
1166
    public void getServiceProviders(RechargeType rechargeType, boolean onlyActive, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getServiceProviders_call> resultHandler) throws org.apache.thrift.TException;
1165
 
1167
 
1166
    public void getServiceProviderForDevice(RechargeType rechargeType, String deviceNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getServiceProviderForDevice_call> resultHandler) throws org.apache.thrift.TException;
1168
    public void getServiceProviderForDevice(RechargeType rechargeType, String deviceNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getServiceProviderForDevice_call> resultHandler) throws org.apache.thrift.TException;
1167
 
1169
 
-
 
1170
    public void validateRecharge(RechargeType rechargeType, String deviceNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.validateRecharge_call> resultHandler) throws org.apache.thrift.TException;
-
 
1171
 
1168
    public void getRechargeOrdersForDevice(String deviceNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRechargeOrdersForDevice_call> resultHandler) throws org.apache.thrift.TException;
1172
    public void getRechargeOrdersForDevice(String deviceNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRechargeOrdersForDevice_call> resultHandler) throws org.apache.thrift.TException;
1169
 
1173
 
1170
    public void addAmountToWallet(long userId, long orderId, long amount, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addAmountToWallet_call> resultHandler) throws org.apache.thrift.TException;
1174
    public void addAmountToWallet(long userId, long orderId, long amount, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addAmountToWallet_call> resultHandler) throws org.apache.thrift.TException;
1171
 
1175
 
1172
    public void getRechargeStatistics(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRechargeStatistics_call> resultHandler) throws org.apache.thrift.TException;
1176
    public void getRechargeStatistics(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRechargeStatistics_call> resultHandler) throws org.apache.thrift.TException;
Line 4664... Line 4668...
4664
        return result.success;
4668
        return result.success;
4665
      }
4669
      }
4666
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getServiceProviderForDevice failed: unknown result");
4670
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getServiceProviderForDevice failed: unknown result");
4667
    }
4671
    }
4668
 
4672
 
-
 
4673
    public String validateRecharge(RechargeType rechargeType, String deviceNumber) throws org.apache.thrift.TException
-
 
4674
    {
-
 
4675
      send_validateRecharge(rechargeType, deviceNumber);
-
 
4676
      return recv_validateRecharge();
-
 
4677
    }
-
 
4678
 
-
 
4679
    public void send_validateRecharge(RechargeType rechargeType, String deviceNumber) throws org.apache.thrift.TException
-
 
4680
    {
-
 
4681
      validateRecharge_args args = new validateRecharge_args();
-
 
4682
      args.setRechargeType(rechargeType);
-
 
4683
      args.setDeviceNumber(deviceNumber);
-
 
4684
      sendBase("validateRecharge", args);
-
 
4685
    }
-
 
4686
 
-
 
4687
    public String recv_validateRecharge() throws org.apache.thrift.TException
-
 
4688
    {
-
 
4689
      validateRecharge_result result = new validateRecharge_result();
-
 
4690
      receiveBase(result, "validateRecharge");
-
 
4691
      if (result.isSetSuccess()) {
-
 
4692
        return result.success;
-
 
4693
      }
-
 
4694
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "validateRecharge failed: unknown result");
-
 
4695
    }
-
 
4696
 
4669
    public List<RechargeOrder> getRechargeOrdersForDevice(String deviceNumber) throws org.apache.thrift.TException
4697
    public List<RechargeOrder> getRechargeOrdersForDevice(String deviceNumber) throws org.apache.thrift.TException
4670
    {
4698
    {
4671
      send_getRechargeOrdersForDevice(deviceNumber);
4699
      send_getRechargeOrdersForDevice(deviceNumber);
4672
      return recv_getRechargeOrdersForDevice();
4700
      return recv_getRechargeOrdersForDevice();
4673
    }
4701
    }
Line 9584... Line 9612...
9584
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
9612
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
9585
        return (new Client(prot)).recv_getServiceProviderForDevice();
9613
        return (new Client(prot)).recv_getServiceProviderForDevice();
9586
      }
9614
      }
9587
    }
9615
    }
9588
 
9616
 
-
 
9617
    public void validateRecharge(RechargeType rechargeType, String deviceNumber, org.apache.thrift.async.AsyncMethodCallback<validateRecharge_call> resultHandler) throws org.apache.thrift.TException {
-
 
9618
      checkReady();
-
 
9619
      validateRecharge_call method_call = new validateRecharge_call(rechargeType, deviceNumber, resultHandler, this, ___protocolFactory, ___transport);
-
 
9620
      this.___currentMethod = method_call;
-
 
9621
      ___manager.call(method_call);
-
 
9622
    }
-
 
9623
 
-
 
9624
    public static class validateRecharge_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
9625
      private RechargeType rechargeType;
-
 
9626
      private String deviceNumber;
-
 
9627
      public validateRecharge_call(RechargeType rechargeType, String deviceNumber, org.apache.thrift.async.AsyncMethodCallback<validateRecharge_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 {
-
 
9628
        super(client, protocolFactory, transport, resultHandler, false);
-
 
9629
        this.rechargeType = rechargeType;
-
 
9630
        this.deviceNumber = deviceNumber;
-
 
9631
      }
-
 
9632
 
-
 
9633
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
9634
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("validateRecharge", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
9635
        validateRecharge_args args = new validateRecharge_args();
-
 
9636
        args.setRechargeType(rechargeType);
-
 
9637
        args.setDeviceNumber(deviceNumber);
-
 
9638
        args.write(prot);
-
 
9639
        prot.writeMessageEnd();
-
 
9640
      }
-
 
9641
 
-
 
9642
      public String getResult() throws org.apache.thrift.TException {
-
 
9643
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
9644
          throw new IllegalStateException("Method call not finished!");
-
 
9645
        }
-
 
9646
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
9647
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
9648
        return (new Client(prot)).recv_validateRecharge();
-
 
9649
      }
-
 
9650
    }
-
 
9651
 
9589
    public void getRechargeOrdersForDevice(String deviceNumber, org.apache.thrift.async.AsyncMethodCallback<getRechargeOrdersForDevice_call> resultHandler) throws org.apache.thrift.TException {
9652
    public void getRechargeOrdersForDevice(String deviceNumber, org.apache.thrift.async.AsyncMethodCallback<getRechargeOrdersForDevice_call> resultHandler) throws org.apache.thrift.TException {
9590
      checkReady();
9653
      checkReady();
9591
      getRechargeOrdersForDevice_call method_call = new getRechargeOrdersForDevice_call(deviceNumber, resultHandler, this, ___protocolFactory, ___transport);
9654
      getRechargeOrdersForDevice_call method_call = new getRechargeOrdersForDevice_call(deviceNumber, resultHandler, this, ___protocolFactory, ___transport);
9592
      this.___currentMethod = method_call;
9655
      this.___currentMethod = method_call;
9593
      ___manager.call(method_call);
9656
      ___manager.call(method_call);
Line 9897... Line 9960...
9897
      processMap.put("getUserWallet", new getUserWallet());
9960
      processMap.put("getUserWallet", new getUserWallet());
9898
      processMap.put("getUserWalletHistory", new getUserWalletHistory());
9961
      processMap.put("getUserWalletHistory", new getUserWalletHistory());
9899
      processMap.put("getRechargeOrdersForTransaction", new getRechargeOrdersForTransaction());
9962
      processMap.put("getRechargeOrdersForTransaction", new getRechargeOrdersForTransaction());
9900
      processMap.put("getServiceProviders", new getServiceProviders());
9963
      processMap.put("getServiceProviders", new getServiceProviders());
9901
      processMap.put("getServiceProviderForDevice", new getServiceProviderForDevice());
9964
      processMap.put("getServiceProviderForDevice", new getServiceProviderForDevice());
-
 
9965
      processMap.put("validateRecharge", new validateRecharge());
9902
      processMap.put("getRechargeOrdersForDevice", new getRechargeOrdersForDevice());
9966
      processMap.put("getRechargeOrdersForDevice", new getRechargeOrdersForDevice());
9903
      processMap.put("addAmountToWallet", new addAmountToWallet());
9967
      processMap.put("addAmountToWallet", new addAmountToWallet());
9904
      processMap.put("getRechargeStatistics", new getRechargeStatistics());
9968
      processMap.put("getRechargeStatistics", new getRechargeStatistics());
9905
      processMap.put("getRechargeOrdersForStatus", new getRechargeOrdersForStatus());
9969
      processMap.put("getRechargeOrdersForStatus", new getRechargeOrdersForStatus());
9906
      processMap.put("getPlansForOperator", new getPlansForOperator());
9970
      processMap.put("getPlansForOperator", new getPlansForOperator());
Line 12516... Line 12580...
12516
        result.setSuccessIsSet(true);
12580
        result.setSuccessIsSet(true);
12517
        return result;
12581
        return result;
12518
      }
12582
      }
12519
    }
12583
    }
12520
 
12584
 
-
 
12585
    private static class validateRecharge<I extends Iface> extends org.apache.thrift.ProcessFunction<I, validateRecharge_args> {
-
 
12586
      public validateRecharge() {
-
 
12587
        super("validateRecharge");
-
 
12588
      }
-
 
12589
 
-
 
12590
      protected validateRecharge_args getEmptyArgsInstance() {
-
 
12591
        return new validateRecharge_args();
-
 
12592
      }
-
 
12593
 
-
 
12594
      protected validateRecharge_result getResult(I iface, validateRecharge_args args) throws org.apache.thrift.TException {
-
 
12595
        validateRecharge_result result = new validateRecharge_result();
-
 
12596
        result.success = iface.validateRecharge(args.rechargeType, args.deviceNumber);
-
 
12597
        return result;
-
 
12598
      }
-
 
12599
    }
-
 
12600
 
12521
    private static class getRechargeOrdersForDevice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getRechargeOrdersForDevice_args> {
12601
    private static class getRechargeOrdersForDevice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getRechargeOrdersForDevice_args> {
12522
      public getRechargeOrdersForDevice() {
12602
      public getRechargeOrdersForDevice() {
12523
        super("getRechargeOrdersForDevice");
12603
        super("getRechargeOrdersForDevice");
12524
      }
12604
      }
12525
 
12605
 
Line 112796... Line 112876...
112796
      first = false;
112876
      first = false;
112797
      sb.append(")");
112877
      sb.append(")");
112798
      return sb.toString();
112878
      return sb.toString();
112799
    }
112879
    }
112800
 
112880
 
-
 
112881
    public void validate() throws org.apache.thrift.TException {
-
 
112882
      // check for required fields
-
 
112883
    }
-
 
112884
 
-
 
112885
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
112886
      try {
-
 
112887
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
112888
      } catch (org.apache.thrift.TException te) {
-
 
112889
        throw new java.io.IOException(te);
-
 
112890
      }
-
 
112891
    }
-
 
112892
 
-
 
112893
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
112894
      try {
-
 
112895
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
112896
      } catch (org.apache.thrift.TException te) {
-
 
112897
        throw new java.io.IOException(te);
-
 
112898
      }
-
 
112899
    }
-
 
112900
 
-
 
112901
  }
-
 
112902
 
-
 
112903
  public static class validateRecharge_args implements org.apache.thrift.TBase<validateRecharge_args, validateRecharge_args._Fields>, java.io.Serializable, Cloneable   {
-
 
112904
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("validateRecharge_args");
-
 
112905
 
-
 
112906
    private static final org.apache.thrift.protocol.TField RECHARGE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("rechargeType", org.apache.thrift.protocol.TType.I32, (short)1);
-
 
112907
    private static final org.apache.thrift.protocol.TField DEVICE_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("deviceNumber", org.apache.thrift.protocol.TType.STRING, (short)2);
-
 
112908
 
-
 
112909
    private RechargeType rechargeType; // required
-
 
112910
    private String deviceNumber; // required
-
 
112911
 
-
 
112912
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
112913
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
112914
      /**
-
 
112915
       * 
-
 
112916
       * @see RechargeType
-
 
112917
       */
-
 
112918
      RECHARGE_TYPE((short)1, "rechargeType"),
-
 
112919
      DEVICE_NUMBER((short)2, "deviceNumber");
-
 
112920
 
-
 
112921
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
112922
 
-
 
112923
      static {
-
 
112924
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
112925
          byName.put(field.getFieldName(), field);
-
 
112926
        }
-
 
112927
      }
-
 
112928
 
-
 
112929
      /**
-
 
112930
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
112931
       */
-
 
112932
      public static _Fields findByThriftId(int fieldId) {
-
 
112933
        switch(fieldId) {
-
 
112934
          case 1: // RECHARGE_TYPE
-
 
112935
            return RECHARGE_TYPE;
-
 
112936
          case 2: // DEVICE_NUMBER
-
 
112937
            return DEVICE_NUMBER;
-
 
112938
          default:
-
 
112939
            return null;
-
 
112940
        }
-
 
112941
      }
-
 
112942
 
-
 
112943
      /**
-
 
112944
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
112945
       * if it is not found.
-
 
112946
       */
-
 
112947
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
112948
        _Fields fields = findByThriftId(fieldId);
-
 
112949
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
112950
        return fields;
-
 
112951
      }
-
 
112952
 
-
 
112953
      /**
-
 
112954
       * Find the _Fields constant that matches name, or null if its not found.
-
 
112955
       */
-
 
112956
      public static _Fields findByName(String name) {
-
 
112957
        return byName.get(name);
-
 
112958
      }
-
 
112959
 
-
 
112960
      private final short _thriftId;
-
 
112961
      private final String _fieldName;
-
 
112962
 
-
 
112963
      _Fields(short thriftId, String fieldName) {
-
 
112964
        _thriftId = thriftId;
-
 
112965
        _fieldName = fieldName;
-
 
112966
      }
-
 
112967
 
-
 
112968
      public short getThriftFieldId() {
-
 
112969
        return _thriftId;
-
 
112970
      }
-
 
112971
 
-
 
112972
      public String getFieldName() {
-
 
112973
        return _fieldName;
-
 
112974
      }
-
 
112975
    }
-
 
112976
 
-
 
112977
    // isset id assignments
-
 
112978
 
-
 
112979
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
112980
    static {
-
 
112981
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
112982
      tmpMap.put(_Fields.RECHARGE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("rechargeType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
112983
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, RechargeType.class)));
-
 
112984
      tmpMap.put(_Fields.DEVICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("deviceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
112985
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
112986
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
112987
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(validateRecharge_args.class, metaDataMap);
-
 
112988
    }
-
 
112989
 
-
 
112990
    public validateRecharge_args() {
-
 
112991
    }
-
 
112992
 
-
 
112993
    public validateRecharge_args(
-
 
112994
      RechargeType rechargeType,
-
 
112995
      String deviceNumber)
-
 
112996
    {
-
 
112997
      this();
-
 
112998
      this.rechargeType = rechargeType;
-
 
112999
      this.deviceNumber = deviceNumber;
-
 
113000
    }
-
 
113001
 
-
 
113002
    /**
-
 
113003
     * Performs a deep copy on <i>other</i>.
-
 
113004
     */
-
 
113005
    public validateRecharge_args(validateRecharge_args other) {
-
 
113006
      if (other.isSetRechargeType()) {
-
 
113007
        this.rechargeType = other.rechargeType;
-
 
113008
      }
-
 
113009
      if (other.isSetDeviceNumber()) {
-
 
113010
        this.deviceNumber = other.deviceNumber;
-
 
113011
      }
-
 
113012
    }
-
 
113013
 
-
 
113014
    public validateRecharge_args deepCopy() {
-
 
113015
      return new validateRecharge_args(this);
-
 
113016
    }
-
 
113017
 
-
 
113018
    @Override
-
 
113019
    public void clear() {
-
 
113020
      this.rechargeType = null;
-
 
113021
      this.deviceNumber = null;
-
 
113022
    }
-
 
113023
 
-
 
113024
    /**
-
 
113025
     * 
-
 
113026
     * @see RechargeType
-
 
113027
     */
-
 
113028
    public RechargeType getRechargeType() {
-
 
113029
      return this.rechargeType;
-
 
113030
    }
-
 
113031
 
-
 
113032
    /**
-
 
113033
     * 
-
 
113034
     * @see RechargeType
-
 
113035
     */
-
 
113036
    public void setRechargeType(RechargeType rechargeType) {
-
 
113037
      this.rechargeType = rechargeType;
-
 
113038
    }
-
 
113039
 
-
 
113040
    public void unsetRechargeType() {
-
 
113041
      this.rechargeType = null;
-
 
113042
    }
-
 
113043
 
-
 
113044
    /** Returns true if field rechargeType is set (has been assigned a value) and false otherwise */
-
 
113045
    public boolean isSetRechargeType() {
-
 
113046
      return this.rechargeType != null;
-
 
113047
    }
-
 
113048
 
-
 
113049
    public void setRechargeTypeIsSet(boolean value) {
-
 
113050
      if (!value) {
-
 
113051
        this.rechargeType = null;
-
 
113052
      }
-
 
113053
    }
-
 
113054
 
-
 
113055
    public String getDeviceNumber() {
-
 
113056
      return this.deviceNumber;
-
 
113057
    }
-
 
113058
 
-
 
113059
    public void setDeviceNumber(String deviceNumber) {
-
 
113060
      this.deviceNumber = deviceNumber;
-
 
113061
    }
-
 
113062
 
-
 
113063
    public void unsetDeviceNumber() {
-
 
113064
      this.deviceNumber = null;
-
 
113065
    }
-
 
113066
 
-
 
113067
    /** Returns true if field deviceNumber is set (has been assigned a value) and false otherwise */
-
 
113068
    public boolean isSetDeviceNumber() {
-
 
113069
      return this.deviceNumber != null;
-
 
113070
    }
-
 
113071
 
-
 
113072
    public void setDeviceNumberIsSet(boolean value) {
-
 
113073
      if (!value) {
-
 
113074
        this.deviceNumber = null;
-
 
113075
      }
-
 
113076
    }
-
 
113077
 
-
 
113078
    public void setFieldValue(_Fields field, Object value) {
-
 
113079
      switch (field) {
-
 
113080
      case RECHARGE_TYPE:
-
 
113081
        if (value == null) {
-
 
113082
          unsetRechargeType();
-
 
113083
        } else {
-
 
113084
          setRechargeType((RechargeType)value);
-
 
113085
        }
-
 
113086
        break;
-
 
113087
 
-
 
113088
      case DEVICE_NUMBER:
-
 
113089
        if (value == null) {
-
 
113090
          unsetDeviceNumber();
-
 
113091
        } else {
-
 
113092
          setDeviceNumber((String)value);
-
 
113093
        }
-
 
113094
        break;
-
 
113095
 
-
 
113096
      }
-
 
113097
    }
-
 
113098
 
-
 
113099
    public Object getFieldValue(_Fields field) {
-
 
113100
      switch (field) {
-
 
113101
      case RECHARGE_TYPE:
-
 
113102
        return getRechargeType();
-
 
113103
 
-
 
113104
      case DEVICE_NUMBER:
-
 
113105
        return getDeviceNumber();
-
 
113106
 
-
 
113107
      }
-
 
113108
      throw new IllegalStateException();
-
 
113109
    }
-
 
113110
 
-
 
113111
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
113112
    public boolean isSet(_Fields field) {
-
 
113113
      if (field == null) {
-
 
113114
        throw new IllegalArgumentException();
-
 
113115
      }
-
 
113116
 
-
 
113117
      switch (field) {
-
 
113118
      case RECHARGE_TYPE:
-
 
113119
        return isSetRechargeType();
-
 
113120
      case DEVICE_NUMBER:
-
 
113121
        return isSetDeviceNumber();
-
 
113122
      }
-
 
113123
      throw new IllegalStateException();
-
 
113124
    }
-
 
113125
 
-
 
113126
    @Override
-
 
113127
    public boolean equals(Object that) {
-
 
113128
      if (that == null)
-
 
113129
        return false;
-
 
113130
      if (that instanceof validateRecharge_args)
-
 
113131
        return this.equals((validateRecharge_args)that);
-
 
113132
      return false;
-
 
113133
    }
-
 
113134
 
-
 
113135
    public boolean equals(validateRecharge_args that) {
-
 
113136
      if (that == null)
-
 
113137
        return false;
-
 
113138
 
-
 
113139
      boolean this_present_rechargeType = true && this.isSetRechargeType();
-
 
113140
      boolean that_present_rechargeType = true && that.isSetRechargeType();
-
 
113141
      if (this_present_rechargeType || that_present_rechargeType) {
-
 
113142
        if (!(this_present_rechargeType && that_present_rechargeType))
-
 
113143
          return false;
-
 
113144
        if (!this.rechargeType.equals(that.rechargeType))
-
 
113145
          return false;
-
 
113146
      }
-
 
113147
 
-
 
113148
      boolean this_present_deviceNumber = true && this.isSetDeviceNumber();
-
 
113149
      boolean that_present_deviceNumber = true && that.isSetDeviceNumber();
-
 
113150
      if (this_present_deviceNumber || that_present_deviceNumber) {
-
 
113151
        if (!(this_present_deviceNumber && that_present_deviceNumber))
-
 
113152
          return false;
-
 
113153
        if (!this.deviceNumber.equals(that.deviceNumber))
-
 
113154
          return false;
-
 
113155
      }
-
 
113156
 
-
 
113157
      return true;
-
 
113158
    }
-
 
113159
 
-
 
113160
    @Override
-
 
113161
    public int hashCode() {
-
 
113162
      return 0;
-
 
113163
    }
-
 
113164
 
-
 
113165
    public int compareTo(validateRecharge_args other) {
-
 
113166
      if (!getClass().equals(other.getClass())) {
-
 
113167
        return getClass().getName().compareTo(other.getClass().getName());
-
 
113168
      }
-
 
113169
 
-
 
113170
      int lastComparison = 0;
-
 
113171
      validateRecharge_args typedOther = (validateRecharge_args)other;
-
 
113172
 
-
 
113173
      lastComparison = Boolean.valueOf(isSetRechargeType()).compareTo(typedOther.isSetRechargeType());
-
 
113174
      if (lastComparison != 0) {
-
 
113175
        return lastComparison;
-
 
113176
      }
-
 
113177
      if (isSetRechargeType()) {
-
 
113178
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rechargeType, typedOther.rechargeType);
-
 
113179
        if (lastComparison != 0) {
-
 
113180
          return lastComparison;
-
 
113181
        }
-
 
113182
      }
-
 
113183
      lastComparison = Boolean.valueOf(isSetDeviceNumber()).compareTo(typedOther.isSetDeviceNumber());
-
 
113184
      if (lastComparison != 0) {
-
 
113185
        return lastComparison;
-
 
113186
      }
-
 
113187
      if (isSetDeviceNumber()) {
-
 
113188
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deviceNumber, typedOther.deviceNumber);
-
 
113189
        if (lastComparison != 0) {
-
 
113190
          return lastComparison;
-
 
113191
        }
-
 
113192
      }
-
 
113193
      return 0;
-
 
113194
    }
-
 
113195
 
-
 
113196
    public _Fields fieldForId(int fieldId) {
-
 
113197
      return _Fields.findByThriftId(fieldId);
-
 
113198
    }
-
 
113199
 
-
 
113200
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
113201
      org.apache.thrift.protocol.TField field;
-
 
113202
      iprot.readStructBegin();
-
 
113203
      while (true)
-
 
113204
      {
-
 
113205
        field = iprot.readFieldBegin();
-
 
113206
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
113207
          break;
-
 
113208
        }
-
 
113209
        switch (field.id) {
-
 
113210
          case 1: // RECHARGE_TYPE
-
 
113211
            if (field.type == org.apache.thrift.protocol.TType.I32) {
-
 
113212
              this.rechargeType = RechargeType.findByValue(iprot.readI32());
-
 
113213
            } else { 
-
 
113214
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
113215
            }
-
 
113216
            break;
-
 
113217
          case 2: // DEVICE_NUMBER
-
 
113218
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
113219
              this.deviceNumber = iprot.readString();
-
 
113220
            } else { 
-
 
113221
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
113222
            }
-
 
113223
            break;
-
 
113224
          default:
-
 
113225
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
113226
        }
-
 
113227
        iprot.readFieldEnd();
-
 
113228
      }
-
 
113229
      iprot.readStructEnd();
-
 
113230
      validate();
-
 
113231
    }
-
 
113232
 
-
 
113233
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
113234
      validate();
-
 
113235
 
-
 
113236
      oprot.writeStructBegin(STRUCT_DESC);
-
 
113237
      if (this.rechargeType != null) {
-
 
113238
        oprot.writeFieldBegin(RECHARGE_TYPE_FIELD_DESC);
-
 
113239
        oprot.writeI32(this.rechargeType.getValue());
-
 
113240
        oprot.writeFieldEnd();
-
 
113241
      }
-
 
113242
      if (this.deviceNumber != null) {
-
 
113243
        oprot.writeFieldBegin(DEVICE_NUMBER_FIELD_DESC);
-
 
113244
        oprot.writeString(this.deviceNumber);
-
 
113245
        oprot.writeFieldEnd();
-
 
113246
      }
-
 
113247
      oprot.writeFieldStop();
-
 
113248
      oprot.writeStructEnd();
-
 
113249
    }
-
 
113250
 
-
 
113251
    @Override
-
 
113252
    public String toString() {
-
 
113253
      StringBuilder sb = new StringBuilder("validateRecharge_args(");
-
 
113254
      boolean first = true;
-
 
113255
 
-
 
113256
      sb.append("rechargeType:");
-
 
113257
      if (this.rechargeType == null) {
-
 
113258
        sb.append("null");
-
 
113259
      } else {
-
 
113260
        sb.append(this.rechargeType);
-
 
113261
      }
-
 
113262
      first = false;
-
 
113263
      if (!first) sb.append(", ");
-
 
113264
      sb.append("deviceNumber:");
-
 
113265
      if (this.deviceNumber == null) {
-
 
113266
        sb.append("null");
-
 
113267
      } else {
-
 
113268
        sb.append(this.deviceNumber);
-
 
113269
      }
-
 
113270
      first = false;
-
 
113271
      sb.append(")");
-
 
113272
      return sb.toString();
-
 
113273
    }
-
 
113274
 
-
 
113275
    public void validate() throws org.apache.thrift.TException {
-
 
113276
      // check for required fields
-
 
113277
    }
-
 
113278
 
-
 
113279
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
113280
      try {
-
 
113281
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
113282
      } catch (org.apache.thrift.TException te) {
-
 
113283
        throw new java.io.IOException(te);
-
 
113284
      }
-
 
113285
    }
-
 
113286
 
-
 
113287
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
113288
      try {
-
 
113289
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
113290
      } catch (org.apache.thrift.TException te) {
-
 
113291
        throw new java.io.IOException(te);
-
 
113292
      }
-
 
113293
    }
-
 
113294
 
-
 
113295
  }
-
 
113296
 
-
 
113297
  public static class validateRecharge_result implements org.apache.thrift.TBase<validateRecharge_result, validateRecharge_result._Fields>, java.io.Serializable, Cloneable   {
-
 
113298
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("validateRecharge_result");
-
 
113299
 
-
 
113300
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
-
 
113301
 
-
 
113302
    private String success; // required
-
 
113303
 
-
 
113304
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
113305
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
113306
      SUCCESS((short)0, "success");
-
 
113307
 
-
 
113308
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
113309
 
-
 
113310
      static {
-
 
113311
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
113312
          byName.put(field.getFieldName(), field);
-
 
113313
        }
-
 
113314
      }
-
 
113315
 
-
 
113316
      /**
-
 
113317
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
113318
       */
-
 
113319
      public static _Fields findByThriftId(int fieldId) {
-
 
113320
        switch(fieldId) {
-
 
113321
          case 0: // SUCCESS
-
 
113322
            return SUCCESS;
-
 
113323
          default:
-
 
113324
            return null;
-
 
113325
        }
-
 
113326
      }
-
 
113327
 
-
 
113328
      /**
-
 
113329
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
113330
       * if it is not found.
-
 
113331
       */
-
 
113332
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
113333
        _Fields fields = findByThriftId(fieldId);
-
 
113334
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
113335
        return fields;
-
 
113336
      }
-
 
113337
 
-
 
113338
      /**
-
 
113339
       * Find the _Fields constant that matches name, or null if its not found.
-
 
113340
       */
-
 
113341
      public static _Fields findByName(String name) {
-
 
113342
        return byName.get(name);
-
 
113343
      }
-
 
113344
 
-
 
113345
      private final short _thriftId;
-
 
113346
      private final String _fieldName;
-
 
113347
 
-
 
113348
      _Fields(short thriftId, String fieldName) {
-
 
113349
        _thriftId = thriftId;
-
 
113350
        _fieldName = fieldName;
-
 
113351
      }
-
 
113352
 
-
 
113353
      public short getThriftFieldId() {
-
 
113354
        return _thriftId;
-
 
113355
      }
-
 
113356
 
-
 
113357
      public String getFieldName() {
-
 
113358
        return _fieldName;
-
 
113359
      }
-
 
113360
    }
-
 
113361
 
-
 
113362
    // isset id assignments
-
 
113363
 
-
 
113364
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
113365
    static {
-
 
113366
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
113367
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
113368
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
113369
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
113370
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(validateRecharge_result.class, metaDataMap);
-
 
113371
    }
-
 
113372
 
-
 
113373
    public validateRecharge_result() {
-
 
113374
    }
-
 
113375
 
-
 
113376
    public validateRecharge_result(
-
 
113377
      String success)
-
 
113378
    {
-
 
113379
      this();
-
 
113380
      this.success = success;
-
 
113381
    }
-
 
113382
 
-
 
113383
    /**
-
 
113384
     * Performs a deep copy on <i>other</i>.
-
 
113385
     */
-
 
113386
    public validateRecharge_result(validateRecharge_result other) {
-
 
113387
      if (other.isSetSuccess()) {
-
 
113388
        this.success = other.success;
-
 
113389
      }
-
 
113390
    }
-
 
113391
 
-
 
113392
    public validateRecharge_result deepCopy() {
-
 
113393
      return new validateRecharge_result(this);
-
 
113394
    }
-
 
113395
 
-
 
113396
    @Override
-
 
113397
    public void clear() {
-
 
113398
      this.success = null;
-
 
113399
    }
-
 
113400
 
-
 
113401
    public String getSuccess() {
-
 
113402
      return this.success;
-
 
113403
    }
-
 
113404
 
-
 
113405
    public void setSuccess(String success) {
-
 
113406
      this.success = success;
-
 
113407
    }
-
 
113408
 
-
 
113409
    public void unsetSuccess() {
-
 
113410
      this.success = null;
-
 
113411
    }
-
 
113412
 
-
 
113413
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
113414
    public boolean isSetSuccess() {
-
 
113415
      return this.success != null;
-
 
113416
    }
-
 
113417
 
-
 
113418
    public void setSuccessIsSet(boolean value) {
-
 
113419
      if (!value) {
-
 
113420
        this.success = null;
-
 
113421
      }
-
 
113422
    }
-
 
113423
 
-
 
113424
    public void setFieldValue(_Fields field, Object value) {
-
 
113425
      switch (field) {
-
 
113426
      case SUCCESS:
-
 
113427
        if (value == null) {
-
 
113428
          unsetSuccess();
-
 
113429
        } else {
-
 
113430
          setSuccess((String)value);
-
 
113431
        }
-
 
113432
        break;
-
 
113433
 
-
 
113434
      }
-
 
113435
    }
-
 
113436
 
-
 
113437
    public Object getFieldValue(_Fields field) {
-
 
113438
      switch (field) {
-
 
113439
      case SUCCESS:
-
 
113440
        return getSuccess();
-
 
113441
 
-
 
113442
      }
-
 
113443
      throw new IllegalStateException();
-
 
113444
    }
-
 
113445
 
-
 
113446
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
113447
    public boolean isSet(_Fields field) {
-
 
113448
      if (field == null) {
-
 
113449
        throw new IllegalArgumentException();
-
 
113450
      }
-
 
113451
 
-
 
113452
      switch (field) {
-
 
113453
      case SUCCESS:
-
 
113454
        return isSetSuccess();
-
 
113455
      }
-
 
113456
      throw new IllegalStateException();
-
 
113457
    }
-
 
113458
 
-
 
113459
    @Override
-
 
113460
    public boolean equals(Object that) {
-
 
113461
      if (that == null)
-
 
113462
        return false;
-
 
113463
      if (that instanceof validateRecharge_result)
-
 
113464
        return this.equals((validateRecharge_result)that);
-
 
113465
      return false;
-
 
113466
    }
-
 
113467
 
-
 
113468
    public boolean equals(validateRecharge_result that) {
-
 
113469
      if (that == null)
-
 
113470
        return false;
-
 
113471
 
-
 
113472
      boolean this_present_success = true && this.isSetSuccess();
-
 
113473
      boolean that_present_success = true && that.isSetSuccess();
-
 
113474
      if (this_present_success || that_present_success) {
-
 
113475
        if (!(this_present_success && that_present_success))
-
 
113476
          return false;
-
 
113477
        if (!this.success.equals(that.success))
-
 
113478
          return false;
-
 
113479
      }
-
 
113480
 
-
 
113481
      return true;
-
 
113482
    }
-
 
113483
 
-
 
113484
    @Override
-
 
113485
    public int hashCode() {
-
 
113486
      return 0;
-
 
113487
    }
-
 
113488
 
-
 
113489
    public int compareTo(validateRecharge_result other) {
-
 
113490
      if (!getClass().equals(other.getClass())) {
-
 
113491
        return getClass().getName().compareTo(other.getClass().getName());
-
 
113492
      }
-
 
113493
 
-
 
113494
      int lastComparison = 0;
-
 
113495
      validateRecharge_result typedOther = (validateRecharge_result)other;
-
 
113496
 
-
 
113497
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
113498
      if (lastComparison != 0) {
-
 
113499
        return lastComparison;
-
 
113500
      }
-
 
113501
      if (isSetSuccess()) {
-
 
113502
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
113503
        if (lastComparison != 0) {
-
 
113504
          return lastComparison;
-
 
113505
        }
-
 
113506
      }
-
 
113507
      return 0;
-
 
113508
    }
-
 
113509
 
-
 
113510
    public _Fields fieldForId(int fieldId) {
-
 
113511
      return _Fields.findByThriftId(fieldId);
-
 
113512
    }
-
 
113513
 
-
 
113514
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
113515
      org.apache.thrift.protocol.TField field;
-
 
113516
      iprot.readStructBegin();
-
 
113517
      while (true)
-
 
113518
      {
-
 
113519
        field = iprot.readFieldBegin();
-
 
113520
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
113521
          break;
-
 
113522
        }
-
 
113523
        switch (field.id) {
-
 
113524
          case 0: // SUCCESS
-
 
113525
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
113526
              this.success = iprot.readString();
-
 
113527
            } else { 
-
 
113528
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
113529
            }
-
 
113530
            break;
-
 
113531
          default:
-
 
113532
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
113533
        }
-
 
113534
        iprot.readFieldEnd();
-
 
113535
      }
-
 
113536
      iprot.readStructEnd();
-
 
113537
      validate();
-
 
113538
    }
-
 
113539
 
-
 
113540
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
113541
      oprot.writeStructBegin(STRUCT_DESC);
-
 
113542
 
-
 
113543
      if (this.isSetSuccess()) {
-
 
113544
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
113545
        oprot.writeString(this.success);
-
 
113546
        oprot.writeFieldEnd();
-
 
113547
      }
-
 
113548
      oprot.writeFieldStop();
-
 
113549
      oprot.writeStructEnd();
-
 
113550
    }
-
 
113551
 
-
 
113552
    @Override
-
 
113553
    public String toString() {
-
 
113554
      StringBuilder sb = new StringBuilder("validateRecharge_result(");
-
 
113555
      boolean first = true;
-
 
113556
 
-
 
113557
      sb.append("success:");
-
 
113558
      if (this.success == null) {
-
 
113559
        sb.append("null");
-
 
113560
      } else {
-
 
113561
        sb.append(this.success);
-
 
113562
      }
-
 
113563
      first = false;
-
 
113564
      sb.append(")");
-
 
113565
      return sb.toString();
-
 
113566
    }
-
 
113567
 
112801
    public void validate() throws org.apache.thrift.TException {
113568
    public void validate() throws org.apache.thrift.TException {
112802
      // check for required fields
113569
      // check for required fields
112803
    }
113570
    }
112804
 
113571
 
112805
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
113572
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {