Subversion Repositories SmartDukaan

Rev

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

Rev 4630 Rev 4865
Line 97... Line 97...
97
     * @param fromDate
97
     * @param fromDate
98
     * @param toDate
98
     * @param toDate
99
     */
99
     */
100
    public List<Long> getHolidays(long fromDate, long toDate) throws org.apache.thrift.TException;
100
    public List<Long> getHolidays(long fromDate, long toDate) throws org.apache.thrift.TException;
101
 
101
 
102
    /**
-
 
103
     * Returns true if COD is allowed for this destination pincode
-
 
104
     * 
-
 
105
     * @param destination_pincode
-
 
106
     */
-
 
107
    public boolean isCodAllowed(String destination_pincode) throws org.apache.thrift.TException;
-
 
108
 
-
 
109
  }
102
  }
110
 
103
 
111
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
104
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
112
 
105
 
113
    public void getProvider(long providerId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getProvider_call> resultHandler) throws org.apache.thrift.TException;
106
    public void getProvider(long providerId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getProvider_call> resultHandler) throws org.apache.thrift.TException;
Line 126... Line 119...
126
 
119
 
127
    public void getFreeAwbCount(long providerId, String type, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getFreeAwbCount_call> resultHandler) throws org.apache.thrift.TException;
120
    public void getFreeAwbCount(long providerId, String type, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getFreeAwbCount_call> resultHandler) throws org.apache.thrift.TException;
128
 
121
 
129
    public void getHolidays(long fromDate, long toDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getHolidays_call> resultHandler) throws org.apache.thrift.TException;
122
    public void getHolidays(long fromDate, long toDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getHolidays_call> resultHandler) throws org.apache.thrift.TException;
130
 
123
 
131
    public void isCodAllowed(String destination_pincode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isCodAllowed_call> resultHandler) throws org.apache.thrift.TException;
-
 
132
 
-
 
133
  }
124
  }
134
 
125
 
135
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
126
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
136
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
127
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
137
      public Factory() {}
128
      public Factory() {}
Line 385... Line 376...
385
        return result.success;
376
        return result.success;
386
      }
377
      }
387
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getHolidays failed: unknown result");
378
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getHolidays failed: unknown result");
388
    }
379
    }
389
 
380
 
390
    public boolean isCodAllowed(String destination_pincode) throws org.apache.thrift.TException
-
 
391
    {
-
 
392
      send_isCodAllowed(destination_pincode);
-
 
393
      return recv_isCodAllowed();
-
 
394
    }
-
 
395
 
-
 
396
    public void send_isCodAllowed(String destination_pincode) throws org.apache.thrift.TException
-
 
397
    {
-
 
398
      isCodAllowed_args args = new isCodAllowed_args();
-
 
399
      args.setDestination_pincode(destination_pincode);
-
 
400
      sendBase("isCodAllowed", args);
-
 
401
    }
-
 
402
 
-
 
403
    public boolean recv_isCodAllowed() throws org.apache.thrift.TException
-
 
404
    {
-
 
405
      isCodAllowed_result result = new isCodAllowed_result();
-
 
406
      receiveBase(result, "isCodAllowed");
-
 
407
      if (result.isSetSuccess()) {
-
 
408
        return result.success;
-
 
409
      }
-
 
410
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isCodAllowed failed: unknown result");
-
 
411
    }
-
 
412
 
-
 
413
  }
381
  }
414
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
382
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
415
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
383
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
416
      private org.apache.thrift.async.TAsyncClientManager clientManager;
384
      private org.apache.thrift.async.TAsyncClientManager clientManager;
417
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
385
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
Line 735... Line 703...
735
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
703
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
736
        return (new Client(prot)).recv_getHolidays();
704
        return (new Client(prot)).recv_getHolidays();
737
      }
705
      }
738
    }
706
    }
739
 
707
 
