Subversion Repositories SmartDukaan

Rev

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

Rev 3374 Rev 3385
Line 47... Line 47...
47
 
47
 
48
    public void trackCouponUsage(String couponCode, long transactionId, long userId) throws PromotionException, TException;
48
    public void trackCouponUsage(String couponCode, long transactionId, long userId) throws PromotionException, TException;
49
 
49
 
50
    public long getCouponUsageCountByUser(String couponCode, long userId) throws PromotionException, TException;
50
    public long getCouponUsageCountByUser(String couponCode, long userId) throws PromotionException, TException;
51
 
51
 
-
 
52
    /**
-
 
53
     * Returns a list of active coupons
-
 
54
     */
-
 
55
    public List<Coupon> getActiveCoupons() throws PromotionException, TException;
-
 
56
 
-
 
57
    /**
-
 
58
     * Returns the count of successful payments done using a given coupon
-
 
59
     * 
-
 
60
     * @param couponCode
-
 
61
     */
-
 
62
    public long getSuccessfulPaymentCountForCoupon(String couponCode) throws PromotionException, TException;
-
 
63
 
-
 
64
    /**
-
 
65
     * Returns the doc string of the rule module
-
 
66
     * 
-
 
67
     * @param ruleName
-
 
68
     */
-
 
69
    public String getRuleDocString(String ruleName) throws TException;
-
 
70
 
52
  }
71
  }
53
 
72
 
54
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
73
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
55
    public Client(TProtocol prot)
74
    public Client(TProtocol prot)
56
    {
75
    {
Line 339... Line 358...
339
        throw result.pex;
358
        throw result.pex;
340
      }
359
      }
341
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCouponUsageCountByUser failed: unknown result");
360
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCouponUsageCountByUser failed: unknown result");
342
    }
361
    }
343
 
362
 
-
 
363
    public List<Coupon> getActiveCoupons() throws PromotionException, TException
-
 
364
    {
-
 
365
      send_getActiveCoupons();
-
 
366
      return recv_getActiveCoupons();
-
 
367
    }
-
 
368
 
-
 
369
    public void send_getActiveCoupons() throws TException
-
 
370
    {
-
 
371
      oprot_.writeMessageBegin(new TMessage("getActiveCoupons", TMessageType.CALL, seqid_));
-
 
372
      getActiveCoupons_args args = new getActiveCoupons_args();
-
 
373
      args.write(oprot_);
-
 
374
      oprot_.writeMessageEnd();
-
 
375
      oprot_.getTransport().flush();
-
 
376
    }
-
 
377
 
-
 
378
    public List<Coupon> recv_getActiveCoupons() throws PromotionException, TException
-
 
379
    {
-
 
380
      TMessage msg = iprot_.readMessageBegin();
-
 
381
      if (msg.type == TMessageType.EXCEPTION) {
-
 
382
        TApplicationException x = TApplicationException.read(iprot_);
-
 
383
        iprot_.readMessageEnd();
-
 
384
        throw x;
-
 
385
      }
-
 
386
      getActiveCoupons_result result = new getActiveCoupons_result();
-
 
387
      result.read(iprot_);
-
 
388
      iprot_.readMessageEnd();
-
 
389
      if (result.isSetSuccess()) {
-
 
390
        return result.success;
-
 
391
      }
-
 
392
      if (result.pex != null) {
-
 
393
        throw result.pex;
-
 
394
      }
-
 
395
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getActiveCoupons failed: unknown result");
-
 
396
    }
-
 
397
 
-
 
398
    public long getSuccessfulPaymentCountForCoupon(String couponCode) throws PromotionException, TException
-
 
399
    {
-
 
400
      send_getSuccessfulPaymentCountForCoupon(couponCode);
-
 
401
      return recv_getSuccessfulPaymentCountForCoupon();
-
 
402
    }
-
 
403
 
-
 
404
    public void send_getSuccessfulPaymentCountForCoupon(String couponCode) throws TException
-
 
405
    {
-
 
406
      oprot_.writeMessageBegin(new TMessage("getSuccessfulPaymentCountForCoupon", TMessageType.CALL, seqid_));
-
 
407
      getSuccessfulPaymentCountForCoupon_args args = new getSuccessfulPaymentCountForCoupon_args();
-
 
408
      args.couponCode = couponCode;
-
 
409
      args.write(oprot_);
-
 
410
      oprot_.writeMessageEnd();
-
 
411
      oprot_.getTransport().flush();
-
 
412
    }
-
 
413
 
-
 
414
    public long recv_getSuccessfulPaymentCountForCoupon() throws PromotionException, TException
-
 
415
    {
-
 
416
      TMessage msg = iprot_.readMessageBegin();
-
 
417
      if (msg.type == TMessageType.EXCEPTION) {
-
 
418
        TApplicationException x = TApplicationException.read(iprot_);
-
 
419
        iprot_.readMessageEnd();
-
 
420
        throw x;
-
 
421
      }
-
 
422
      getSuccessfulPaymentCountForCoupon_result result = new getSuccessfulPaymentCountForCoupon_result();
-
 
423
      result.read(iprot_);
-
 
424
      iprot_.readMessageEnd();
-
 
425
      if (result.isSetSuccess()) {
-
 
426
        return result.success;
-
 
427
      }
-
 
428
      if (result.pex != null) {
-
 
429
        throw result.pex;
-
 
430
      }
-
 
431
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getSuccessfulPaymentCountForCoupon failed: unknown result");
-
 
432
    }
-
 
433
 
-
 
434
    public String getRuleDocString(String ruleName) throws TException
-
 
435
    {
-
 
436
      send_getRuleDocString(ruleName);
-
 
437
      return recv_getRuleDocString();
-
 
438
    }
-
 
439
 
-
 
440
    public void send_getRuleDocString(String ruleName) throws TException
-
 
441
    {
-
 
442
      oprot_.writeMessageBegin(new TMessage("getRuleDocString", TMessageType.CALL, seqid_));
-
 
443
      getRuleDocString_args args = new getRuleDocString_args();
-
 
444
      args.ruleName = ruleName;
-
 
445
      args.write(oprot_);
-
 
446
      oprot_.writeMessageEnd();
-
 
447
      oprot_.getTransport().flush();
-
 
448
    }
-
 
449
 
-
 
450
    public String recv_getRuleDocString() throws TException
-
 
451
    {
-
 
452
      TMessage msg = iprot_.readMessageBegin();
-
 
453
      if (msg.type == TMessageType.EXCEPTION) {
-
 
454
        TApplicationException x = TApplicationException.read(iprot_);
-
 
455
        iprot_.readMessageEnd();
-
 
456
        throw x;
-
 
457
      }
-
 
458
      getRuleDocString_result result = new getRuleDocString_result();
-
 
459
      result.read(iprot_);
-
 
460
      iprot_.readMessageEnd();
-
 
461
      if (result.isSetSuccess()) {
-
 
462
        return result.success;
-
 
463
      }
-
 
464
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getRuleDocString failed: unknown result");
-
 
465
    }
-
 
466
 
344
  }
467
  }
345
  public static class Processor extends in.shop2020.generic.GenericService.Processor implements TProcessor {
468
  public static class Processor extends in.shop2020.generic.GenericService.Processor implements TProcessor {
346
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
469
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
347
    public Processor(Iface iface)
470
    public Processor(Iface iface)
348
    {
471
    {
Line 354... Line 477...
354
      processMap_.put("getPromotionById", new getPromotionById());
477
      processMap_.put("getPromotionById", new getPromotionById());
355
      processMap_.put("generateCouponsForPromotion", new generateCouponsForPromotion());
478
      processMap_.put("generateCouponsForPromotion", new generateCouponsForPromotion());
356
      processMap_.put("applyCoupon", new applyCoupon());
479
      processMap_.put("applyCoupon", new applyCoupon());
357
      processMap_.put("trackCouponUsage", new trackCouponUsage());
480
      processMap_.put("trackCouponUsage", new trackCouponUsage());
358
      processMap_.put("getCouponUsageCountByUser", new getCouponUsageCountByUser());
481
      processMap_.put("getCouponUsageCountByUser", new getCouponUsageCountByUser());
-
 
482
      processMap_.put("getActiveCoupons", new getActiveCoupons());
-
 
483
      processMap_.put("getSuccessfulPaymentCountForCoupon", new getSuccessfulPaymentCountForCoupon());
-
 
484
      processMap_.put("getRuleDocString", new getRuleDocString());
359
    }
485
    }
360
 
486
 
361
    private Iface iface_;
487
    private Iface iface_;
362
 
488
 
363
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
489
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
Line 589... Line 715...
589
        oprot.getTransport().flush();
715
        oprot.getTransport().flush();
590
      }
716
      }
591
 
717
 
592
    }
718
    }
593
 
719
 
-
 
720
    private class getActiveCoupons implements ProcessFunction {
-
 
721
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
722
      {
-
 
723
        getActiveCoupons_args args = new getActiveCoupons_args();
-
 
724
        args.read(iprot);
-
 
725
        iprot.readMessageEnd();
-
 
726
        getActiveCoupons_result result = new getActiveCoupons_result();
-
 
727
        try {
-
 
728
          result.success = iface_.getActiveCoupons();
-
 
729
        } catch (PromotionException pex) {
-
 
730
          result.pex = pex;
-
 
731
        } catch (Throwable th) {
-
 
732
          LOGGER.error("Internal error processing getActiveCoupons", th);
-
 
733
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getActiveCoupons");
-
 
734
          oprot.writeMessageBegin(new TMessage("getActiveCoupons", TMessageType.EXCEPTION, seqid));
-
 
735
          x.write(oprot);
-
 
736
          oprot.writeMessageEnd();
-
 
737
          oprot.getTransport().flush();
-
 
738
          return;
-
 
739
        }
-
 
740
        oprot.writeMessageBegin(new TMessage("getActiveCoupons", TMessageType.REPLY, seqid));
-
 
741
        result.write(oprot);
-
 
742
        oprot.writeMessageEnd();
-
 
743
        oprot.getTransport().flush();
-
 
744
      }
-
 
745
 
-
 
746
    }
-
 
747
 
-
 
