Subversion Repositories SmartDukaan

Rev

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

Rev 3044 Rev 3061
Line 103... Line 103...
103
     * @param fromDate
103
     * @param fromDate
104
     * @param toDate
104
     * @param toDate
105
     */
105
     */
106
    public List<Long> getHolidays(long fromDate, long toDate) throws TException;
106
    public List<Long> getHolidays(long fromDate, long toDate) throws TException;
107
 
107
 
-
 
108
    /**
-
 
109
     * Returns true if COD is allowed for this destination pincode
-
 
110
     * 
-
 
111
     * @param destination_pincode
-
 
112
     */
-
 
113
    public boolean isCodAllowed(String destination_pincode) throws TException;
-
 
114
 
108
  }
115
  }
109
 
116
 
110
  public static class Client implements Iface {
117
  public static class Client implements Iface {
111
    public Client(TProtocol prot)
118
    public Client(TProtocol prot)
112
    {
119
    {
Line 484... Line 491...
484
        return result.success;
491
        return result.success;
485
      }
492
      }
486
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getHolidays failed: unknown result");
493
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getHolidays failed: unknown result");
487
    }
494
    }
488
 
495
 
-
 
496
    public boolean isCodAllowed(String destination_pincode) throws TException
-
 
497
    {
-
 
498
      send_isCodAllowed(destination_pincode);
-
 
499
      return recv_isCodAllowed();
-
 
500
    }
-
 
501
 
-
 
502
    public void send_isCodAllowed(String destination_pincode) throws TException
-
 
503
    {
-
 
504
      oprot_.writeMessageBegin(new TMessage("isCodAllowed", TMessageType.CALL, seqid_));
-
 
505
      isCodAllowed_args args = new isCodAllowed_args();
-
 
506
      args.destination_pincode = destination_pincode;
-
 
507
      args.write(oprot_);
-
 
508
      oprot_.writeMessageEnd();
-
 
509
      oprot_.getTransport().flush();
-
 
510
    }
-
 
511
 
-
 
512
    public boolean recv_isCodAllowed() throws TException
-
 
513
    {
-
 
514
      TMessage msg = iprot_.readMessageBegin();
-
 
515
      if (msg.type == TMessageType.EXCEPTION) {
-
 
516
        TApplicationException x = TApplicationException.read(iprot_);
-
 
517
        iprot_.readMessageEnd();
-
 
518
        throw x;
-
 
519
      }
-
 
520
      isCodAllowed_result result = new isCodAllowed_result();
-
 
521
      result.read(iprot_);
-
 
522
      iprot_.readMessageEnd();
-
 
523
      if (result.isSetSuccess()) {
-
 
524
        return result.success;
-
 
525
      }
-
 
526
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "isCodAllowed failed: unknown result");
-
 
527
    }
-
 
528
 
489
  }
529
  }
490
  public static class Processor implements TProcessor {
530
  public static class Processor implements TProcessor {
491
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
531
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
492
    public Processor(Iface iface)
532
    public Processor(Iface iface)
493
    {
533
    {
Line 500... Line 540...
500
      processMap_.put("getEmptyAWB", new getEmptyAWB());
540
      processMap_.put("getEmptyAWB", new getEmptyAWB());
501
      processMap_.put("getShipmentInfo", new getShipmentInfo());
541
      processMap_.put("getShipmentInfo", new getShipmentInfo());
502
      processMap_.put("getDestinationCode", new getDestinationCode());
542
      processMap_.put("getDestinationCode", new getDestinationCode());
503
      processMap_.put("getFreeAwbCount", new getFreeAwbCount());
543
      processMap_.put("getFreeAwbCount", new getFreeAwbCount());
504
      processMap_.put("getHolidays", new getHolidays());
544
      processMap_.put("getHolidays", new getHolidays());
-
 
545
      processMap_.put("isCodAllowed", new isCodAllowed());
505
    }
546
    }
506
 
547
 
507
    protected static interface ProcessFunction {
548
    protected static interface ProcessFunction {
508
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
549
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
509
    }
550
    }
Line 772... Line 813...
772
        oprot.getTransport().flush();
813
        oprot.getTransport().flush();
773
      }
814
      }