740
    public void isCodAllowed(String destination_pincode, org.apache.thrift.async.AsyncMethodCallback<isCodAllowed_call> resultHandler) throws org.apache.thrift.TException {
-
 
741
      checkReady();
-
 
742
      isCodAllowed_call method_call = new isCodAllowed_call(destination_pincode, resultHandler, this, ___protocolFactory, ___transport);
-
 
743
      this.___currentMethod = method_call;
-
 
744
      ___manager.call(method_call);
-
 
745
    }
-
 
746
 
-
 
747
    public static class isCodAllowed_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
748
      private String destination_pincode;
-
 
749
      public isCodAllowed_call(String destination_pincode, org.apache.thrift.async.AsyncMethodCallback<isCodAllowed_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 {
-
 
750
        super(client, protocolFactory, transport, resultHandler, false);
-
 
751
        this.destination_pincode = destination_pincode;
-
 
752
      }
-
 
753
 
-
 
754
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
755
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isCodAllowed", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
756
        isCodAllowed_args args = new isCodAllowed_args();
-
 
757
        args.setDestination_pincode(destination_pincode);
-
 
758
        args.write(prot);
-
 
759
        prot.writeMessageEnd();
-
 
760
      }
-
 
761
 
-
 
762
      public boolean getResult() throws org.apache.thrift.TException {
-
 
763
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
764
          throw new IllegalStateException("Method call not finished!");
-
 
765
        }
-
 
766
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
767
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
768
        return (new Client(prot)).recv_isCodAllowed();
-
 
769
      }
-
 
770
    }
-
 
771
 
-
 
772
  }
708
  }
773
 
709
 
774
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
710
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
775
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
711
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
776
    public Processor(I iface) {
712
    public Processor(I iface) {
Line 789... Line 725...
789
      processMap.put("getEmptyAWB", new getEmptyAWB());
725
      processMap.put("getEmptyAWB", new getEmptyAWB());
790
      processMap.put("getShipmentInfo", new getShipmentInfo());
726
      processMap.put("getShipmentInfo", new getShipmentInfo());
791
      processMap.put("getDestinationCode", new getDestinationCode());
727
      processMap.put("getDestinationCode", new getDestinationCode());
792
      processMap.put("getFreeAwbCount", new getFreeAwbCount());
728
      processMap.put("getFreeAwbCount", new getFreeAwbCount());
793
      processMap.put("getHolidays", new getHolidays());
729
      processMap.put("getHolidays", new getHolidays());
794
      processMap.put("isCodAllowed", new isCodAllowed());
-
 
795
      return processMap;
730
      return processMap;
796
    }
731
    }
797
 
732
 
798
    private static class getProvider<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getProvider_args> {
733
    private static class getProvider<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getProvider_args> {
799
      public getProvider() {
734
      public getProvider() {
Line 966... Line 901...
966
        result.success = iface.getHolidays(args.fromDate, args.toDate);
901
        result.success = iface.getHolidays(args.fromDate, args.toDate);
967
        return result;
902
        return result;
968
      }
903
      }
969
    }
904
    }
970
 
905
 
971
    private static class isCodAllowed<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isCodAllowed_args> {
-
 
972
      public isCodAllowed() {
-
 
973
        super("isCodAllowed");
-
 
974
      }
-
 
975
 
-
 
976
      protected isCodAllowed_args getEmptyArgsInstance() {
-
 
977
        return new isCodAllowed_args();
-
 
978
      }
-
 
979
 
-
 
980
      protected isCodAllowed_result getResult(I iface, isCodAllowed_args args) throws org.apache.thrift.TException {
-
 
981
        isCodAllowed_result result = new isCodAllowed_result();
-
 
982
        result.success = iface.isCodAllowed(args.destination_pincode);
-
 
983
        result.setSuccessIsSet(true);
-
 
984
        return result;
-
 
985
      }
-
 
986
    }
-
 
987
 
-
 
988
  }