748
    private class getSuccessfulPaymentCountForCoupon implements ProcessFunction {
-
 
749
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
750
      {
-
 
751
        getSuccessfulPaymentCountForCoupon_args args = new getSuccessfulPaymentCountForCoupon_args();
-
 
752
        args.read(iprot);
-
 
753
        iprot.readMessageEnd();
-
 
754
        getSuccessfulPaymentCountForCoupon_result result = new getSuccessfulPaymentCountForCoupon_result();
-
 
755
        try {
-
 
756
          result.success = iface_.getSuccessfulPaymentCountForCoupon(args.couponCode);
-
 
757
          result.setSuccessIsSet(true);
-
 
758
        } catch (PromotionException pex) {
-
 
759
          result.pex = pex;
-
 
760
        } catch (Throwable th) {
-
 
761
          LOGGER.error("Internal error processing getSuccessfulPaymentCountForCoupon", th);
-
 
762
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getSuccessfulPaymentCountForCoupon");
-
 
763
          oprot.writeMessageBegin(new TMessage("getSuccessfulPaymentCountForCoupon", TMessageType.EXCEPTION, seqid));
-
 
764
          x.write(oprot);
-
 
765
          oprot.writeMessageEnd();
-
 
766
          oprot.getTransport().flush();
-
 
767
          return;
-
 
768
        }
-
 
769
        oprot.writeMessageBegin(new TMessage("getSuccessfulPaymentCountForCoupon", TMessageType.REPLY, seqid));
-
 
770
        result.write(oprot);
-
 
771
        oprot.writeMessageEnd();
-
 
772
        oprot.getTransport().flush();
-
 
773
      }
-
 
774
 
-
 
775
    }
-
 
776
 
-
 
777
    private class getRuleDocString implements ProcessFunction {
-
 
778
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
779
      {
-
 
780
        getRuleDocString_args args = new getRuleDocString_args();
-
 
781
        args.read(iprot);
-
 
782
        iprot.readMessageEnd();
-
 
783
        getRuleDocString_result result = new getRuleDocString_result();
-
 
784
        result.success = iface_.getRuleDocString(args.ruleName);
-
 
785
        oprot.writeMessageBegin(new TMessage("getRuleDocString", TMessageType.REPLY, seqid));
-
 
786
        result.write(oprot);
-
 
787
        oprot.writeMessageEnd();
-
 
788
        oprot.getTransport().flush();
-
 
789
      }
-
 
790
 
-
 
791
    }
-
 
792
 
594
  }
793
  }
595
 
794
 
596
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
795
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
597
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
796
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
598
 
797
 
Line 5822... Line 6021...
5822
      }
6021
      }
5823
      first = false;
6022
      first = false;
5824
      sb.append(")");
6023
      sb.append(")");
5825
      return sb.toString();
6024
      return sb.toString();
5826
    }
6025
    }
-
 
6026
 
-
 
6027
    public void validate() throws TException {
-
 
6028
      // check for required fields
-
 
6029
    }
-
 
6030
 
-
 
6031
  }
-
 
6032
 
-
 
6033
  public static class getActiveCoupons_args implements TBase<getActiveCoupons_args._Fields>, java.io.Serializable, Cloneable, Comparable<getActiveCoupons_args>   {
-
 
6034
    private static final TStruct STRUCT_DESC = new TStruct("getActiveCoupons_args");
-
 
6035
 
-
 
6036
 
-
 
6037
 
-
 
6038
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
6039
    public enum _Fields implements TFieldIdEnum {
-
 
6040
;
-
 
6041
 
-
 
6042
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
6043
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
6044
 
-
 
6045
      static {
-
 
6046
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
6047
          byId.put((int)field._thriftId, field);
-
 
6048
          byName.put(field.getFieldName(), field);
-
 
6049
        }
-
 
6050
      }
-
 
6051
 
-
 
6052
      /**
-
 
6053
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
6054
       */
-
 
6055
      public static _Fields findByThriftId(int fieldId) {
-
 
6056
        return byId.get(fieldId);
-
 
6057
      }
-
 
6058
 
-
 
6059
      /**
-
 
6060
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
6061
       * if it is not found.
-
 
6062
       */
-
 
6063
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
6064
        _Fields fields = findByThriftId(fieldId);
-
 
6065
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
6066
        return fields;
-
 
6067
      }
-
 
6068
 
-
 
6069
      /**
-
 
6070
       * Find the _Fields constant that matches name, or null if its not found.
-
 
6071
       */
-
 
6072
      public static _Fields findByName(String name) {
-
 
6073
        return byName.get(name);
-
 
6074
      }
-
 
6075
 
-
 
6076
      private final short _thriftId;
-
 
6077
      private final String _fieldName;
-
 
6078
 
-
 
6079
      _Fields(short thriftId, String fieldName) {
-
 
6080
        _thriftId = thriftId;
-
 
6081
        _fieldName = fieldName;
-
 
6082
      }
-
 
6083
 
-
 
6084
      public short getThriftFieldId() {
-
 
6085
        return _thriftId;
-
 
6086
      }
-
 
6087
 
-
 
6088
      public String getFieldName() {
-
 
6089
        return _fieldName;
-
 
6090
      }
-
 
6091
    }
-
 
6092
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
6093
    }});
-
 
6094
 
-
 
6095
    static {
-
 
6096
      FieldMetaData.addStructMetaDataMap(getActiveCoupons_args.class, metaDataMap);
-
 
6097
    }
-
 
6098
 
-
 
6099
    public getActiveCoupons_args() {
-
 
6100
    }
-
 
6101
 
-
 
6102
    /**
-
 
6103
     * Performs a deep copy on <i>other</i>.
-
 
6104
     */
-
 
6105
    public getActiveCoupons_args(getActiveCoupons_args other) {
-
 
6106
    }
-
 
6107
 
-
 
6108
    public getActiveCoupons_args deepCopy() {
-
 
6109
      return new getActiveCoupons_args(this);
-
 
6110
    }
-
 
6111
 
-
 
6112
    @Deprecated
-
 
6113
    public getActiveCoupons_args clone() {
-
 
6114
      return new getActiveCoupons_args(this);
-
 
6115
    }
-
 
6116
 
-
 
6117
    public void setFieldValue(_Fields field, Object value) {
-
 
6118
      switch (field) {
-
 
6119
      }
-
 
6120
    }
-
 
6121
 
-
 
6122
    public void setFieldValue(int fieldID, Object value) {
-
 
6123
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
6124
    }
-
 
6125
 
-
 
6126
    public Object getFieldValue(_Fields field) {
-
 
6127
      switch (field) {
-
 
6128
      }
-
 
6129
      throw new IllegalStateException();
-
 
6130
    }
-
 
6131
 
-
 
6132
    public Object getFieldValue(int fieldId) {
-
 
6133
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
6134
    }
-
 
6135
 
-
 
6136
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
6137
    public boolean isSet(_Fields field) {
-
 
6138
      switch (field) {
-
 
6139
      }
-
 
6140
      throw new IllegalStateException();
-
 
6141
    }
-
 
6142
 
-
 
6143
    public boolean isSet(int fieldID) {
-
 
6144
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
6145
    }
-
 
6146
 
-
 
6147
    @Override
-
 
6148
    public boolean equals(Object that) {
-
 
6149
      if (that == null)
-
 
6150
        return false;
-
 
6151
      if (that instanceof getActiveCoupons_args)
-
 
6152
        return this.equals((getActiveCoupons_args)that);
-
 
6153
      return false;
-
 
6154
    }
-
 
6155
 
-
 
6156
    public boolean equals(getActiveCoupons_args that) {
-
 
6157
      if (that == null)
-
 
6158
        return false;
-
 
6159
 
-
 
6160
      return true;
-
 
6161
    }
-
 
6162
 
-
 
6163
    @Override
-
 
6164
    public int hashCode() {
-
 
6165
      return 0;
-
 
6166
    }
-
 
6167
 
-
 
6168
    public int compareTo(getActiveCoupons_args other) {
-
 
6169
      if (!getClass().equals(other.getClass())) {
-
 
6170
        return getClass().getName().compareTo(other.getClass().getName());
-
 
6171
      }
-
 
6172
 
-
 
6173
      int lastComparison = 0;
-
 
6174
      getActiveCoupons_args typedOther = (getActiveCoupons_args)other;
-
 
6175
 
-
 
6176
      return 0;
-
 
6177
    }
-
 
6178
 
-
 
6179
    public void read(TProtocol iprot) throws TException {
-
 
6180
      TField field;
-
 
6181
      iprot.readStructBegin();
-
 
6182
      while (true)
-
 
6183
      {
-
 
6184
        field = iprot.readFieldBegin();
-
 
6185
        if (field.type == TType.STOP) { 
-
 
6186
          break;
-
 
6187
        }
-
 
6188
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
6189
        if (fieldId == null) {
-
 
6190
          TProtocolUtil.skip(iprot, field.type);
-
 
6191
        } else {
-
 
6192
          switch (fieldId) {
-
 
6193
          }
-
 
6194
          iprot.readFieldEnd();
-
 
6195
        }
-
 
6196
      }
-
 
6197
      iprot.readStructEnd();
-
 
6198
      validate();
-
 
6199
    }
-
 
6200
 
-
 
6201
    public void write(TProtocol oprot) throws TException {
-
 
6202
      validate();
-
 
6203
 
-
 
6204
      oprot.writeStructBegin(STRUCT_DESC);
-
 
6205
      oprot.writeFieldStop();
-
 
6206
      oprot.writeStructEnd();
-
 
6207
    }
-
 
6208
 
-
 
6209
    @Override
-
 
6210
    public String toString() {
-
 
6211
      StringBuilder sb = new StringBuilder("getActiveCoupons_args(");
-
 
6212
      boolean first = true;
-
 
6213
 
-
 
6214
      sb.append(")");
-
 
6215
      return sb.toString();
-
 
6216
    }
-
 
6217
 
-
 
6218
    public void validate() throws TException {
-
 
6219
      // check for required fields
-
 
6220
    }
-
 
6221
 
-
 
6222
  }
-
 
6223
 
-
 
