Subversion Repositories SmartDukaan

Rev

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

Rev 1013 Rev 1982
Line 32... Line 32...
32
  private static final TField CREATED_ON_FIELD_DESC = new TField("createdOn", TType.I64, (short)4);
32
  private static final TField CREATED_ON_FIELD_DESC = new TField("createdOn", TType.I64, (short)4);
33
  private static final TField UPDATED_ON_FIELD_DESC = new TField("updatedOn", TType.I64, (short)5);
33
  private static final TField UPDATED_ON_FIELD_DESC = new TField("updatedOn", TType.I64, (short)5);
34
  private static final TField CHECKED_OUT_ON_FIELD_DESC = new TField("checkedOutOn", TType.I64, (short)6);
34
  private static final TField CHECKED_OUT_ON_FIELD_DESC = new TField("checkedOutOn", TType.I64, (short)6);
35
  private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)7);
35
  private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)7);
36
  private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)8);
36
  private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)8);
-
 
37
  private static final TField TOTAL_PRICE_FIELD_DESC = new TField("totalPrice", TType.DOUBLE, (short)9);
-
 
38
  private static final TField DISCOUNTED_PRICE_FIELD_DESC = new TField("discountedPrice", TType.DOUBLE, (short)10);
-
 
39
  private static final TField COUPON_CODE_FIELD_DESC = new TField("couponCode", TType.STRING, (short)11);
37
 
40
 
38
  private long id;
41
  private long id;
39
  private List<Line> lines;
42
  private List<Line> lines;
40
  private CartStatus status;
43
  private CartStatus status;
41
  private long createdOn;
44
  private long createdOn;
42
  private long updatedOn;
45
  private long updatedOn;
43
  private long checkedOutOn;
46
  private long checkedOutOn;
44
  private long userId;
47
  private long userId;
45
  private long addressId;
48
  private long addressId;
-
 
49
  private double totalPrice;
-
 
50
  private double discountedPrice;
-
 
51
  private String couponCode;
46
 
52
 
47
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
53
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
48
  public enum _Fields implements TFieldIdEnum {
54
  public enum _Fields implements TFieldIdEnum {
49
    ID((short)1, "id"),
55
    ID((short)1, "id"),
50
    LINES((short)2, "lines"),
56
    LINES((short)2, "lines"),
Line 55... Line 61...
55
    STATUS((short)3, "status"),
61
    STATUS((short)3, "status"),
56
    CREATED_ON((short)4, "createdOn"),
62
    CREATED_ON((short)4, "createdOn"),
57
    UPDATED_ON((short)5, "updatedOn"),
63
    UPDATED_ON((short)5, "updatedOn"),
58
    CHECKED_OUT_ON((short)6, "checkedOutOn"),
64
    CHECKED_OUT_ON((short)6, "checkedOutOn"),
59
    USER_ID((short)7, "userId"),
65
    USER_ID((short)7, "userId"),
60
    ADDRESS_ID((short)8, "addressId");
66
    ADDRESS_ID((short)8, "addressId"),
-
 
67
    TOTAL_PRICE((short)9, "totalPrice"),
-
 
68
    DISCOUNTED_PRICE((short)10, "discountedPrice"),
-
 
69
    COUPON_CODE((short)11, "couponCode");
61
 
70
 
62
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
71
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
63
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
72
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
64
 
73
 
65
    static {
74
    static {
Line 115... Line 124...
115
  private static final int __CREATEDON_ISSET_ID = 1;
124
  private static final int __CREATEDON_ISSET_ID = 1;
116
  private static final int __UPDATEDON_ISSET_ID = 2;
125
  private static final int __UPDATEDON_ISSET_ID = 2;
117
  private static final int __CHECKEDOUTON_ISSET_ID = 3;
126
  private static final int __CHECKEDOUTON_ISSET_ID = 3;
118
  private static final int __USERID_ISSET_ID = 4;
127
  private static final int __USERID_ISSET_ID = 4;
119
  private static final int __ADDRESSID_ISSET_ID = 5;
128
  private static final int __ADDRESSID_ISSET_ID = 5;
-
 
129
  private static final int __TOTALPRICE_ISSET_ID = 6;
-
 
130
  private static final int __DISCOUNTEDPRICE_ISSET_ID = 7;
120
  private BitSet __isset_bit_vector = new BitSet(6);
131
  private BitSet __isset_bit_vector = new BitSet(8);
121
 
132
 
122
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
133
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
123
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
134
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
124
        new FieldValueMetaData(TType.I64)));
135
        new FieldValueMetaData(TType.I64)));