906
  }
989
 
907
 
990
  public static class getProvider_args implements org.apache.thrift.TBase<getProvider_args, getProvider_args._Fields>, java.io.Serializable, Cloneable   {
908
  public static class getProvider_args implements org.apache.thrift.TBase<getProvider_args, getProvider_args._Fields>, java.io.Serializable, Cloneable   {
991
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getProvider_args");
909
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getProvider_args");
992
 
910
 
Line 7595... Line 7513...
7595
      first = false;
7513
      first = false;
7596
      sb.append(")");
7514
      sb.append(")");
7597
      return sb.toString();
7515
      return sb.toString();
7598
    }
7516
    }
7599
 
7517
 
7600
    public void validate() throws org.apache.thrift.TException {
-
 
7601
      // check for required fields
-
 
7602
    }
-
 
7603
 
-
 
7604
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
7605
      try {
-
 
7606
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
7607
      } catch (org.apache.thrift.TException te) {
-
 
7608
        throw new java.io.IOException(te);
-
 
7609
      }
-
 
7610
    }
-
 
7611
 
-
 
7612
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
7613
      try {
-
 
7614
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
7615
      } catch (org.apache.thrift.TException te) {
-
 
7616
        throw new java.io.IOException(te);
-
 
7617
      }
-
 
7618
    }
-
 
7619
 
-
 
7620
  }
-
 
7621
 
-
 
7622
  public static class isCodAllowed_args implements org.apache.thrift.TBase<isCodAllowed_args, isCodAllowed_args._Fields>, java.io.Serializable, Cloneable   {
-
 
7623
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isCodAllowed_args");
-
 
7624
 
-
 
7625
    private static final org.apache.thrift.protocol.TField DESTINATION_PINCODE_FIELD_DESC = new org.apache.thrift.protocol.TField("destination_pincode", org.apache.thrift.protocol.TType.STRING, (short)1);
-
 
7626
 
-
 
7627
    private String destination_pincode; // required
-
 
7628
 
-
 
7629
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
7630
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
7631
      DESTINATION_PINCODE((short)1, "destination_pincode");
-
 
7632
 
-
 
7633
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
7634
 
-
 
7635
      static {
-
 
7636
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
7637
          byName.put(field.getFieldName(), field);
-
 
7638
        }
-
 
7639
      }
-
 
7640
 
-
 
7641
      /**
-
 
7642
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
7643
       */
-
 
7644
      public static _Fields findByThriftId(int fieldId) {
-
 
7645
        switch(fieldId) {
-
 
7646
          case 1: // DESTINATION_PINCODE
-
 
7647
            return DESTINATION_PINCODE;
-
 
7648
          default:
-
 
7649
            return null;
-
 
7650
        }
-
 
7651
      }
-
 
7652
 
-
 
7653
      /**
-
 
7654
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
7655
       * if it is not found.
-
 
7656
       */
-
 
7657
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
7658
        _Fields fields = findByThriftId(fieldId);
-
 
7659
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
7660
        return fields;
-
 
7661
      }
-
 
7662
 
-
 
7663
      /**
-
 
7664
       * Find the _Fields constant that matches name, or null if its not found.
-
 
7665
       */
-
 
7666
      public static _Fields findByName(String name) {
-
 
7667
        return byName.get(name);
-
 
7668
      }
-
 
7669
 
-
 
7670
      private final short _thriftId;
-
 
7671
      private final String _fieldName;
-
 
7672
 
-
 
7673
      _Fields(short thriftId, String fieldName) {
-
 
7674
        _thriftId = thriftId;
-
 
7675
        _fieldName = fieldName;
-
 
7676
      }
-
 
7677
 
-
 
7678
      public short getThriftFieldId() {
-
 
7679
        return _thriftId;
-
 
7680
      }
-
 
7681
 
-
 
7682
      public String getFieldName() {
-
 
7683
        return _fieldName;
-
 
7684
      }
