Subversion Repositories SmartDukaan

Rev

Rev 1013 | Rev 4393 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
305 ashish 1
/**
3430 rajveer 2
 * Autogenerated by Thrift Compiler (0.7.0)
305 ashish 3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.order;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
3430 rajveer 18
import java.nio.ByteBuffer;
305 ashish 19
import java.util.Arrays;
20
import org.slf4j.Logger;
21
import org.slf4j.LoggerFactory;
22
 
3430 rajveer 23
public class Alert implements org.apache.thrift.TBase<Alert, Alert._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Alert");
305 ashish 25
 
3430 rajveer 26
  private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);
27
  private static final org.apache.thrift.protocol.TField ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("order_id", org.apache.thrift.protocol.TType.I64, (short)2);
28
  private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I64, (short)3);
29
  private static final org.apache.thrift.protocol.TField TIME_SET_FIELD_DESC = new org.apache.thrift.protocol.TField("time_set", org.apache.thrift.protocol.TType.I64, (short)4);
30
  private static final org.apache.thrift.protocol.TField COMMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("comment", org.apache.thrift.protocol.TType.STRING, (short)5);
31
  private static final org.apache.thrift.protocol.TField TIME_UNSET_FIELD_DESC = new org.apache.thrift.protocol.TField("time_unset", org.apache.thrift.protocol.TType.I64, (short)6);
305 ashish 32
 
3430 rajveer 33
  private long id; // required
34
  private long order_id; // required
35
  private long type; // required
36
  private long time_set; // required
37
  private String comment; // required
38
  private long time_unset; // required
305 ashish 39
 
40
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 41
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
305 ashish 42
    ID((short)1, "id"),
483 rajveer 43
    ORDER_ID((short)2, "order_id"),
305 ashish 44
    TYPE((short)3, "type"),
45
    TIME_SET((short)4, "time_set"),
46
    COMMENT((short)5, "comment"),
47
    TIME_UNSET((short)6, "time_unset");
48
 
49
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
50
 
51
    static {
52
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
53
        byName.put(field.getFieldName(), field);
54
      }
55
    }
56
 
57
    /**
58
     * Find the _Fields constant that matches fieldId, or null if its not found.
59
     */
60
    public static _Fields findByThriftId(int fieldId) {
3430 rajveer 61
      switch(fieldId) {
62
        case 1: // ID
63
          return ID;
64
        case 2: // ORDER_ID
65
          return ORDER_ID;
66
        case 3: // TYPE
67
          return TYPE;
68
        case 4: // TIME_SET
69
          return TIME_SET;
70
        case 5: // COMMENT
71
          return COMMENT;
72
        case 6: // TIME_UNSET
73
          return TIME_UNSET;
74
        default:
75
          return null;
76
      }
305 ashish 77
    }
78
 
79
    /**
80
     * Find the _Fields constant that matches fieldId, throwing an exception
81
     * if it is not found.
82
     */
83
    public static _Fields findByThriftIdOrThrow(int fieldId) {
84
      _Fields fields = findByThriftId(fieldId);
85
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
86
      return fields;
87
    }
88
 
89
    /**
90
     * Find the _Fields constant that matches name, or null if its not found.
91
     */
92
    public static _Fields findByName(String name) {
93
      return byName.get(name);
94
    }
95
 
96
    private final short _thriftId;
97
    private final String _fieldName;
98
 
99
    _Fields(short thriftId, String fieldName) {
100
      _thriftId = thriftId;
101
      _fieldName = fieldName;
102
    }
103
 
104
    public short getThriftFieldId() {
105
      return _thriftId;
106
    }
107
 
108
    public String getFieldName() {
109
      return _fieldName;
110
    }
111
  }
112
 
113
  // isset id assignments
114
  private static final int __ID_ISSET_ID = 0;
483 rajveer 115
  private static final int __ORDER_ID_ISSET_ID = 1;
305 ashish 116
  private static final int __TYPE_ISSET_ID = 2;
117
  private static final int __TIME_SET_ISSET_ID = 3;
118
  private static final int __TIME_UNSET_ISSET_ID = 4;