6224
  public static class getActiveCoupons_result implements TBase<getActiveCoupons_result._Fields>, java.io.Serializable, Cloneable, Comparable<getActiveCoupons_result>   {
-
 
6225
    private static final TStruct STRUCT_DESC = new TStruct("getActiveCoupons_result");
-
 
6226
 
-
 
6227
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
-
 
6228
    private static final TField PEX_FIELD_DESC = new TField("pex", TType.STRUCT, (short)1);
-
 
6229
 
-
 
6230
    private List<Coupon> success;
-
 
6231
    private PromotionException pex;
-
 
6232
 
-
 
6233
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
6234
    public enum _Fields implements TFieldIdEnum {
-
 
6235
      SUCCESS((short)0, "success"),
-
 
6236
      PEX((short)1, "pex");
-
 
6237
 
-
 
6238
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
6239
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
6240
 
-
 
6241
      static {
-
 
6242
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
6243
          byId.put((int)field._thriftId, field);
-
 
6244
          byName.put(field.getFieldName(), field);
-
 
6245
        }
-
 
6246
      }
-
 
6247
 
-
 
6248
      /**
-
 
6249
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
6250
       */
-
 
6251
      public static _Fields findByThriftId(int fieldId) {
-
 
6252
        return byId.get(fieldId);
-
 
6253
      }
-
 
6254
 
-
 
6255
      /**
-
 
6256
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
6257
       * if it is not found.
-
 
6258
       */
-
 
6259
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
6260
        _Fields fields = findByThriftId(fieldId);
-
 
6261
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
6262
        return fields;
-
 
6263
      }
-
 
6264
 
-
 
6265
      /**
-
 
6266
       * Find the _Fields constant that matches name, or null if its not found.
-
 
6267
       */
-
 
6268
      public static _Fields findByName(String name) {
-
 
6269
        return byName.get(name);
-
 
6270
      }
-
 
6271
 
-
 
6272
      private final short _thriftId;
-
 
6273
      private final String _fieldName;
-
 
6274
 
-
 
6275
      _Fields(short thriftId, String fieldName) {
-
 
6276
        _thriftId = thriftId;
-
 
6277
        _fieldName = fieldName;
-
 
6278
      }
-
 
6279
 
-
 
6280
      public short getThriftFieldId() {
-
 
6281
        return _thriftId;
-
 
6282
      }
-
 
6283
 
-
 
6284
      public String getFieldName() {
-
 
6285
        return _fieldName;
-
 
6286
      }
-
 
6287
    }
-
 
6288
 
-
 
6289
    // isset id assignments
-
 
6290
 
-
 
6291
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
6292
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
6293
          new ListMetaData(TType.LIST, 
-
 
6294
              new StructMetaData(TType.STRUCT, Coupon.class))));
-
 
6295
      put(_Fields.PEX, new FieldMetaData("pex", TFieldRequirementType.DEFAULT, 
-
 
6296
          new FieldValueMetaData(TType.STRUCT)));
-
 
6297
    }});
-
 
6298
 
-
 
6299
    static {
-
 
6300
      FieldMetaData.addStructMetaDataMap(getActiveCoupons_result.class, metaDataMap);
-
 
6301
    }
-
 
6302
 
-
 
6303
    public getActiveCoupons_result() {
-
 
6304
    }
-
 
6305
 
-
 
6306
    public getActiveCoupons_result(
-
 
6307
      List<Coupon> success,
-
 
6308
      PromotionException pex)
-
 
6309
    {
-
 
6310
      this();
-
 
6311
      this.success = success;
-
 
6312
      this.pex = pex;
-
 
6313
    }
-
 
6314
 
-
 
6315
    /**
-
 
6316
     * Performs a deep copy on <i>other</i>.
-
 
6317
     */
-
 
6318
    public getActiveCoupons_result(getActiveCoupons_result other) {
-
 
6319
      if (other.isSetSuccess()) {
-
 
6320
        List<Coupon> __this__success = new ArrayList<Coupon>();
-
 
6321
        for (Coupon other_element : other.success) {
-
 
6322
          __this__success.add(new Coupon(other_element));
-
 
6323
        }
-
 
6324
        this.success = __this__success;
-
 
6325
      }
-
 
6326
      if (other.isSetPex()) {
-
 
6327
        this.pex = new PromotionException(other.pex);
-
 
6328
      }
-
 
6329
    }
-
 
6330
 
-
 
6331
    public getActiveCoupons_result deepCopy() {
-
 
6332
      return new getActiveCoupons_result(this);
-
 
6333
    }
-
 
6334
 
-
 
6335
    @Deprecated
-
 
6336
    public getActiveCoupons_result clone() {
-
 
6337
      return new getActiveCoupons_result(this);
-
 
6338
    }
-
 
6339
 
-
 
6340
    public int getSuccessSize() {
-
 
6341
      return (this.success == null) ? 0 : this.success.size();
-
 
6342
    }
-
 
6343
 
-
 
6344
    public java.util.Iterator<Coupon> getSuccessIterator() {
-
 
6345
      return (this.success == null) ? null : this.success.iterator();
-
 
6346
    }
-
 
6347
 
-
 
6348
    public void addToSuccess(Coupon elem) {
-
 
6349
      if (this.success == null) {
-
 
6350
        this.success = new ArrayList<Coupon>();
-
 
6351
      }
-
 
6352
      this.success.add(elem);
-
 
6353
    }
-
 
6354
 
-
 
6355
    public List<Coupon> getSuccess() {
-
 
6356
      return this.success;
-
 
6357
    }
-
 
6358
 
-
 
6359
    public getActiveCoupons_result setSuccess(List<Coupon> success) {
-
 
6360
      this.success = success;
-
 
6361
      return this;
-
 
6362
    }
-
 
6363
 
-
 
6364
    public void unsetSuccess() {
-
 
6365
      this.success = null;
-
 
6366
    }
-
 
6367
 
-
 
6368
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
6369
    public boolean isSetSuccess() {
-
 
6370
      return this.success != null;
-
 
6371
    }
-
 
6372
 
-
 
6373
    public void setSuccessIsSet(boolean value) {
-
 
6374
      if (!value) {
-
 
6375
        this.success = null;
-
 
6376
      }
-
 
6377
    }
-
 
6378
 
-
 
6379
    public PromotionException getPex() {
-
 
6380
      return this.pex;
-
 
6381
    }
-
 
6382
 
-
 
6383
    public getActiveCoupons_result setPex(PromotionException pex) {
-
 
6384
      this.pex = pex;
-
 
6385
      return this;
-
 
6386
    }
-
 
6387
 
-
 
6388
    public void unsetPex() {
-
 
6389
      this.pex = null;
-
 
6390
    }
-
 
6391
 
-
 
6392
    /** Returns true if field pex is set (has been asigned a value) and false otherwise */
-
 
6393
    public boolean isSetPex() {
-
 
6394
      return this.pex != null;
-
 
6395
    }
-
 
6396
 
-
 
6397
    public void setPexIsSet(boolean value) {
-
 
6398
      if (!value) {
-
 
6399
        this.pex = null;
-
 
6400
      }
-
 
6401
    }
-
 
6402
 
-
 
6403
    public void setFieldValue(_Fields field, Object value) {
-
 
6404
      switch (field) {
-
 
6405
      case SUCCESS:
-
 
6406
        if (value == null) {
-
 
6407
          unsetSuccess();
-
 
6408
        } else {
-
 
6409
          setSuccess((List<Coupon>)value);
-
 
6410
        }
-
 
6411
        break;
-
 
6412
 
-
 
6413
      case PEX:
-
 
6414
        if (value == null) {
-
 
6415
          unsetPex();
-
 
6416
        } else {
-
 
6417
          setPex((PromotionException)value);
-
 
6418
        }
-
 
6419
        break;
-
 
6420
 
-
 
6421
      }
-
 
6422
    }
-
 
6423
 
-
 
6424
    public void setFieldValue(int fieldID, Object value) {
-
 
6425
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
6426
    }
-
 
6427
 
-
 
6428
    public Object getFieldValue(_Fields field) {
-
 
6429
      switch (field) {
-
 
6430
      case SUCCESS:
-
 
6431
        return getSuccess();
-
 
6432
 
-
 
6433
      case PEX:
-
 
6434
        return getPex();
-
 
6435
 
-
 
6436
      }
-
 
6437
      throw new IllegalStateException();
-
 
6438
    }
-
 
6439
 
-
 
6440
    public Object getFieldValue(int fieldId) {
-
 
6441
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
6442
    }
-
 
6443
 
-
 
6444
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
6445
    public boolean isSet(_Fields field) {
-
 
6446
      switch (field) {
-
 
6447
      case SUCCESS:
-
 
6448
        return isSetSuccess();
-
 
6449
      case PEX:
-
 
6450
        return isSetPex();
-
 
6451
      }
-
 
6452
      throw new IllegalStateException();
-
 
6453
    }
-
 
6454
 
-
 
6455
    public boolean isSet(int fieldID) {
-
 
6456
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
6457
    }
-
 
6458
 
-
 
6459
    @Override
-
 
6460
    public boolean equals(Object that) {
-
 
6461
      if (that == null)
-
 
6462
        return false;
-
 
6463
      if (that instanceof getActiveCoupons_result)
-
 
6464
        return this.equals((getActiveCoupons_result)that);
-
 
6465
      return false;
-
 
6466
    }
-
 
6467
 
-
 
6468
    public boolean equals(getActiveCoupons_result that) {
-
 
6469
      if (that == null)
-
 
6470
        return false;
-
 
6471
 
-
 
6472
      boolean this_present_success = true && this.isSetSuccess();
-
 
6473
      boolean that_present_success = true && that.isSetSuccess();
-
 
6474
      if (this_present_success || that_present_success) {
-
 
6475
        if (!(this_present_success && that_present_success))
-
 
6476
          return false;
-
 
6477
        if (!this.success.equals(that.success))
-
 
6478
          return false;
-
 
6479
      }
-
 
6480
 
-
 
6481
      boolean this_present_pex = true && this.isSetPex();
-
 
6482
      boolean that_present_pex = true && that.isSetPex();
-
 
6483
      if (this_present_pex || that_present_pex) {
-
 
6484
        if (!(this_present_pex && that_present_pex))
-
 
6485
          return false;
-
 
6486
        if (!this.pex.equals(that.pex))
-
 
6487
          return false;
-
 
6488
      }
-
 
6489
 
-
 
6490
      return true;
-
 
6491
    }
-
 
6492
 
-
 
6493
    @Override
-
 
6494
    public int hashCode() {
-
 
6495
      return 0;
-
 
6496
    }
-
 
6497
 
-
 
6498
    public int compareTo(getActiveCoupons_result other) {
-
 
6499
      if (!getClass().equals(other.getClass())) {
-
 
6500
        return getClass().getName().compareTo(other.getClass().getName());
-
 
6501
      }
-
 
6502
 
-
 
6503
      int lastComparison = 0;
-
 
6504
      getActiveCoupons_result typedOther = (getActiveCoupons_result)other;
-
 
6505
 
-
 
6506
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
6507
      if (lastComparison != 0) {
-
 
6508
        return lastComparison;
-
 
6509
      }
-
 
6510
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
6511
      if (lastComparison != 0) {
-
 
6512
        return lastComparison;
-
 
6513
      }
-
 
6514
      lastComparison = Boolean.valueOf(isSetPex()).compareTo(isSetPex());
-
 
6515
      if (lastComparison != 0) {
-
 
6516
        return lastComparison;
-
 
6517
      }
-
 
6518
      lastComparison = TBaseHelper.compareTo(pex, typedOther.pex);
-
 
6519
      if (lastComparison != 0) {
-
 
6520
        return lastComparison;
-
 
6521
      }
-
 
6522
      return 0;
-
 
6523
    }