-
 
7685
    }
-
 
7686
 
-
 
7687
    // isset id assignments
-
 
7688
 
-
 
7689
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
7690
    static {
-
 
7691
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
7692
      tmpMap.put(_Fields.DESTINATION_PINCODE, new org.apache.thrift.meta_data.FieldMetaData("destination_pincode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
7693
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
7694
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
7695
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isCodAllowed_args.class, metaDataMap);
-
 
7696
    }
-
 
7697
 
-
 
7698
    public isCodAllowed_args() {
-
 
7699
    }
-
 
7700
 
-
 
7701
    public isCodAllowed_args(
-
 
7702
      String destination_pincode)
-
 
7703
    {
-
 
7704
      this();
-
 
7705
      this.destination_pincode = destination_pincode;
-
 
7706
    }
-
 
7707
 
-
 
7708
    /**
-
 
7709
     * Performs a deep copy on <i>other</i>.
-
 
7710
     */
-
 
7711
    public isCodAllowed_args(isCodAllowed_args other) {
-
 
7712
      if (other.isSetDestination_pincode()) {
-
 
7713
        this.destination_pincode = other.destination_pincode;
-
 
7714
      }
-
 
7715
    }
-
 
7716
 
-
 
7717
    public isCodAllowed_args deepCopy() {
-
 
7718
      return new isCodAllowed_args(this);
-
 
7719
    }
-
 
7720
 
-
 
7721
    @Override
-
 
7722
    public void clear() {
-
 
7723
      this.destination_pincode = null;
-
 
7724
    }
-
 
7725
 
-
 
7726
    public String getDestination_pincode() {
-
 
7727
      return this.destination_pincode;
-
 
7728
    }
-
 
7729
 
-
 
7730
    public void setDestination_pincode(String destination_pincode) {
-
 
7731
      this.destination_pincode = destination_pincode;
-
 
7732
    }
-
 
7733
 
-
 
7734
    public void unsetDestination_pincode() {
-
 
7735
      this.destination_pincode = null;
-
 
7736
    }
-
 
7737
 
-
 
7738
    /** Returns true if field destination_pincode is set (has been assigned a value) and false otherwise */
-
 
7739
    public boolean isSetDestination_pincode() {
-
 
7740
      return this.destination_pincode != null;
-
 
7741
    }
-
 
7742
 
-
 
7743
    public void setDestination_pincodeIsSet(boolean value) {
-
 
7744
      if (!value) {
-
 
7745
        this.destination_pincode = null;
-
 
7746
      }
-
 
7747
    }
-
 
7748
 
-
 
7749
    public void setFieldValue(_Fields field, Object value) {
-
 
7750
      switch (field) {
-
 
7751
      case DESTINATION_PINCODE:
-
 
7752
        if (value == null) {
-
 
7753
          unsetDestination_pincode();
-
 
7754
        } else {
-
 
7755
          setDestination_pincode((String)value);
-
 
7756
        }
-
 
7757
        break;
-
 
7758
 
-
 
7759
      }
-
 
7760
    }
-
 
7761
 
-
 
7762
    public Object getFieldValue(_Fields field) {
-
 
7763
      switch (field) {
-
 
7764
      case DESTINATION_PINCODE:
-
 
7765
        return getDestination_pincode();
-
 
7766
 
-
 
7767
      }
-
 
7768
      throw new IllegalStateException();
-
 
7769
    }
-
 
7770
 
-
 
7771
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
7772
    public boolean isSet(_Fields field) {
-
 
7773
      if (field == null) {
-
 
7774
        throw new IllegalArgumentException();
-
 
7775
      }
-
 
7776
 
-
 
7777
      switch (field) {
-
 
7778
      case DESTINATION_PINCODE:
-
 
7779
        return isSetDestination_pincode();
-
 
7780
      }
-
 
7781
      throw new IllegalStateException();
-
 
7782
    }
-
 
7783
 
-
 
7784
    @Override
-
 
7785
    public boolean equals(Object that) {
-
 
7786
      if (that == null)
-
 
7787
        return false;
-
 
7788
      if (that instanceof isCodAllowed_args)
-
 
7789
        return this.equals((isCodAllowed_args)that);
-
 
7790
      return false;
-
 
7791
    }
-
 
7792
 
-
 
7793
    public boolean equals(isCodAllowed_args that) {
-
 
7794
      if (that == null)
-
 
7795
        return false;
-
 
7796
 
-
 
7797
      boolean this_present_destination_pincode = true && this.isSetDestination_pincode();
-
 
7798
      boolean that_present_destination_pincode = true && that.isSetDestination_pincode();
-
 
7799
      if (this_present_destination_pincode || that_present_destination_pincode) {
-
 
7800
        if (!(this_present_destination_pincode && that_present_destination_pincode))
-
 
7801
          return false;
-
 
7802
        if (!this.destination_pincode.equals(that.destination_pincode))
-
 
7803
          return false;
-
 
7804
      }
-
 
7805
 
-
 
7806
      return true;
-
 
7807
    }
-
 
7808
 
-
 
7809
    @Override
-
 
7810
    public int hashCode() {
-
 
7811
      return 0;
-
 
7812
    }
-
 
7813
 
-
 
7814
    public int compareTo(isCodAllowed_args other) {
-
 
7815
      if (!getClass().equals(other.getClass())) {
-
 
7816
        return getClass().getName().compareTo(other.getClass().getName());
-
 
7817
      }
-
 
7818
 
-
 
7819
      int lastComparison = 0;
-
 
7820
      isCodAllowed_args typedOther = (isCodAllowed_args)other;
-
 
7821
 
-
 
7822
      lastComparison = Boolean.valueOf(isSetDestination_pincode()).compareTo(typedOther.isSetDestination_pincode());
-
 
7823
      if (lastComparison != 0) {
-
 
7824
        return lastComparison;
-
 
7825
      }
-
 
7826
      if (isSetDestination_pincode()) {
-
 
7827
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.destination_pincode, typedOther.destination_pincode);
-
 
7828
        if (lastComparison != 0) {
-
 
7829
          return lastComparison;
-
 
7830
        }
-
 
7831
      }
-
 
7832
      return 0;
-
 
7833
    }