119
  private BitSet __isset_bit_vector = new BitSet(5);
120
 
3430 rajveer 121
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
305 ashish 122
  static {
3430 rajveer 123
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
124
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
125
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
126
    tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("order_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
127
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
128
    tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
129
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
130
    tmpMap.put(_Fields.TIME_SET, new org.apache.thrift.meta_data.FieldMetaData("time_set", org.apache.thrift.TFieldRequirementType.DEFAULT, 
131
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
132
    tmpMap.put(_Fields.COMMENT, new org.apache.thrift.meta_data.FieldMetaData("comment", org.apache.thrift.TFieldRequirementType.DEFAULT, 
133
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
134
    tmpMap.put(_Fields.TIME_UNSET, new org.apache.thrift.meta_data.FieldMetaData("time_unset", org.apache.thrift.TFieldRequirementType.DEFAULT, 
135
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
136
    metaDataMap = Collections.unmodifiableMap(tmpMap);
137
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Alert.class, metaDataMap);
305 ashish 138
  }
139
 
140
  public Alert() {
141
  }
142
 
143
  public Alert(
144
    long id,
483 rajveer 145
    long order_id,
305 ashish 146
    long type,
147
    long time_set,
148
    String comment,
149
    long time_unset)
150
  {
151
    this();
152
    this.id = id;
153
    setIdIsSet(true);
483 rajveer 154
    this.order_id = order_id;
155
    setOrder_idIsSet(true);
305 ashish 156
    this.type = type;
157
    setTypeIsSet(true);
158
    this.time_set = time_set;
159
    setTime_setIsSet(true);
160
    this.comment = comment;
161
    this.time_unset = time_unset;
162
    setTime_unsetIsSet(true);
163
  }
164
 
165
  /**
166
   * Performs a deep copy on <i>other</i>.
167
   */
168
  public Alert(Alert other) {
169
    __isset_bit_vector.clear();
170
    __isset_bit_vector.or(other.__isset_bit_vector);
171
    this.id = other.id;
483 rajveer 172
    this.order_id = other.order_id;
305 ashish 173
    this.type = other.type;
174
    this.time_set = other.time_set;
175
    if (other.isSetComment()) {
176
      this.comment = other.comment;
177
    }
178
    this.time_unset = other.time_unset;
179
  }
180
 
181
  public Alert deepCopy() {
182
    return new Alert(this);
183
  }
184
 
3430 rajveer 185
  @Override
186
  public void clear() {
187
    setIdIsSet(false);
188
    this.id = 0;
189
    setOrder_idIsSet(false);
190
    this.order_id = 0;
191
    setTypeIsSet(false);
192
    this.type = 0;
193
    setTime_setIsSet(false);
194
    this.time_set = 0;
195
    this.comment = null;
196
    setTime_unsetIsSet(false);
197
    this.time_unset = 0;
305 ashish 198
  }
199
 
200
  public long getId() {
201
    return this.id;
202
  }
203
 
3430 rajveer 204
  public void setId(long id) {
305 ashish 205
    this.id = id;
206
    setIdIsSet(true);
207
  }
208
 
209
  public void unsetId() {
210
    __isset_bit_vector.clear(__ID_ISSET_ID);
211
  }
212
 
3430 rajveer 213
  /** Returns true if field id is set (has been assigned a value) and false otherwise */
305 ashish 214
  public boolean isSetId() {
215
    return __isset_bit_vector.get(__ID_ISSET_ID);
216
  }
217
 
218
  public void setIdIsSet(boolean value) {
219
    __isset_bit_vector.set(__ID_ISSET_ID, value);
220
  }
221
 
483 rajveer 222
  public long getOrder_id() {
223
    return this.order_id;
305 ashish 224
  }
225
 
3430 rajveer 226
  public void setOrder_id(long order_id) {
483 rajveer 227
    this.order_id = order_id;
228
    setOrder_idIsSet(true);
305 ashish 229
  }
230
 
483 rajveer 231
  public void unsetOrder_id() {
232
    __isset_bit_vector.clear(__ORDER_ID_ISSET_ID);
305 ashish 233
  }
234
 
3430 rajveer 235
  /** Returns true if field order_id is set (has been assigned a value) and false otherwise */
483 rajveer 236
  public boolean isSetOrder_id() {
237
    return __isset_bit_vector.get(__ORDER_ID_ISSET_ID);
305 ashish 238
  }
239
 
483 rajveer 240
  public void setOrder_idIsSet(boolean value) {
241
    __isset_bit_vector.set(__ORDER_ID_ISSET_ID, value);
305 ashish 242
  }
243
 
244
  public long getType() {
245
    return this.type;
246
  }
247
 
3430 rajveer 248
  public void setType(long type) {
305 ashish 249
    this.type = type;
250
    setTypeIsSet(true);
251
  }
252
 
253
  public void unsetType() {
254
    __isset_bit_vector.clear(__TYPE_ISSET_ID);
255
  }
256
 
3430 rajveer 257
  /** Returns true if field type is set (has been assigned a value) and false otherwise */
305 ashish 258
  public boolean isSetType() {
259
    return __isset_bit_vector.get(__TYPE_ISSET_ID);
260
  }
261
 
262
  public void setTypeIsSet(boolean value) {
263
    __isset_bit_vector.set(__TYPE_ISSET_ID, value);
264
  }
265
 
266
  public long getTime_set() {
267
    return this.time_set;
268
  }
269
 
3430 rajveer 270
  public void setTime_set(long time_set) {
305 ashish 271
    this.time_set = time_set;
272
    setTime_setIsSet(true);
273
  }
274
 
275
  public void unsetTime_set() {
276
    __isset_bit_vector.clear(__TIME_SET_ISSET_ID);
277
  }
278
 
3430 rajveer 279
  /** Returns true if field time_set is set (has been assigned a value) and false otherwise */
305 ashish 280
  public boolean isSetTime_set() {
281
    return __isset_bit_vector.get(__TIME_SET_ISSET_ID);
282
  }
283
 
284
  public void setTime_setIsSet(boolean value) {
285
    __isset_bit_vector.set(__TIME_SET_ISSET_ID, value);
286
  }
287
 
288
  public String getComment() {
289
    return this.comment;
290
  }
291
 
3430 rajveer 292
  public void setComment(String comment) {
305 ashish 293
    this.comment = comment;
294
  }
295
 
296
  public void unsetComment() {
297
    this.comment = null;
298
  }
299
 
3430 rajveer 300
  /** Returns true if field comment is set (has been assigned a value) and false otherwise */
305 ashish 301
  public boolean isSetComment() {
302
    return this.comment != null;
303
  }
304
 
305
  public void setCommentIsSet(boolean value) {
306
    if (!value) {
307
      this.comment = null;
308
    }
309
  }
310
 
311
  public long getTime_unset() {
312
    return this.time_unset;
313
  }
314
 
3430 rajveer 315
  public void setTime_unset(long time_unset) {
305 ashish 316
    this.time_unset = time_unset;
317
    setTime_unsetIsSet(true);
318
  }
319
 
320
  public void unsetTime_unset() {
321
    __isset_bit_vector.clear(__TIME_UNSET_ISSET_ID);
322
  }
323
 
3430 rajveer 324
  /** Returns true if field time_unset is set (has been assigned a value) and false otherwise */
305 ashish 325
  public boolean isSetTime_unset() {
326
    return __isset_bit_vector.get(__TIME_UNSET_ISSET_ID);
327
  }
328
 
329
  public void setTime_unsetIsSet(boolean value) {
330
    __isset_bit_vector.set(__TIME_UNSET_ISSET_ID, value);
331
  }
332
 
333
  public void setFieldValue(_Fields field, Object value) {
334
    switch (field) {
335
    case ID:
336
      if (value == null) {
337
        unsetId();
338
      } else {
339
        setId((Long)value);
340
      }
341
      break;
342
 
483 rajveer 343
    case ORDER_ID:
305 ashish 344
      if (value == null) {
483 rajveer 345
        unsetOrder_id();
305 ashish 346
      } else {
483 rajveer 347
        setOrder_id((Long)value);
305 ashish 348
      }
349
      break;
350
 
351
    case TYPE:
352
      if (value == null) {
353
        unsetType();
354
      } else {
355
        setType((Long)value);
356
      }
357
      break;
358
 
359
    case TIME_SET:
360
      if (value == null) {
361
        unsetTime_set();
362
      } else {
363
        setTime_set((Long)value);
364
      }
365
      break;
366
 
367
    case COMMENT:
368
      if (value == null) {
369
        unsetComment();
370
      } else {
371
        setComment((String)value);
372
      }
373
      break;
374
 
375
    case TIME_UNSET:
376
      if (value == null) {
377
        unsetTime_unset();
378
      } else {
379
        setTime_unset((Long)value);
380
      }
381
      break;
382
 
383
    }
384
  }
385
 
386
  public Object getFieldValue(_Fields field) {
387
    switch (field) {
388
    case ID:
3430 rajveer 389
      return Long.valueOf(getId());
305 ashish 390
 
483 rajveer 391
    case ORDER_ID:
3430 rajveer 392
      return Long.valueOf(getOrder_id());
305 ashish 393
 
394
    case TYPE:
3430 rajveer 395
      return Long.valueOf(getType());
305 ashish 396
 
397
    case TIME_SET:
3430 rajveer 398
      return Long.valueOf(getTime_set());
305 ashish 399
 
400
    case COMMENT:
401
      return getComment();
402
 
403
    case TIME_UNSET:
3430 rajveer 404
      return Long.valueOf(getTime_unset());
305 ashish 405
 
406
    }
407
    throw new IllegalStateException();
408
  }
409
 
3430 rajveer 410
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
411
  public boolean isSet(_Fields field) {
412
    if (field == null) {
413
      throw new IllegalArgumentException();
414
    }
305 ashish 415
 
416
    switch (field) {
417
    case ID:
418
      return isSetId();
483 rajveer 419
    case ORDER_ID:
420
      return isSetOrder_id();
305 ashish 421
    case TYPE:
422
      return isSetType();
423
    case TIME_SET:
424
      return isSetTime_set();
425
    case COMMENT:
426
      return isSetComment();
427
    case TIME_UNSET:
428
      return isSetTime_unset();
429
    }
430
    throw new IllegalStateException();
431
  }
432
 
433
  @Override
434
  public boolean equals(Object that) {
435
    if (that == null)
436
      return false;
437
    if (that instanceof Alert)
438
      return this.equals((Alert)that);
439
    return false;
440
  }
441
 
442
  public boolean equals(Alert that) {
443
    if (that == null)
444
      return false;
445
 
446
    boolean this_present_id = true;
447
    boolean that_present_id = true;
448
    if (this_present_id || that_present_id) {
449
      if (!(this_present_id && that_present_id))
450
        return false;
451
      if (this.id != that.id)
452
        return false;
453
    }
454
 
483 rajveer 455
    boolean this_present_order_id = true;
456
    boolean that_present_order_id = true;
457
    if (this_present_order_id || that_present_order_id) {
458
      if (!(this_present_order_id && that_present_order_id))
305 ashish 459
        return false;
483 rajveer 460
      if (this.order_id != that.order_id)
305 ashish 461
        return false;
462
    }
463
 
464
    boolean this_present_type = true;
465
    boolean that_present_type = true;
466
    if (this_present_type || that_present_type) {
467
      if (!(this_present_type && that_present_type))
468
        return false;
469
      if (this.type != that.type)
470
        return false;
471
    }
472
 
473
    boolean this_present_time_set = true;
474
    boolean that_present_time_set = true;
475
    if (this_present_time_set || that_present_time_set) {
476
      if (!(this_present_time_set && that_present_time_set))
477
        return false;
478
      if (this.time_set != that.time_set)
479
        return false;
480
    }
481
 
482
    boolean this_present_comment = true && this.isSetComment();
483
    boolean that_present_comment = true && that.isSetComment();
484
    if (this_present_comment || that_present_comment) {
485
      if (!(this_present_comment && that_present_comment))
486
        return false;
487
      if (!this.comment.equals(that.comment))
488
        return false;
489
    }
490
 
491
    boolean this_present_time_unset = true;
492
    boolean that_present_time_unset = true;
493
    if (this_present_time_unset || that_present_time_unset) {
494
      if (!(this_present_time_unset && that_present_time_unset))
495
        return false;
496
      if (this.time_unset != that.time_unset)
497
        return false;
498
    }
499
 
500
    return true;
501
  }
502
 
503
  @Override
504
  public int hashCode() {
505
    return 0;
506
  }
507
 
508
  public int compareTo(Alert other) {
509
    if (!getClass().equals(other.getClass())) {
510
      return getClass().getName().compareTo(other.getClass().getName());
511
    }
512
 
513
    int lastComparison = 0;
514
    Alert typedOther = (Alert)other;
515
 
3430 rajveer 516
    lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
305 ashish 517
    if (lastComparison != 0) {
518
      return lastComparison;
519
    }
3430 rajveer 520
    if (isSetId()) {
521
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
522
      if (lastComparison != 0) {
523
        return lastComparison;
524
      }
305 ashish 525
    }
3430 rajveer 526
    lastComparison = Boolean.valueOf(isSetOrder_id()).compareTo(typedOther.isSetOrder_id());
305 ashish 527
    if (lastComparison != 0) {
528
      return lastComparison;
529
    }
3430 rajveer 530
    if (isSetOrder_id()) {
531
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.order_id, typedOther.order_id);
532
      if (lastComparison != 0) {
533
        return lastComparison;
534
      }
305 ashish 535
    }
3430 rajveer 536
    lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
305 ashish 537
    if (lastComparison != 0) {
538
      return lastComparison;
539
    }
3430 rajveer 540
    if (isSetType()) {
541
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
542
      if (lastComparison != 0) {
543
        return lastComparison;
544
      }
305 ashish 545
    }
3430 rajveer 546
    lastComparison = Boolean.valueOf(isSetTime_set()).compareTo(typedOther.isSetTime_set());
305 ashish 547
    if (lastComparison != 0) {
548
      return lastComparison;
549
    }
3430 rajveer 550
    if (isSetTime_set()) {
551
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.time_set, typedOther.time_set);
552
      if (lastComparison != 0) {
553
        return lastComparison;
554
      }
305 ashish 555
    }
3430 rajveer 556
    lastComparison = Boolean.valueOf(isSetComment()).compareTo(typedOther.isSetComment());
305 ashish 557
    if (lastComparison != 0) {
558
      return lastComparison;
559
    }
3430 rajveer 560
    if (isSetComment()) {
561
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.comment, typedOther.comment);
562
      if (lastComparison != 0) {
563
        return lastComparison;
564
      }
305 ashish 565
    }
3430 rajveer 566
    lastComparison = Boolean.valueOf(isSetTime_unset()).compareTo(typedOther.isSetTime_unset());
305 ashish 567
    if (lastComparison != 0) {
568
      return lastComparison;
569
    }
3430 rajveer 570
    if (isSetTime_unset()) {
571
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.time_unset, typedOther.time_unset);
572
      if (lastComparison != 0) {
573
        return lastComparison;
574
      }
305 ashish 575
    }
576
    return 0;
577
  }
578
 
3430 rajveer 579
  public _Fields fieldForId(int fieldId) {
580
    return _Fields.findByThriftId(fieldId);
581
  }
582
 
583
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
584
    org.apache.thrift.protocol.TField field;
305 ashish 585
    iprot.readStructBegin();
586
    while (true)
587
    {
588
      field = iprot.readFieldBegin();
3430 rajveer 589
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
305 ashish 590
        break;
591
      }
3430 rajveer 592
      switch (field.id) {
593
        case 1: // ID
594
          if (field.type == org.apache.thrift.protocol.TType.I64) {
595
            this.id = iprot.readI64();
596
            setIdIsSet(true);
597
          } else { 
598
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
599
          }
600
          break;
601
        case 2: // ORDER_ID
602
          if (field.type == org.apache.thrift.protocol.TType.I64) {
603
            this.order_id = iprot.readI64();
604
            setOrder_idIsSet(true);
605
          } else { 
606
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
607
          }
608
          break;
609
        case 3: // TYPE
610
          if (field.type == org.apache.thrift.protocol.TType.I64) {
611
            this.type = iprot.readI64();
612
            setTypeIsSet(true);
613
          } else { 
614
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
615
          }
616
          break;
617
        case 4: // TIME_SET
618
          if (field.type == org.apache.thrift.protocol.TType.I64) {
619
            this.time_set = iprot.readI64();
620
            setTime_setIsSet(true);
621
          } else { 
622
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
623
          }
624
          break;
625
        case 5: // COMMENT
626
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
627
            this.comment = iprot.readString();
628
          } else { 
629
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
630
          }
631
          break;
632
        case 6: // TIME_UNSET
633
          if (field.type == org.apache.thrift.protocol.TType.I64) {
634
            this.time_unset = iprot.readI64();
635
            setTime_unsetIsSet(true);
636
          } else { 
637
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
638
          }
639
          break;
640
        default:
641
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
305 ashish 642
      }
3430 rajveer 643
      iprot.readFieldEnd();
305 ashish 644
    }