-
 
6524
 
-
 
6525
    public void read(TProtocol iprot) throws TException {
-
 
6526
      TField field;
-
 
6527
      iprot.readStructBegin();
-
 
6528
      while (true)
-
 
6529
      {
-
 
6530
        field = iprot.readFieldBegin();
-
 
6531
        if (field.type == TType.STOP) { 
-
 
6532
          break;
-
 
6533
        }
-
 
6534
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
6535
        if (fieldId == null) {
-
 
6536
          TProtocolUtil.skip(iprot, field.type);
-
 
6537
        } else {
-
 
6538
          switch (fieldId) {
-
 
6539
            case SUCCESS:
-
 
6540
              if (field.type == TType.LIST) {
-
 
6541
                {
-
 
6542
                  TList _list16 = iprot.readListBegin();
-
 
6543
                  this.success = new ArrayList<Coupon>(_list16.size);
-
 
6544
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
-
 
6545
                  {
-
 
6546
                    Coupon _elem18;
-
 
6547
                    _elem18 = new Coupon();
-
 
6548
                    _elem18.read(iprot);
-
 
6549
                    this.success.add(_elem18);
-
 
6550
                  }
-
 
6551
                  iprot.readListEnd();
-
 
6552
                }
-
 
6553
              } else { 
-
 
6554
                TProtocolUtil.skip(iprot, field.type);
-
 
6555
              }
-
 
6556
              break;
-
 
6557
            case PEX:
-
 
6558
              if (field.type == TType.STRUCT) {
-
 
6559
                this.pex = new PromotionException();
-
 
6560
                this.pex.read(iprot);
-
 
6561
              } else { 
-
 
6562
                TProtocolUtil.skip(iprot, field.type);
-
 
6563
              }
-
 
6564
              break;
-
 
6565
          }
-
 
6566
          iprot.readFieldEnd();
-
 
6567
        }
-
 
6568
      }
-
 
6569
      iprot.readStructEnd();
-
 
6570
      validate();
-
 
6571
    }
-
 
6572
 
-
 
6573
    public void write(TProtocol oprot) throws TException {
-
 
6574
      oprot.writeStructBegin(STRUCT_DESC);
-
 
6575
 
-
 
6576
      if (this.isSetSuccess()) {
-
 
6577
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
6578
        {
-
 
6579
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
-
 
6580
          for (Coupon _iter19 : this.success)
-
 
6581
          {
-
 
6582
            _iter19.write(oprot);
-
 
6583
          }
-
 
6584
          oprot.writeListEnd();
-
 
6585
        }
-
 
6586
        oprot.writeFieldEnd();
-
 
6587
      } else if (this.isSetPex()) {
-
 
6588
        oprot.writeFieldBegin(PEX_FIELD_DESC);
-
 
6589
        this.pex.write(oprot);
-
 
6590
        oprot.writeFieldEnd();
-
 
6591
      }
-
 
6592
      oprot.writeFieldStop();
-
 
6593
      oprot.writeStructEnd();
-
 
6594
    }
-
 
6595
 
-
 
6596
    @Override
-
 
6597
    public String toString() {
-
 
6598
      StringBuilder sb = new StringBuilder("getActiveCoupons_result(");
-
 
6599
      boolean first = true;
-
 
6600
 
-
 
6601
      sb.append("success:");
-
 
6602
      if (this.success == null) {
-
 
6603
        sb.append("null");
-
 
6604
      } else {
-
 
6605
        sb.append(this.success);
-
 
6606
      }
-
 
6607
      first = false;
-
 
6608
      if (!first) sb.append(", ");
-
 
6609
      sb.append("pex:");
-
 
6610
      if (this.pex == null) {
-
 
6611
        sb.append("null");
-
 
6612
      } else {
-
 
6613
        sb.append(this.pex);
-
 
6614
      }
-
 
6615
      first = false;
-
 
6616
      sb.append(")");
-
 
6617
      return sb.toString();
-
 
6618
    }
-
 
6619
 
-
 
6620
    public void validate() throws TException {
-
 
6621
      // check for required fields
-
 
6622
    }
-
 
6623
 
-
 
6624
  }
-
 
6625
 
-
 
6626
  public static class getSuccessfulPaymentCountForCoupon_args implements TBase<getSuccessfulPaymentCountForCoupon_args._Fields>, java.io.Serializable, Cloneable, Comparable<getSuccessfulPaymentCountForCoupon_args>   {
-
 
6627
    private static final TStruct STRUCT_DESC = new TStruct("getSuccessfulPaymentCountForCoupon_args");
-
 
6628
 
-
 
6629
    private static final TField COUPON_CODE_FIELD_DESC = new TField("couponCode", TType.STRING, (short)1);
-
 
6630
 
-
 
6631
    private String couponCode;
-
 
6632
 
-
 
6633
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
6634
    public enum _Fields implements TFieldIdEnum {
-
 
6635
      COUPON_CODE((short)1, "couponCode");
-
 
6636
 
-
 
6637
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
6638
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
6639
 
-
 
6640
      static {
-
 
6641
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
6642
          byId.put((int)field._thriftId, field);
-
 
6643
          byName.put(field.getFieldName(), field);
-
 
6644
        }
-
 
6645
      }
-
 
6646
 
-
 
6647
      /**
-
 
6648
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
6649
       */
-
 
6650
      public static _Fields findByThriftId(int fieldId) {
-
 
6651
        return byId.get(fieldId);
-
 
6652
      }
-
 
6653
 
-
 
6654
      /**
-
 
6655
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
6656
       * if it is not found.
-
 
6657
       */
-
 
6658
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
6659
        _Fields fields = findByThriftId(fieldId);
-
 
6660
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
6661
        return fields;
-
 
6662
      }
-
 
6663
 
-
 
6664
      /**
-
 
6665
       * Find the _Fields constant that matches name, or null if its not found.
-
 
6666
       */
-
 
6667
      public static _Fields findByName(String name) {
-
 
6668
        return byName.get(name);
-
 
6669
      }
-
 
6670
 
-
 
6671
      private final short _thriftId;
-
 
6672
      private final String _fieldName;
-
 
6673
 
-
 
6674
      _Fields(short thriftId, String fieldName) {
-
 
6675
        _thriftId = thriftId;
-
 
6676
        _fieldName = fieldName;
-
 
6677
      }
-
 
6678
 
-
 
6679
      public short getThriftFieldId() {
-
 
6680
        return _thriftId;
-
 
6681
      }
-
 
6682
 
-
 
6683
      public String getFieldName() {
-
 
6684
        return _fieldName;
-
 
6685
      }
-
 
6686
    }
-
 
6687
 
-
 
6688
    // isset id assignments
-
 
6689
 
-
 
6690
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
6691
      put(_Fields.COUPON_CODE, new FieldMetaData("couponCode", TFieldRequirementType.DEFAULT, 
-
 
6692
          new FieldValueMetaData(TType.STRING)));
-
 
6693
    }});
-
 
6694
 
-
 
6695
    static {
-
 
6696
      FieldMetaData.addStructMetaDataMap(getSuccessfulPaymentCountForCoupon_args.class, metaDataMap);
-
 
6697
    }
-
 
6698
 
-
 
6699
    public getSuccessfulPaymentCountForCoupon_args() {
-
 
6700
    }
-
 
6701
 
-
 
6702
    public getSuccessfulPaymentCountForCoupon_args(
-
 
6703
      String couponCode)
-
 
6704
    {
-
 
6705
      this();
-
 
6706
      this.couponCode = couponCode;
-
 
6707
    }
-
 
6708
 
-
 
6709
    /**
-
 
6710
     * Performs a deep copy on <i>other</i>.
-
 
6711
     */
-
 
6712
    public getSuccessfulPaymentCountForCoupon_args(getSuccessfulPaymentCountForCoupon_args other) {
-
 
6713
      if (other.isSetCouponCode()) {
-
 
6714
        this.couponCode = other.couponCode;
-
 
6715
      }
-
 
6716
    }
-
 
6717
 
-
 
6718
    public getSuccessfulPaymentCountForCoupon_args deepCopy() {
-
 
6719
      return new getSuccessfulPaymentCountForCoupon_args(this);
-
 
6720
    }
-
 
6721
 
-
 
6722
    @Deprecated
-
 
6723
    public getSuccessfulPaymentCountForCoupon_args clone() {
-
 
6724
      return new getSuccessfulPaymentCountForCoupon_args(this);
-
 
6725
    }
-
 
6726
 
-
 
6727
    public String getCouponCode() {
-
 
6728
      return this.couponCode;
-
 
6729
    }
-
 
6730
 
-
 
6731
    public getSuccessfulPaymentCountForCoupon_args setCouponCode(String couponCode) {
-
 
6732
      this.couponCode = couponCode;
-
 
6733
      return this;
-
 
6734
    }
-
 
6735
 
-
 
6736
    public void unsetCouponCode() {
-
 
6737
      this.couponCode = null;
-
 
6738
    }
-
 
6739
 
-
 
6740
    /** Returns true if field couponCode is set (has been asigned a value) and false otherwise */
-
 
6741
    public boolean isSetCouponCode() {
-
 
6742
      return this.couponCode != null;
-
 
6743
    }
-
 
6744
 
-
 
6745
    public void setCouponCodeIsSet(boolean value) {
-
 
6746
      if (!value) {
-
 
6747
        this.couponCode = null;
-
 
6748
      }
-
 
6749
    }
-
 
6750
 
-
 
6751
    public void setFieldValue(_Fields field, Object value) {
-
 
6752
      switch (field) {
-
 
6753
      case COUPON_CODE:
-
 
6754
        if (value == null) {
-
 
6755
          unsetCouponCode();
-
 
6756
        } else {
-
 
6757
          setCouponCode((String)value);
-
 
6758
        }
-
 
6759
        break;
-
 
6760
 
-
 
6761
      }
-
 
6762
    }
-
 
6763
 
-
 
