Subversion Repositories SmartDukaan

Rev

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

Rev 6154 Rev 6159
Line 881... Line 881...
881
 
881
 
882
    public void addAmountToWallet(long userId, long orderId, long amount) throws org.apache.thrift.TException;
882
    public void addAmountToWallet(long userId, long orderId, long amount) throws org.apache.thrift.TException;
883
 
883
 
884
    public List<RechargeOrder> getRechargeOrdersForStatus(long status) throws org.apache.thrift.TException;
884
    public List<RechargeOrder> getRechargeOrdersForStatus(long status) throws org.apache.thrift.TException;
885
 
885
 
-
 
886
    public List<RechargePlan> getPlansForOperator(long operatorId) throws org.apache.thrift.TException;
-
 
887
 
886
  }
888
  }
887
 
889
 
888
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
890
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
889
 
891
 
890
    public void createTransaction(Transaction transaction, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createTransaction_call> resultHandler) throws org.apache.thrift.TException;
892
    public void createTransaction(Transaction transaction, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createTransaction_call> resultHandler) throws org.apache.thrift.TException;
Line 1165... Line 1167...
1165
 
1167
 
1166
    public void addAmountToWallet(long userId, long orderId, long amount, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addAmountToWallet_call> resultHandler) throws org.apache.thrift.TException;
1168
    public void addAmountToWallet(long userId, long orderId, long amount, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addAmountToWallet_call> resultHandler) throws org.apache.thrift.TException;
1167
 
1169
 
1168
    public void getRechargeOrdersForStatus(long status, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRechargeOrdersForStatus_call> resultHandler) throws org.apache.thrift.TException;
1170
    public void getRechargeOrdersForStatus(long status, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRechargeOrdersForStatus_call> resultHandler) throws org.apache.thrift.TException;
1169
 
1171
 
-
 
1172
    public void getPlansForOperator(long operatorId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPlansForOperator_call> resultHandler) throws org.apache.thrift.TException;
-
 
1173
 
1170
  }
1174
  }
1171
 
1175
 
1172
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
1176
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
1173
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
1177
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
1174
      public Factory() {}
1178
      public Factory() {}
Line 4723... Line 4727...
4723
        return result.success;
4727
        return result.success;
4724
      }
4728
      }
4725
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRechargeOrdersForStatus failed: unknown result");
4729
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRechargeOrdersForStatus failed: unknown result");
4726
    }
4730
    }
4727
 
4731
 
-
 
4732
    public List<RechargePlan> getPlansForOperator(long operatorId) throws org.apache.thrift.TException
-
 
4733
    {
-
 
4734
      send_getPlansForOperator(operatorId);
-
 
4735
      return recv_getPlansForOperator();
-
 
4736
    }
-
 
4737
 
-
 
4738
    public void send_getPlansForOperator(long operatorId) throws org.apache.thrift.TException
-
 
4739
    {
-
 
4740
      getPlansForOperator_args args = new getPlansForOperator_args();
-
 
4741
      args.setOperatorId(operatorId);
-
 
4742
      sendBase("getPlansForOperator", args);
-
 
4743
    }
-
 
4744
 
-
 
4745
    public List<RechargePlan> recv_getPlansForOperator() throws org.apache.thrift.TException
-
 
4746
    {
-
 
4747
      getPlansForOperator_result result = new getPlansForOperator_result();
-
 
4748
      receiveBase(result, "getPlansForOperator");
-
 
4749
      if (result.isSetSuccess()) {
-
 
4750
        return result.success;
-
 
4751
      }
-
 
4752
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPlansForOperator failed: unknown result");
-
 
4753
    }
-
 
4754
 
4728
  }
4755
  }
4729
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
4756
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
4730
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
4757
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
4731
      private org.apache.thrift.async.TAsyncClientManager clientManager;
4758
      private org.apache.thrift.async.TAsyncClientManager clientManager;
4732
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
4759
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
Line 9629... Line 9656...
9629
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
9656
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
9630
        return (new Client(prot)).recv_getRechargeOrdersForStatus();
9657
        return (new Client(prot)).recv_getRechargeOrdersForStatus();
9631
      }
9658
      }
9632
    }
9659
    }
9633
 
9660
 