774
 
815
 
775
    }
816
    }
776
 
817
 
-
 
818
    private class isCodAllowed implements ProcessFunction {
-
 
819
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
820
      {
-
 
821
        isCodAllowed_args args = new isCodAllowed_args();
-
 
822
        args.read(iprot);
-
 
823
        iprot.readMessageEnd();
-
 
824
        isCodAllowed_result result = new isCodAllowed_result();
-
 
825
        result.success = iface_.isCodAllowed(args.destination_pincode);
-
 
826
        result.setSuccessIsSet(true);
-
 
827
        oprot.writeMessageBegin(new TMessage("isCodAllowed", TMessageType.REPLY, seqid));
-
 
828
        result.write(oprot);
-
 
829
        oprot.writeMessageEnd();
-
 
830
        oprot.getTransport().flush();
-
 
831
      }
-
 
832
 
-
 
833
    }
-
 
834
 
777
  }
835
  }
778
 
836
 
779
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
837
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
780
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
838
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
781
 
839
 
Line 7251... Line 7309...
7251
      first = false;
7309
      first = false;
7252
      sb.append(")");
7310
      sb.append(")");
7253
      return sb.toString();
7311
      return sb.toString();
7254
    }
7312
    }
7255
 
7313
 
-
 
7314
    public void validate() throws TException {
-
 
7315
      // check for required fields
-
 
7316
    }
-
 
7317
 
-
 
7318
  }
-
 
7319
 
-
 
7320
  public static class isCodAllowed_args implements TBase<isCodAllowed_args._Fields>, java.io.Serializable, Cloneable, Comparable<isCodAllowed_args>   {
-
 
7321
    private static final TStruct STRUCT_DESC = new TStruct("isCodAllowed_args");
-
 
7322
 
-
 
7323
    private static final TField DESTINATION_PINCODE_FIELD_DESC = new TField("destination_pincode", TType.STRING, (short)1);
-
 
7324
 
-
 
7325
    private String destination_pincode;
-
 
7326
 
-
 
7327
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
7328
    public enum _Fields implements TFieldIdEnum {
-
 
7329
      DESTINATION_PINCODE((short)1, "destination_pincode");
-
 
7330
 
-
 
7331
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
7332
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
7333
 
-
 
7334
      static {
-
 
7335
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
7336
          byId.put((int)field._thriftId, field);
-
 
7337
          byName.put(field.getFieldName(), field);
-
 
7338
        }
-
 
7339
      }
-
 
7340
 
-
 
7341
      /**
-
 
7342
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
7343
       */
-
 
7344
      public static _Fields findByThriftId(int fieldId) {
-
 
7345
        return byId.get(fieldId);
-
 
7346
      }
-
 
7347
 
-
 
7348
      /**
-
 
7349
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
7350
       * if it is not found.
-
 
7351
       */
-
 
7352
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
7353
        _Fields fields = findByThriftId(fieldId);
-
 
7354
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
7355
        return fields;
-
 
7356
      }
-
 
7357
 
-
 
7358
      /**
-
 
7359
       * Find the _Fields constant that matches name, or null if its not found.
-
 
7360
       */
-
 
7361
      public static _Fields findByName(String name) {
-
 
7362
        return byName.get(name);
-
 
7363
      }
-
 
7364
 
-
 
7365
      private final short _thriftId;
-
 
7366
      private final String _fieldName;
-
 
7367
 
-
 
7368
      _Fields(short thriftId, String fieldName) {
-
 
7369
        _thriftId = thriftId;
-
 
7370
        _fieldName = fieldName;
-
 
7371
      }
-
 
7372
 
-
 
7373
      public short getThriftFieldId() {
-
 
7374
        return _thriftId;
-
 
7375
      }
-
 
7376
 
-
 