-
 
7834
 
-
 
7835
    public _Fields fieldForId(int fieldId) {
-
 
7836
      return _Fields.findByThriftId(fieldId);
-
 
7837
    }
-
 
7838
 
-
 
7839
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
7840
      org.apache.thrift.protocol.TField field;
-
 
7841
      iprot.readStructBegin();
-
 
7842
      while (true)
-
 
7843
      {
-
 
7844
        field = iprot.readFieldBegin();
-
 
7845
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
7846
          break;
-
 
7847
        }
-
 
7848
        switch (field.id) {
-
 
7849
          case 1: // DESTINATION_PINCODE
-
 
7850
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
7851
              this.destination_pincode = iprot.readString();
-
 
7852
            } else { 
-
 
7853
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
7854
            }
-
 
7855
            break;
-
 
7856
          default:
-
 
7857
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
7858
        }
-
 
7859
        iprot.readFieldEnd();
-
 
7860
      }
-
 
7861
      iprot.readStructEnd();
-
 
7862
      validate();
-
 
7863
    }
-
 
7864
 
-
 
7865
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
7866
      validate();
-
 
7867
 
-
 
7868
      oprot.writeStructBegin(STRUCT_DESC);
-
 
7869
      if (this.destination_pincode != null) {
-
 
7870
        oprot.writeFieldBegin(DESTINATION_PINCODE_FIELD_DESC);
-
 
7871
        oprot.writeString(this.destination_pincode);
-
 
7872
        oprot.writeFieldEnd();
-
 
7873
      }