-
 
9661
    public void getPlansForOperator(long operatorId, org.apache.thrift.async.AsyncMethodCallback<getPlansForOperator_call> resultHandler) throws org.apache.thrift.TException {
-
 
9662
      checkReady();
-
 
9663
      getPlansForOperator_call method_call = new getPlansForOperator_call(operatorId, resultHandler, this, ___protocolFactory, ___transport);
-
 
9664
      this.___currentMethod = method_call;
-
 
9665
      ___manager.call(method_call);
-
 
9666
    }
-
 
9667
 
-
 
9668
    public static class getPlansForOperator_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
9669
      private long operatorId;
-
 
9670
      public getPlansForOperator_call(long operatorId, org.apache.thrift.async.AsyncMethodCallback<getPlansForOperator_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 {
-
 
9671
        super(client, protocolFactory, transport, resultHandler, false);
-
 
9672
        this.operatorId = operatorId;
-
 
9673
      }
-
 
9674
 
-
 
9675
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
9676
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPlansForOperator", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
9677
        getPlansForOperator_args args = new getPlansForOperator_args();
-
 
9678
        args.setOperatorId(operatorId);
-
 
9679
        args.write(prot);
-
 
9680
        prot.writeMessageEnd();
-
 
9681
      }
-
 
9682
 
-
 
9683
      public List<RechargePlan> getResult() throws org.apache.thrift.TException {
-
 
9684
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
9685
          throw new IllegalStateException("Method call not finished!");
-
 
9686
        }
-
 
9687
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
9688
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
9689
        return (new Client(prot)).recv_getPlansForOperator();
-
 
9690
      }
-
 
9691
    }
-
 
9692
 
9634
  }
9693
  }
9635
 
9694
 
9636
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
9695
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
9637
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
9696
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
9638
    public Processor(I iface) {
9697
    public Processor(I iface) {
Line 9782... Line 9841...
9782
      processMap.put("getServiceProviders", new getServiceProviders());
9841
      processMap.put("getServiceProviders", new getServiceProviders());
9783
      processMap.put("getServiceProviderForDevice", new getServiceProviderForDevice());
9842
      processMap.put("getServiceProviderForDevice", new getServiceProviderForDevice());
9784
      processMap.put("getRechargeOrdersForDevice", new getRechargeOrdersForDevice());
9843
      processMap.put("getRechargeOrdersForDevice", new getRechargeOrdersForDevice());
9785
      processMap.put("addAmountToWallet", new addAmountToWallet());
9844
      processMap.put("addAmountToWallet", new addAmountToWallet());
9786
      processMap.put("getRechargeOrdersForStatus", new getRechargeOrdersForStatus());
9845
      processMap.put("getRechargeOrdersForStatus", new getRechargeOrdersForStatus());
-
 
9846
      processMap.put("getPlansForOperator", new getPlansForOperator());
9787
      return processMap;
9847
      return processMap;
9788
    }
9848
    }
9789
 
9849
 
9790
    private static class createTransaction<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createTransaction_args> {
9850
    private static class createTransaction<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createTransaction_args> {
9791
      public createTransaction() {
9851
      public createTransaction() {
Line 12444... Line 12504...
12444
        result.success = iface.getRechargeOrdersForStatus(args.status);
12504
        result.success = iface.getRechargeOrdersForStatus(args.status);
12445
        return result;
12505
        return result;
12446
      }
12506
      }
12447
    }
12507
    }
12448
 
12508
 
-
 
12509
    private static class getPlansForOperator<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPlansForOperator_args> {
-
 
12510
      public getPlansForOperator() {
-
 
12511
        super("getPlansForOperator");
-
 
12512
      }
-
 
12513
 
-
 
12514
      protected getPlansForOperator_args getEmptyArgsInstance() {
-
 
12515
        return new getPlansForOperator_args();
-
 
12516
      }
-
 
12517
 
-
 
12518
      protected getPlansForOperator_result getResult(I iface, getPlansForOperator_args args) throws org.apache.thrift.TException {
-
 
12519
        getPlansForOperator_result result = new getPlansForOperator_result();
-
 
12520
        result.success = iface.getPlansForOperator(args.operatorId);
-
 
12521
        return result;
-
 
12522
      }
-
 
12523
    }