7377
      public String getFieldName() {
-
 
7378
        return _fieldName;
-
 
7379
      }
-
 
7380
    }
-
 
7381
 
-
 
7382
    // isset id assignments
-
 
7383
 
-
 
7384
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
7385
      put(_Fields.DESTINATION_PINCODE, new FieldMetaData("destination_pincode", TFieldRequirementType.DEFAULT, 
-
 
7386
          new FieldValueMetaData(TType.STRING)));
-
 
7387
    }});
-
 
7388
 
-
 
7389
    static {
-
 
7390
      FieldMetaData.addStructMetaDataMap(isCodAllowed_args.class, metaDataMap);
-
 
7391
    }
-
 
7392
 
-
 
7393
    public isCodAllowed_args() {
-
 
7394
    }
-
 
7395
 
-
 
7396
    public isCodAllowed_args(
-
 
7397
      String destination_pincode)
-
 
7398
    {
-
 
7399
      this();
-
 
7400
      this.destination_pincode = destination_pincode;
-
 
7401
    }
-
 
7402
 
-
 
7403
    /**
-
 
7404
     * Performs a deep copy on <i>other</i>.
-
 
7405
     */
-
 
7406
    public isCodAllowed_args(isCodAllowed_args other) {
-
 
7407
      if (other.isSetDestination_pincode()) {
-
 
7408
        this.destination_pincode = other.destination_pincode;
-
 
7409
      }
-
 
7410
    }
-
 
7411
 
-
 
7412
    public isCodAllowed_args deepCopy() {
-
 
7413
      return new isCodAllowed_args(this);
-
 
7414
    }
-
 
7415
 
-
 
7416
    @Deprecated
-
 
7417
    public isCodAllowed_args clone() {
-
 
7418
      return new isCodAllowed_args(this);
-
 
7419
    }
-
 
7420
 
-
 
7421
    public String getDestination_pincode() {
-
 
7422
      return this.destination_pincode;
-
 
7423
    }
-
 
7424
 
-
 
7425
    public isCodAllowed_args setDestination_pincode(String destination_pincode) {
-
 
7426
      this.destination_pincode = destination_pincode;
-
 
7427
      return this;
-
 
7428
    }
-
 
7429
 
-
 
7430
    public void unsetDestination_pincode() {
-
 
7431
      this.destination_pincode = null;
-
 
7432
    }
-
 
7433
 
-
 
7434
    /** Returns true if field destination_pincode is set (has been asigned a value) and false otherwise */
-
 
7435
    public boolean isSetDestination_pincode() {
-
 
7436
      return this.destination_pincode != null;
-
 
7437
    }
-
 
7438
 
-
 
7439
    public void setDestination_pincodeIsSet(boolean value) {
-
 
7440
      if (!value) {
-
 
7441
        this.destination_pincode = null;
-
 
7442
      }
-
 
7443
    }
-
 
7444
 
-
 
7445
    public void setFieldValue(_Fields field, Object value) {
-
 
7446
      switch (field) {
-
 
7447
      case DESTINATION_PINCODE:
-
 
7448
        if (value == null) {
-
 
7449
          unsetDestination_pincode();
-
 
7450
        } else {
-
 
7451
          setDestination_pincode((String)value);
-
 
7452
        }
-
 
7453
        break;
-
 
7454
 
-
 
7455
      }
-
 
7456
    }
-
 
7457
 
-
 
7458
    public void setFieldValue(int fieldID, Object value) {
-
 
7459
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
7460
    }
-
 
7461
 
-
 
7462
    public Object getFieldValue(_Fields field) {
-
 
7463
      switch (field) {
-
 
7464
      case DESTINATION_PINCODE:
-
 
7465
        return getDestination_pincode();
-
 
7466
 
-
 
7467
      }
-
 
7468
      throw new IllegalStateException();
-
 
7469
    }
-
 
7470
 
-
 
7471
    public Object getFieldValue(int fieldId) {
-
 
7472
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
7473
    }
-
 
7474
 
-
 