645
    iprot.readStructEnd();
646
    validate();
647
  }
648
 
3430 rajveer 649
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
305 ashish 650
    validate();
651
 
652
    oprot.writeStructBegin(STRUCT_DESC);
653
    oprot.writeFieldBegin(ID_FIELD_DESC);
654
    oprot.writeI64(this.id);
655
    oprot.writeFieldEnd();
483 rajveer 656
    oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
657
    oprot.writeI64(this.order_id);
305 ashish 658
    oprot.writeFieldEnd();
659
    oprot.writeFieldBegin(TYPE_FIELD_DESC);
660
    oprot.writeI64(this.type);
661
    oprot.writeFieldEnd();
662
    oprot.writeFieldBegin(TIME_SET_FIELD_DESC);
663
    oprot.writeI64(this.time_set);
664
    oprot.writeFieldEnd();
665
    if (this.comment != null) {
666
      oprot.writeFieldBegin(COMMENT_FIELD_DESC);
667
      oprot.writeString(this.comment);
668
      oprot.writeFieldEnd();
669
    }
670
    oprot.writeFieldBegin(TIME_UNSET_FIELD_DESC);
671
    oprot.writeI64(this.time_unset);
672
    oprot.writeFieldEnd();
673
    oprot.writeFieldStop();
674
    oprot.writeStructEnd();