-
 
12524
 
12449
  }
12525
  }
12450
 
12526
 
12451
  public static class createTransaction_args implements org.apache.thrift.TBase<createTransaction_args, createTransaction_args._Fields>, java.io.Serializable, Cloneable   {
12527
  public static class createTransaction_args implements org.apache.thrift.TBase<createTransaction_args, createTransaction_args._Fields>, java.io.Serializable, Cloneable   {
12452
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createTransaction_args");
12528
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createTransaction_args");
12453
 
12529
 
Line 114457... Line 114533...
114457
      boolean first = true;
114533
      boolean first = true;
114458
 
114534
 
114459
      sb.append("success:");
114535
      sb.append("success:");
114460
      if (this.success == null) {
114536
      if (this.success == null) {
114461
        sb.append("null");
114537
        sb.append("null");
-
 
114538
      } else {
-
 
114539
        sb.append(this.success);
-
 
114540
      }
-
 
114541
      first = false;
-
 
114542
      sb.append(")");
-
 
114543
      return sb.toString();
-
 
114544
    }
-
 
114545
 
-
 
114546
    public void validate() throws org.apache.thrift.TException {
-
 
114547
      // check for required fields
-
 
114548
    }
-
 
114549
 
-
 
114550
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
114551
      try {
-
 
114552
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
114553
      } catch (org.apache.thrift.TException te) {
-
 
114554
        throw new java.io.IOException(te);
-
 
114555
      }
-
 
114556
    }
-
 
114557
 
-
 
114558
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
114559
      try {
-
 
114560
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
114561
      } catch (org.apache.thrift.TException te) {
-
 
114562
        throw new java.io.IOException(te);
-
 
114563
      }
-
 
114564
    }
-
 
114565
 
-
 
114566
  }
-
 
114567
 
-
 
114568
  public static class getPlansForOperator_args implements org.apache.thrift.TBase<getPlansForOperator_args, getPlansForOperator_args._Fields>, java.io.Serializable, Cloneable   {
-
 
114569
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPlansForOperator_args");
-
 
114570
 
-
 
114571
    private static final org.apache.thrift.protocol.TField OPERATOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("operatorId", org.apache.thrift.protocol.TType.I64, (short)1);
-
 
114572
 
-
 
114573
    private long operatorId; // required
-
 
114574
 
-
 
114575
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
114576
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
114577
      OPERATOR_ID((short)1, "operatorId");
-
 
114578
 
-
 
114579
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
114580
 
-
 
114581
      static {
-
 
114582
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
114583
          byName.put(field.getFieldName(), field);
-
 
114584
        }
-
 
114585
      }
-
 
114586
 
-
 
114587
      /**
-
 
114588
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
114589
       */
-
 
114590
      public static _Fields findByThriftId(int fieldId) {
-
 
114591
        switch(fieldId) {
-
 
114592
          case 1: // OPERATOR_ID
-
 
114593
            return OPERATOR_ID;
-
 
114594
          default:
-
 
114595
            return null;
-
 
114596
        }
-
 
114597
      }
-
 
114598
 
-
 
114599
      /**
-
 
114600
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
114601
       * if it is not found.
-
 
114602
       */
-
 
114603
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
114604
        _Fields fields = findByThriftId(fieldId);
-
 
114605
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
114606
        return fields;
-
 
114607
      }
-
 
114608
 
-
 
114609
      /**
-
 
114610
       * Find the _Fields constant that matches name, or null if its not found.
-
 
114611
       */
-
 
114612
      public static _Fields findByName(String name) {
-
 
114613
        return byName.get(name);
-
 
114614
      }
-
 
114615
 
-
 
114616
      private final short _thriftId;
-
 
114617
      private final String _fieldName;
-
 
114618
 
-
 
114619
      _Fields(short thriftId, String fieldName) {
-
 
114620
        _thriftId = thriftId;
-
 
114621
        _fieldName = fieldName;
-
 
114622
      }
-
 
114623
 
-
 
114624
      public short getThriftFieldId() {
-
 
114625
        return _thriftId;
-
 
114626
      }
-
 
114627
 
-
 
114628
      public String getFieldName() {
-
 
114629
        return _fieldName;
-
 
114630
      }
