Subversion Repositories SmartDukaan

Rev

Rev 1982 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1982 Rev 3430
Line 1... Line 1...
1
/**
1
/**
2
 * Autogenerated by Thrift
2
 * Autogenerated by Thrift Compiler (0.7.0)
3
 *
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
5
 */
6
package in.shop2020.model.v1.user;
6
package in.shop2020.model.v1.user;
7
 
7
 
Line 13... Line 13...
13
import java.util.Set;
13
import java.util.Set;
14
import java.util.HashSet;
14
import java.util.HashSet;
15
import java.util.EnumSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
16
import java.util.Collections;
17
import java.util.BitSet;
17
import java.util.BitSet;
-
 
18
import java.nio.ByteBuffer;
18
import java.util.Arrays;
19
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
import org.slf4j.LoggerFactory;
21
 
22
 
22
import org.apache.thrift.*;
-
 
23
import org.apache.thrift.meta_data.*;
-
 
24
import org.apache.thrift.protocol.*;
-
 
25
 
-
 
26
public class PromotionTracking implements TBase<PromotionTracking._Fields>, java.io.Serializable, Cloneable, Comparable<PromotionTracking> {
23
public class PromotionTracking implements org.apache.thrift.TBase<PromotionTracking, PromotionTracking._Fields>, java.io.Serializable, Cloneable {
27
  private static final TStruct STRUCT_DESC = new TStruct("PromotionTracking");
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PromotionTracking");
28
 
25
 
29
  private static final TField COUPON_CODE_FIELD_DESC = new TField("couponCode", TType.STRING, (short)1);
26
  private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCode", org.apache.thrift.protocol.TType.STRING, (short)1);
30
  private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)2);
27
  private static final org.apache.thrift.protocol.TField TRANSACTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionId", org.apache.thrift.protocol.TType.I64, (short)2);
31
  private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)3);
28
  private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)3);
32
  private static final TField APPLIED_ON_FIELD_DESC = new TField("appliedOn", TType.BOOL, (short)4);
29
  private static final org.apache.thrift.protocol.TField APPLIED_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("appliedOn", org.apache.thrift.protocol.TType.BOOL, (short)4);
33
 
30
 
34
  private String couponCode;
31
  private String couponCode; // required
35
  private long transactionId;
32
  private long transactionId; // required
36
  private long userId;
33
  private long userId; // required
37
  private boolean appliedOn;
34
  private boolean appliedOn; // required
38
 
35
 
39
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
36
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
40
  public enum _Fields implements TFieldIdEnum {
37
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
41
    COUPON_CODE((short)1, "couponCode"),
38
    COUPON_CODE((short)1, "couponCode"),
42
    TRANSACTION_ID((short)2, "transactionId"),
39
    TRANSACTION_ID((short)2, "transactionId"),
43
    USER_ID((short)3, "userId"),
40
    USER_ID((short)3, "userId"),
44
    APPLIED_ON((short)4, "appliedOn");
41
    APPLIED_ON((short)4, "appliedOn");
45
 
42
 
46
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
47
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
43
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
48
 
44
 
49
    static {
45
    static {
50
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
46
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
51
        byId.put((int)field._thriftId, field);
-
 
52
        byName.put(field.getFieldName(), field);
47
        byName.put(field.getFieldName(), field);
53
      }
48
      }
54
    }
49
    }
55
 
50
 
56
    /**
51
    /**
57
     * Find the _Fields constant that matches fieldId, or null if its not found.
52
     * Find the _Fields constant that matches fieldId, or null if its not found.
58
     */
53
     */
59
    public static _Fields findByThriftId(int fieldId) {
54
    public static _Fields findByThriftId(int fieldId) {
60
      return byId.get(fieldId);
55
      switch(fieldId) {
-
 
56
        case 1: // COUPON_CODE
-
 
57
          return COUPON_CODE;
-
 
58
        case 2: // TRANSACTION_ID
-
 
59
          return TRANSACTION_ID;
-
 
60
        case 3: // USER_ID
-
 
61
          return USER_ID;
-
 
62
        case 4: // APPLIED_ON
-
 
63
          return APPLIED_ON;
-
 
64
        default:
-
 
65
          return null;
-
 
66
      }
61
    }
67
    }
62
 
68
 
