Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
3028 mandeep.dh 1
/**
2
 * Autogenerated by Thrift
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.crm;
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;
18
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
 
22
import org.apache.thrift.*;
23
import org.apache.thrift.meta_data.*;
24
import org.apache.thrift.protocol.*;
25
 
26
public class Ticket implements TBase<Ticket._Fields>, java.io.Serializable, Cloneable, Comparable<Ticket> {
27
  private static final TStruct STRUCT_DESC = new TStruct("Ticket");
28
 
29
  private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
30
  private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)2);
3269 mandeep.dh 31
  private static final TField CUSTOMER_EMAIL_ID_FIELD_DESC = new TField("customerEmailId", TType.STRING, (short)3);
32
  private static final TField OPEN_DATE_FIELD_DESC = new TField("openDate", TType.I64, (short)4);
33
  private static final TField CLOSE_DATE_FIELD_DESC = new TField("closeDate", TType.I64, (short)5);
34
  private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)6);
35
  private static final TField PRIORITY_FIELD_DESC = new TField("priority", TType.I32, (short)7);
36
  private static final TField CATEGORY_FIELD_DESC = new TField("category", TType.I32, (short)8);
37
  private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)9);
38
  private static final TField ASSIGNEE_ID_FIELD_DESC = new TField("assigneeId", TType.I64, (short)10);
39
  private static final TField CREATOR_ID_FIELD_DESC = new TField("creatorId", TType.I64, (short)11);
40
  private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)12);
41
  private static final TField AIRWAY_BILL_NO_FIELD_DESC = new TField("airwayBillNo", TType.STRING, (short)13);
42
  private static final TField PRODUCT_NAME_FIELD_DESC = new TField("productName", TType.STRING, (short)14);
3028 mandeep.dh 43
 
44
  private long id;
45
  private long customerId;
3269 mandeep.dh 46
  private String customerEmailId;
3028 mandeep.dh 47
  private long openDate;
48
  private long closeDate;
3106 mandeep.dh 49
  private String description;
50
  private TicketPriority priority;
51
  private TicketCategory category;
52
  private TicketStatus status;
53
  private long assigneeId;
3028 mandeep.dh 54
  private long creatorId;
55
  private long orderId;
56
  private String airwayBillNo;
57
  private String productName;
58
 
59
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
60
  public enum _Fields implements TFieldIdEnum {
61
    ID((short)1, "id"),
62
    CUSTOMER_ID((short)2, "customerId"),
3269 mandeep.dh 63
    CUSTOMER_EMAIL_ID((short)3, "customerEmailId"),
64
    OPEN_DATE((short)4, "openDate"),
65
    CLOSE_DATE((short)5, "closeDate"),
66
    DESCRIPTION((short)6, "description"),
3106 mandeep.dh 67
    /**
68
     * 
69
     * @see TicketPriority
70
     */
3269 mandeep.dh 71
    PRIORITY((short)7, "priority"),
3106 mandeep.dh 72
    /**
73
     * 
74
     * @see TicketCategory
75
     */
3269 mandeep.dh 76
    CATEGORY((short)8, "category"),
3106 mandeep.dh 77
    /**
78
     * 
79
     * @see TicketStatus
80
     */
3269 mandeep.dh 81
    STATUS((short)9, "status"),
82
    ASSIGNEE_ID((short)10, "assigneeId"),
83
    CREATOR_ID((short)11, "creatorId"),
84
    ORDER_ID((short)12, "orderId"),
85
    AIRWAY_BILL_NO((short)13, "airwayBillNo"),
86
    PRODUCT_NAME((short)14, "productName");
3028 mandeep.dh 87
 
88
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
89
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
90
 
91
    static {
92
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
93
        byId.put((int)field._thriftId, field);
94
        byName.put(field.getFieldName(), field);
95
      }
96
    }
97
 
98
    /**
99
     * Find the _Fields constant that matches fieldId, or null if its not found.
100
     */
101
    public static _Fields findByThriftId(int fieldId) {
102
      return byId.get(fieldId);
103
    }
104
 
105
    /**
106
     * Find the _Fields constant that matches fieldId, throwing an exception
107
     * if it is not found.
108
     */
109
    public static _Fields findByThriftIdOrThrow(int fieldId) {
110
      _Fields fields = findByThriftId(fieldId);
111
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
112
      return fields;
113
    }
114
 
115
    /**
116
     * Find the _Fields constant that matches name, or null if its not found.
117
     */
118
    public static _Fields findByName(String name) {
119
      return byName.get(name);
120
    }
121
 
122
    private final short _thriftId;
123
    private final String _fieldName;
124
 
125
    _Fields(short thriftId, String fieldName) {
126
      _thriftId = thriftId;
127
      _fieldName = fieldName;
128
    }
129
 
130
    public short getThriftFieldId() {
131
      return _thriftId;
132
    }
133
 
134
    public String getFieldName() {
135
      return _fieldName;
136
    }
137
  }
138
 
139
  // isset id assignments
140
  private static final int __ID_ISSET_ID = 0;
141
  private static final int __CUSTOMERID_ISSET_ID = 1;
142
  private static final int __OPENDATE_ISSET_ID = 2;
143
  private static final int __CLOSEDATE_ISSET_ID = 3;
3106 mandeep.dh 144
  private static final int __ASSIGNEEID_ISSET_ID = 4;
145
  private static final int __CREATORID_ISSET_ID = 5;
3028 mandeep.dh 146
  private static final int __ORDERID_ISSET_ID = 6;
147
  private BitSet __isset_bit_vector = new BitSet(7);
148
 
149
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
150
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
151
        new FieldValueMetaData(TType.I64)));
3269 mandeep.dh 152
    put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.OPTIONAL, 
3028 mandeep.dh 153
        new FieldValueMetaData(TType.I64)));
3269 mandeep.dh 154
    put(_Fields.CUSTOMER_EMAIL_ID, new FieldMetaData("customerEmailId", TFieldRequirementType.OPTIONAL, 
155
        new FieldValueMetaData(TType.STRING)));
3028 mandeep.dh 156
    put(_Fields.OPEN_DATE, new FieldMetaData("openDate", TFieldRequirementType.DEFAULT, 
157
        new FieldValueMetaData(TType.I64)));
3168 mandeep.dh 158
    put(_Fields.CLOSE_DATE, new FieldMetaData("closeDate", TFieldRequirementType.OPTIONAL, 
3028 mandeep.dh 159
        new FieldValueMetaData(TType.I64)));
3269 mandeep.dh 160
    put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.OPTIONAL, 
3028 mandeep.dh 161
        new FieldValueMetaData(TType.STRING)));
3106 mandeep.dh 162
    put(_Fields.PRIORITY, new FieldMetaData("priority", TFieldRequirementType.DEFAULT, 
163
        new EnumMetaData(TType.ENUM, TicketPriority.class)));
164
    put(_Fields.CATEGORY, new FieldMetaData("category", TFieldRequirementType.DEFAULT, 
165
        new EnumMetaData(TType.ENUM, TicketCategory.class)));
166
    put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
167
        new EnumMetaData(TType.ENUM, TicketStatus.class)));
3168 mandeep.dh 168
    put(_Fields.ASSIGNEE_ID, new FieldMetaData("assigneeId", TFieldRequirementType.OPTIONAL, 
3106 mandeep.dh 169
        new FieldValueMetaData(TType.I64)));
3028 mandeep.dh 170
    put(_Fields.CREATOR_ID, new FieldMetaData("creatorId", TFieldRequirementType.DEFAULT, 
171
        new FieldValueMetaData(TType.I64)));
3168 mandeep.dh 172
    put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.OPTIONAL, 
3028 mandeep.dh 173
        new FieldValueMetaData(TType.I64)));
3168 mandeep.dh 174
    put(_Fields.AIRWAY_BILL_NO, new FieldMetaData("airwayBillNo", TFieldRequirementType.OPTIONAL, 
3028 mandeep.dh 175
        new FieldValueMetaData(TType.STRING)));
3168 mandeep.dh 176
    put(_Fields.PRODUCT_NAME, new FieldMetaData("productName", TFieldRequirementType.OPTIONAL, 
3028 mandeep.dh 177
        new FieldValueMetaData(TType.STRING)));
178
  }});
179
 
180
  static {
181
    FieldMetaData.addStructMetaDataMap(Ticket.class, metaDataMap);
182
  }
183
 
184
  public Ticket() {
185
  }
186
 
187
  public Ticket(
188
    long id,
189
    long openDate,
3106 mandeep.dh 190
    TicketPriority priority,
191
    TicketCategory category,
192
    TicketStatus status,
3168 mandeep.dh 193
    long creatorId)
3028 mandeep.dh 194
  {
195
    this();
196
    this.id = id;
197
    setIdIsSet(true);
198
    this.openDate = openDate;
199
    setOpenDateIsSet(true);
3106 mandeep.dh 200
    this.priority = priority;
201
    this.category = category;
202
    this.status = status;
3028 mandeep.dh 203
    this.creatorId = creatorId;
204
    setCreatorIdIsSet(true);
205
  }
206
 
207
  /**
208
   * Performs a deep copy on <i>other</i>.
209
   */
210
  public Ticket(Ticket other) {
211
    __isset_bit_vector.clear();
212
    __isset_bit_vector.or(other.__isset_bit_vector);
213
    this.id = other.id;
214
    this.customerId = other.customerId;
3269 mandeep.dh 215
    if (other.isSetCustomerEmailId()) {
216
      this.customerEmailId = other.customerEmailId;
217
    }
3028 mandeep.dh 218
    this.openDate = other.openDate;
219
    this.closeDate = other.closeDate;
3106 mandeep.dh 220
    if (other.isSetDescription()) {
221
      this.description = other.description;
3028 mandeep.dh 222
    }
3106 mandeep.dh 223
    if (other.isSetPriority()) {
224
      this.priority = other.priority;
225
    }
226
    if (other.isSetCategory()) {
227
      this.category = other.category;
228
    }
229
    if (other.isSetStatus()) {
230
      this.status = other.status;
231
    }
232
    this.assigneeId = other.assigneeId;
3028 mandeep.dh 233
    this.creatorId = other.creatorId;
234
    this.orderId = other.orderId;
235
    if (other.isSetAirwayBillNo()) {
236
      this.airwayBillNo = other.airwayBillNo;
237
    }
238
    if (other.isSetProductName()) {
239
      this.productName = other.productName;
240
    }
241
  }
242
 
243
  public Ticket deepCopy() {
244
    return new Ticket(this);
245
  }
246
 
247
  @Deprecated
248
  public Ticket clone() {
249
    return new Ticket(this);
250
  }
251
 
252
  public long getId() {
253
    return this.id;
254
  }
255
 
256
  public Ticket setId(long id) {
257
    this.id = id;
258
    setIdIsSet(true);
259
    return this;
260
  }
261
 
262
  public void unsetId() {
263
    __isset_bit_vector.clear(__ID_ISSET_ID);
264
  }
265
 
266
  /** Returns true if field id is set (has been asigned a value) and false otherwise */
267
  public boolean isSetId() {
268
    return __isset_bit_vector.get(__ID_ISSET_ID);
269
  }
270
 
271
  public void setIdIsSet(boolean value) {
272
    __isset_bit_vector.set(__ID_ISSET_ID, value);
273
  }
274
 
275
  public long getCustomerId() {
276
    return this.customerId;
277
  }
278
 
279
  public Ticket setCustomerId(long customerId) {
280
    this.customerId = customerId;
281
    setCustomerIdIsSet(true);
282
    return this;
283
  }
284
 
285
  public void unsetCustomerId() {
286
    __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
287
  }
288
 
289
  /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
290
  public boolean isSetCustomerId() {
291
    return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
292
  }
293
 
294
  public void setCustomerIdIsSet(boolean value) {
295
    __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
296
  }
297
 
3269 mandeep.dh 298
  public String getCustomerEmailId() {
299
    return this.customerEmailId;
300
  }
301
 
302
  public Ticket setCustomerEmailId(String customerEmailId) {
303
    this.customerEmailId = customerEmailId;
304
    return this;
305
  }
306
 
307
  public void unsetCustomerEmailId() {
308
    this.customerEmailId = null;
309
  }
310
 
311
  /** Returns true if field customerEmailId is set (has been asigned a value) and false otherwise */
312
  public boolean isSetCustomerEmailId() {
313
    return this.customerEmailId != null;
314
  }
315
 
316
  public void setCustomerEmailIdIsSet(boolean value) {
317
    if (!value) {
318
      this.customerEmailId = null;
319
    }
320
  }
321
 
3028 mandeep.dh 322
  public long getOpenDate() {
323
    return this.openDate;
324
  }
325
 
326
  public Ticket setOpenDate(long openDate) {
327
    this.openDate = openDate;
328
    setOpenDateIsSet(true);
329
    return this;
330
  }
331
 
332
  public void unsetOpenDate() {
333
    __isset_bit_vector.clear(__OPENDATE_ISSET_ID);
334
  }
335
 
336
  /** Returns true if field openDate is set (has been asigned a value) and false otherwise */
337
  public boolean isSetOpenDate() {
338
    return __isset_bit_vector.get(__OPENDATE_ISSET_ID);
339
  }
340
 
341
  public void setOpenDateIsSet(boolean value) {
342
    __isset_bit_vector.set(__OPENDATE_ISSET_ID, value);
343
  }
344
 
345
  public long getCloseDate() {
346
    return this.closeDate;
347
  }
348
 
349
  public Ticket setCloseDate(long closeDate) {
350
    this.closeDate = closeDate;
351
    setCloseDateIsSet(true);
352
    return this;
353
  }
354
 
355
  public void unsetCloseDate() {
356
    __isset_bit_vector.clear(__CLOSEDATE_ISSET_ID);
357
  }
358
 
359
  /** Returns true if field closeDate is set (has been asigned a value) and false otherwise */
360
  public boolean isSetCloseDate() {
361
    return __isset_bit_vector.get(__CLOSEDATE_ISSET_ID);
362
  }
363
 
364
  public void setCloseDateIsSet(boolean value) {
365
    __isset_bit_vector.set(__CLOSEDATE_ISSET_ID, value);
366
  }
367
 
3106 mandeep.dh 368
  public String getDescription() {
369
    return this.description;
3028 mandeep.dh 370
  }
371
 
3106 mandeep.dh 372
  public Ticket setDescription(String description) {
373
    this.description = description;
3028 mandeep.dh 374
    return this;
375
  }
376
 
3106 mandeep.dh 377
  public void unsetDescription() {
378
    this.description = null;
3028 mandeep.dh 379
  }
380
 
3106 mandeep.dh 381
  /** Returns true if field description is set (has been asigned a value) and false otherwise */
382
  public boolean isSetDescription() {
383
    return this.description != null;
3028 mandeep.dh 384
  }
385
 
3106 mandeep.dh 386
  public void setDescriptionIsSet(boolean value) {
3028 mandeep.dh 387
    if (!value) {
3106 mandeep.dh 388
      this.description = null;
3028 mandeep.dh 389
    }
390
  }
391
 
3106 mandeep.dh 392
  /**
393
   * 
394
   * @see TicketPriority
395
   */
396
  public TicketPriority getPriority() {
397
    return this.priority;
398
  }
399
 
400
  /**
401
   * 
402
   * @see TicketPriority
403
   */
404
  public Ticket setPriority(TicketPriority priority) {
405
    this.priority = priority;
406
    return this;
407
  }
408
 
409
  public void unsetPriority() {
410
    this.priority = null;
411
  }
412
 
413
  /** Returns true if field priority is set (has been asigned a value) and false otherwise */
414
  public boolean isSetPriority() {
415
    return this.priority != null;
416
  }
417
 
418
  public void setPriorityIsSet(boolean value) {
419
    if (!value) {
420
      this.priority = null;
421
    }
422
  }
423
 
424
  /**
425
   * 
426
   * @see TicketCategory
427
   */
428
  public TicketCategory getCategory() {
429
    return this.category;
430
  }
431
 
432
  /**
433
   * 
434
   * @see TicketCategory
435
   */
436
  public Ticket setCategory(TicketCategory category) {
437
    this.category = category;
438
    return this;
439
  }
440
 
441
  public void unsetCategory() {
442
    this.category = null;
443
  }
444
 
445
  /** Returns true if field category is set (has been asigned a value) and false otherwise */
446
  public boolean isSetCategory() {
447
    return this.category != null;
448
  }
449
 
450
  public void setCategoryIsSet(boolean value) {
451
    if (!value) {
452
      this.category = null;
453
    }
454
  }
455
 
456
  /**
457
   * 
458
   * @see TicketStatus
459
   */
460
  public TicketStatus getStatus() {
461
    return this.status;
462
  }
463
 
464
  /**
465
   * 
466
   * @see TicketStatus
467
   */
468
  public Ticket setStatus(TicketStatus status) {
469
    this.status = status;
470
    return this;
471
  }
472
 
473
  public void unsetStatus() {
474
    this.status = null;
475
  }
476
 
477
  /** Returns true if field status is set (has been asigned a value) and false otherwise */
478
  public boolean isSetStatus() {
479
    return this.status != null;
480
  }
481
 
482
  public void setStatusIsSet(boolean value) {
483
    if (!value) {
484
      this.status = null;
485
    }
486
  }
487
 
488
  public long getAssigneeId() {
489
    return this.assigneeId;
490
  }
491
 
492
  public Ticket setAssigneeId(long assigneeId) {
493
    this.assigneeId = assigneeId;
494
    setAssigneeIdIsSet(true);
495
    return this;
496
  }
497
 
498
  public void unsetAssigneeId() {
499
    __isset_bit_vector.clear(__ASSIGNEEID_ISSET_ID);
500
  }
501
 
502
  /** Returns true if field assigneeId is set (has been asigned a value) and false otherwise */
503
  public boolean isSetAssigneeId() {
504
    return __isset_bit_vector.get(__ASSIGNEEID_ISSET_ID);
505
  }
506
 
507
  public void setAssigneeIdIsSet(boolean value) {
508
    __isset_bit_vector.set(__ASSIGNEEID_ISSET_ID, value);
509
  }
510
 
3028 mandeep.dh 511
  public long getCreatorId() {
512
    return this.creatorId;
513
  }
514
 
515
  public Ticket setCreatorId(long creatorId) {
516
    this.creatorId = creatorId;
517
    setCreatorIdIsSet(true);
518
    return this;
519
  }
520
 
521
  public void unsetCreatorId() {
522
    __isset_bit_vector.clear(__CREATORID_ISSET_ID);
523
  }
524
 
525
  /** Returns true if field creatorId is set (has been asigned a value) and false otherwise */
526
  public boolean isSetCreatorId() {
527
    return __isset_bit_vector.get(__CREATORID_ISSET_ID);
528
  }
529
 
530
  public void setCreatorIdIsSet(boolean value) {
531
    __isset_bit_vector.set(__CREATORID_ISSET_ID, value);
532
  }
533
 
534
  public long getOrderId() {
535
    return this.orderId;
536
  }
537
 
538
  public Ticket setOrderId(long orderId) {
539
    this.orderId = orderId;
540
    setOrderIdIsSet(true);
541
    return this;
542
  }
543
 
544
  public void unsetOrderId() {
545
    __isset_bit_vector.clear(__ORDERID_ISSET_ID);
546
  }
547
 
548
  /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
549
  public boolean isSetOrderId() {
550
    return __isset_bit_vector.get(__ORDERID_ISSET_ID);
551
  }
552
 
553
  public void setOrderIdIsSet(boolean value) {
554
    __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
555
  }
556
 
557
  public String getAirwayBillNo() {
558
    return this.airwayBillNo;
559
  }
560
 
561
  public Ticket setAirwayBillNo(String airwayBillNo) {
562
    this.airwayBillNo = airwayBillNo;
563
    return this;
564
  }
565
 
566
  public void unsetAirwayBillNo() {
567
    this.airwayBillNo = null;
568
  }
569
 
570
  /** Returns true if field airwayBillNo is set (has been asigned a value) and false otherwise */
571
  public boolean isSetAirwayBillNo() {
572
    return this.airwayBillNo != null;
573
  }
574
 
575
  public void setAirwayBillNoIsSet(boolean value) {
576
    if (!value) {
577
      this.airwayBillNo = null;
578
    }
579
  }
580
 
581
  public String getProductName() {
582
    return this.productName;
583
  }
584
 
585
  public Ticket setProductName(String productName) {
586
    this.productName = productName;
587
    return this;
588
  }
589
 
590
  public void unsetProductName() {
591
    this.productName = null;
592
  }
593
 
594
  /** Returns true if field productName is set (has been asigned a value) and false otherwise */
595
  public boolean isSetProductName() {
596
    return this.productName != null;
597
  }
598
 
599
  public void setProductNameIsSet(boolean value) {
600
    if (!value) {
601
      this.productName = null;
602
    }
603
  }
604
 
605
  public void setFieldValue(_Fields field, Object value) {
606
    switch (field) {
607
    case ID:
608
      if (value == null) {
609
        unsetId();
610
      } else {
611
        setId((Long)value);
612
      }
613
      break;
614
 
615
    case CUSTOMER_ID:
616
      if (value == null) {
617
        unsetCustomerId();
618
      } else {
619
        setCustomerId((Long)value);
620
      }
621
      break;
622
 
3269 mandeep.dh 623
    case CUSTOMER_EMAIL_ID:
624
      if (value == null) {
625
        unsetCustomerEmailId();
626
      } else {
627
        setCustomerEmailId((String)value);
628
      }
629
      break;
630
 
3028 mandeep.dh 631
    case OPEN_DATE:
632
      if (value == null) {
633
        unsetOpenDate();
634
      } else {
635
        setOpenDate((Long)value);
636
      }
637
      break;
638
 
639
    case CLOSE_DATE:
640
      if (value == null) {
641
        unsetCloseDate();
642
      } else {
643
        setCloseDate((Long)value);
644
      }
645
      break;
646
 
3106 mandeep.dh 647
    case DESCRIPTION:
3028 mandeep.dh 648
      if (value == null) {
3106 mandeep.dh 649
        unsetDescription();
3028 mandeep.dh 650
      } else {
3106 mandeep.dh 651
        setDescription((String)value);
3028 mandeep.dh 652
      }
653
      break;
654
 
3106 mandeep.dh 655
    case PRIORITY:
3028 mandeep.dh 656
      if (value == null) {
3106 mandeep.dh 657
        unsetPriority();
3028 mandeep.dh 658
      } else {
3106 mandeep.dh 659
        setPriority((TicketPriority)value);
3028 mandeep.dh 660
      }
661
      break;
662
 
3106 mandeep.dh 663
    case CATEGORY:
3028 mandeep.dh 664
      if (value == null) {
3106 mandeep.dh 665
        unsetCategory();
3028 mandeep.dh 666
      } else {
3106 mandeep.dh 667
        setCategory((TicketCategory)value);
3028 mandeep.dh 668
      }
669
      break;
670
 
3106 mandeep.dh 671
    case STATUS:
672
      if (value == null) {
673
        unsetStatus();
674
      } else {
675
        setStatus((TicketStatus)value);
676
      }
677
      break;
678
 
679
    case ASSIGNEE_ID:
680
      if (value == null) {
681
        unsetAssigneeId();
682
      } else {
683
        setAssigneeId((Long)value);
684
      }
685
      break;
686
 
687
    case CREATOR_ID:
688
      if (value == null) {
689
        unsetCreatorId();
690
      } else {
691
        setCreatorId((Long)value);
692
      }
693
      break;
694
 
3028 mandeep.dh 695
    case ORDER_ID:
696
      if (value == null) {
697
        unsetOrderId();
698
      } else {
699
        setOrderId((Long)value);
700
      }
701
      break;
702
 
703
    case AIRWAY_BILL_NO:
704
      if (value == null) {
705
        unsetAirwayBillNo();
706
      } else {
707
        setAirwayBillNo((String)value);
708
      }
709
      break;
710
 
711
    case PRODUCT_NAME:
712
      if (value == null) {
713
        unsetProductName();
714
      } else {
715
        setProductName((String)value);
716
      }
717
      break;
718
 
719
    }
720
  }
721
 
722
  public void setFieldValue(int fieldID, Object value) {
723
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
724
  }
725
 
726
  public Object getFieldValue(_Fields field) {
727
    switch (field) {
728
    case ID:
729
      return new Long(getId());
730
 
731
    case CUSTOMER_ID:
732
      return new Long(getCustomerId());
733
 
3269 mandeep.dh 734
    case CUSTOMER_EMAIL_ID:
735
      return getCustomerEmailId();
736
 
3028 mandeep.dh 737
    case OPEN_DATE:
738
      return new Long(getOpenDate());
739
 
740
    case CLOSE_DATE:
741
      return new Long(getCloseDate());
742
 
3106 mandeep.dh 743
    case DESCRIPTION:
744
      return getDescription();
3028 mandeep.dh 745
 
3106 mandeep.dh 746
    case PRIORITY:
747
      return getPriority();
748
 
749
    case CATEGORY:
750
      return getCategory();
751
 
752
    case STATUS:
753
      return getStatus();
754
 
755
    case ASSIGNEE_ID:
756
      return new Long(getAssigneeId());
757
 
3028 mandeep.dh 758
    case CREATOR_ID:
759
      return new Long(getCreatorId());
760
 
761
    case ORDER_ID:
762
      return new Long(getOrderId());
763
 
764
    case AIRWAY_BILL_NO:
765
      return getAirwayBillNo();
766
 
767
    case PRODUCT_NAME:
768
      return getProductName();
769
 
770
    }
771
    throw new IllegalStateException();
772
  }
773
 
774
  public Object getFieldValue(int fieldId) {
775
    return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
776
  }
777
 
778
  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
779
  public boolean isSet(_Fields field) {
780
    switch (field) {
781
    case ID:
782
      return isSetId();
783
    case CUSTOMER_ID:
784
      return isSetCustomerId();
3269 mandeep.dh 785
    case CUSTOMER_EMAIL_ID:
786
      return isSetCustomerEmailId();
3028 mandeep.dh 787
    case OPEN_DATE:
788
      return isSetOpenDate();
789
    case CLOSE_DATE:
790
      return isSetCloseDate();
3106 mandeep.dh 791
    case DESCRIPTION:
792
      return isSetDescription();
793
    case PRIORITY:
794
      return isSetPriority();
795
    case CATEGORY:
796
      return isSetCategory();
797
    case STATUS:
798
      return isSetStatus();
799
    case ASSIGNEE_ID:
800
      return isSetAssigneeId();
3028 mandeep.dh 801
    case CREATOR_ID:
802
      return isSetCreatorId();
803
    case ORDER_ID:
804
      return isSetOrderId();
805
    case AIRWAY_BILL_NO:
806
      return isSetAirwayBillNo();
807
    case PRODUCT_NAME:
808
      return isSetProductName();
809
    }
810
    throw new IllegalStateException();
811
  }
812
 
813
  public boolean isSet(int fieldID) {
814
    return isSet(_Fields.findByThriftIdOrThrow(fieldID));
815
  }
816
 
817
  @Override
818
  public boolean equals(Object that) {
819
    if (that == null)
820
      return false;
821
    if (that instanceof Ticket)
822
      return this.equals((Ticket)that);
823
    return false;
824
  }
825
 
826
  public boolean equals(Ticket that) {
827
    if (that == null)
828
      return false;
829
 
830
    boolean this_present_id = true;
831
    boolean that_present_id = true;
832
    if (this_present_id || that_present_id) {
833
      if (!(this_present_id && that_present_id))
834
        return false;
835
      if (this.id != that.id)
836
        return false;
837
    }
838
 
3269 mandeep.dh 839
    boolean this_present_customerId = true && this.isSetCustomerId();
840
    boolean that_present_customerId = true && that.isSetCustomerId();
3028 mandeep.dh 841
    if (this_present_customerId || that_present_customerId) {
842
      if (!(this_present_customerId && that_present_customerId))
843
        return false;
844
      if (this.customerId != that.customerId)
845
        return false;
846
    }
847
 
3269 mandeep.dh 848
    boolean this_present_customerEmailId = true && this.isSetCustomerEmailId();
849
    boolean that_present_customerEmailId = true && that.isSetCustomerEmailId();
850
    if (this_present_customerEmailId || that_present_customerEmailId) {
851
      if (!(this_present_customerEmailId && that_present_customerEmailId))
852
        return false;
853
      if (!this.customerEmailId.equals(that.customerEmailId))
854
        return false;
855
    }
856
 
3028 mandeep.dh 857
    boolean this_present_openDate = true;
858
    boolean that_present_openDate = true;
859
    if (this_present_openDate || that_present_openDate) {
860
      if (!(this_present_openDate && that_present_openDate))
861
        return false;
862
      if (this.openDate != that.openDate)
863
        return false;
864
    }
865
 
3168 mandeep.dh 866
    boolean this_present_closeDate = true && this.isSetCloseDate();
867
    boolean that_present_closeDate = true && that.isSetCloseDate();
3028 mandeep.dh 868
    if (this_present_closeDate || that_present_closeDate) {
869
      if (!(this_present_closeDate && that_present_closeDate))
870
        return false;
871
      if (this.closeDate != that.closeDate)
872
        return false;
873
    }
874
 
3106 mandeep.dh 875
    boolean this_present_description = true && this.isSetDescription();
876
    boolean that_present_description = true && that.isSetDescription();
877
    if (this_present_description || that_present_description) {
878
      if (!(this_present_description && that_present_description))
3028 mandeep.dh 879
        return false;
3106 mandeep.dh 880
      if (!this.description.equals(that.description))
3028 mandeep.dh 881
        return false;
882
    }
883
 
3106 mandeep.dh 884
    boolean this_present_priority = true && this.isSetPriority();
885
    boolean that_present_priority = true && that.isSetPriority();
886
    if (this_present_priority || that_present_priority) {
887
      if (!(this_present_priority && that_present_priority))
888
        return false;
889
      if (!this.priority.equals(that.priority))
890
        return false;
891
    }
892
 
893
    boolean this_present_category = true && this.isSetCategory();
894
    boolean that_present_category = true && that.isSetCategory();
895
    if (this_present_category || that_present_category) {
896
      if (!(this_present_category && that_present_category))
897
        return false;
898
      if (!this.category.equals(that.category))
899
        return false;
900
    }
901
 
902
    boolean this_present_status = true && this.isSetStatus();
903
    boolean that_present_status = true && that.isSetStatus();
904
    if (this_present_status || that_present_status) {
905
      if (!(this_present_status && that_present_status))
906
        return false;
907
      if (!this.status.equals(that.status))
908
        return false;
909
    }
910
 
3168 mandeep.dh 911
    boolean this_present_assigneeId = true && this.isSetAssigneeId();
912
    boolean that_present_assigneeId = true && that.isSetAssigneeId();
3106 mandeep.dh 913
    if (this_present_assigneeId || that_present_assigneeId) {
914
      if (!(this_present_assigneeId && that_present_assigneeId))
915
        return false;
916
      if (this.assigneeId != that.assigneeId)
917
        return false;
918
    }
919
 
3028 mandeep.dh 920
    boolean this_present_creatorId = true;
921
    boolean that_present_creatorId = true;
922
    if (this_present_creatorId || that_present_creatorId) {
923
      if (!(this_present_creatorId && that_present_creatorId))
924
        return false;
925
      if (this.creatorId != that.creatorId)
926
        return false;
927
    }
928
 
3168 mandeep.dh 929
    boolean this_present_orderId = true && this.isSetOrderId();
930
    boolean that_present_orderId = true && that.isSetOrderId();
3028 mandeep.dh 931
    if (this_present_orderId || that_present_orderId) {
932
      if (!(this_present_orderId && that_present_orderId))
933
        return false;
934
      if (this.orderId != that.orderId)
935
        return false;
936
    }
937
 
938
    boolean this_present_airwayBillNo = true && this.isSetAirwayBillNo();
939
    boolean that_present_airwayBillNo = true && that.isSetAirwayBillNo();
940
    if (this_present_airwayBillNo || that_present_airwayBillNo) {
941
      if (!(this_present_airwayBillNo && that_present_airwayBillNo))
942
        return false;
943
      if (!this.airwayBillNo.equals(that.airwayBillNo))
944
        return false;
945
    }
946
 
947
    boolean this_present_productName = true && this.isSetProductName();
948
    boolean that_present_productName = true && that.isSetProductName();
949
    if (this_present_productName || that_present_productName) {
950
      if (!(this_present_productName && that_present_productName))
951
        return false;
952
      if (!this.productName.equals(that.productName))
953
        return false;
954
    }
955
 
956
    return true;
957
  }
958
 
959
  @Override
960
  public int hashCode() {
961
    return 0;
962
  }
963
 
964
  public int compareTo(Ticket other) {
965
    if (!getClass().equals(other.getClass())) {
966
      return getClass().getName().compareTo(other.getClass().getName());
967
    }
968
 
969
    int lastComparison = 0;
970
    Ticket typedOther = (Ticket)other;
971
 
972
    lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
973
    if (lastComparison != 0) {
974
      return lastComparison;
975
    }
976
    lastComparison = TBaseHelper.compareTo(id, typedOther.id);
977
    if (lastComparison != 0) {
978
      return lastComparison;
979
    }
980
    lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
981
    if (lastComparison != 0) {
982
      return lastComparison;
983
    }
984
    lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
985
    if (lastComparison != 0) {
986
      return lastComparison;
987
    }
3269 mandeep.dh 988
    lastComparison = Boolean.valueOf(isSetCustomerEmailId()).compareTo(isSetCustomerEmailId());
989
    if (lastComparison != 0) {
990
      return lastComparison;
991
    }
992
    lastComparison = TBaseHelper.compareTo(customerEmailId, typedOther.customerEmailId);
993
    if (lastComparison != 0) {
994
      return lastComparison;
995
    }
3028 mandeep.dh 996
    lastComparison = Boolean.valueOf(isSetOpenDate()).compareTo(isSetOpenDate());
997
    if (lastComparison != 0) {
998
      return lastComparison;
999
    }
1000
    lastComparison = TBaseHelper.compareTo(openDate, typedOther.openDate);
1001
    if (lastComparison != 0) {
1002
      return lastComparison;
1003
    }
1004
    lastComparison = Boolean.valueOf(isSetCloseDate()).compareTo(isSetCloseDate());
1005
    if (lastComparison != 0) {
1006
      return lastComparison;
1007
    }
1008
    lastComparison = TBaseHelper.compareTo(closeDate, typedOther.closeDate);
1009
    if (lastComparison != 0) {
1010
      return lastComparison;
1011
    }
3106 mandeep.dh 1012
    lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
3028 mandeep.dh 1013
    if (lastComparison != 0) {
1014
      return lastComparison;
1015
    }
3106 mandeep.dh 1016
    lastComparison = TBaseHelper.compareTo(description, typedOther.description);
3028 mandeep.dh 1017
    if (lastComparison != 0) {
1018
      return lastComparison;
1019
    }
3106 mandeep.dh 1020
    lastComparison = Boolean.valueOf(isSetPriority()).compareTo(isSetPriority());
3028 mandeep.dh 1021
    if (lastComparison != 0) {
1022
      return lastComparison;
1023
    }
3106 mandeep.dh 1024
    lastComparison = TBaseHelper.compareTo(priority, typedOther.priority);
3028 mandeep.dh 1025
    if (lastComparison != 0) {
1026
      return lastComparison;
1027
    }
3106 mandeep.dh 1028
    lastComparison = Boolean.valueOf(isSetCategory()).compareTo(isSetCategory());
3028 mandeep.dh 1029
    if (lastComparison != 0) {
1030
      return lastComparison;
1031
    }
3106 mandeep.dh 1032
    lastComparison = TBaseHelper.compareTo(category, typedOther.category);
3028 mandeep.dh 1033
    if (lastComparison != 0) {
1034
      return lastComparison;
1035
    }
3106 mandeep.dh 1036
    lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
1037
    if (lastComparison != 0) {
1038
      return lastComparison;
1039
    }
1040
    lastComparison = TBaseHelper.compareTo(status, typedOther.status);
1041
    if (lastComparison != 0) {
1042
      return lastComparison;
1043
    }
1044
    lastComparison = Boolean.valueOf(isSetAssigneeId()).compareTo(isSetAssigneeId());
1045
    if (lastComparison != 0) {
1046
      return lastComparison;
1047
    }
1048
    lastComparison = TBaseHelper.compareTo(assigneeId, typedOther.assigneeId);
1049
    if (lastComparison != 0) {
1050
      return lastComparison;
1051
    }
1052
    lastComparison = Boolean.valueOf(isSetCreatorId()).compareTo(isSetCreatorId());
1053
    if (lastComparison != 0) {
1054
      return lastComparison;
1055
    }
1056
    lastComparison = TBaseHelper.compareTo(creatorId, typedOther.creatorId);
1057
    if (lastComparison != 0) {
1058
      return lastComparison;
1059
    }
3028 mandeep.dh 1060
    lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
1061
    if (lastComparison != 0) {
1062
      return lastComparison;
1063
    }
1064
    lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
1065
    if (lastComparison != 0) {
1066
      return lastComparison;
1067
    }
1068
    lastComparison = Boolean.valueOf(isSetAirwayBillNo()).compareTo(isSetAirwayBillNo());
1069
    if (lastComparison != 0) {
1070
      return lastComparison;
1071
    }
1072
    lastComparison = TBaseHelper.compareTo(airwayBillNo, typedOther.airwayBillNo);
1073
    if (lastComparison != 0) {
1074
      return lastComparison;
1075
    }
1076
    lastComparison = Boolean.valueOf(isSetProductName()).compareTo(isSetProductName());
1077
    if (lastComparison != 0) {
1078
      return lastComparison;
1079
    }
1080
    lastComparison = TBaseHelper.compareTo(productName, typedOther.productName);
1081
    if (lastComparison != 0) {
1082
      return lastComparison;
1083
    }
1084
    return 0;
1085
  }
1086
 
1087
  public void read(TProtocol iprot) throws TException {
1088
    TField field;
1089
    iprot.readStructBegin();
1090
    while (true)
1091
    {
1092
      field = iprot.readFieldBegin();
1093
      if (field.type == TType.STOP) { 
1094
        break;
1095
      }
1096
      _Fields fieldId = _Fields.findByThriftId(field.id);
1097
      if (fieldId == null) {
1098
        TProtocolUtil.skip(iprot, field.type);
1099
      } else {
1100
        switch (fieldId) {
1101
          case ID:
1102
            if (field.type == TType.I64) {
1103
              this.id = iprot.readI64();
1104
              setIdIsSet(true);
1105
            } else { 
1106
              TProtocolUtil.skip(iprot, field.type);
1107
            }
1108
            break;
1109
          case CUSTOMER_ID:
1110
            if (field.type == TType.I64) {
1111
              this.customerId = iprot.readI64();
1112
              setCustomerIdIsSet(true);
1113
            } else { 
1114
              TProtocolUtil.skip(iprot, field.type);
1115
            }
1116
            break;
3269 mandeep.dh 1117
          case CUSTOMER_EMAIL_ID:
1118
            if (field.type == TType.STRING) {
1119
              this.customerEmailId = iprot.readString();
1120
            } else { 
1121
              TProtocolUtil.skip(iprot, field.type);
1122
            }
1123
            break;
3028 mandeep.dh 1124
          case OPEN_DATE:
1125
            if (field.type == TType.I64) {
1126
              this.openDate = iprot.readI64();
1127
              setOpenDateIsSet(true);
1128
            } else { 
1129
              TProtocolUtil.skip(iprot, field.type);
1130
            }
1131
            break;
1132
          case CLOSE_DATE:
1133
            if (field.type == TType.I64) {
1134
              this.closeDate = iprot.readI64();
1135
              setCloseDateIsSet(true);
1136
            } else { 
1137
              TProtocolUtil.skip(iprot, field.type);
1138
            }
1139
            break;
3106 mandeep.dh 1140
          case DESCRIPTION:
3028 mandeep.dh 1141
            if (field.type == TType.STRING) {
3106 mandeep.dh 1142
              this.description = iprot.readString();
3028 mandeep.dh 1143
            } else { 
1144
              TProtocolUtil.skip(iprot, field.type);
1145
            }
1146
            break;
3106 mandeep.dh 1147
          case PRIORITY:
1148
            if (field.type == TType.I32) {
1149
              this.priority = TicketPriority.findByValue(iprot.readI32());
1150
            } else { 
1151
              TProtocolUtil.skip(iprot, field.type);
1152
            }
1153
            break;
1154
          case CATEGORY:
1155
            if (field.type == TType.I32) {
1156
              this.category = TicketCategory.findByValue(iprot.readI32());
1157
            } else { 
1158
              TProtocolUtil.skip(iprot, field.type);
1159
            }
1160
            break;
1161
          case STATUS:
1162
            if (field.type == TType.I32) {
1163
              this.status = TicketStatus.findByValue(iprot.readI32());
1164
            } else { 
1165
              TProtocolUtil.skip(iprot, field.type);
1166
            }
1167
            break;
1168
          case ASSIGNEE_ID:
3028 mandeep.dh 1169
            if (field.type == TType.I64) {
3106 mandeep.dh 1170
              this.assigneeId = iprot.readI64();
1171
              setAssigneeIdIsSet(true);
3028 mandeep.dh 1172
            } else { 
1173
              TProtocolUtil.skip(iprot, field.type);
1174
            }
1175
            break;
3106 mandeep.dh 1176
          case CREATOR_ID:
3028 mandeep.dh 1177
            if (field.type == TType.I64) {
3106 mandeep.dh 1178
              this.creatorId = iprot.readI64();
1179
              setCreatorIdIsSet(true);
3028 mandeep.dh 1180
            } else { 
1181
              TProtocolUtil.skip(iprot, field.type);
1182
            }
1183
            break;
1184
          case ORDER_ID:
1185
            if (field.type == TType.I64) {
1186
              this.orderId = iprot.readI64();
1187
              setOrderIdIsSet(true);
1188
            } else { 
1189
              TProtocolUtil.skip(iprot, field.type);
1190
            }
1191
            break;
1192
          case AIRWAY_BILL_NO:
1193
            if (field.type == TType.STRING) {
1194
              this.airwayBillNo = iprot.readString();
1195
            } else { 
1196
              TProtocolUtil.skip(iprot, field.type);
1197
            }
1198
            break;
1199
          case PRODUCT_NAME:
1200
            if (field.type == TType.STRING) {
1201
              this.productName = iprot.readString();
1202
            } else { 
1203
              TProtocolUtil.skip(iprot, field.type);
1204
            }
1205
            break;
1206
        }
1207
        iprot.readFieldEnd();
1208
      }
1209
    }
1210
    iprot.readStructEnd();
1211
    validate();
1212
  }
1213
 
1214
  public void write(TProtocol oprot) throws TException {
1215
    validate();
1216
 
1217
    oprot.writeStructBegin(STRUCT_DESC);
1218
    oprot.writeFieldBegin(ID_FIELD_DESC);
1219
    oprot.writeI64(this.id);
1220
    oprot.writeFieldEnd();
3269 mandeep.dh 1221
    if (isSetCustomerId()) {
1222
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
1223
      oprot.writeI64(this.customerId);
1224
      oprot.writeFieldEnd();
1225
    }
1226
    if (this.customerEmailId != null) {
1227
      if (isSetCustomerEmailId()) {
1228
        oprot.writeFieldBegin(CUSTOMER_EMAIL_ID_FIELD_DESC);
1229
        oprot.writeString(this.customerEmailId);
1230
        oprot.writeFieldEnd();
1231
      }
1232
    }
3028 mandeep.dh 1233
    oprot.writeFieldBegin(OPEN_DATE_FIELD_DESC);
1234
    oprot.writeI64(this.openDate);
1235
    oprot.writeFieldEnd();
3168 mandeep.dh 1236
    if (isSetCloseDate()) {
1237
      oprot.writeFieldBegin(CLOSE_DATE_FIELD_DESC);
1238
      oprot.writeI64(this.closeDate);
1239
      oprot.writeFieldEnd();
1240
    }
3106 mandeep.dh 1241
    if (this.description != null) {
3269 mandeep.dh 1242
      if (isSetDescription()) {
1243
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
1244
        oprot.writeString(this.description);
1245
        oprot.writeFieldEnd();
1246
      }
3028 mandeep.dh 1247
    }
3106 mandeep.dh 1248
    if (this.priority != null) {
1249
      oprot.writeFieldBegin(PRIORITY_FIELD_DESC);
1250
      oprot.writeI32(this.priority.getValue());
1251
      oprot.writeFieldEnd();
1252
    }
1253
    if (this.category != null) {
1254
      oprot.writeFieldBegin(CATEGORY_FIELD_DESC);
1255
      oprot.writeI32(this.category.getValue());
1256
      oprot.writeFieldEnd();
1257
    }
1258
    if (this.status != null) {
1259
      oprot.writeFieldBegin(STATUS_FIELD_DESC);
1260
      oprot.writeI32(this.status.getValue());
1261
      oprot.writeFieldEnd();
1262
    }
3168 mandeep.dh 1263
    if (isSetAssigneeId()) {
1264
      oprot.writeFieldBegin(ASSIGNEE_ID_FIELD_DESC);
1265
      oprot.writeI64(this.assigneeId);
1266
      oprot.writeFieldEnd();
1267
    }
3028 mandeep.dh 1268
    oprot.writeFieldBegin(CREATOR_ID_FIELD_DESC);
1269
    oprot.writeI64(this.creatorId);
1270
    oprot.writeFieldEnd();
3168 mandeep.dh 1271
    if (isSetOrderId()) {
1272
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
1273
      oprot.writeI64(this.orderId);
3028 mandeep.dh 1274
      oprot.writeFieldEnd();
1275
    }
3168 mandeep.dh 1276
    if (this.airwayBillNo != null) {
1277
      if (isSetAirwayBillNo()) {
1278
        oprot.writeFieldBegin(AIRWAY_BILL_NO_FIELD_DESC);
1279
        oprot.writeString(this.airwayBillNo);
1280
        oprot.writeFieldEnd();
1281
      }
1282
    }
3028 mandeep.dh 1283
    if (this.productName != null) {
3168 mandeep.dh 1284
      if (isSetProductName()) {
1285
        oprot.writeFieldBegin(PRODUCT_NAME_FIELD_DESC);
1286
        oprot.writeString(this.productName);
1287
        oprot.writeFieldEnd();
1288
      }
3028 mandeep.dh 1289
    }
1290
    oprot.writeFieldStop();
1291
    oprot.writeStructEnd();
1292
  }
1293
 
1294
  @Override
1295
  public String toString() {
1296
    StringBuilder sb = new StringBuilder("Ticket(");
1297
    boolean first = true;
1298
 
1299
    sb.append("id:");
1300
    sb.append(this.id);
1301
    first = false;
3269 mandeep.dh 1302
    if (isSetCustomerId()) {
1303
      if (!first) sb.append(", ");
1304
      sb.append("customerId:");
1305
      sb.append(this.customerId);
1306
      first = false;
1307
    }
1308
    if (isSetCustomerEmailId()) {
1309
      if (!first) sb.append(", ");
1310
      sb.append("customerEmailId:");
1311
      if (this.customerEmailId == null) {
1312
        sb.append("null");
1313
      } else {
1314
        sb.append(this.customerEmailId);
1315
      }
1316
      first = false;
1317
    }
3028 mandeep.dh 1318
    if (!first) sb.append(", ");
1319
    sb.append("openDate:");
1320
    sb.append(this.openDate);
1321
    first = false;
3168 mandeep.dh 1322
    if (isSetCloseDate()) {
1323
      if (!first) sb.append(", ");
1324
      sb.append("closeDate:");
1325
      sb.append(this.closeDate);
1326
      first = false;
1327
    }
3269 mandeep.dh 1328
    if (isSetDescription()) {
1329
      if (!first) sb.append(", ");
1330
      sb.append("description:");
1331
      if (this.description == null) {
1332
        sb.append("null");
1333
      } else {
1334
        sb.append(this.description);
1335
      }
1336
      first = false;
3028 mandeep.dh 1337
    }
1338
    if (!first) sb.append(", ");
3106 mandeep.dh 1339
    sb.append("priority:");
1340
    if (this.priority == null) {
1341
      sb.append("null");
1342
    } else {
1343
      String priority_name = priority.name();
1344
      if (priority_name != null) {
1345
        sb.append(priority_name);
1346
        sb.append(" (");
1347
      }
1348
      sb.append(this.priority);
1349
      if (priority_name != null) {
1350
        sb.append(")");
1351
      }
1352
    }
1353
    first = false;
1354
    if (!first) sb.append(", ");
1355
    sb.append("category:");
1356
    if (this.category == null) {
1357
      sb.append("null");
1358
    } else {
1359
      String category_name = category.name();
1360
      if (category_name != null) {
1361
        sb.append(category_name);
1362
        sb.append(" (");
1363
      }
1364
      sb.append(this.category);
1365
      if (category_name != null) {
1366
        sb.append(")");
1367
      }
1368
    }
1369
    first = false;
1370
    if (!first) sb.append(", ");
1371
    sb.append("status:");
1372
    if (this.status == null) {
1373
      sb.append("null");
1374
    } else {
1375
      String status_name = status.name();
1376
      if (status_name != null) {
1377
        sb.append(status_name);
1378
        sb.append(" (");
1379
      }
1380
      sb.append(this.status);
1381
      if (status_name != null) {
1382
        sb.append(")");
1383
      }
1384
    }
1385
    first = false;
3168 mandeep.dh 1386
    if (isSetAssigneeId()) {
1387
      if (!first) sb.append(", ");
1388
      sb.append("assigneeId:");
1389
      sb.append(this.assigneeId);
1390
      first = false;
1391
    }
3106 mandeep.dh 1392
    if (!first) sb.append(", ");
3028 mandeep.dh 1393
    sb.append("creatorId:");
1394
    sb.append(this.creatorId);
1395
    first = false;
3168 mandeep.dh 1396
    if (isSetOrderId()) {
1397
      if (!first) sb.append(", ");
1398
      sb.append("orderId:");
1399
      sb.append(this.orderId);
1400
      first = false;
3028 mandeep.dh 1401
    }
3168 mandeep.dh 1402
    if (isSetAirwayBillNo()) {
1403
      if (!first) sb.append(", ");
1404
      sb.append("airwayBillNo:");
1405
      if (this.airwayBillNo == null) {
1406
        sb.append("null");
1407
      } else {
1408
        sb.append(this.airwayBillNo);
1409
      }
1410
      first = false;
3028 mandeep.dh 1411
    }
3168 mandeep.dh 1412
    if (isSetProductName()) {
1413
      if (!first) sb.append(", ");
1414
      sb.append("productName:");
1415
      if (this.productName == null) {
1416
        sb.append("null");
1417
      } else {
1418
        sb.append(this.productName);
1419
      }
1420
      first = false;
1421
    }
3028 mandeep.dh 1422
    sb.append(")");
1423
    return sb.toString();
1424
  }
1425
 
1426
  public void validate() throws TException {
1427
    // check for required fields
1428
  }
1429
 
1430
}
1431