7475
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
7476
    public boolean isSet(_Fields field) {
-
 
7477
      switch (field) {
-
 
7478
      case DESTINATION_PINCODE:
-
 
7479
        return isSetDestination_pincode();
-
 
7480
      }
-
 
7481
      throw new IllegalStateException();
-
 
7482
    }
-
 
7483
 
-
 
7484
    public boolean isSet(int fieldID) {
-
 
7485
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
7486
    }
-
 
7487
 
-
 
7488
    @Override
-
 
7489
    public boolean equals(Object that) {
-
 
7490
      if (that == null)
-
 
7491
        return false;
-
 
7492
      if (that instanceof isCodAllowed_args)
-
 
7493
        return this.equals((isCodAllowed_args)that);
-
 
7494
      return false;
-
 
7495
    }
-
 
7496
 
-
 
7497
    public boolean equals(isCodAllowed_args that) {
-
 
7498
      if (that == null)
-
 
7499
        return false;
-
 
7500
 
-
 
7501
      boolean this_present_destination_pincode = true && this.isSetDestination_pincode();
-
 
7502
      boolean that_present_destination_pincode = true && that.isSetDestination_pincode();
-
 
7503
      if (this_present_destination_pincode || that_present_destination_pincode) {
-
 
7504
        if (!(this_present_destination_pincode && that_present_destination_pincode))
-
 
7505
          return false;
-
 
7506
        if (!this.destination_pincode.equals(that.destination_pincode))
-
 
7507
          return false;
-
 
7508
      }
-
 
7509
 
-
 
7510
      return true;
-
 
7511
    }
-
 
7512
 
-
 
7513
    @Override
-
 
7514
    public int hashCode() {
-
 
7515
      return 0;
-
 
7516
    }
-
 
7517
 
-
 
7518
    public int compareTo(isCodAllowed_args other) {
-
 
7519
      if (!getClass().equals(other.getClass())) {
-
 
7520
        return getClass().getName().compareTo(other.getClass().getName());
-
 
7521
      }
-
 
7522
 
-
 
7523
      int lastComparison = 0;
-
 
7524
      isCodAllowed_args typedOther = (isCodAllowed_args)other;
-
 
7525
 
-
 
7526
      lastComparison = Boolean.valueOf(isSetDestination_pincode()).compareTo(isSetDestination_pincode());
-
 
7527
      if (lastComparison != 0) {
-
 
7528
        return lastComparison;
-
 
7529
      }
-
 
7530
      lastComparison = TBaseHelper.compareTo(destination_pincode, typedOther.destination_pincode);
-
 
7531
      if (lastComparison != 0) {
-
 
7532
        return lastComparison;
-
 
7533
      }
-
 
7534
      return 0;
-
 
7535
    }
-
 
7536
 
-
 
7537
    public void read(TProtocol iprot) throws TException {
-
 
7538
      TField field;
-
 
7539
      iprot.readStructBegin();
-
 
7540
      while (true)
-
 
7541
      {
-
 
7542
        field = iprot.readFieldBegin();
-
 
7543
        if (field.type == TType.STOP) { 
-
 
7544
          break;
-
 
7545
        }
-
 
7546
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
7547
        if (fieldId == null) {
-
 
7548
          TProtocolUtil.skip(iprot, field.type);
-
 
7549
        } else {
-
 
7550
          switch (fieldId) {
-
 
7551
            case DESTINATION_PINCODE:
-
 
7552
              if (field.type == TType.STRING) {
-
 
7553
                this.destination_pincode = iprot.readString();
-
 
7554
              } else { 
-
 
7555
                TProtocolUtil.skip(iprot, field.type);
-
 
7556
              }
-
 
7557
              break;
-
 
7558
          }
-
 
7559
          iprot.readFieldEnd();
-
 
7560
        }
-
 
7561
      }
-
 
7562
      iprot.readStructEnd();
-
 
7563
      validate();
-
 
7564
    }
-
 
7565
 
-
 