-
 
7874
      oprot.writeFieldStop();
-
 
7875
      oprot.writeStructEnd();
-
 
7876
    }
-
 
7877
 
-
 
7878
    @Override
-
 
7879
    public String toString() {
-
 
7880
      StringBuilder sb = new StringBuilder("isCodAllowed_args(");
-
 
7881
      boolean first = true;
-
 
7882
 
-
 
7883
      sb.append("destination_pincode:");
-
 
7884
      if (this.destination_pincode == null) {
-
 
7885
        sb.append("null");
-
 
7886
      } else {
-
 
7887
        sb.append(this.destination_pincode);
-
 
7888
      }
-
 
7889
      first = false;
-
 
7890
      sb.append(")");
-
 
7891
      return sb.toString();
-
 
7892
    }
-
 
7893
 
-
 
7894
    public void validate() throws org.apache.thrift.TException {
-
 
7895
      // check for required fields
-
 
7896
    }
-
 
7897
 
-
 
7898
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
7899
      try {
-
 
7900
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
7901
      } catch (org.apache.thrift.TException te) {
-
 
7902
        throw new java.io.IOException(te);
-
 
7903
      }
-
 
7904
    }
-
 
7905
 
-
 
7906
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
7907
      try {
-
 
7908
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
7909
      } catch (org.apache.thrift.TException te) {
-
 
7910
        throw new java.io.IOException(te);
-
 
7911
      }
-
 
7912
    }
-
 
7913
 
-
 
7914
  }
-
 
7915
 
-
 
7916
  public static class isCodAllowed_result implements org.apache.thrift.TBase<isCodAllowed_result, isCodAllowed_result._Fields>, java.io.Serializable, Cloneable   {
-
 
7917
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isCodAllowed_result");
-
 
7918
 
-
 
7919
    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);
-
 
7920
 
-
 
7921
    private boolean success; // required
-
 
7922
 
-
 
7923
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
7924
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
7925
      SUCCESS((short)0, "success");
-
 
7926
 
-
 
7927
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
7928
 
-
 
7929
      static {
-
 
7930
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
7931
          byName.put(field.getFieldName(), field);
-
 
7932
        }
-
 
7933
      }
-
 
7934
 
-
 
7935
      /**
-
 
7936
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
7937
       */
-
 
7938
      public static _Fields findByThriftId(int fieldId) {
-
 
7939
        switch(fieldId) {
-
 
7940
          case 0: // SUCCESS
-
 
7941
            return SUCCESS;
-
 
7942
          default:
-
 
7943
            return null;
-
 
7944
        }
-
 
7945
      }
-
 
7946
 
-
 
7947
      /**
-
 
7948
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
7949
       * if it is not found.
-
 
7950
       */
-
 
7951
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
7952
        _Fields fields = findByThriftId(fieldId);
-
 
7953
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
7954
        return fields;
-
 
7955
      }
-
 
7956
 
-
 
7957
      /**
-
 
7958
       * Find the _Fields constant that matches name, or null if its not found.
-
 
7959
       */
-
 
7960
      public static _Fields findByName(String name) {
-
 
7961
        return byName.get(name);
-
 
7962
      }
-
 
7963
 
-
 
7964
      private final short _thriftId;
-
 
7965
      private final String _fieldName;
-
 
7966
 
-
 
7967
      _Fields(short thriftId, String fieldName) {
-
 
7968
        _thriftId = thriftId;
-
 
7969
        _fieldName = fieldName;
-
 
7970
      }
-
 
7971
 
-
 
7972
      public short getThriftFieldId() {
-
 
7973
        return _thriftId;
-
 
7974
      }
-
 
7975
 
-
 
7976
      public String getFieldName() {
-
 
7977
        return _fieldName;
-
 
7978
      }
-
 
7979
    }
-
 
7980
 
-
 
7981
    // isset id assignments