63
    /**
69
    /**
64
     * Find the _Fields constant that matches fieldId, throwing an exception
70
     * Find the _Fields constant that matches fieldId, throwing an exception
65
     * if it is not found.
71
     * if it is not found.
Line 98... Line 104...
98
  private static final int __TRANSACTIONID_ISSET_ID = 0;
104
  private static final int __TRANSACTIONID_ISSET_ID = 0;
99
  private static final int __USERID_ISSET_ID = 1;
105
  private static final int __USERID_ISSET_ID = 1;
100
  private static final int __APPLIEDON_ISSET_ID = 2;
106
  private static final int __APPLIEDON_ISSET_ID = 2;
101
  private BitSet __isset_bit_vector = new BitSet(3);
107
  private BitSet __isset_bit_vector = new BitSet(3);
102
 
108
 
103
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
109
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
104
    put(_Fields.COUPON_CODE, new FieldMetaData("couponCode", TFieldRequirementType.DEFAULT, 
-
 
105
        new FieldValueMetaData(TType.STRING)));
-
 
106
    put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
-
 
107
        new FieldValueMetaData(TType.I64)));
-
 
108
    put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
-
 
109
        new FieldValueMetaData(TType.I64)));
-
 
110
    put(_Fields.APPLIED_ON, new FieldMetaData("appliedOn", TFieldRequirementType.DEFAULT, 
-
 
111
        new FieldValueMetaData(TType.BOOL)));
-
 
112
  }});
-
 
113
 
-
 
114
  static {
110
  static {
-
 
111
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
112
    tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
113
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
114
    tmpMap.put(_Fields.TRANSACTION_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
115
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
116
    tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
117
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
118
    tmpMap.put(_Fields.APPLIED_ON, new org.apache.thrift.meta_data.FieldMetaData("appliedOn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
119
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
-
 
120
    metaDataMap = Collections.unmodifiableMap(tmpMap);
115
    FieldMetaData.addStructMetaDataMap(PromotionTracking.class, metaDataMap);
121
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PromotionTracking.class, metaDataMap);
116
  }
122
  }
117
 
123
 
118
  public PromotionTracking() {
124
  public PromotionTracking() {
119
  }
125
  }
120
 
126
 
Line 150... Line 156...
150
 
156
 
151
  public PromotionTracking deepCopy() {
157
  public PromotionTracking deepCopy() {
152
    return new PromotionTracking(this);
158
    return new PromotionTracking(this);
153
  }
159
  }
154
 
160
 
155
  @Deprecated
161
  @Override
156
  public PromotionTracking clone() {
162
  public void clear() {
-
 
163
    this.couponCode = null;
157
    return new PromotionTracking(this);
164
    setTransactionIdIsSet(false);
-
 
165
    this.transactionId = 0;
-
 
166
    setUserIdIsSet(false);
-
 
167
    this.userId = 0;
-
 
168
    setAppliedOnIsSet(false);
-
 
169
    this.appliedOn = false;
158
  }
170
  }
159
 
171
 
160
  public String getCouponCode() {
172
  public String getCouponCode() {
161
    return this.couponCode;
173
    return this.couponCode;
162
  }
174
  }
163
 
175
 
164
  public PromotionTracking setCouponCode(String couponCode) {
176
  public void setCouponCode(String couponCode) {
165
    this.couponCode = couponCode;
177
    this.couponCode = couponCode;
166
    return this;
-
 
167
  }
178
  }
168
 
179
 
169
  public void unsetCouponCode() {
180
  public void unsetCouponCode() {
170
    this.couponCode = null;
181
    this.couponCode = null;
171
  }
182
  }
172
 
183
 
173
  /** Returns true if field couponCode is set (has been asigned a value) and false otherwise */
184
  /** Returns true if field couponCode is set (has been assigned a value) and false otherwise */
174
  public boolean isSetCouponCode() {
185
  public boolean isSetCouponCode() {
175
    return this.couponCode != null;
186
    return this.couponCode != null;
176
  }
187
  }
177
 
188
 