7566
    public void write(TProtocol oprot) throws TException {
-
 
7567
      validate();
-
 
7568
 
-
 
7569
      oprot.writeStructBegin(STRUCT_DESC);
-
 
7570
      if (this.destination_pincode != null) {
-
 
7571
        oprot.writeFieldBegin(DESTINATION_PINCODE_FIELD_DESC);
-
 
7572
        oprot.writeString(this.destination_pincode);
-
 
7573
        oprot.writeFieldEnd();
-
 
7574
      }
-
 
7575
      oprot.writeFieldStop();
-
 
7576
      oprot.writeStructEnd();
-
 
7577
    }
-
 
7578
 
-
 
7579
    @Override
-
 
7580
    public String toString() {
-
 
7581
      StringBuilder sb = new StringBuilder("isCodAllowed_args(");
-
 
7582
      boolean first = true;
-
 
7583
 
-
 
7584
      sb.append("destination_pincode:");
-
 
7585
      if (this.destination_pincode == null) {
-
 
7586
        sb.append("null");
-
 
7587
      } else {
-
 
7588
        sb.append(this.destination_pincode);
-
 
7589
      }
-
 
7590
      first = false;
-
 
7591
      sb.append(")");
-
 
7592
      return sb.toString();
-
 
7593
    }
-
 
7594
 
-
 
7595
    public void validate() throws TException {
-
 
7596
      // check for required fields
-
 
7597
    }
-
 
7598
 
-
 
7599
  }
-
 
7600
 
-
 
7601
  public static class isCodAllowed_result implements TBase<isCodAllowed_result._Fields>, java.io.Serializable, Cloneable, Comparable<isCodAllowed_result>   {
-
 
7602
    private static final TStruct STRUCT_DESC = new TStruct("isCodAllowed_result");
-
 
7603
 
-
 
7604
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
-
 
7605
 
-
 
7606
    private boolean success;
-
 
7607
 
-
 
7608
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
7609
    public enum _Fields implements TFieldIdEnum {
-
 
7610
      SUCCESS((short)0, "success");
-
 
7611
 
-
 
7612
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
7613
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
7614
 
-
 
7615
      static {
-
 
7616
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
7617
          byId.put((int)field._thriftId, field);
-
 
7618
          byName.put(field.getFieldName(), field);
-
 
7619
        }
-
 
7620
      }
-
 
7621
 
-
 
7622
      /**
-
 
7623
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
7624
       */
-
 
7625
      public static _Fields findByThriftId(int fieldId) {
-
 
7626
        return byId.get(fieldId);
-
 
7627
      }
-
 
7628
 
-
 
7629
      /**
-
 
7630
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
7631
       * if it is not found.
-
 
7632
       */
-
 
7633
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
7634
        _Fields fields = findByThriftId(fieldId);
-
 
7635
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
7636
        return fields;
-
 
7637
      }
-
 
7638
 
-
 
7639
      /**
-
 
7640
       * Find the _Fields constant that matches name, or null if its not found.
-
 
7641
       */
-
 
7642
      public static _Fields findByName(String name) {
-
 
7643
        return byName.get(name);
-
 
7644
      }
-
 
7645
 
-
 
7646
      private final short _thriftId;
-
 
7647
      private final String _fieldName;
-
 
7648
 
-
 
7649
      _Fields(short thriftId, String fieldName) {
-
 
7650
        _thriftId = thriftId;
-
 
7651
        _fieldName = fieldName;
-
 
7652
      }
-
 
7653
 
-
 
7654
      public short getThriftFieldId() {
-
 
7655
        return _thriftId;
-
 
7656
      }
-
 
7657
 
-
 
7658
      public String getFieldName() {
-
 
7659
        return _fieldName;
-
 
7660
      }
-
 
7661
    }
-
 
7662
 
-
 
7663
    // isset id assignments
-
 
7664
    private static final int __SUCCESS_ISSET_ID = 0;
-
 
7665
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
7666
 
-
 
7667
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
7668
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
7669
          new FieldValueMetaData(TType.BOOL)));
-
 