6764
    public void setFieldValue(int fieldID, Object value) {
-
 
6765
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
6766
    }
-
 
6767
 
-
 
6768
    public Object getFieldValue(_Fields field) {
-
 
6769
      switch (field) {
-
 
6770
      case COUPON_CODE:
-
 
6771
        return getCouponCode();
-
 
6772
 
-
 
6773
      }
-
 
6774
      throw new IllegalStateException();
-
 
6775
    }
-
 
6776
 
-
 
6777
    public Object getFieldValue(int fieldId) {
-
 
6778
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
6779
    }
-
 
6780
 
-
 
6781
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
6782
    public boolean isSet(_Fields field) {
-
 
6783
      switch (field) {
-
 
6784
      case COUPON_CODE:
-
 
6785
        return isSetCouponCode();
-
 
6786
      }
-
 
6787
      throw new IllegalStateException();
-
 
6788
    }
-
 
6789
 
-
 
6790
    public boolean isSet(int fieldID) {
-
 
6791
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
6792
    }
-
 
6793
 
-
 
6794
    @Override
-
 
6795
    public boolean equals(Object that) {
-
 
6796
      if (that == null)
-
 
6797
        return false;
-
 
6798
      if (that instanceof getSuccessfulPaymentCountForCoupon_args)
-
 
6799
        return this.equals((getSuccessfulPaymentCountForCoupon_args)that);
-
 
6800
      return false;
-
 
6801
    }
-
 
6802
 
-
 
6803
    public boolean equals(getSuccessfulPaymentCountForCoupon_args that) {
-
 
6804
      if (that == null)
-
 
6805
        return false;
-
 
6806
 
-
 
6807
      boolean this_present_couponCode = true && this.isSetCouponCode();
-
 
6808
      boolean that_present_couponCode = true && that.isSetCouponCode();
-
 
6809
      if (this_present_couponCode || that_present_couponCode) {
-
 
6810
        if (!(this_present_couponCode && that_present_couponCode))
-
 
6811
          return false;
-
 
6812
        if (!this.couponCode.equals(that.couponCode))
-
 
6813
          return false;
-
 
6814
      }
-
 
6815
 
-
 
6816
      return true;
-
 
6817
    }
-
 
6818
 
-
 
6819
    @Override
-
 
6820
    public int hashCode() {
-
 
6821
      return 0;
-
 
6822
    }
-
 
6823
 
-
 
6824
    public int compareTo(getSuccessfulPaymentCountForCoupon_args other) {
-
 
6825
      if (!getClass().equals(other.getClass())) {
-
 
6826
        return getClass().getName().compareTo(other.getClass().getName());
-
 
6827
      }
-
 
6828
 
-
 
6829
      int lastComparison = 0;
-
 
6830
      getSuccessfulPaymentCountForCoupon_args typedOther = (getSuccessfulPaymentCountForCoupon_args)other;
-
 
6831
 
-
 
6832
      lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(isSetCouponCode());
-
 
6833
      if (lastComparison != 0) {
-
 
6834
        return lastComparison;
-
 
6835
      }
-
 
6836
      lastComparison = TBaseHelper.compareTo(couponCode, typedOther.couponCode);
-
 
6837
      if (lastComparison != 0) {
-
 
6838
        return lastComparison;
-
 
6839
      }
-
 
6840
      return 0;
-
 
6841
    }
-
 
6842
 
-
 
6843
    public void read(TProtocol iprot) throws TException {
-
 
6844
      TField field;
-
 
6845
      iprot.readStructBegin();
-
 
6846
      while (true)
-
 
6847
      {
-
 
6848
        field = iprot.readFieldBegin();
-
 
6849
        if (field.type == TType.STOP) { 
-
 
6850
          break;
-
 
6851
        }
-
 
6852
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
6853
        if (fieldId == null) {
-
 
6854
          TProtocolUtil.skip(iprot, field.type);
-
 
6855
        } else {
-
 
6856
          switch (fieldId) {
-
 
6857
            case COUPON_CODE:
-
 
6858
              if (field.type == TType.STRING) {
-
 
6859
                this.couponCode = iprot.readString();
-
 
6860
              } else { 
-
 
6861
                TProtocolUtil.skip(iprot, field.type);
-
 
6862
              }
-
 
6863
              break;
-
 
6864
          }
-
 
6865
          iprot.readFieldEnd();
-
 
6866
        }
-
 
6867
      }
-
 
6868
      iprot.readStructEnd();
-
 
6869
      validate();
-
 
6870
    }
-
 
6871
 
-
 
6872
    public void write(TProtocol oprot) throws TException {
-
 
6873
      validate();
-
 
6874
 
-
 
6875
      oprot.writeStructBegin(STRUCT_DESC);
-
 
6876
      if (this.couponCode != null) {
-
 
6877
        oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
-
 
6878
        oprot.writeString(this.couponCode);
-
 
6879
        oprot.writeFieldEnd();
-
 
6880
      }
-
 
6881
      oprot.writeFieldStop();
-
 
6882
      oprot.writeStructEnd();
-
 
6883
    }
-
 
6884
 
-
 
6885
    @Override
-
 
6886
    public String toString() {
-
 
6887
      StringBuilder sb = new StringBuilder("getSuccessfulPaymentCountForCoupon_args(");
-
 
6888
      boolean first = true;
-
 
6889
 
-
 
6890
      sb.append("couponCode:");
-
 
6891
      if (this.couponCode == null) {
-
 
6892
        sb.append("null");
-
 
6893
      } else {
-
 
6894
        sb.append(this.couponCode);
-
 
6895
      }
-
 
6896
      first = false;
-
 
6897
      sb.append(")");
-
 
6898
      return sb.toString();
-
 
6899
    }
-
 
6900
 
-
 
6901
    public void validate() throws TException {
-
 
6902
      // check for required fields
-
 
6903
    }
-
 
6904
 
-
 
6905
  }
-
 
6906
 
-
 
6907
  public static class getSuccessfulPaymentCountForCoupon_result implements TBase<getSuccessfulPaymentCountForCoupon_result._Fields>, java.io.Serializable, Cloneable, Comparable<getSuccessfulPaymentCountForCoupon_result>   {
-
 
6908
    private static final TStruct STRUCT_DESC = new TStruct("getSuccessfulPaymentCountForCoupon_result");
-
 
6909
 
-
 
6910
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
-
 
6911
    private static final TField PEX_FIELD_DESC = new TField("pex", TType.STRUCT, (short)1);
-
 
6912
 
-
 
6913
    private long success;
-
 
6914
    private PromotionException pex;
-
 
6915
 
-
 
6916
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
6917
    public enum _Fields implements TFieldIdEnum {
-
 
6918
      SUCCESS((short)0, "success"),
-
 
6919
      PEX((short)1, "pex");
-
 
6920
 
-
 
6921
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
6922
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
6923
 
-
 
6924
      static {
-
 
6925
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
6926
          byId.put((int)field._thriftId, field);
-
 
6927
          byName.put(field.getFieldName(), field);
-
 
6928
        }
-
 
6929
      }
-
 
6930
 
-
 
6931
      /**
-
 
6932
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
6933
       */
-
 
6934
      public static _Fields findByThriftId(int fieldId) {
-
 
6935
        return byId.get(fieldId);
-
 
6936
      }
-
 
6937
 
-
 
6938
      /**
-
 
6939
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
6940
       * if it is not found.
-
 
6941
       */
-
 
6942
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
6943
        _Fields fields = findByThriftId(fieldId);
-
 
6944
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
6945
        return fields;
-
 
6946
      }
-
 
6947
 
-
 
6948
      /**
-
 
6949
       * Find the _Fields constant that matches name, or null if its not found.
-
 
6950
       */
-
 
6951
      public static _Fields findByName(String name) {
-
 
6952
        return byName.get(name);
-
 
6953
      }
-
 
6954
 
-
 
6955
      private final short _thriftId;
-
 
6956
      private final String _fieldName;
-
 
6957
 
-
 
6958
      _Fields(short thriftId, String fieldName) {
-
 
6959
        _thriftId = thriftId;
-
 
6960
        _fieldName = fieldName;
-
 
6961
      }
-
 
6962
 
-
 
6963
      public short getThriftFieldId() {
-
 
6964
        return _thriftId;
-
 
6965
      }
-
 
6966
 
-
 
6967
      public String getFieldName() {
-
 
6968
        return _fieldName;
-
 
6969
      }
-
 
6970
    }
-
 
6971
 
-
 
6972
    // isset id assignments
-
 
6973
    private static final int __SUCCESS_ISSET_ID = 0;
-
 
6974
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
6975
 
-
 
6976
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
6977
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
6978
          new FieldValueMetaData(TType.I64)));
-
 
6979
      put(_Fields.PEX, new FieldMetaData("pex", TFieldRequirementType.DEFAULT, 
-
 
6980
          new FieldValueMetaData(TType.STRUCT)));
-
 
6981
    }});
-
 
6982
 
-
 
6983
    static {
-
 
6984
      FieldMetaData.addStructMetaDataMap(getSuccessfulPaymentCountForCoupon_result.class, metaDataMap);
-
 
6985
    }
-
 
6986
 
-
 
6987
    public getSuccessfulPaymentCountForCoupon_result() {
-
 
6988
    }
-
 
6989
 
-
 
6990
    public getSuccessfulPaymentCountForCoupon_result(
-
 
6991
      long success,
-
 
6992
      PromotionException pex)
-
 
6993
    {
-
 
6994
      this();
-
 
6995
      this.success = success;
-
 
6996
      setSuccessIsSet(true);
-
 
6997
      this.pex = pex;
-
 
6998
    }
-
 
6999
 
-
 
7000
    /**
-
 
7001
     * Performs a deep copy on <i>other</i>.
-
 
7002
     */
-
 
7003
    public getSuccessfulPaymentCountForCoupon_result(getSuccessfulPaymentCountForCoupon_result other) {
-
 
7004
      __isset_bit_vector.clear();
-
 
7005
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
7006
      this.success = other.success;
-
 
7007
      if (other.isSetPex()) {
-
 
7008
        this.pex = new PromotionException(other.pex);
-
 
7009
      }
-
 
7010
    }
-
 
7011
 
-
 
7012
    public getSuccessfulPaymentCountForCoupon_result deepCopy() {
-
 
7013
      return new getSuccessfulPaymentCountForCoupon_result(this);
-
 
7014
    }
-
 
7015
 
-
 
7016
    @Deprecated
-
 