-
 
114631
    }
-
 
114632
 
-
 
114633
    // isset id assignments
-
 
114634
    private static final int __OPERATORID_ISSET_ID = 0;
-
 
114635
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
114636
 
-
 
114637
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
114638
    static {
-
 
114639
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
114640
      tmpMap.put(_Fields.OPERATOR_ID, new org.apache.thrift.meta_data.FieldMetaData("operatorId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
114641
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
114642
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
114643
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPlansForOperator_args.class, metaDataMap);
-
 
114644
    }
-
 
114645
 
-
 
114646
    public getPlansForOperator_args() {
-
 
114647
    }
-
 
114648
 
-
 
114649
    public getPlansForOperator_args(
-
 
114650
      long operatorId)
-
 
114651
    {
-
 
114652
      this();
-
 
114653
      this.operatorId = operatorId;
-
 
114654
      setOperatorIdIsSet(true);
-
 
114655
    }
-
 
114656
 
-
 
114657
    /**
-
 
114658
     * Performs a deep copy on <i>other</i>.
-
 
114659
     */
-
 
114660
    public getPlansForOperator_args(getPlansForOperator_args other) {
-
 
114661
      __isset_bit_vector.clear();
-
 
114662
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
114663
      this.operatorId = other.operatorId;
-
 
114664
    }
-
 
114665
 
-
 
114666
    public getPlansForOperator_args deepCopy() {
-
 
114667
      return new getPlansForOperator_args(this);
-
 
114668
    }
-
 
114669
 
-
 
114670
    @Override
-
 
114671
    public void clear() {
-
 
114672
      setOperatorIdIsSet(false);
-
 
114673
      this.operatorId = 0;
-
 
114674
    }
-
 
114675
 
-
 
114676
    public long getOperatorId() {
-
 
114677
      return this.operatorId;
-
 
114678
    }
-
 
114679
 
-
 
114680
    public void setOperatorId(long operatorId) {
-
 
114681
      this.operatorId = operatorId;
-
 
114682
      setOperatorIdIsSet(true);
-
 
114683
    }
-
 
114684
 
-
 
114685
    public void unsetOperatorId() {
-
 
114686
      __isset_bit_vector.clear(__OPERATORID_ISSET_ID);
-
 
114687
    }
-
 
114688
 
-
 
114689
    /** Returns true if field operatorId is set (has been assigned a value) and false otherwise */
-
 
114690
    public boolean isSetOperatorId() {
-
 
114691
      return __isset_bit_vector.get(__OPERATORID_ISSET_ID);
-
 
114692
    }
-
 
114693
 
-
 
114694
    public void setOperatorIdIsSet(boolean value) {
-
 
114695
      __isset_bit_vector.set(__OPERATORID_ISSET_ID, value);
-
 
114696
    }
-
 
114697
 
-
 
114698
    public void setFieldValue(_Fields field, Object value) {
-
 
114699
      switch (field) {
-
 
114700
      case OPERATOR_ID:
-
 
114701
        if (value == null) {
-
 
114702
          unsetOperatorId();
-
 
114703
        } else {
-
 
114704
          setOperatorId((Long)value);
-
 
114705
        }
-
 
114706
        break;
-
 
114707
 
-
 
114708
      }
-
 
114709
    }
-
 
114710
 
-
 
114711
    public Object getFieldValue(_Fields field) {
-
 
114712
      switch (field) {
-
 
114713
      case OPERATOR_ID:
-
 
114714
        return Long.valueOf(getOperatorId());
-
 
114715
 
-
 
114716
      }
-
 
114717
      throw new IllegalStateException();
-
 
114718
    }
-
 
114719
 
-
 
114720
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
114721
    public boolean isSet(_Fields field) {
-
 
114722
      if (field == null) {
-
 
114723
        throw new IllegalArgumentException();
-
 
114724
      }
-
 
114725
 
-
 
114726
      switch (field) {
-
 
114727
      case OPERATOR_ID:
-
 
114728
        return isSetOperatorId();
-
 
114729
      }
-
 
114730
      throw new IllegalStateException();
-
 
114731
    }
-
 
114732
 
-
 
114733
    @Override
-
 
114734
    public boolean equals(Object that) {
-
 
114735
      if (that == null)
-
 
114736
        return false;
-
 
114737
      if (that instanceof getPlansForOperator_args)
-
 
114738
        return this.equals((getPlansForOperator_args)that);
-
 
114739
      return false;
-
 
114740
    }
-
 
114741
 
-
 
114742
    public boolean equals(getPlansForOperator_args that) {
-
 
114743
      if (that == null)
-
 
114744
        return false;
-
 
114745
 
-
 
114746
      boolean this_present_operatorId = true;
-
 
114747
      boolean that_present_operatorId = true;
-
 
114748
      if (this_present_operatorId || that_present_operatorId) {
-
 
114749
        if (!(this_present_operatorId && that_present_operatorId))
-
 
114750
          return false;
-
 
114751
        if (this.operatorId != that.operatorId)
-
 
114752
          return false;
-
 
114753
      }
-
 
114754
 
-
 
114755
      return true;
-
 
114756
    }
-
 
114757
 
-
 
114758
    @Override
-
 
114759
    public int hashCode() {
-
 
114760
      return 0;
-
 
114761
    }
-
 
114762
 
-
 
114763
    public int compareTo(getPlansForOperator_args other) {
-
 
114764
      if (!getClass().equals(other.getClass())) {
-
 
114765
        return getClass().getName().compareTo(other.getClass().getName());
-
 
114766
      }
-
 
114767
 
-
 
114768
      int lastComparison = 0;
-
 
114769
      getPlansForOperator_args typedOther = (getPlansForOperator_args)other;
-
 
114770
 
-
 
114771
      lastComparison = Boolean.valueOf(isSetOperatorId()).compareTo(typedOther.isSetOperatorId());
-
 
114772
      if (lastComparison != 0) {
-
 
114773
        return lastComparison;
-
 
114774
      }
-
 
114775
      if (isSetOperatorId()) {
-
 
114776
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operatorId, typedOther.operatorId);
-
 
114777
        if (lastComparison != 0) {
-
 
114778
          return lastComparison;
-
 
114779
        }
-
 
114780
      }
-
 
114781
      return 0;
-
 
114782
    }