125
    put(_Fields.LINES, new FieldMetaData("lines", TFieldRequirementType.DEFAULT, 
136
    put(_Fields.LINES, new FieldMetaData("lines", TFieldRequirementType.DEFAULT, 
Line 135... Line 146...
135
        new FieldValueMetaData(TType.I64)));
146
        new FieldValueMetaData(TType.I64)));
136
    put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
147
    put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
137
        new FieldValueMetaData(TType.I64)));
148
        new FieldValueMetaData(TType.I64)));
138
    put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
149
    put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
139
        new FieldValueMetaData(TType.I64)));
150
        new FieldValueMetaData(TType.I64)));
-
 
151
    put(_Fields.TOTAL_PRICE, new FieldMetaData("totalPrice", TFieldRequirementType.DEFAULT, 
-
 
152
        new FieldValueMetaData(TType.DOUBLE)));
-
 
153
    put(_Fields.DISCOUNTED_PRICE, new FieldMetaData("discountedPrice", TFieldRequirementType.DEFAULT, 
-
 
154
        new FieldValueMetaData(TType.DOUBLE)));
-
 
155
    put(_Fields.COUPON_CODE, new FieldMetaData("couponCode", TFieldRequirementType.DEFAULT, 
-
 
156
        new FieldValueMetaData(TType.STRING)));
140
  }});
157
  }});
141
 
158
 
142
  static {
159
  static {
143
    FieldMetaData.addStructMetaDataMap(Cart.class, metaDataMap);
160
    FieldMetaData.addStructMetaDataMap(Cart.class, metaDataMap);
144
  }
161
  }
Line 152... Line 169...
152
    CartStatus status,
169
    CartStatus status,
153
    long createdOn,
170
    long createdOn,
154
    long updatedOn,
171
    long updatedOn,
155
    long checkedOutOn,
172
    long checkedOutOn,
156
    long userId,
173
    long userId,
157
    long addressId)
174
    long addressId,
-
 
175
    double totalPrice,
-
 
176
    double discountedPrice,
-
 
177
    String couponCode)
158
  {
178
  {
159
    this();
179
    this();
160
    this.id = id;
180
    this.id = id;
161
    setIdIsSet(true);
181
    setIdIsSet(true);
162
    this.lines = lines;
182
    this.lines = lines;
Line 169... Line 189...
169
    setCheckedOutOnIsSet(true);
189
    setCheckedOutOnIsSet(true);
170
    this.userId = userId;
190
    this.userId = userId;
171
    setUserIdIsSet(true);
191
    setUserIdIsSet(true);
172
    this.addressId = addressId;
192
    this.addressId = addressId;
173
    setAddressIdIsSet(true);
193
    setAddressIdIsSet(true);
-
 
194
    this.totalPrice = totalPrice;
-
 
195
    setTotalPriceIsSet(true);
-
 
196
    this.discountedPrice = discountedPrice;
-
 
197
    setDiscountedPriceIsSet(true);
-
 
198
    this.couponCode = couponCode;
174
  }
199
  }
175
 
200
 
176
  /**
201
  /**
177
   * Performs a deep copy on <i>other</i>.
202
   * Performs a deep copy on <i>other</i>.
178
   */
203
   */
Line 193... Line 218...
193
    this.createdOn = other.createdOn;