178
  public void setCouponCodeIsSet(boolean value) {
189
  public void setCouponCodeIsSet(boolean value) {
Line 183... Line 194...
183
 
194
 
184
  public long getTransactionId() {
195
  public long getTransactionId() {
185
    return this.transactionId;
196
    return this.transactionId;
186
  }
197
  }
187
 
198
 
188
  public PromotionTracking setTransactionId(long transactionId) {
199
  public void setTransactionId(long transactionId) {
189
    this.transactionId = transactionId;
200
    this.transactionId = transactionId;
190
    setTransactionIdIsSet(true);
201
    setTransactionIdIsSet(true);
191
    return this;
-
 
192
  }
202
  }
193
 
203
 
194
  public void unsetTransactionId() {
204
  public void unsetTransactionId() {
195
    __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
205
    __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
196
  }
206
  }
197
 
207
 
198
  /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
208
  /** Returns true if field transactionId is set (has been assigned a value) and false otherwise */
199
  public boolean isSetTransactionId() {
209
  public boolean isSetTransactionId() {
200
    return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
210
    return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
201
  }
211
  }
202
 
212
 
203
  public void setTransactionIdIsSet(boolean value) {
213
  public void setTransactionIdIsSet(boolean value) {
Line 206... Line 216...
206
 
216
 
207
  public long getUserId() {
217
  public long getUserId() {
208
    return this.userId;
218
    return this.userId;
209
  }
219
  }
210
 
220
 
211
  public PromotionTracking setUserId(long userId) {
221
  public void setUserId(long userId) {
212
    this.userId = userId;
222
    this.userId = userId;
213
    setUserIdIsSet(true);
223
    setUserIdIsSet(true);
214
    return this;
-
 
215
  }
224
  }
216
 
225
 
217
  public void unsetUserId() {
226
  public void unsetUserId() {
218
    __isset_bit_vector.clear(__USERID_ISSET_ID);
227
    __isset_bit_vector.clear(__USERID_ISSET_ID);
219
  }
228
  }
220
 
229
 
221
  /** Returns true if field userId is set (has been asigned a value) and false otherwise */
230
  /** Returns true if field userId is set (has been assigned a value) and false otherwise */
222
  public boolean isSetUserId() {
231
  public boolean isSetUserId() {
223
    return __isset_bit_vector.get(__USERID_ISSET_ID);
232
    return __isset_bit_vector.get(__USERID_ISSET_ID);
224
  }
233
  }
225
 
234
 
226
  public void setUserIdIsSet(boolean value) {
235
  public void setUserIdIsSet(boolean value) {
Line 229... Line 238...
229
 
238
 
230
  public boolean isAppliedOn() {
239
  public boolean isAppliedOn() {
231
    return this.appliedOn;
240
    return this.appliedOn;
232
  }
241
  }
233
 
242
 
234
  public PromotionTracking setAppliedOn(boolean appliedOn) {
243
  public void setAppliedOn(boolean appliedOn) {
235
    this.appliedOn = appliedOn;
244
    this.appliedOn = appliedOn;
236
    setAppliedOnIsSet(true);
245
    setAppliedOnIsSet(true);
237
    return this;
-
 
238
  }
246
  }
239
 
247
 
240
  public void unsetAppliedOn() {
248
  public void unsetAppliedOn() {
241
    __isset_bit_vector.clear(__APPLIEDON_ISSET_ID);
249
    __isset_bit_vector.clear(__APPLIEDON_ISSET_ID);
242
  }
250
  }
243
 
251
 
244
  /** Returns true if field appliedOn is set (has been asigned a value) and false otherwise */
252
  /** Returns true if field appliedOn is set (has been assigned a value) and false otherwise */
245
  public boolean isSetAppliedOn() {
253
  public boolean isSetAppliedOn() {
246
    return __isset_bit_vector.get(__APPLIEDON_ISSET_ID);
254
    return __isset_bit_vector.get(__APPLIEDON_ISSET_ID);
247
  }
255
  }
248
 
256
 
249
  public void setAppliedOnIsSet(boolean value) {
257
  public void setAppliedOnIsSet(boolean value) {
Line 285... Line 293...
285
      break;
293
      break;
286
 
294
 
287
    }
295
    }
288
  }
296
  }
289
 
297
 
290
  public void setFieldValue(int fieldID, Object value) {
-
 
291
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
292
  }
-
 
293
 
-
 
294
  public Object getFieldValue(_Fields field) {
298
  public Object getFieldValue(_Fields field) {
295
    switch (field) {
299
    switch (field) {
296
    case COUPON_CODE:
300
    case COUPON_CODE:
297
      return getCouponCode();
301
      return getCouponCode();
298
 
302
 
299
    case TRANSACTION_ID:
303
    case TRANSACTION_ID:
300
      return new Long(getTransactionId());
304
      return Long.valueOf(getTransactionId());
301
 
305
 
302
    case USER_ID:
306
    case USER_ID:
303
      return new Long(getUserId());
307
      return Long.valueOf(getUserId());
304
 
308
 
305
    case APPLIED_ON:
309
    case APPLIED_ON:
306
      return new Boolean(isAppliedOn());
310
      return Boolean.valueOf(isAppliedOn());
307
 
311
 
308
    }
312
    }
309
    throw new IllegalStateException();
313
    throw new IllegalStateException();
310
  }
314
  }
311
 
315
 
312
  public Object getFieldValue(int fieldId) {
-
 
313
    return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
314
  }
-
 
315
 
-
 
316
  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
316
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
317
  public boolean isSet(_Fields field) {
317
  public boolean isSet(_Fields field) {
-
 
318
    if (field == null) {
-
 
319
      throw new IllegalArgumentException();
-
 
320
    }
-
 
321
 
318
    switch (field) {
322
    switch (field) {
319
    case COUPON_CODE:
323
    case COUPON_CODE:
320
      return isSetCouponCode();
324
      return isSetCouponCode();
321
    case TRANSACTION_ID:
325
    case TRANSACTION_ID:
322
      return isSetTransactionId();
326
      return isSetTransactionId();
Line 326... Line 330...
326
      return isSetAppliedOn();
330
      return isSetAppliedOn();
327
    }
331
    }
328
    throw new IllegalStateException();
332
    throw new IllegalStateException();
329
  }
333
  }
330
 
334
 
331
  public boolean isSet(int fieldID) {
-
 
332
    return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
333
  }
-
 
334
 
-
 
335
  @Override
335
  @Override
336
  public boolean equals(Object that) {
336
  public boolean equals(Object that) {
337
    if (that == null)
337
    if (that == null)
338
      return false;
338
      return false;
339
    if (that instanceof PromotionTracking)
339
    if (that instanceof PromotionTracking)
Line 395... Line 395...
395
    }
395
    }
396
 
396
 
397
    int lastComparison = 0;
397
    int lastComparison = 0;
398
    PromotionTracking typedOther = (PromotionTracking)other;
398
    PromotionTracking typedOther = (PromotionTracking)other;
399
 
399
 
400
    lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(isSetCouponCode());
400
    lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
401
    if (lastComparison != 0) {
401
    if (lastComparison != 0) {
402
      return lastComparison;
402
      return lastComparison;
403
    }
403
    }
-
 
404
    if (isSetCouponCode()) {
404
    lastComparison = TBaseHelper.compareTo(couponCode, typedOther.couponCode);
405
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);
405
    if (lastComparison != 0) {
406
      if (lastComparison != 0) {
406
      return lastComparison;
407
        return lastComparison;
-
 
408
      }
407
    }
409
    }
408
    lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
410
    lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(typedOther.isSetTransactionId());
409
    if (lastComparison != 0) {
411
    if (lastComparison != 0) {
410
      return lastComparison;
412
      return lastComparison;
411
    }
413
    }
-
 
414
    if (isSetTransactionId()) {
412
    lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
415
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionId, typedOther.transactionId);
413
    if (lastComparison != 0) {
416
      if (lastComparison != 0) {
414
      return lastComparison;
417
        return lastComparison;
-
 
418
      }
415
    }
419
    }
416
    lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
420
    lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
417
    if (lastComparison != 0) {
421
    if (lastComparison != 0) {
418
      return lastComparison;
422
      return lastComparison;
419
    }
423
    }
-
 
424
    if (isSetUserId()) {
420
    lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
425
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
421
    if (lastComparison != 0) {
426
      if (lastComparison != 0) {
422
      return lastComparison;
427
        return lastComparison;
-
 
428
      }
423
    }
429
    }
424
    lastComparison = Boolean.valueOf(isSetAppliedOn()).compareTo(isSetAppliedOn());
430
    lastComparison = Boolean.valueOf(isSetAppliedOn()).compareTo(typedOther.isSetAppliedOn());
425
    if (lastComparison != 0) {
431
    if (lastComparison != 0) {
426
      return lastComparison;
432
      return lastComparison;
427
    }
433
    }
-
 
434
    if (isSetAppliedOn()) {
428
    lastComparison = TBaseHelper.compareTo(appliedOn, typedOther.appliedOn);
435
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.appliedOn, typedOther.appliedOn);
429
    if (lastComparison != 0) {
436
      if (lastComparison != 0) {
430
      return lastComparison;
437
        return lastComparison;
-
 
438
      }
431
    }
439
    }
432
    return 0;
440
    return 0;
433
  }