-
 
114783
 
-
 
114784
    public _Fields fieldForId(int fieldId) {
-
 
114785
      return _Fields.findByThriftId(fieldId);
-
 
114786
    }
-
 
114787
 
-
 
114788
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
114789
      org.apache.thrift.protocol.TField field;
-
 
114790
      iprot.readStructBegin();
-
 
114791
      while (true)
-
 
114792
      {
-
 
114793
        field = iprot.readFieldBegin();
-
 
114794
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
114795
          break;
-
 
114796
        }
-
 
114797
        switch (field.id) {
-
 
114798
          case 1: // OPERATOR_ID
-
 
114799
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
114800
              this.operatorId = iprot.readI64();
-
 
114801
              setOperatorIdIsSet(true);
-
 
114802
            } else { 
-
 
114803
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
114804
            }
-
 
114805
            break;
-
 
114806
          default:
-
 
114807
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
114808
        }
-
 
114809
        iprot.readFieldEnd();
-
 
114810
      }
-
 
114811
      iprot.readStructEnd();
-
 
114812
      validate();
-
 
114813
    }
-
 
114814
 
-
 
114815
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
114816
      validate();
-
 
114817
 
-
 
114818
      oprot.writeStructBegin(STRUCT_DESC);
-
 
114819
      oprot.writeFieldBegin(OPERATOR_ID_FIELD_DESC);
-
 
114820
      oprot.writeI64(this.operatorId);
-
 
114821
      oprot.writeFieldEnd();
-
 
114822
      oprot.writeFieldStop();
-
 
114823
      oprot.writeStructEnd();
-
 
114824
    }
-
 
114825
 
-
 
114826
    @Override
-
 
114827
    public String toString() {
-
 
114828
      StringBuilder sb = new StringBuilder("getPlansForOperator_args(");
-
 
114829
      boolean first = true;
-
 
114830
 
-
 
114831
      sb.append("operatorId:");
-
 
114832
      sb.append(this.operatorId);
-
 
114833
      first = false;
-
 
114834
      sb.append(")");
-
 
114835
      return sb.toString();
-
 
114836
    }