218
    this.createdOn = other.createdOn;
194
    this.updatedOn = other.updatedOn;
219
    this.updatedOn = other.updatedOn;
195
    this.checkedOutOn = other.checkedOutOn;
220
    this.checkedOutOn = other.checkedOutOn;
196
    this.userId = other.userId;
221
    this.userId = other.userId;
197
    this.addressId = other.addressId;
222
    this.addressId = other.addressId;
-
 
223
    this.totalPrice = other.totalPrice;
-
 
224
    this.discountedPrice = other.discountedPrice;
-
 
225
    if (other.isSetCouponCode()) {
-
 
226
      this.couponCode = other.couponCode;
-
 
227
    }
198
  }
228
  }
199
 
229
 
200
  public Cart deepCopy() {
230
  public Cart deepCopy() {
201
    return new Cart(this);
231
    return new Cart(this);
202
  }
232
  }
Line 413... Line 443...
413
 
443
 
414
  public void setAddressIdIsSet(boolean value) {
444
  public void setAddressIdIsSet(boolean value) {
415
    __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
445
    __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
416
  }
446
  }
417
 
447
 
-
 
448
  public double getTotalPrice() {
-
 
449
    return this.totalPrice;
-
 
450
  }
-
 
451
 
-
 
452
  public Cart setTotalPrice(double totalPrice) {
-
 
453
    this.totalPrice = totalPrice;
-
 
454
    setTotalPriceIsSet(true);
-
 
455
    return this;
-
 
456
  }
-
 
457
 
-
 
458
  public void unsetTotalPrice() {
-
 
459
    __isset_bit_vector.clear(__TOTALPRICE_ISSET_ID);
-
 
460
  }
-
 
461
 
-
 
462
  /** Returns true if field totalPrice is set (has been asigned a value) and false otherwise */
-
 
463
  public boolean isSetTotalPrice() {
-
 
464
    return __isset_bit_vector.get(__TOTALPRICE_ISSET_ID);
-
 
465
  }
-
 
466
 
-
 
467
  public void setTotalPriceIsSet(boolean value) {
-
 
468
    __isset_bit_vector.set(__TOTALPRICE_ISSET_ID, value);
-
 
469
  }
-
 
470
 
-
 
471
  public double getDiscountedPrice() {
-
 
472
    return this.discountedPrice;
-
 
473
  }
-
 
474
 
-
 
475
  public Cart setDiscountedPrice(double discountedPrice) {
-
 
476
    this.discountedPrice = discountedPrice;
-
 
477
    setDiscountedPriceIsSet(true);
-
 
478
    return this;
-
 
479
  }
-
 
480
 
-
 
481
  public void unsetDiscountedPrice() {
-
 
482
    __isset_bit_vector.clear(__DISCOUNTEDPRICE_ISSET_ID);
-
 
483
  }
-
 
484
 
-
 
485
  /** Returns true if field discountedPrice is set (has been asigned a value) and false otherwise */
-
 
486
  public boolean isSetDiscountedPrice() {
-
 
487
    return __isset_bit_vector.get(__DISCOUNTEDPRICE_ISSET_ID);
-
 
488
  }
-
 
489
 
-
 
490
  public void setDiscountedPriceIsSet(boolean value) {
-
 
491
    __isset_bit_vector.set(__DISCOUNTEDPRICE_ISSET_ID, value);
-
 
492
  }
-
 
493
 
-
 
494
  public String getCouponCode() {
-
 
495
    return this.couponCode;
-
 
496
  }
-
 
497
 
-
 
498
  public Cart setCouponCode(String couponCode) {
-
 
499
    this.couponCode = couponCode;
-
 
500
    return this;
-
 
501
  }
-
 
502
 
-
 
503
  public void unsetCouponCode() {
-
 
504
    this.couponCode = null;
-
 
505
  }
-
 
506
 
-
 
507
  /** Returns true if field couponCode is set (has been asigned a value) and false otherwise */