7017
    public getSuccessfulPaymentCountForCoupon_result clone() {
-
 
7018
      return new getSuccessfulPaymentCountForCoupon_result(this);
-
 
7019
    }
-
 
7020
 
-
 
7021
    public long getSuccess() {
-
 
7022
      return this.success;
-
 
7023
    }
-
 
7024
 
-
 
7025
    public getSuccessfulPaymentCountForCoupon_result setSuccess(long success) {
-
 
7026
      this.success = success;
-
 
7027
      setSuccessIsSet(true);
-
 
7028
      return this;
-
 
7029
    }
-
 
7030
 
-
 
7031
    public void unsetSuccess() {
-
 
7032
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
-
 
7033
    }
-
 
7034
 
-
 
7035
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
7036
    public boolean isSetSuccess() {
-
 
7037
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
-
 
7038
    }
-
 
7039
 
-
 
7040
    public void setSuccessIsSet(boolean value) {
-
 
7041
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
-
 
7042
    }
-
 
7043
 
-
 
7044
    public PromotionException getPex() {
-
 
7045
      return this.pex;
-
 
7046
    }
-
 
7047
 
-
 
7048
    public getSuccessfulPaymentCountForCoupon_result setPex(PromotionException pex) {
-
 
7049
      this.pex = pex;
-
 
7050
      return this;
-
 
7051
    }
-
 
7052
 
-
 
7053
    public void unsetPex() {
-
 
7054
      this.pex = null;
-
 
7055
    }
-
 
7056
 
-
 
7057
    /** Returns true if field pex is set (has been asigned a value) and false otherwise */
-
 
7058
    public boolean isSetPex() {
-
 
7059
      return this.pex != null;
-
 
7060
    }
-
 
7061
 
-
 
7062
    public void setPexIsSet(boolean value) {
-
 
7063
      if (!value) {
-
 
7064
        this.pex = null;
-
 
7065
      }
-
 
7066
    }
-
 
7067
 
-
 
7068
    public void setFieldValue(_Fields field, Object value) {
-
 
7069
      switch (field) {
-
 
7070
      case SUCCESS:
-
 
7071
        if (value == null) {
-
 
7072
          unsetSuccess();
-
 
7073
        } else {
-
 
7074
          setSuccess((Long)value);
-
 
7075
        }
-
 
7076
        break;
-
 
7077
 
-
 
7078
      case PEX:
-
 
7079
        if (value == null) {
-
 
7080
          unsetPex();
-
 
7081
        } else {
-
 
7082
          setPex((PromotionException)value);
-
 
7083
        }
-
 
7084
        break;
-
 
7085
 
-
 
7086
      }
-
 
7087
    }
-
 
7088
 
-
 
7089
    public void setFieldValue(int fieldID, Object value) {
-
 
7090
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
7091
    }
-
 
7092
 
-
 
7093
    public Object getFieldValue(_Fields field) {
-
 
7094
      switch (field) {
-
 
7095
      case SUCCESS:
-
 
7096
        return new Long(getSuccess());
-
 
7097
 
-
 
7098
      case PEX:
-
 
7099
        return getPex();
-
 
7100
 
-
 
7101
      }
-
 
7102
      throw new IllegalStateException();
-
 
7103
    }
-
 
7104
 
-
 
7105
    public Object getFieldValue(int fieldId) {
-
 
7106
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
7107
    }
-
 
7108
 
-
 
7109
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
7110
    public boolean isSet(_Fields field) {
-
 
7111
      switch (field) {
-
 
7112
      case SUCCESS:
-
 
7113
        return isSetSuccess();
-
 
7114
      case PEX:
-
 
7115
        return isSetPex();
-
 
7116
      }
-
 
7117
      throw new IllegalStateException();
-
 
7118
    }
-
 
7119
 
-
 
7120
    public boolean isSet(int fieldID) {
-
 
7121
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
7122
    }
-
 
7123
 
-
 
7124
    @Override
-
 
7125
    public boolean equals(Object that) {
-
 
7126
      if (that == null)
-
 
7127
        return false;
-
 
7128
      if (that instanceof getSuccessfulPaymentCountForCoupon_result)
-
 
7129
        return this.equals((getSuccessfulPaymentCountForCoupon_result)that);
-
 
7130
      return false;
-
 
7131
    }
-
 
7132
 
-
 
7133
    public boolean equals(getSuccessfulPaymentCountForCoupon_result that) {
-
 
7134
      if (that == null)
-
 
7135
        return false;
-
 
7136
 
-
 
7137
      boolean this_present_success = true;
-
 
7138
      boolean that_present_success = true;
-
 
7139
      if (this_present_success || that_present_success) {
-
 
7140
        if (!(this_present_success && that_present_success))
-
 
7141
          return false;
-
 
7142
        if (this.success != that.success)
-
 
7143
          return false;
-
 
7144
      }
-
 
7145
 
-
 
7146
      boolean this_present_pex = true && this.isSetPex();
-
 
7147
      boolean that_present_pex = true && that.isSetPex();
-
 
7148
      if (this_present_pex || that_present_pex) {
-
 
7149
        if (!(this_present_pex && that_present_pex))
-
 
7150
          return false;
-
 
7151
        if (!this.pex.equals(that.pex))
-
 
7152
          return false;
-
 
7153
      }
-
 
7154
 
-
 
7155
      return true;
-
 
7156
    }
-
 
7157
 
-
 
7158
    @Override
-
 
7159
    public int hashCode() {
-
 
7160
      return 0;
-
 
7161
    }
-
 
7162
 
-
 
7163
    public int compareTo(getSuccessfulPaymentCountForCoupon_result other) {
-
 
7164
      if (!getClass().equals(other.getClass())) {
-
 
7165
        return getClass().getName().compareTo(other.getClass().getName());
-
 
7166
      }
-
 
7167
 
-
 
7168
      int lastComparison = 0;
-
 
7169
      getSuccessfulPaymentCountForCoupon_result typedOther = (getSuccessfulPaymentCountForCoupon_result)other;
-
 
7170
 
-
 
7171
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
7172
      if (lastComparison != 0) {
-
 
7173
        return lastComparison;
-
 
7174
      }
-
 
7175
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
7176
      if (lastComparison != 0) {
-
 
7177
        return lastComparison;
-
 
7178
      }
-
 
7179
      lastComparison = Boolean.valueOf(isSetPex()).compareTo(isSetPex());
-
 
7180
      if (lastComparison != 0) {
-
 
7181
        return lastComparison;
-
 
7182
      }
-
 
7183
      lastComparison = TBaseHelper.compareTo(pex, typedOther.pex);
-
 
7184
      if (lastComparison != 0) {
-
 
7185
        return lastComparison;
-
 
7186
      }
-
 
7187
      return 0;
-
 
7188
    }
-
 
7189
 
-
 
7190
    public void read(TProtocol iprot) throws TException {
-
 
7191
      TField field;
-
 
7192
      iprot.readStructBegin();
-
 
7193
      while (true)
-
 
7194
      {
-
 
7195
        field = iprot.readFieldBegin();
-
 
7196
        if (field.type == TType.STOP) { 
-
 
7197
          break;
-
 
7198
        }
-
 
7199
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
7200
        if (fieldId == null) {
-
 
7201
          TProtocolUtil.skip(iprot, field.type);
-
 
7202
        } else {
-
 
7203
          switch (fieldId) {
-
 
7204
            case SUCCESS:
-
 
7205
              if (field.type == TType.I64) {
-
 
7206
                this.success = iprot.readI64();
-
 
7207
                setSuccessIsSet(true);
-
 
7208
              } else { 
-
 
7209
                TProtocolUtil.skip(iprot, field.type);
-
 
7210
              }
-
 
7211
              break;
-
 
7212
            case PEX:
-
 
7213
              if (field.type == TType.STRUCT) {
-
 
7214
                this.pex = new PromotionException();
-
 
7215
                this.pex.read(iprot);
-
 
7216
              } else { 
-
 
7217
                TProtocolUtil.skip(iprot, field.type);
-
 
7218
              }
-
 
7219
              break;
-
 
7220
          }
-
 
7221
          iprot.readFieldEnd();
-
 
7222
        }
-
 
7223
      }
-
 
7224
      iprot.readStructEnd();
-
 
7225
      validate();
-
 
7226
    }
-
 
7227
 
-
 
7228
    public void write(TProtocol oprot) throws TException {
-
 
7229
      oprot.writeStructBegin(STRUCT_DESC);
-
 
7230
 
-
 
7231
      if (this.isSetSuccess()) {
-
 
7232
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
7233
        oprot.writeI64(this.success);
-
 
7234
        oprot.writeFieldEnd();
-
 
7235
      } else if (this.isSetPex()) {
-
 
7236
        oprot.writeFieldBegin(PEX_FIELD_DESC);
-
 
7237
        this.pex.write(oprot);
-
 
7238
        oprot.writeFieldEnd();
-
 
7239
      }
-
 
7240
      oprot.writeFieldStop();
-
 
7241
      oprot.writeStructEnd();
-
 
7242
    }
-
 
7243
 
-
 
7244
    @Override
-
 
7245
    public String toString() {
-
 
7246
      StringBuilder sb = new StringBuilder("getSuccessfulPaymentCountForCoupon_result(");
-
 
7247
      boolean first = true;
-
 
7248
 
-
 
7249
      sb.append("success:");
-
 
7250
      sb.append(this.success);
-
 
7251
      first = false;
-
 
7252
      if (!first) sb.append(", ");
-
 
7253
      sb.append("pex:");
-
 
7254
      if (this.pex == null) {
-
 
7255
        sb.append("null");
-
 
7256
      } else {
-
 
7257
        sb.append(this.pex);
-
 
7258
      }
-
 
7259
      first = false;
-
 
7260
      sb.append(")");
-
 
7261
      return sb.toString();
-
 
7262
    }
-
 
7263
 
-
 
7264
    public void validate() throws TException {
-
 
7265
      // check for required fields
-
 
7266
    }
-
 
7267
 
-
 
7268
  }
-
 
7269
 
-
 