-
 
7982
    private static final int __SUCCESS_ISSET_ID = 0;
-
 
7983
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
7984
 
-
 
7985
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
7986
    static {
-
 
7987
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
7988
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
7989
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
-
 
7990
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
7991
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isCodAllowed_result.class, metaDataMap);
-
 
7992
    }
-
 
7993
 
-
 
7994
    public isCodAllowed_result() {
-
 
7995
    }
-
 
7996
 
-
 
7997
    public isCodAllowed_result(
-
 
7998
      boolean success)
-
 
7999
    {
-
 
8000
      this();
-
 
8001
      this.success = success;
-
 
8002
      setSuccessIsSet(true);
-
 
8003
    }
-
 
8004
 
-
 
8005
    /**
-
 
8006
     * Performs a deep copy on <i>other</i>.
-
 
8007
     */
-
 
8008
    public isCodAllowed_result(isCodAllowed_result other) {
-
 
8009
      __isset_bit_vector.clear();
-
 
8010
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
8011
      this.success = other.success;
-
 
8012
    }
-
 
8013
 
-
 
8014
    public isCodAllowed_result deepCopy() {
-
 
8015
      return new isCodAllowed_result(this);
-
 
8016
    }
-
 
8017
 
-
 
8018
    @Override
-
 
8019
    public void clear() {
-
 
8020
      setSuccessIsSet(false);
-
 
8021
      this.success = false;
-
 
8022
    }
-
 
8023
 
-
 
8024
    public boolean isSuccess() {
-
 
8025
      return this.success;
-
 
8026
    }
-
 
8027
 
-
 
8028
    public void setSuccess(boolean success) {
-
 
8029
      this.success = success;
-
 
8030
      setSuccessIsSet(true);
-
 
8031
    }
-
 
8032
 
-
 
8033
    public void unsetSuccess() {
-
 
8034
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
-
 
8035
    }
-
 
8036
 
-
 
8037
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
8038
    public boolean isSetSuccess() {
-
 
8039
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
-
 
8040
    }
-
 
8041
 
-
 
8042
    public void setSuccessIsSet(boolean value) {
-
 
8043
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
-
 
8044
    }
-
 
8045
 
-
 
8046
    public void setFieldValue(_Fields field, Object value) {
-
 
8047
      switch (field) {
-
 
8048
      case SUCCESS:
-
 
8049
        if (value == null) {
-
 
8050
          unsetSuccess();
-
 
8051
        } else {
-
 
8052
          setSuccess((Boolean)value);
-
 
8053
        }
-
 
8054
        break;
-
 
8055
 
-
 
8056
      }
-
 
8057
    }
-
 
8058
 
-
 
8059
    public Object getFieldValue(_Fields field) {
-
 
8060
      switch (field) {
-
 
8061
      case SUCCESS:
-
 
8062
        return Boolean.valueOf(isSuccess());
-
 
8063
 
-
 
8064
      }
-
 
8065
      throw new IllegalStateException();
-
 
8066
    }
-
 
8067
 
-
 
8068
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
8069
    public boolean isSet(_Fields field) {
-
 
8070
      if (field == null) {
-
 
8071
        throw new IllegalArgumentException();
-
 
8072
      }
-
 
8073
 
-
 
8074
      switch (field) {
-
 
8075
      case SUCCESS:
-
 
8076
        return isSetSuccess();
-
 
8077
      }
-
 
8078
      throw new IllegalStateException();
-
 
8079
    }
-
 
8080
 
-
 
8081
    @Override
-
 
8082
    public boolean equals(Object that) {
-
 
8083
      if (that == null)
-
 
8084
        return false;
-
 
8085
      if (that instanceof isCodAllowed_result)
-
 
8086
        return this.equals((isCodAllowed_result)that);
-
 
8087
      return false;
-
 
8088
    }
-
 
8089
 
-
 