-
 
508
  public boolean isSetCouponCode() {
-
 
509
    return this.couponCode != null;
-
 
510
  }
-
 
511
 
-
 
512
  public void setCouponCodeIsSet(boolean value) {
-
 
513
    if (!value) {
-
 
514
      this.couponCode = null;
-
 
515
    }
-
 
516
  }
-
 
517
 
418
  public void setFieldValue(_Fields field, Object value) {
518
  public void setFieldValue(_Fields field, Object value) {
419
    switch (field) {
519
    switch (field) {
420
    case ID:
520
    case ID:
421
      if (value == null) {
521
      if (value == null) {
422
        unsetId();
522
        unsetId();
Line 479... Line 579...
479
      } else {
579
      } else {
480
        setAddressId((Long)value);
580
        setAddressId((Long)value);
481
      }
581
      }
482
      break;
582
      break;
483
 
583
 
-
 
584
    case TOTAL_PRICE:
-
 
585
      if (value == null) {
-
 
586
        unsetTotalPrice();
-
 
587
      } else {
-
 
588
        setTotalPrice((Double)value);
-
 
589
      }
-
 
590
      break;
-
 
591
 
-
 
592
    case DISCOUNTED_PRICE:
-
 
593
      if (value == null) {
-
 
594
        unsetDiscountedPrice();
-
 
595
      } else {
-
 
596
        setDiscountedPrice((Double)value);
-
 
597
      }
-
 
598
      break;
-
 
599
 
-
 
600
    case COUPON_CODE:
-
 
601
      if (value == null) {
-
 
602
        unsetCouponCode();
-
 
603
      } else {
-
 
604
        setCouponCode((String)value);
-
 
605
      }
-
 
606
      break;
-
 
607
 
484
    }
608
    }
485
  }
609
  }
486
 
610
 
487
  public void setFieldValue(int fieldID, Object value) {
611
  public void setFieldValue(int fieldID, Object value) {
488
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
612
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
Line 512... Line 636...
512
      return new Long(getUserId());
636
      return new Long(getUserId());
513
 
637
 
514
    case ADDRESS_ID:
638
    case ADDRESS_ID:
515
      return new Long(getAddressId());
639
      return new Long(getAddressId());
516
 
640
 
-
 
641
    case TOTAL_PRICE:
-
 
642
      return new Double(getTotalPrice());
-
 
643
 
-
 
644
    case DISCOUNTED_PRICE:
-
 
645
      return new Double(getDiscountedPrice());
-
 
646
 
-
 
647
    case COUPON_CODE:
-
 
648
      return getCouponCode();
-
 
649
 
517
    }
650
    }
518
    throw new IllegalStateException();
651
    throw new IllegalStateException();
519
  }
652
  }
520
 
653
 
521
  public Object getFieldValue(int fieldId) {
654
  public Object getFieldValue(int fieldId) {
Line 539... Line 672...
539
      return isSetCheckedOutOn();
672
      return isSetCheckedOutOn();
540
    case USER_ID:
673
    case USER_ID:
541
      return isSetUserId();
674
      return isSetUserId();
542
    case ADDRESS_ID:
675
    case ADDRESS_ID:
543
      return isSetAddressId();
676
      return isSetAddressId();
-
 
677
    case TOTAL_PRICE:
-
 
678
      return isSetTotalPrice();
-
 
679
    case DISCOUNTED_PRICE:
-
 
680
      return isSetDiscountedPrice();
-
 
681
    case COUPON_CODE:
-
 
682
      return isSetCouponCode();
544
    }
683
    }
545
    throw new IllegalStateException();
684
    throw new IllegalStateException();
546
  }
685
  }
547
 
686
 
548
  public boolean isSet(int fieldID) {
687
  public boolean isSet(int fieldID) {
Line 632... Line 771...
632
        return false;
771
        return false;
633
      if (this.addressId != that.addressId)
772
      if (this.addressId != that.addressId)
634
        return false;
773
        return false;
635
    }
774
    }
636
 
775
 
-
 
776
    boolean this_present_totalPrice = true;
-
 
777
    boolean that_present_totalPrice = true;
-
 
778
    if (this_present_totalPrice || that_present_totalPrice) {
-
 
779
      if (!(this_present_totalPrice && that_present_totalPrice))
-
 
780
        return false;
-
 
781
      if (this.totalPrice != that.totalPrice)
-
 
782
        return false;
-
 
783
    }
-
 
784
 
-
 
785
    boolean this_present_discountedPrice = true;
-
 
786
    boolean that_present_discountedPrice = true;
-
 
787
    if (this_present_discountedPrice || that_present_discountedPrice) {
-
 
788
      if (!(this_present_discountedPrice && that_present_discountedPrice))
-
 
789
        return false;
-
 
790
      if (this.discountedPrice != that.discountedPrice)
-
 
791
        return false;
-
 
792
    }
-
 
793
 
-
 
794
    boolean this_present_couponCode = true && this.isSetCouponCode();
-
 
795
    boolean that_present_couponCode = true && that.isSetCouponCode();
-
 
796
    if (this_present_couponCode || that_present_couponCode) {
-
 
797
      if (!(this_present_couponCode && that_present_couponCode))
-
 
798
        return false;
-
 
799
      if (!this.couponCode.equals(that.couponCode))
-
 
800
        return false;
-
 
801
    }
-
 
802
 
637
    return true;
803
    return true;
638
  }
804
  }
639
 
805
 
640
  @Override
806
  @Override
641
  public int hashCode() {
807
  public int hashCode() {
Line 712... Line 878...
712
    }
878
    }
713
    lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
879
    lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
714
    if (lastComparison != 0) {
880
    if (lastComparison != 0) {
715
      return lastComparison;
881
      return lastComparison;
716
    }
882
    }
-
 
883
    lastComparison = Boolean.valueOf(isSetTotalPrice()).compareTo(isSetTotalPrice());
-
 
884
    if (lastComparison != 0) {
-
 
885
      return lastComparison;
-
 
886
    }
-
 
887
    lastComparison = TBaseHelper.compareTo(totalPrice, typedOther.totalPrice);
-
 
888
    if (lastComparison != 0) {
-
 
889
      return lastComparison;
-
 
890
    }
-
 
891
    lastComparison = Boolean.valueOf(isSetDiscountedPrice()).compareTo(isSetDiscountedPrice());
-
 
892
    if (lastComparison != 0) {
-
 
893
      return lastComparison;
-
 
894
    }
-
 
895
    lastComparison = TBaseHelper.compareTo(discountedPrice, typedOther.discountedPrice);
-
 
896
    if (lastComparison != 0) {
-
 
897
      return lastComparison;
-
 
898
    }
-
 
899
    lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(isSetCouponCode());
-
 
900
    if (lastComparison != 0) {
-
 
901
      return lastComparison;
-
 
902
    }
-
 
903
    lastComparison = TBaseHelper.compareTo(couponCode, typedOther.couponCode);
-
 
904
    if (lastComparison != 0) {
-
 
905
      return lastComparison;
-
 
906
    }
717
    return 0;
907
    return 0;
718
  }
908
  }
719
 
909
 
720
  public void read(TProtocol iprot) throws TException {
910
  public void read(TProtocol iprot) throws TException {
721
    TField field;
911
    TField field;
Line 802... Line 992...
802
              setAddressIdIsSet(true);
992
              setAddressIdIsSet(true);
803
            } else { 
993
            } else { 
804
              TProtocolUtil.skip(iprot, field.type);
994
              TProtocolUtil.skip(iprot, field.type);
805
            }
995
            }
806
            break;
996
            break;
-
 
997
          case TOTAL_PRICE:
-
 