7270
  public static class getRuleDocString_args implements TBase<getRuleDocString_args._Fields>, java.io.Serializable, Cloneable, Comparable<getRuleDocString_args>   {
-
 
7271
    private static final TStruct STRUCT_DESC = new TStruct("getRuleDocString_args");
-
 
7272
 
-
 
7273
    private static final TField RULE_NAME_FIELD_DESC = new TField("ruleName", TType.STRING, (short)1);
-
 
7274
 
-
 
7275
    private String ruleName;
-
 
7276
 
-
 
7277
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
7278
    public enum _Fields implements TFieldIdEnum {
-
 
7279
      RULE_NAME((short)1, "ruleName");
-
 
7280
 
-
 
7281
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
7282
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
7283
 
-
 
7284
      static {
-
 
7285
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
7286
          byId.put((int)field._thriftId, field);
-
 
7287
          byName.put(field.getFieldName(), field);
-
 
7288
        }
-
 
7289
      }
-
 
7290
 
-
 
7291
      /**
-
 
7292
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
7293
       */
-
 
7294
      public static _Fields findByThriftId(int fieldId) {
-
 
7295
        return byId.get(fieldId);
-
 
7296
      }
-
 
7297
 
-
 
7298
      /**
-
 
7299
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
7300
       * if it is not found.
-
 
7301
       */
-
 
7302
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
7303
        _Fields fields = findByThriftId(fieldId);
-
 
7304
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
7305
        return fields;
-
 
7306
      }
-
 
7307
 
-
 
7308
      /**
-
 
7309
       * Find the _Fields constant that matches name, or null if its not found.
-
 
7310
       */
-
 
7311
      public static _Fields findByName(String name) {
-
 
7312
        return byName.get(name);
-
 
7313
      }
-
 
7314
 
-
 
7315
      private final short _thriftId;
-
 
7316
      private final String _fieldName;
-
 
7317
 
-
 
7318
      _Fields(short thriftId, String fieldName) {
-
 
7319
        _thriftId = thriftId;
-
 
7320
        _fieldName = fieldName;
-
 
7321
      }
-
 
7322
 
-
 
7323
      public short getThriftFieldId() {
-
 
7324
        return _thriftId;
-
 
7325
      }
-
 
7326
 
-
 
7327
      public String getFieldName() {
-
 
7328
        return _fieldName;
-
 
7329
      }
-
 
7330
    }
-
 
7331
 
-
 
7332
    // isset id assignments
-
 
7333
 
-
 
7334
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
7335
      put(_Fields.RULE_NAME, new FieldMetaData("ruleName", TFieldRequirementType.DEFAULT, 
-
 
7336
          new FieldValueMetaData(TType.STRING)));
-
 
7337
    }});
-
 
7338
 
-
 
7339
    static {
-
 
7340
      FieldMetaData.addStructMetaDataMap(getRuleDocString_args.class, metaDataMap);
-
 
7341
    }
-
 
7342
 
-
 
7343
    public getRuleDocString_args() {
-
 
7344
    }
-
 
7345
 
-
 
7346
    public getRuleDocString_args(
-
 
7347
      String ruleName)
-
 
7348
    {
-
 
7349
      this();
-
 
7350
      this.ruleName = ruleName;
-
 
7351
    }
-
 
7352
 
-
 
7353
    /**
-
 
7354
     * Performs a deep copy on <i>other</i>.
-
 
7355
     */
-
 
7356
    public getRuleDocString_args(getRuleDocString_args other) {
-
 
7357
      if (other.isSetRuleName()) {
-
 
7358
        this.ruleName = other.ruleName;
-
 
7359
      }
-
 
7360
    }
-
 
7361
 
-
 
7362
    public getRuleDocString_args deepCopy() {
-
 
7363
      return new getRuleDocString_args(this);
-
 
7364
    }
-
 
7365
 
-
 
7366
    @Deprecated
-
 
7367
    public getRuleDocString_args clone() {
-
 
7368
      return new getRuleDocString_args(this);
-
 
7369
    }
-
 
7370
 
-
 
7371
    public String getRuleName() {
-
 
7372
      return this.ruleName;
-
 
7373
    }
-
 
7374
 
-
 
7375
    public getRuleDocString_args setRuleName(String ruleName) {
-
 
7376
      this.ruleName = ruleName;
-
 
7377
      return this;
-
 
7378
    }
-
 
7379
 
-
 
7380
    public void unsetRuleName() {
-
 
7381
      this.ruleName = null;
-
 
7382
    }
-
 
7383
 
-
 
7384
    /** Returns true if field ruleName is set (has been asigned a value) and false otherwise */
-
 
7385
    public boolean isSetRuleName() {
-
 
7386
      return this.ruleName != null;
-
 
7387
    }
-
 
7388
 
-
 
7389
    public void setRuleNameIsSet(boolean value) {
-
 
7390
      if (!value) {
-
 
7391
        this.ruleName = null;
-
 
7392
      }
-
 
7393
    }
-
 
7394
 
-
 
7395
    public void setFieldValue(_Fields field, Object value) {
-
 
7396
      switch (field) {
-
 
7397
      case RULE_NAME:
-
 
7398
        if (value == null) {
-
 
7399
          unsetRuleName();
-
 
7400
        } else {
-
 
7401
          setRuleName((String)value);
-
 
7402
        }
-
 
7403
        break;
-
 
7404
 
-
 
7405
      }
-
 
7406
    }
-
 
7407
 
-
 
7408
    public void setFieldValue(int fieldID, Object value) {
-
 
7409
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
7410
    }
-
 
7411
 
-
 
7412
    public Object getFieldValue(_Fields field) {
-
 
7413
      switch (field) {
-
 
7414
      case RULE_NAME:
-
 
7415
        return getRuleName();
-
 
7416
 
-
 
7417
      }
-
 
7418
      throw new IllegalStateException();
-
 
7419
    }
-
 
7420
 
-
 
7421
    public Object getFieldValue(int fieldId) {
-
 
7422
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
7423
    }
-
 
7424
 
-
 
7425
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
7426
    public boolean isSet(_Fields field) {
-
 
7427
      switch (field) {
-
 
7428
      case RULE_NAME:
-
 
7429
        return isSetRuleName();
-
 
7430
      }
-
 
7431
      throw new IllegalStateException();
-
 
7432
    }
-
 
7433
 
-
 
7434
    public boolean isSet(int fieldID) {
-
 
7435
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
7436
    }
-
 
7437
 
-
 
7438
    @Override
-
 
7439
    public boolean equals(Object that) {
-
 
7440
      if (that == null)
-
 
7441
        return false;
-
 
7442
      if (that instanceof getRuleDocString_args)
-
 
7443
        return this.equals((getRuleDocString_args)that);
-
 
7444
      return false;
-
 
7445
    }
-
 
7446
 
-
 
7447
    public boolean equals(getRuleDocString_args that) {
-
 
7448
      if (that == null)
-
 
7449
        return false;
-
 
7450
 
-
 
7451
      boolean this_present_ruleName = true && this.isSetRuleName();
-
 
7452
      boolean that_present_ruleName = true && that.isSetRuleName();
-
 
7453
      if (this_present_ruleName || that_present_ruleName) {
-
 
7454
        if (!(this_present_ruleName && that_present_ruleName))
-
 
7455
          return false;
-
 
7456
        if (!this.ruleName.equals(that.ruleName))
-
 
7457
          return false;
-
 
7458
      }
-
 
7459
 
-
 
7460
      return true;
-
 
7461
    }
-
 
7462
 
-
 
7463
    @Override
-
 
7464
    public int hashCode() {
-
 
7465
      return 0;
-
 
7466
    }
-
 
7467
 
-
 
7468
    public int compareTo(getRuleDocString_args other) {
-
 
7469
      if (!getClass().equals(other.getClass())) {
-
 
7470
        return getClass().getName().compareTo(other.getClass().getName());
-
 
7471
      }
-
 
7472
 
-
 
7473
      int lastComparison = 0;
-
 
7474
      getRuleDocString_args typedOther = (getRuleDocString_args)other;
-
 
7475
 
-
 
7476
      lastComparison = Boolean.valueOf(isSetRuleName()).compareTo(isSetRuleName());
-
 
7477
      if (lastComparison != 0) {
-
 
7478
        return lastComparison;
-
 
7479
      }
-
 
7480
      lastComparison = TBaseHelper.compareTo(ruleName, typedOther.ruleName);
-
 
7481
      if (lastComparison != 0) {
-
 
7482
        return lastComparison;
-
 
7483
      }
-
 
7484
      return 0;
-
 
7485
    }
-
 
7486
 
-
 
7487
    public void read(TProtocol iprot) throws TException {
-
 
7488
      TField field;
-
 
7489
      iprot.readStructBegin();
-
 
7490
      while (true)
-
 
7491
      {
-
 
7492
        field = iprot.readFieldBegin();
-
 
7493
        if (field.type == TType.STOP) { 
-
 
7494
          break;
-
 
7495
        }
-
 
7496
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
7497
        if (fieldId == null) {
-
 
7498
          TProtocolUtil.skip(iprot, field.type);
-
 
7499
        } else {
-
 
7500
          switch (fieldId) {
-
 
7501
            case RULE_NAME:
-
 
7502
              if (field.type == TType.STRING) {
-
 
7503
                this.ruleName = iprot.readString();
-
 
7504
              } else { 
-
 
7505
                TProtocolUtil.skip(iprot, field.type);
-
 
7506
              }
-
 
7507
              break;
-
 
7508
          }
-
 
7509
          iprot.readFieldEnd();
-
 
7510
        }
-
 
7511
      }
-
 
7512
      iprot.readStructEnd();
-
 
7513
      validate();
-
 
7514
    }
-
 
7515
 
-
 
7516
    public void write(TProtocol oprot) throws TException {
-
 
7517
      validate();
-
 
7518
 
-
 
7519
      oprot.writeStructBegin(STRUCT_DESC);
-
 
7520
      if (this.ruleName != null) {
-
 
7521
        oprot.writeFieldBegin(RULE_NAME_FIELD_DESC);
-
 
7522
        oprot.writeString(this.ruleName);
-
 
7523
        oprot.writeFieldEnd();
-
 
7524
      }
-
 
7525
      oprot.writeFieldStop();
-
 
7526
      oprot.writeStructEnd();
-
 
7527
    }
-
 
7528
 
-
 
7529
    @Override
-
 
7530
    public String toString() {
-
 
7531
      StringBuilder sb = new StringBuilder("getRuleDocString_args(");
-
 
7532
      boolean first = true;
-
 
7533
 
-
 
7534
      sb.append("ruleName:");
-
 
7535
      if (this.ruleName == null) {
-
 
7536
        sb.append("null");
-
 
7537
      } else {
-
 
7538
        sb.append(this.ruleName);
-
 
7539
      }
-
 
7540
      first = false;
-
 
7541
      sb.append(")");
-
 
7542
      return sb.toString();
-
 
7543
    }
-
 
7544
 
-
 