8090
    public boolean equals(isCodAllowed_result that) {
-
 
8091
      if (that == null)
-
 
8092
        return false;
-
 
8093
 
-
 
8094
      boolean this_present_success = true;
-
 
8095
      boolean that_present_success = true;
-
 
8096
      if (this_present_success || that_present_success) {
-
 
8097
        if (!(this_present_success && that_present_success))
-
 
8098
          return false;
-
 
8099
        if (this.success != that.success)
-
 
8100
          return false;
-
 
8101
      }
-
 
8102
 
-
 
8103
      return true;
-
 
8104
    }
-
 
8105
 
-
 
8106
    @Override
-
 
8107
    public int hashCode() {
-
 
8108
      return 0;
-
 
8109
    }
-
 
8110
 
-
 
8111
    public int compareTo(isCodAllowed_result other) {
-
 
8112
      if (!getClass().equals(other.getClass())) {
-
 
8113
        return getClass().getName().compareTo(other.getClass().getName());
-
 
8114
      }
-
 
8115
 
-
 
8116
      int lastComparison = 0;
-
 
8117
      isCodAllowed_result typedOther = (isCodAllowed_result)other;
-
 
8118
 
-
 
8119
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
8120
      if (lastComparison != 0) {
-
 
8121
        return lastComparison;
-
 
8122
      }
-
 
8123
      if (isSetSuccess()) {
-
 
8124
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
8125
        if (lastComparison != 0) {
-
 
8126
          return lastComparison;
-
 
8127
        }
-
 
8128
      }
-
 
8129
      return 0;
-
 
8130
    }
-
 
8131
 
-
 
8132
    public _Fields fieldForId(int fieldId) {
-
 
8133
      return _Fields.findByThriftId(fieldId);
-
 
8134
    }
-
 
8135
 
-
 
8136
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
8137
      org.apache.thrift.protocol.TField field;
-
 
8138
      iprot.readStructBegin();
-
 
8139
      while (true)
-
 
8140
      {
-
 
8141
        field = iprot.readFieldBegin();
-
 
8142
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
8143
          break;
-
 
8144
        }
-
 
8145
        switch (field.id) {
-
 
8146
          case 0: // SUCCESS
-
 
8147
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-
 
8148
              this.success = iprot.readBool();
-
 
8149
              setSuccessIsSet(true);
-
 
8150
            } else { 
-
 
8151
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
8152
            }
-
 
8153
            break;
-
 
8154
          default:
-
 
8155
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
8156
        }
-
 
8157
        iprot.readFieldEnd();
-
 
8158
      }
-
 
8159
      iprot.readStructEnd();
-
 
8160
      validate();
-
 
8161
    }
-
 
8162
 
-
 
8163
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
8164
      oprot.writeStructBegin(STRUCT_DESC);
-
 
8165
 
-
 
8166
      if (this.isSetSuccess()) {
-
 
8167
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
8168
        oprot.writeBool(this.success);
-
 
8169
        oprot.writeFieldEnd();
-
 
8170
      }
-
 
8171
      oprot.writeFieldStop();
-
 
8172
      oprot.writeStructEnd();
-
 
8173
    }
-
 
8174
 
-
 
8175
    @Override
-
 
8176
    public String toString() {
-
 
8177
      StringBuilder sb = new StringBuilder("isCodAllowed_result(");
-
 
8178
      boolean first = true;
-
 
8179
 
-
 
8180
      sb.append("success:");
-
 
8181
      sb.append(this.success);
-
 
8182
      first = false;
-
 
8183
      sb.append(")");
-
 
8184
      return sb.toString();
-
 
8185
    }
-
 
8186
 
-
 
8187
    public void validate() throws org.apache.thrift.TException {
7518
    public void validate() throws org.apache.thrift.TException {
8188
      // check for required fields
7519
      // check for required fields
8189
    }
7520
    }
8190
 
7521
 
8191
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7522
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {