Subversion Repositories SmartDukaan

Rev

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