-
 
114837
 
-
 
114838
    public void validate() throws org.apache.thrift.TException {
-
 
114839
      // check for required fields
-
 
114840
    }
-
 
114841
 
-
 
114842
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
114843
      try {
-
 
114844
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
114845
      } catch (org.apache.thrift.TException te) {
-
 
114846
        throw new java.io.IOException(te);
-
 
114847
      }
-
 
114848
    }
-
 
114849
 
-
 
114850
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
114851
      try {
-
 
114852
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
114853
        __isset_bit_vector = new BitSet(1);
-
 
114854
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
114855
      } catch (org.apache.thrift.TException te) {
-
 
114856
        throw new java.io.IOException(te);
-
 
114857
      }
-
 
114858
    }
-
 
114859
 
-
 
114860
  }
-
 
114861
 
-
 
114862
  public static class getPlansForOperator_result implements org.apache.thrift.TBase<getPlansForOperator_result, getPlansForOperator_result._Fields>, java.io.Serializable, Cloneable   {
-
 
114863
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPlansForOperator_result");
-
 
114864
 
-
 
114865
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
-
 
114866
 
-
 
114867
    private List<RechargePlan> success; // required
-
 
114868
 
-
 
114869
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
114870
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
114871
      SUCCESS((short)0, "success");
-
 
114872
 
-
 
114873
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
114874
 
-
 
114875
      static {
-
 
114876
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
114877
          byName.put(field.getFieldName(), field);
-
 
114878
        }
-
 
114879
      }
-
 
114880
 
-
 
114881
      /**
-
 
114882
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
114883
       */
-
 
114884
      public static _Fields findByThriftId(int fieldId) {
-
 
114885
        switch(fieldId) {
-
 
114886
          case 0: // SUCCESS
-
 
114887
            return SUCCESS;
-
 
114888
          default:
-
 
114889
            return null;
-
 
114890
        }
-
 
114891
      }
-
 
114892
 
-
 
114893
      /**
-
 
114894
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
114895
       * if it is not found.
-
 
114896
       */
-
 
114897
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
114898
        _Fields fields = findByThriftId(fieldId);
-
 
114899
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
114900
        return fields;
-
 
114901
      }
-
 
114902
 
-
 
114903
      /**
-
 
114904
       * Find the _Fields constant that matches name, or null if its not found.
-
 
114905
       */
-
 
114906
      public static _Fields findByName(String name) {
-
 
114907
        return byName.get(name);
-
 
114908
      }
-
 
114909
 
-
 
114910
      private final short _thriftId;
-
 
114911
      private final String _fieldName;
-
 
114912
 
-
 
114913
      _Fields(short thriftId, String fieldName) {
-
 
114914
        _thriftId = thriftId;
-
 
114915
        _fieldName = fieldName;
-
 
114916
      }
-
 
114917
 
-
 
114918
      public short getThriftFieldId() {
-
 
114919
        return _thriftId;
-
 
114920
      }
-
 
114921
 
-
 
114922
      public String getFieldName() {
-
 
114923
        return _fieldName;
-
 
114924
      }
-
 
114925
    }
-
 
114926
 
-
 
114927
    // isset id assignments
-
 
114928
 
-
 
114929
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
114930
    static {
-
 
114931
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
114932
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
114933
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
-
 
114934
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RechargePlan.class))));
-
 
114935
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
114936
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPlansForOperator_result.class, metaDataMap);
-
 
114937
    }
-
 
114938
 
-
 
114939
    public getPlansForOperator_result() {
-
 
114940
    }
-
 
114941
 
-
 
114942
    public getPlansForOperator_result(
-
 
114943
      List<RechargePlan> success)
-
 
114944
    {
-
 
114945
      this();
-
 
114946
      this.success = success;
-
 
114947
    }
-
 
114948
 
-
 
114949
    /**
-
 
114950
     * Performs a deep copy on <i>other</i>.
-
 
114951
     */
-
 