7670
    }});
-
 
7671
 
-
 
7672
    static {
-
 
7673
      FieldMetaData.addStructMetaDataMap(isCodAllowed_result.class, metaDataMap);
-
 
7674
    }
-
 
7675
 
-
 
7676
    public isCodAllowed_result() {
-
 
7677
    }
-
 
7678
 
-
 
7679
    public isCodAllowed_result(
-
 
7680
      boolean success)
-
 
7681
    {
-
 
7682
      this();
-
 
7683
      this.success = success;
-
 
7684
      setSuccessIsSet(true);
-
 
7685
    }
-
 
7686
 
-
 
7687
    /**
-
 
7688
     * Performs a deep copy on <i>other</i>.
-
 
7689
     */
-
 
7690
    public isCodAllowed_result(isCodAllowed_result other) {
-
 
7691
      __isset_bit_vector.clear();
-
 
7692
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
7693
      this.success = other.success;
-
 
7694
    }
-
 
7695
 
-
 
7696
    public isCodAllowed_result deepCopy() {
-
 
7697
      return new isCodAllowed_result(this);
-
 
7698
    }
-
 
7699
 
-
 
7700
    @Deprecated
-
 
7701
    public isCodAllowed_result clone() {
-
 
7702
      return new isCodAllowed_result(this);
-
 
7703
    }
-
 
7704
 
-
 
7705
    public boolean isSuccess() {
-
 
7706
      return this.success;
-
 
7707
    }
-
 
7708
 
-
 
7709
    public isCodAllowed_result setSuccess(boolean success) {
-
 
7710
      this.success = success;
-
 
7711
      setSuccessIsSet(true);
-
 
7712
      return this;
-
 
7713
    }
-
 
7714
 
-
 
7715
    public void unsetSuccess() {
-
 
7716
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
-
 
7717
    }
-
 
7718
 
-
 
7719
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
7720
    public boolean isSetSuccess() {
-
 
7721
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
-
 
7722
    }
-
 
7723
 
-
 
7724
    public void setSuccessIsSet(boolean value) {
-
 
7725
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
-
 
7726
    }
-
 
7727
 
-
 
7728
    public void setFieldValue(_Fields field, Object value) {
-
 
7729
      switch (field) {
-
 
7730
      case SUCCESS:
-
 
7731
        if (value == null) {
-
 
7732
          unsetSuccess();
-
 
7733
        } else {
-
 
7734
          setSuccess((Boolean)value);
-
 
7735
        }
-
 
7736
        break;
-
 
7737
 
-
 
7738
      }
-
 
7739
    }
-
 
7740
 
-
 
7741
    public void setFieldValue(int fieldID, Object value) {
-
 
7742
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
7743
    }
-
 
7744
 
-
 
7745
    public Object getFieldValue(_Fields field) {
-
 
7746
      switch (field) {
-
 
7747
      case SUCCESS:
-
 
7748
        return new Boolean(isSuccess());
-
 
7749
 
-
 
7750
      }
-
 
7751
      throw new IllegalStateException();
-
 
7752
    }
-
 
7753
 
-
 
7754
    public Object getFieldValue(int fieldId) {
-
 
7755
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
7756
    }
-
 
7757
 
-
 
7758
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
7759
    public boolean isSet(_Fields field) {
-
 
7760
      switch (field) {
-
 
7761
      case SUCCESS:
-
 
7762
        return isSetSuccess();
-
 
7763
      }
-
 
7764
      throw new IllegalStateException();
-
 
7765
    }
-
 
7766
 
-
 
7767
    public boolean isSet(int fieldID) {
-
 
7768
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
7769
    }
-
 
7770
 
-
 
7771
    @Override
-
 
7772
    public boolean equals(Object that) {
-
 
7773
      if (that == null)
-
 
7774
        return false;
-
 
7775
      if (that instanceof isCodAllowed_result)
-
 
7776
        return this.equals((isCodAllowed_result)that);
-
 
7777
      return false;
-
 
7778
    }
-
 