675
  }
676
 
677
  @Override
678
  public String toString() {
679
    StringBuilder sb = new StringBuilder("Alert(");
680
    boolean first = true;
681
 
682
    sb.append("id:");
683
    sb.append(this.id);
684
    first = false;
685
    if (!first) sb.append(", ");
483 rajveer 686
    sb.append("order_id:");
687
    sb.append(this.order_id);
305 ashish 688
    first = false;
689
    if (!first) sb.append(", ");
690
    sb.append("type:");
691
    sb.append(this.type);
692
    first = false;
693
    if (!first) sb.append(", ");
694
    sb.append("time_set:");
695
    sb.append(this.time_set);
696
    first = false;
697
    if (!first) sb.append(", ");
698
    sb.append("comment:");
699
    if (this.comment == null) {
700
      sb.append("null");
701
    } else {
702
      sb.append(this.comment);
703
    }
704
    first = false;
705
    if (!first) sb.append(", ");
706
    sb.append("time_unset:");
707
    sb.append(this.time_unset);
708
    first = false;
709
    sb.append(")");
710
    return sb.toString();
711
  }
712
 
3430 rajveer 713
  public void validate() throws org.apache.thrift.TException {
305 ashish 714
    // check for required fields
715
  }
716
 
3430 rajveer 717
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
718
    try {
719
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
720
    } catch (org.apache.thrift.TException te) {
721
      throw new java.io.IOException(te);
722
    }
723
  }
724
 
725
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
726
    try {
727
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
728
      __isset_bit_vector = new BitSet(1);
729
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
730
    } catch (org.apache.thrift.TException te) {
731
      throw new java.io.IOException(te);
732
    }
733
  }
734
 
305 ashish 735
}
736