114952
    public getPlansForOperator_result(getPlansForOperator_result other) {
-
 
114953
      if (other.isSetSuccess()) {
-
 
114954
        List<RechargePlan> __this__success = new ArrayList<RechargePlan>();
-
 
114955
        for (RechargePlan other_element : other.success) {
-
 
114956
          __this__success.add(new RechargePlan(other_element));
-
 
114957
        }
-
 
114958
        this.success = __this__success;
-
 
114959
      }
-
 
114960
    }
-
 
114961
 
-
 
114962
    public getPlansForOperator_result deepCopy() {
-
 
114963
      return new getPlansForOperator_result(this);
-
 
114964
    }
-
 
114965
 
-
 
114966
    @Override
-
 
114967
    public void clear() {
-
 
114968
      this.success = null;
-
 
114969
    }
-
 
114970
 
-
 
114971
    public int getSuccessSize() {
-
 
114972
      return (this.success == null) ? 0 : this.success.size();
-
 
114973
    }
-
 
114974
 
-
 
114975
    public java.util.Iterator<RechargePlan> getSuccessIterator() {
-
 
114976
      return (this.success == null) ? null : this.success.iterator();
-
 
114977
    }
-
 
114978
 
-
 
114979
    public void addToSuccess(RechargePlan elem) {
-
 
114980
      if (this.success == null) {
-
 
114981
        this.success = new ArrayList<RechargePlan>();
-
 
114982
      }
-
 
114983
      this.success.add(elem);
-
 
114984
    }
-
 
114985
 
-
 
114986
    public List<RechargePlan> getSuccess() {
-
 
114987
      return this.success;
-
 
114988
    }
-
 
114989
 
-
 
114990
    public void setSuccess(List<RechargePlan> success) {
-
 
114991
      this.success = success;
-
 
114992
    }
-
 
114993
 
-
 
114994
    public void unsetSuccess() {
-
 
114995
      this.success = null;
-
 
114996
    }
-
 
114997
 
-
 
114998
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
114999
    public boolean isSetSuccess() {
-
 
115000
      return this.success != null;
-
 
115001
    }
-
 
115002
 
-
 
115003
    public void setSuccessIsSet(boolean value) {
-
 
115004
      if (!value) {
-
 
115005
        this.success = null;
-
 
115006
      }
-
 
115007
    }
-
 
115008
 
-
 
115009
    public void setFieldValue(_Fields field, Object value) {
-
 
115010
      switch (field) {
-
 
115011
      case SUCCESS:
-
 
115012
        if (value == null) {
-
 
115013
          unsetSuccess();
-
 
115014
        } else {
-
 
115015
          setSuccess((List<RechargePlan>)value);
-
 
115016
        }
-
 
115017
        break;
-
 
115018
 
-
 
115019
      }
-
 
115020
    }
-
 
115021
 
-
 
115022
    public Object getFieldValue(_Fields field) {
-
 
115023
      switch (field) {
-
 
115024
      case SUCCESS:
-
 
115025
        return getSuccess();
-
 
115026
 
-
 
115027
      }
-
 
115028
      throw new IllegalStateException();
-
 
115029
    }
-
 
115030
 
-
 
115031
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
115032
    public boolean isSet(_Fields field) {
-
 
115033
      if (field == null) {
-
 
115034
        throw new IllegalArgumentException();
-
 
115035
      }
-
 
115036
 
-
 
115037
      switch (field) {
-
 
115038
      case SUCCESS:
-
 
115039
        return isSetSuccess();
-
 
115040
      }
-
 
115041
      throw new IllegalStateException();
-
 
115042
    }
-
 
115043
 
-
 
115044
    @Override
-
 
115045
    public boolean equals(Object that) {
-
 
115046
      if (that == null)
-
 
115047
        return false;
-
 
115048
      if (that instanceof getPlansForOperator_result)
-
 
115049
        return this.equals((getPlansForOperator_result)that);
-
 
115050
      return false;
-
 
115051
    }
-
 
115052
 
-
 
115053
    public boolean equals(getPlansForOperator_result that) {
-
 
115054
      if (that == null)
-
 
115055
        return false;
-
 
115056
 
-
 
115057
      boolean this_present_success = true && this.isSetSuccess();
-
 
115058
      boolean that_present_success = true && that.isSetSuccess();
-
 
115059
      if (this_present_success || that_present_success) {
-
 
115060
        if (!(this_present_success && that_present_success))
-
 
115061
          return false;
-
 
115062
        if (!this.success.equals(that.success))
-
 
115063
          return false;
-
 
115064
      }
-
 
115065
 
-
 
115066
      return true;
-
 
115067
    }