441
  }
434
 
442
 
-
 
443
  public _Fields fieldForId(int fieldId) {
-
 
444
    return _Fields.findByThriftId(fieldId);
-
 
445
  }
-
 
446
 
435
  public void read(TProtocol iprot) throws TException {
447
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
436
    TField field;
448
    org.apache.thrift.protocol.TField field;
437
    iprot.readStructBegin();
449
    iprot.readStructBegin();
438
    while (true)
450
    while (true)
439
    {
451
    {
440
      field = iprot.readFieldBegin();
452
      field = iprot.readFieldBegin();
441
      if (field.type == TType.STOP) { 
453
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
442
        break;
454
        break;
443
      }
455
      }
444
      _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
445
      if (fieldId == null) {
-
 
446
        TProtocolUtil.skip(iprot, field.type);
-
 
447
      } else {
-
 
448
        switch (fieldId) {
456
      switch (field.id) {
449
          case COUPON_CODE:
457
        case 1: // COUPON_CODE
450
            if (field.type == TType.STRING) {
458
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
451
              this.couponCode = iprot.readString();
459
            this.couponCode = iprot.readString();
452
            } else { 
460
          } else { 
453
              TProtocolUtil.skip(iprot, field.type);
461
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
454
            }
462
          }
455
            break;
463
          break;
456
          case TRANSACTION_ID:
464
        case 2: // TRANSACTION_ID
457
            if (field.type == TType.I64) {
465
          if (field.type == org.apache.thrift.protocol.TType.I64) {
458
              this.transactionId = iprot.readI64();
466
            this.transactionId = iprot.readI64();
459
              setTransactionIdIsSet(true);
467
            setTransactionIdIsSet(true);
460
            } else { 
468
          } else { 
461
              TProtocolUtil.skip(iprot, field.type);
469
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
462
            }
470
          }
463
            break;
471
          break;
464
          case USER_ID:
472
        case 3: // USER_ID
465
            if (field.type == TType.I64) {
473
          if (field.type == org.apache.thrift.protocol.TType.I64) {
466
              this.userId = iprot.readI64();
474
            this.userId = iprot.readI64();
467
              setUserIdIsSet(true);
475
            setUserIdIsSet(true);
468
            } else { 
476
          } else { 
469
              TProtocolUtil.skip(iprot, field.type);
477
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
470
            }
478
          }
471
            break;
479
          break;
472
          case APPLIED_ON:
480
        case 4: // APPLIED_ON
473
            if (field.type == TType.BOOL) {
481
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
474
              this.appliedOn = iprot.readBool();
482
            this.appliedOn = iprot.readBool();
475
              setAppliedOnIsSet(true);
483
            setAppliedOnIsSet(true);
476
            } else { 
484
          } else { 
477
              TProtocolUtil.skip(iprot, field.type);
485
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
478
            }
486
          }
479
            break;
487
          break;
480
        }
488
        default:
481
        iprot.readFieldEnd();
489
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
482
      }
490
      }