7545
    public void validate() throws TException {
-
 
7546
      // check for required fields
-
 
7547
    }
-
 
7548
 
-
 
7549
  }
-
 
7550
 
-
 
7551
  public static class getRuleDocString_result implements TBase<getRuleDocString_result._Fields>, java.io.Serializable, Cloneable, Comparable<getRuleDocString_result>   {
-
 
7552
    private static final TStruct STRUCT_DESC = new TStruct("getRuleDocString_result");
-
 
7553
 
-
 
7554
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
-
 
7555
 
-
 
7556
    private String success;
-
 
7557
 
-
 
7558
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
7559
    public enum _Fields implements TFieldIdEnum {
-
 
7560
      SUCCESS((short)0, "success");
-
 
7561
 
-
 
7562
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
7563
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
7564
 
-
 
7565
      static {
-
 
7566
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
7567
          byId.put((int)field._thriftId, field);
-
 
7568
          byName.put(field.getFieldName(), field);
-
 
7569
        }
-
 
7570
      }
-
 
7571
 
-
 
7572
      /**
-
 
7573
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
7574
       */
-
 
7575
      public static _Fields findByThriftId(int fieldId) {
-
 
7576
        return byId.get(fieldId);
-
 
7577
      }
-
 
7578
 
-
 
7579
      /**
-
 
7580
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
7581
       * if it is not found.
-
 
7582
       */
-
 
7583
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
7584
        _Fields fields = findByThriftId(fieldId);
-
 
7585
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
7586
        return fields;
-
 
7587
      }
-
 
7588
 
-
 
7589
      /**
-
 
7590
       * Find the _Fields constant that matches name, or null if its not found.
-
 
7591
       */
-
 
7592
      public static _Fields findByName(String name) {
-
 
7593
        return byName.get(name);
-
 
7594
      }
-
 
7595
 
-
 
7596
      private final short _thriftId;
-
 
7597
      private final String _fieldName;
-
 
7598
 
-
 
7599
      _Fields(short thriftId, String fieldName) {
-
 
7600
        _thriftId = thriftId;
-
 
7601
        _fieldName = fieldName;
-
 
7602
      }
-
 
7603
 
-
 
7604
      public short getThriftFieldId() {
-
 
7605
        return _thriftId;
-
 
7606
      }
-
 
7607
 
-
 
7608
      public String getFieldName() {
-
 
7609
        return _fieldName;
-
 
7610
      }
-
 
7611
    }
-
 
7612
 
-
 
7613
    // isset id assignments
-
 
7614
 
-
 
7615
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
7616
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
7617
          new FieldValueMetaData(TType.STRING)));
-
 
7618
    }});
-
 
7619
 
-
 
7620
    static {
-
 
7621
      FieldMetaData.addStructMetaDataMap(getRuleDocString_result.class, metaDataMap);
-
 
7622
    }
-
 
7623
 
-
 
7624
    public getRuleDocString_result() {
-
 
7625
    }
-
 
7626
 
-
 
7627
    public getRuleDocString_result(
-
 
7628
      String success)
-
 
7629
    {
-
 
7630
      this();
-
 
7631
      this.success = success;
-
 
7632
    }
-
 
7633
 
-
 
7634
    /**
-
 
7635
     * Performs a deep copy on <i>other</i>.
-
 
7636
     */
-
 
7637
    public getRuleDocString_result(getRuleDocString_result other) {
-
 
7638
      if (other.isSetSuccess()) {
-
 
7639
        this.success = other.success;
-
 
7640
      }
-
 
7641
    }
-
 
7642
 
-
 
7643
    public getRuleDocString_result deepCopy() {
-
 
7644
      return new getRuleDocString_result(this);
-
 
7645
    }
-
 
7646
 
-
 
7647
    @Deprecated
-
 
7648
    public getRuleDocString_result clone() {
-
 
7649
      return new getRuleDocString_result(this);
-
 
7650
    }
-
 
7651
 
-
 
7652
    public String getSuccess() {
-
 
7653
      return this.success;
-
 
7654
    }
-
 
7655
 
-
 
7656
    public getRuleDocString_result setSuccess(String success) {
-
 
7657
      this.success = success;
-
 
7658
      return this;
-
 
7659
    }
-
 
7660
 
-
 
7661
    public void unsetSuccess() {
-
 
7662
      this.success = null;
-
 
7663
    }
-
 
7664
 
-
 
7665
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
7666
    public boolean isSetSuccess() {
-
 
7667
      return this.success != null;
-
 
7668
    }
-
 
7669
 
-
 
7670
    public void setSuccessIsSet(boolean value) {
-
 
7671
      if (!value) {
-
 
7672
        this.success = null;
-
 
7673
      }
-
 
7674
    }
-
 
7675
 
-
 
7676
    public void setFieldValue(_Fields field, Object value) {
-
 
7677
      switch (field) {
-
 
7678
      case SUCCESS:
-
 
7679
        if (value == null) {
-
 
7680
          unsetSuccess();
-
 
7681
        } else {
-
 
7682
          setSuccess((String)value);
-
 
7683
        }
-
 
7684
        break;
-
 
7685
 
-
 
7686
      }
-
 
7687
    }
-
 
7688
 
-
 
7689
    public void setFieldValue(int fieldID, Object value) {
-
 
7690
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
7691
    }
-
 
7692
 
-
 
7693
    public Object getFieldValue(_Fields field) {
-
 
7694
      switch (field) {
-
 
7695
      case SUCCESS:
-
 
7696
        return getSuccess();
-
 
7697
 
-
 
7698
      }
-
 
7699
      throw new IllegalStateException();
-
 
7700
    }
-
 
7701
 
-
 
7702
    public Object getFieldValue(int fieldId) {
-
 
7703
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
7704
    }
-
 
7705
 
-
 
7706
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
7707
    public boolean isSet(_Fields field) {
-
 
7708
      switch (field) {
-
 
7709
      case SUCCESS:
-
 
7710
        return isSetSuccess();
-
 
7711
      }
-
 
7712
      throw new IllegalStateException();
-
 
7713
    }
-
 
7714
 
-
 
7715
    public boolean isSet(int fieldID) {
-
 
7716
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
7717
    }
-
 
7718
 
-
 
7719
    @Override
-
 
7720
    public boolean equals(Object that) {
-
 
7721
      if (that == null)
-
 
7722
        return false;
-
 
7723
      if (that instanceof getRuleDocString_result)
-
 
7724
        return this.equals((getRuleDocString_result)that);
-
 
7725
      return false;
-
 
7726
    }
-
 
7727
 
-
 
7728
    public boolean equals(getRuleDocString_result that) {
-
 
7729
      if (that == null)
-
 
7730
        return false;
-
 
7731
 
-
 
7732
      boolean this_present_success = true && this.isSetSuccess();
-
 
7733
      boolean that_present_success = true && that.isSetSuccess();
-
 
7734
      if (this_present_success || that_present_success) {
-
 
7735
        if (!(this_present_success && that_present_success))
-
 
7736
          return false;
-
 
7737
        if (!this.success.equals(that.success))
-
 
7738
          return false;
-
 
7739
      }
-
 
7740
 
-
 
7741
      return true;
-
 
7742
    }
-
 
7743
 
-
 
7744
    @Override
-
 
7745
    public int hashCode() {
-
 
7746
      return 0;
-
 
7747
    }
-
 
7748
 
-
 
7749
    public int compareTo(getRuleDocString_result other) {
-
 
7750
      if (!getClass().equals(other.getClass())) {
-
 
7751
        return getClass().getName().compareTo(other.getClass().getName());
-
 
7752
      }
-
 
7753
 
-
 
7754
      int lastComparison = 0;
-
 
7755
      getRuleDocString_result typedOther = (getRuleDocString_result)other;
-
 
7756
 
-
 
7757
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
7758
      if (lastComparison != 0) {
-
 
7759
        return lastComparison;
-
 
7760
      }
-
 
7761
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
7762
      if (lastComparison != 0) {
-
 
7763
        return lastComparison;
-
 
7764
      }
-
 
7765
      return 0;
-
 
7766
    }
-
 
7767
 
-
 
7768
    public void read(TProtocol iprot) throws TException {
-
 
7769
      TField field;
-
 
7770
      iprot.readStructBegin();
-
 
7771
      while (true)
-
 
7772
      {
-
 
7773
        field = iprot.readFieldBegin();
-
 
7774
        if (field.type == TType.STOP) { 
-
 
7775
          break;
-
 
7776
        }
-
 
7777
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
7778
        if (fieldId == null) {
-
 
7779
          TProtocolUtil.skip(iprot, field.type);
-
 
7780
        } else {
-
 
7781
          switch (fieldId) {
-
 
7782
            case SUCCESS:
-
 
7783
              if (field.type == TType.STRING) {
-
 
7784
                this.success = iprot.readString();
-
 
7785
              } else { 
-
 
7786
                TProtocolUtil.skip(iprot, field.type);
-
 
7787
              }
-
 
7788
              break;
-
 
7789
          }
-
 
7790
          iprot.readFieldEnd();
-
 
7791
        }
-
 
7792
      }
-
 
7793
      iprot.readStructEnd();
-
 
7794
      validate();
-
 
7795
    }
-
 
7796
 
-
 
7797
    public void write(TProtocol oprot) throws TException {
-
 
7798
      oprot.writeStructBegin(STRUCT_DESC);
-
 
7799
 
-
 
7800
      if (this.isSetSuccess()) {
-
 
7801
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
7802
        oprot.writeString(this.success);
-
 
7803
        oprot.writeFieldEnd();
-
 
7804
      }
-
 
7805
      oprot.writeFieldStop();
-
 
7806
      oprot.writeStructEnd();
-
 
7807
    }
-
 
7808
 
-
 
7809
    @Override
-
 
7810
    public String toString() {
-
 
7811
      StringBuilder sb = new StringBuilder("getRuleDocString_result(");
-
 
7812
      boolean first = true;
-
 
7813
 
-
 
7814
      sb.append("success:");
-
 
7815
      if (this.success == null) {
-
 
7816
        sb.append("null");
-
 
7817
      } else {
-
 
7818
        sb.append(this.success);
-
 
7819
      }
-
 
7820
      first = false;
-
 
7821
      sb.append(")");
-
 
7822
      return sb.toString();
-
 
7823
    }
5827
 
7824
 
5828
    public void validate() throws TException {
7825
    public void validate() throws TException {
5829
      // check for required fields
7826
      // check for required fields
5830
    }
7827
    }
5831
 
7828