998
            if (field.type == TType.DOUBLE) {
-
 
999
              this.totalPrice = iprot.readDouble();
-
 
1000
              setTotalPriceIsSet(true);
-
 
1001
            } else { 
-
 
1002
              TProtocolUtil.skip(iprot, field.type);
-
 
1003
            }
-
 
1004
            break;
-
 
1005
          case DISCOUNTED_PRICE:
-
 
1006
            if (field.type == TType.DOUBLE) {
-
 
1007
              this.discountedPrice = iprot.readDouble();
-
 
1008
              setDiscountedPriceIsSet(true);
-
 
1009
            } else { 
-
 
1010
              TProtocolUtil.skip(iprot, field.type);
-
 
1011
            }
-
 
1012
            break;
-
 
1013
          case COUPON_CODE:
-
 
1014
            if (field.type == TType.STRING) {
-
 
1015
              this.couponCode = iprot.readString();
-
 
1016
            } else { 
-
 
1017
              TProtocolUtil.skip(iprot, field.type);
-
 
1018
            }
-
 
1019
            break;
807
        }
1020
        }
808
        iprot.readFieldEnd();
1021
        iprot.readFieldEnd();
809
      }
1022
      }
810
    }
1023
    }
811
    iprot.readStructEnd();
1024
    iprot.readStructEnd();
Line 849... Line 1062...
849
    oprot.writeI64(this.userId);
1062
    oprot.writeI64(this.userId);
850
    oprot.writeFieldEnd();
1063
    oprot.writeFieldEnd();
851
    oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
1064
    oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
852
    oprot.writeI64(this.addressId);
1065
    oprot.writeI64(this.addressId);
853
    oprot.writeFieldEnd();
1066
    oprot.writeFieldEnd();
-
 
1067
    oprot.writeFieldBegin(TOTAL_PRICE_FIELD_DESC);
-
 
1068
    oprot.writeDouble(this.totalPrice);
-
 
1069
    oprot.writeFieldEnd();
-
 
1070
    oprot.writeFieldBegin(DISCOUNTED_PRICE_FIELD_DESC);
-
 
1071
    oprot.writeDouble(this.discountedPrice);
-
 
1072
    oprot.writeFieldEnd();
-
 
1073
    if (this.couponCode != null) {
-
 
1074
      oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
-
 
1075
      oprot.writeString(this.couponCode);
-
 
1076
      oprot.writeFieldEnd();
-
 
1077
    }
854
    oprot.writeFieldStop();
1078
    oprot.writeFieldStop();
855
    oprot.writeStructEnd();
1079
    oprot.writeStructEnd();
856
  }
1080
  }
857
 
1081
 
858
  @Override
1082
  @Override
Line 905... Line 1129...
905
    first = false;
1129
    first = false;
906
    if (!first) sb.append(", ");
1130
    if (!first) sb.append(", ");
907
    sb.append("addressId:");
1131
    sb.append("addressId:");
908
    sb.append(this.addressId);
1132
    sb.append(this.addressId);
909
    first = false;
1133
    first = false;
-
 
1134
    if (!first) sb.append(", ");
-
 
1135
    sb.append("totalPrice:");
-
 
1136
    sb.append(this.totalPrice);
-
 
1137
    first = false;
-
 
1138
    if (!first) sb.append(", ");
-
 
1139
    sb.append("discountedPrice:");
-
 
1140
    sb.append(this.discountedPrice);
-
 
1141
    first = false;
-
 
1142
    if (!first) sb.append(", ");
-
 
1143
    sb.append("couponCode:");
-
 
1144
    if (this.couponCode == null) {
-
 
1145
      sb.append("null");
-
 
1146
    } else {
-
 
1147
      sb.append(this.couponCode);
-
 
1148
    }
-
 
1149
    first = false;
910
    sb.append(")");
1150
    sb.append(")");
911
    return sb.toString();
1151
    return sb.toString();
912
  }
1152
  }
913
 
1153
 
914
  public void validate() throws TException {
1154
  public void validate() throws TException {