-
 
491
      iprot.readFieldEnd();
483
    }
492
    }
484
    iprot.readStructEnd();
493
    iprot.readStructEnd();
485
    validate();
494
    validate();
486
  }
495
  }
487
 
496
 
488
  public void write(TProtocol oprot) throws TException {
497
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
489
    validate();
498
    validate();
490
 
499
 
491
    oprot.writeStructBegin(STRUCT_DESC);
500
    oprot.writeStructBegin(STRUCT_DESC);
492
    if (this.couponCode != null) {
501
    if (this.couponCode != null) {
493
      oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
502
      oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
Line 533... Line 542...
533
    first = false;
542
    first = false;
534
    sb.append(")");
543
    sb.append(")");
535
    return sb.toString();
544
    return sb.toString();
536
  }
545
  }
537
 
546
 
538
  public void validate() throws TException {
547
  public void validate() throws org.apache.thrift.TException {
539
    // check for required fields
548
    // check for required fields
540
  }
549
  }
541
 
550
 
-
 
551
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
552
    try {
-
 
553
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
554
    } catch (org.apache.thrift.TException te) {
-
 
555
      throw new java.io.IOException(te);
-
 
556
    }
-
 
557
  }
-
 
558
 
-
 
559
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
560
    try {
-
 
561
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
562
      __isset_bit_vector = new BitSet(1);
-
 
563
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
564
    } catch (org.apache.thrift.TException te) {
-
 
565
      throw new java.io.IOException(te);
-
 
566
    }
-
 
567
  }
-
 
568
 
542
}
569
}
543
 
570