-
 
115068
 
-
 
115069
    @Override
-
 
115070
    public int hashCode() {
-
 
115071
      return 0;
-
 
115072
    }
-
 
115073
 
-
 
115074
    public int compareTo(getPlansForOperator_result other) {
-
 
115075
      if (!getClass().equals(other.getClass())) {
-
 
115076
        return getClass().getName().compareTo(other.getClass().getName());
-
 
115077
      }
-
 
115078
 
-
 
115079
      int lastComparison = 0;
-
 
115080
      getPlansForOperator_result typedOther = (getPlansForOperator_result)other;
-
 
115081
 
-
 
115082
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
115083
      if (lastComparison != 0) {
-
 
115084
        return lastComparison;
-
 
115085
      }
-
 
115086
      if (isSetSuccess()) {
-
 
115087
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
115088
        if (lastComparison != 0) {
-
 
115089
          return lastComparison;
-
 
115090
        }
-
 
115091
      }
-
 
115092
      return 0;
-
 
115093
    }
-
 
115094
 
-
 
115095
    public _Fields fieldForId(int fieldId) {
-
 
115096
      return _Fields.findByThriftId(fieldId);
-
 
115097
    }
-
 
115098
 
-
 
115099
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
115100
      org.apache.thrift.protocol.TField field;
-
 
115101
      iprot.readStructBegin();
-
 
115102
      while (true)
-
 
115103
      {
-
 
115104
        field = iprot.readFieldBegin();
-
 
115105
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
115106
          break;
-
 
115107
        }
-
 
115108
        switch (field.id) {
-
 
115109
          case 0: // SUCCESS
-
 
115110
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
-
 
115111
              {
-
 
115112
                org.apache.thrift.protocol.TList _list369 = iprot.readListBegin();
-
 
115113
                this.success = new ArrayList<RechargePlan>(_list369.size);
-
 
115114
                for (int _i370 = 0; _i370 < _list369.size; ++_i370)
-
 
115115
                {
-
 
115116
                  RechargePlan _elem371; // required
-
 
115117
                  _elem371 = new RechargePlan();
-
 
115118
                  _elem371.read(iprot);
-
 
115119
                  this.success.add(_elem371);
-
 
115120
                }
-
 
115121
                iprot.readListEnd();
-
 
115122
              }
-
 
115123
            } else { 
-
 
115124
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
115125
            }
-
 
115126
            break;
-
 
115127
          default:
-
 
115128
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
115129
        }
-
 
115130
        iprot.readFieldEnd();
-
 
115131
      }
-
 
115132
      iprot.readStructEnd();
-
 
115133
      validate();
-
 
115134
    }
-
 
115135
 
-
 
115136
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
115137
      oprot.writeStructBegin(STRUCT_DESC);
-
 
115138
 
-
 
115139
      if (this.isSetSuccess()) {
-
 
115140
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
115141
        {
-
 
115142
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
-
 
115143
          for (RechargePlan _iter372 : this.success)
-
 
115144
          {
-
 
115145
            _iter372.write(oprot);
-
 
115146
          }
-
 
115147
          oprot.writeListEnd();
-
 
115148
        }
-
 
115149
        oprot.writeFieldEnd();
-
 
115150
      }
-
 
115151
      oprot.writeFieldStop();
-
 
115152
      oprot.writeStructEnd();
-
 
115153
    }
-
 
115154
 
-
 
115155
    @Override
-
 
115156
    public String toString() {
-
 
115157
      StringBuilder sb = new StringBuilder("getPlansForOperator_result(");
-
 
115158
      boolean first = true;
-
 
115159
 
-
 
115160
      sb.append("success:");
-
 
115161
      if (this.success == null) {
-
 
115162
        sb.append("null");
114462
      } else {
115163
      } else {
114463
        sb.append(this.success);
115164
        sb.append(this.success);
114464
      }
115165
      }
114465
      first = false;
115166
      first = false;
114466
      sb.append(")");
115167
      sb.append(")");