7779
 
-
 
7780
    public boolean equals(isCodAllowed_result that) {
-
 
7781
      if (that == null)
-
 
7782
        return false;
-
 
7783
 
-
 
7784
      boolean this_present_success = true;
-
 
7785
      boolean that_present_success = true;
-
 
7786
      if (this_present_success || that_present_success) {
-
 
7787
        if (!(this_present_success && that_present_success))
-
 
7788
          return false;
-
 
7789
        if (this.success != that.success)
-
 
7790
          return false;
-
 
7791
      }
-
 
7792
 
-
 
7793
      return true;
-
 
7794
    }
-
 
7795
 
-
 
7796
    @Override
-
 
7797
    public int hashCode() {
-
 
7798
      return 0;
-
 
7799
    }
-
 
7800
 
-
 
7801
    public int compareTo(isCodAllowed_result other) {
-
 
7802
      if (!getClass().equals(other.getClass())) {
-
 
7803
        return getClass().getName().compareTo(other.getClass().getName());
-
 
7804
      }
-
 
7805
 
-
 
7806
      int lastComparison = 0;
-
 
7807
      isCodAllowed_result typedOther = (isCodAllowed_result)other;
-
 
7808
 
-
 
7809
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
7810
      if (lastComparison != 0) {
-
 
7811
        return lastComparison;
-
 
7812
      }
-
 
7813
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
7814
      if (lastComparison != 0) {
-
 
7815
        return lastComparison;
-
 
7816
      }
-
 
7817
      return 0;
-
 
7818
    }
-
 
7819
 
-
 
7820
    public void read(TProtocol iprot) throws TException {
-
 
7821
      TField field;
-
 
7822
      iprot.readStructBegin();
-
 
7823
      while (true)
-
 
7824
      {
-
 
7825
        field = iprot.readFieldBegin();
-
 
7826
        if (field.type == TType.STOP) { 
-
 
7827
          break;
-
 
7828
        }
-
 
7829
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
7830
        if (fieldId == null) {
-
 
7831
          TProtocolUtil.skip(iprot, field.type);
-
 
7832
        } else {
-
 
7833
          switch (fieldId) {
-
 
7834
            case SUCCESS:
-
 
7835
              if (field.type == TType.BOOL) {
-
 
7836
                this.success = iprot.readBool();
-
 
7837
                setSuccessIsSet(true);
-
 
7838
              } else { 
-
 
7839
                TProtocolUtil.skip(iprot, field.type);
-
 
7840
              }
-
 
7841
              break;
-
 
7842
          }
-
 
7843
          iprot.readFieldEnd();
-
 
7844
        }
-
 
7845
      }
-
 
7846
      iprot.readStructEnd();
-
 
7847
      validate();
-
 
7848
    }
-
 
7849
 
-
 
7850
    public void write(TProtocol oprot) throws TException {
-
 
7851
      oprot.writeStructBegin(STRUCT_DESC);
-
 
7852
 
-
 
7853
      if (this.isSetSuccess()) {
-
 
7854
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
7855
        oprot.writeBool(this.success);
-
 
7856
        oprot.writeFieldEnd();
-
 
7857
      }
-
 
7858
      oprot.writeFieldStop();
-
 
7859
      oprot.writeStructEnd();
-
 
7860
    }
-
 
7861
 
-
 
7862
    @Override
-
 
7863
    public String toString() {
-
 
7864
      StringBuilder sb = new StringBuilder("isCodAllowed_result(");
-
 
7865
      boolean first = true;
-
 
7866
 
-
 
7867
      sb.append("success:");
-
 
7868
      sb.append(this.success);
-
 
7869
      first = false;
-
 
7870
      sb.append(")");
-
 
7871
      return sb.toString();
-
 
7872
    }
-
 
7873
 
7256
    public void validate() throws TException {
7874
    public void validate() throws TException {
7257
      // check for required fields
7875
      // check for required fields
7258
    }
7876
    }
7259
 
7877
 
7260
  }
7878
  }