Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
19832 amit.gupta 1
/**
2
 * Autogenerated by Thrift Compiler (0.7.0)
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;
18
import java.nio.ByteBuffer;
19
import java.util.Arrays;
20
import org.slf4j.Logger;
21
import org.slf4j.LoggerFactory;
22
 
23
public class PendingStoreOrder implements org.apache.thrift.TBase<PendingStoreOrder, PendingStoreOrder._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PendingStoreOrder");
25
 
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 STORE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("storeId", org.apache.thrift.protocol.TType.I64, (short)2);
28
  private static final org.apache.thrift.protocol.TField PRODUCT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("productId", org.apache.thrift.protocol.TType.I64, (short)3);
29
  private static final org.apache.thrift.protocol.TField PINCODE_FIELD_DESC = new org.apache.thrift.protocol.TField("pincode", org.apache.thrift.protocol.TType.STRING, (short)4);
30
  private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)5);
31
  private static final org.apache.thrift.protocol.TField EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("email", org.apache.thrift.protocol.TType.STRING, (short)6);
32
  private static final org.apache.thrift.protocol.TField PHONE_FIELD_DESC = new org.apache.thrift.protocol.TField("phone", org.apache.thrift.protocol.TType.STRING, (short)7);
33
  private static final org.apache.thrift.protocol.TField LINE1_FIELD_DESC = new org.apache.thrift.protocol.TField("line1", org.apache.thrift.protocol.TType.STRING, (short)8);
34
  private static final org.apache.thrift.protocol.TField LINE2_FIELD_DESC = new org.apache.thrift.protocol.TField("line2", org.apache.thrift.protocol.TType.STRING, (short)9);
35
  private static final org.apache.thrift.protocol.TField CITY_FIELD_DESC = new org.apache.thrift.protocol.TField("city", org.apache.thrift.protocol.TType.STRING, (short)10);
36
  private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.STRING, (short)11);
37
  private static final org.apache.thrift.protocol.TField CREATED_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("createdOn", org.apache.thrift.protocol.TType.I64, (short)12);
38
 
39
  private long id; // required
40
  private long storeId; // required
41
  private long productId; // required
42
  private String pincode; // required
43
  private String name; // required
44
  private String email; // required
45
  private String phone; // required
46
  private String line1; // required
47
  private String line2; // required
48
  private String city; // required
49
  private String state; // required
50
  private long createdOn; // required
51
 
52
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
53
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
54
    ID((short)1, "id"),
55
    STORE_ID((short)2, "storeId"),
56
    PRODUCT_ID((short)3, "productId"),
57
    PINCODE((short)4, "pincode"),
58
    NAME((short)5, "name"),
59
    EMAIL((short)6, "email"),
60
    PHONE((short)7, "phone"),
61
    LINE1((short)8, "line1"),
62
    LINE2((short)9, "line2"),
63
    CITY((short)10, "city"),
64
    STATE((short)11, "state"),
65
    CREATED_ON((short)12, "createdOn");
66
 
67
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
68
 
69
    static {
70
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
71
        byName.put(field.getFieldName(), field);
72
      }
73
    }
74
 
75
    /**
76
     * Find the _Fields constant that matches fieldId, or null if its not found.
77
     */
78
    public static _Fields findByThriftId(int fieldId) {
79
      switch(fieldId) {
80
        case 1: // ID
81
          return ID;
82
        case 2: // STORE_ID
83
          return STORE_ID;
84
        case 3: // PRODUCT_ID
85
          return PRODUCT_ID;
86
        case 4: // PINCODE
87
          return PINCODE;
88
        case 5: // NAME
89
          return NAME;
90
        case 6: // EMAIL
91
          return EMAIL;
92
        case 7: // PHONE
93
          return PHONE;
94
        case 8: // LINE1
95
          return LINE1;
96
        case 9: // LINE2
97
          return LINE2;
98
        case 10: // CITY
99
          return CITY;
100
        case 11: // STATE
101
          return STATE;
102
        case 12: // CREATED_ON
103
          return CREATED_ON;
104
        default:
105
          return null;
106
      }
107
    }
108
 
109
    /**
110
     * Find the _Fields constant that matches fieldId, throwing an exception
111
     * if it is not found.
112
     */
113
    public static _Fields findByThriftIdOrThrow(int fieldId) {
114
      _Fields fields = findByThriftId(fieldId);
115
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
116
      return fields;
117
    }
118
 
119
    /**
120
     * Find the _Fields constant that matches name, or null if its not found.
121
     */
122
    public static _Fields findByName(String name) {
123
      return byName.get(name);
124
    }
125
 
126
    private final short _thriftId;
127
    private final String _fieldName;
128
 
129
    _Fields(short thriftId, String fieldName) {
130
      _thriftId = thriftId;
131
      _fieldName = fieldName;
132
    }
133
 
134
    public short getThriftFieldId() {
135
      return _thriftId;
136
    }
137
 
138
    public String getFieldName() {
139
      return _fieldName;
140
    }
141
  }
142
 
143
  // isset id assignments
144
  private static final int __ID_ISSET_ID = 0;
145
  private static final int __STOREID_ISSET_ID = 1;
146
  private static final int __PRODUCTID_ISSET_ID = 2;
147
  private static final int __CREATEDON_ISSET_ID = 3;
148
  private BitSet __isset_bit_vector = new BitSet(4);
149
 
150
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
151
  static {
152
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
153
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
154
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
155
    tmpMap.put(_Fields.STORE_ID, new org.apache.thrift.meta_data.FieldMetaData("storeId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
156
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
157
    tmpMap.put(_Fields.PRODUCT_ID, new org.apache.thrift.meta_data.FieldMetaData("productId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
158
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
159
    tmpMap.put(_Fields.PINCODE, new org.apache.thrift.meta_data.FieldMetaData("pincode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
160
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
161
    tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
162
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
163
    tmpMap.put(_Fields.EMAIL, new org.apache.thrift.meta_data.FieldMetaData("email", org.apache.thrift.TFieldRequirementType.DEFAULT, 
164
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
165
    tmpMap.put(_Fields.PHONE, new org.apache.thrift.meta_data.FieldMetaData("phone", org.apache.thrift.TFieldRequirementType.DEFAULT, 
166
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
167
    tmpMap.put(_Fields.LINE1, new org.apache.thrift.meta_data.FieldMetaData("line1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
168
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
169
    tmpMap.put(_Fields.LINE2, new org.apache.thrift.meta_data.FieldMetaData("line2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
170
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
171
    tmpMap.put(_Fields.CITY, new org.apache.thrift.meta_data.FieldMetaData("city", org.apache.thrift.TFieldRequirementType.DEFAULT, 
172
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
173
    tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.DEFAULT, 
174
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
175
    tmpMap.put(_Fields.CREATED_ON, new org.apache.thrift.meta_data.FieldMetaData("createdOn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
176
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
177
    metaDataMap = Collections.unmodifiableMap(tmpMap);
178
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PendingStoreOrder.class, metaDataMap);
179
  }
180
 
181
  public PendingStoreOrder() {
182
  }
183
 
184
  public PendingStoreOrder(
185
    long id,
186
    long storeId,
187
    long productId,
188
    String pincode,
189
    String name,
190
    String email,
191
    String phone,
192
    String line1,
193
    String line2,
194
    String city,
195
    String state,
196
    long createdOn)
197
  {
198
    this();
199
    this.id = id;
200
    setIdIsSet(true);
201
    this.storeId = storeId;
202
    setStoreIdIsSet(true);
203
    this.productId = productId;
204
    setProductIdIsSet(true);
205
    this.pincode = pincode;
206
    this.name = name;
207
    this.email = email;
208
    this.phone = phone;
209
    this.line1 = line1;
210
    this.line2 = line2;
211
    this.city = city;
212
    this.state = state;
213
    this.createdOn = createdOn;
214
    setCreatedOnIsSet(true);
215
  }
216
 
217
  /**
218
   * Performs a deep copy on <i>other</i>.
219
   */
220
  public PendingStoreOrder(PendingStoreOrder other) {
221
    __isset_bit_vector.clear();
222
    __isset_bit_vector.or(other.__isset_bit_vector);
223
    this.id = other.id;
224
    this.storeId = other.storeId;
225
    this.productId = other.productId;
226
    if (other.isSetPincode()) {
227
      this.pincode = other.pincode;
228
    }
229
    if (other.isSetName()) {
230
      this.name = other.name;
231
    }
232
    if (other.isSetEmail()) {
233
      this.email = other.email;
234
    }
235
    if (other.isSetPhone()) {
236
      this.phone = other.phone;
237
    }
238
    if (other.isSetLine1()) {
239
      this.line1 = other.line1;
240
    }
241
    if (other.isSetLine2()) {
242
      this.line2 = other.line2;
243
    }
244
    if (other.isSetCity()) {
245
      this.city = other.city;
246
    }
247
    if (other.isSetState()) {
248
      this.state = other.state;
249
    }
250
    this.createdOn = other.createdOn;
251
  }
252
 
253
  public PendingStoreOrder deepCopy() {
254
    return new PendingStoreOrder(this);
255
  }
256
 
257
  @Override
258
  public void clear() {
259
    setIdIsSet(false);
260
    this.id = 0;
261
    setStoreIdIsSet(false);
262
    this.storeId = 0;
263
    setProductIdIsSet(false);
264
    this.productId = 0;
265
    this.pincode = null;
266
    this.name = null;
267
    this.email = null;
268
    this.phone = null;
269
    this.line1 = null;
270
    this.line2 = null;
271
    this.city = null;
272
    this.state = null;
273
    setCreatedOnIsSet(false);
274
    this.createdOn = 0;
275
  }
276
 
277
  public long getId() {
278
    return this.id;
279
  }
280
 
281
  public void setId(long id) {
282
    this.id = id;
283
    setIdIsSet(true);
284
  }
285
 
286
  public void unsetId() {
287
    __isset_bit_vector.clear(__ID_ISSET_ID);
288
  }
289
 
290
  /** Returns true if field id is set (has been assigned a value) and false otherwise */
291
  public boolean isSetId() {
292
    return __isset_bit_vector.get(__ID_ISSET_ID);
293
  }
294
 
295
  public void setIdIsSet(boolean value) {
296
    __isset_bit_vector.set(__ID_ISSET_ID, value);
297
  }
298
 
299
  public long getStoreId() {
300
    return this.storeId;
301
  }
302
 
303
  public void setStoreId(long storeId) {
304
    this.storeId = storeId;
305
    setStoreIdIsSet(true);
306
  }
307
 
308
  public void unsetStoreId() {
309
    __isset_bit_vector.clear(__STOREID_ISSET_ID);
310
  }
311
 
312
  /** Returns true if field storeId is set (has been assigned a value) and false otherwise */
313
  public boolean isSetStoreId() {
314
    return __isset_bit_vector.get(__STOREID_ISSET_ID);
315
  }
316
 
317
  public void setStoreIdIsSet(boolean value) {
318
    __isset_bit_vector.set(__STOREID_ISSET_ID, value);
319
  }
320
 
321
  public long getProductId() {
322
    return this.productId;
323
  }
324
 
325
  public void setProductId(long productId) {
326
    this.productId = productId;
327
    setProductIdIsSet(true);
328
  }
329
 
330
  public void unsetProductId() {
331
    __isset_bit_vector.clear(__PRODUCTID_ISSET_ID);
332
  }
333
 
334
  /** Returns true if field productId is set (has been assigned a value) and false otherwise */
335
  public boolean isSetProductId() {
336
    return __isset_bit_vector.get(__PRODUCTID_ISSET_ID);
337
  }
338
 
339
  public void setProductIdIsSet(boolean value) {
340
    __isset_bit_vector.set(__PRODUCTID_ISSET_ID, value);
341
  }
342
 
343
  public String getPincode() {
344
    return this.pincode;
345
  }
346
 
347
  public void setPincode(String pincode) {
348
    this.pincode = pincode;
349
  }
350
 
351
  public void unsetPincode() {
352
    this.pincode = null;
353
  }
354
 
355
  /** Returns true if field pincode is set (has been assigned a value) and false otherwise */
356
  public boolean isSetPincode() {
357
    return this.pincode != null;
358
  }
359
 
360
  public void setPincodeIsSet(boolean value) {
361
    if (!value) {
362
      this.pincode = null;
363
    }
364
  }
365
 
366
  public String getName() {
367
    return this.name;
368
  }
369
 
370
  public void setName(String name) {
371
    this.name = name;
372
  }
373
 
374
  public void unsetName() {
375
    this.name = null;
376
  }
377
 
378
  /** Returns true if field name is set (has been assigned a value) and false otherwise */
379
  public boolean isSetName() {
380
    return this.name != null;
381
  }
382
 
383
  public void setNameIsSet(boolean value) {
384
    if (!value) {
385
      this.name = null;
386
    }
387
  }
388
 
389
  public String getEmail() {
390
    return this.email;
391
  }
392
 
393
  public void setEmail(String email) {
394
    this.email = email;
395
  }
396
 
397
  public void unsetEmail() {
398
    this.email = null;
399
  }
400
 
401
  /** Returns true if field email is set (has been assigned a value) and false otherwise */
402
  public boolean isSetEmail() {
403
    return this.email != null;
404
  }
405
 
406
  public void setEmailIsSet(boolean value) {
407
    if (!value) {
408
      this.email = null;
409
    }
410
  }
411
 
412
  public String getPhone() {
413
    return this.phone;
414
  }
415
 
416
  public void setPhone(String phone) {
417
    this.phone = phone;
418
  }
419
 
420
  public void unsetPhone() {
421
    this.phone = null;
422
  }
423
 
424
  /** Returns true if field phone is set (has been assigned a value) and false otherwise */
425
  public boolean isSetPhone() {
426
    return this.phone != null;
427
  }
428
 
429
  public void setPhoneIsSet(boolean value) {
430
    if (!value) {
431
      this.phone = null;
432
    }
433
  }
434
 
435
  public String getLine1() {
436
    return this.line1;
437
  }
438
 
439
  public void setLine1(String line1) {
440
    this.line1 = line1;
441
  }
442
 
443
  public void unsetLine1() {
444
    this.line1 = null;
445
  }
446
 
447
  /** Returns true if field line1 is set (has been assigned a value) and false otherwise */
448
  public boolean isSetLine1() {
449
    return this.line1 != null;
450
  }
451
 
452
  public void setLine1IsSet(boolean value) {
453
    if (!value) {
454
      this.line1 = null;
455
    }
456
  }
457
 
458
  public String getLine2() {
459
    return this.line2;
460
  }
461
 
462
  public void setLine2(String line2) {
463
    this.line2 = line2;
464
  }
465
 
466
  public void unsetLine2() {
467
    this.line2 = null;
468
  }
469
 
470
  /** Returns true if field line2 is set (has been assigned a value) and false otherwise */
471
  public boolean isSetLine2() {
472
    return this.line2 != null;
473
  }
474
 
475
  public void setLine2IsSet(boolean value) {
476
    if (!value) {
477
      this.line2 = null;
478
    }
479
  }
480
 
481
  public String getCity() {
482
    return this.city;
483
  }
484
 
485
  public void setCity(String city) {
486
    this.city = city;
487
  }
488
 
489
  public void unsetCity() {
490
    this.city = null;
491
  }
492
 
493
  /** Returns true if field city is set (has been assigned a value) and false otherwise */
494
  public boolean isSetCity() {
495
    return this.city != null;
496
  }
497
 
498
  public void setCityIsSet(boolean value) {
499
    if (!value) {
500
      this.city = null;
501
    }
502
  }
503
 
504
  public String getState() {
505
    return this.state;
506
  }
507
 
508
  public void setState(String state) {
509
    this.state = state;
510
  }
511
 
512
  public void unsetState() {
513
    this.state = null;
514
  }
515
 
516
  /** Returns true if field state is set (has been assigned a value) and false otherwise */
517
  public boolean isSetState() {
518
    return this.state != null;
519
  }
520
 
521
  public void setStateIsSet(boolean value) {
522
    if (!value) {
523
      this.state = null;
524
    }
525
  }
526
 
527
  public long getCreatedOn() {
528
    return this.createdOn;
529
  }
530
 
531
  public void setCreatedOn(long createdOn) {
532
    this.createdOn = createdOn;
533
    setCreatedOnIsSet(true);
534
  }
535
 
536
  public void unsetCreatedOn() {
537
    __isset_bit_vector.clear(__CREATEDON_ISSET_ID);
538
  }
539
 
540
  /** Returns true if field createdOn is set (has been assigned a value) and false otherwise */
541
  public boolean isSetCreatedOn() {
542
    return __isset_bit_vector.get(__CREATEDON_ISSET_ID);
543
  }
544
 
545
  public void setCreatedOnIsSet(boolean value) {
546
    __isset_bit_vector.set(__CREATEDON_ISSET_ID, value);
547
  }
548
 
549
  public void setFieldValue(_Fields field, Object value) {
550
    switch (field) {
551
    case ID:
552
      if (value == null) {
553
        unsetId();
554
      } else {
555
        setId((Long)value);
556
      }
557
      break;
558
 
559
    case STORE_ID:
560
      if (value == null) {
561
        unsetStoreId();
562
      } else {
563
        setStoreId((Long)value);
564
      }
565
      break;
566
 
567
    case PRODUCT_ID:
568
      if (value == null) {
569
        unsetProductId();
570
      } else {
571
        setProductId((Long)value);
572
      }
573
      break;
574
 
575
    case PINCODE:
576
      if (value == null) {
577
        unsetPincode();
578
      } else {
579
        setPincode((String)value);
580
      }
581
      break;
582
 
583
    case NAME:
584
      if (value == null) {
585
        unsetName();
586
      } else {
587
        setName((String)value);
588
      }
589
      break;
590
 
591
    case EMAIL:
592
      if (value == null) {
593
        unsetEmail();
594
      } else {
595
        setEmail((String)value);
596
      }
597
      break;
598
 
599
    case PHONE:
600
      if (value == null) {
601
        unsetPhone();
602
      } else {
603
        setPhone((String)value);
604
      }
605
      break;
606
 
607
    case LINE1:
608
      if (value == null) {
609
        unsetLine1();
610
      } else {
611
        setLine1((String)value);
612
      }
613
      break;
614
 
615
    case LINE2:
616
      if (value == null) {
617
        unsetLine2();
618
      } else {
619
        setLine2((String)value);
620
      }
621
      break;
622
 
623
    case CITY:
624
      if (value == null) {
625
        unsetCity();
626
      } else {
627
        setCity((String)value);
628
      }
629
      break;
630
 
631
    case STATE:
632
      if (value == null) {
633
        unsetState();
634
      } else {
635
        setState((String)value);
636
      }
637
      break;
638
 
639
    case CREATED_ON:
640
      if (value == null) {
641
        unsetCreatedOn();
642
      } else {
643
        setCreatedOn((Long)value);
644
      }
645
      break;
646
 
647
    }
648
  }
649
 
650
  public Object getFieldValue(_Fields field) {
651
    switch (field) {
652
    case ID:
653
      return Long.valueOf(getId());
654
 
655
    case STORE_ID:
656
      return Long.valueOf(getStoreId());
657
 
658
    case PRODUCT_ID:
659
      return Long.valueOf(getProductId());
660
 
661
    case PINCODE:
662
      return getPincode();
663
 
664
    case NAME:
665
      return getName();
666
 
667
    case EMAIL:
668
      return getEmail();
669
 
670
    case PHONE:
671
      return getPhone();
672
 
673
    case LINE1:
674
      return getLine1();
675
 
676
    case LINE2:
677
      return getLine2();
678
 
679
    case CITY:
680
      return getCity();
681
 
682
    case STATE:
683
      return getState();
684
 
685
    case CREATED_ON:
686
      return Long.valueOf(getCreatedOn());
687
 
688
    }
689
    throw new IllegalStateException();
690
  }
691
 
692
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
693
  public boolean isSet(_Fields field) {
694
    if (field == null) {
695
      throw new IllegalArgumentException();
696
    }
697
 
698
    switch (field) {
699
    case ID:
700
      return isSetId();
701
    case STORE_ID:
702
      return isSetStoreId();
703
    case PRODUCT_ID:
704
      return isSetProductId();
705
    case PINCODE:
706
      return isSetPincode();
707
    case NAME:
708
      return isSetName();
709
    case EMAIL:
710
      return isSetEmail();
711
    case PHONE:
712
      return isSetPhone();
713
    case LINE1:
714
      return isSetLine1();
715
    case LINE2:
716
      return isSetLine2();
717
    case CITY:
718
      return isSetCity();
719
    case STATE:
720
      return isSetState();
721
    case CREATED_ON:
722
      return isSetCreatedOn();
723
    }
724
    throw new IllegalStateException();
725
  }
726
 
727
  @Override
728
  public boolean equals(Object that) {
729
    if (that == null)
730
      return false;
731
    if (that instanceof PendingStoreOrder)
732
      return this.equals((PendingStoreOrder)that);
733
    return false;
734
  }
735
 
736
  public boolean equals(PendingStoreOrder that) {
737
    if (that == null)
738
      return false;
739
 
740
    boolean this_present_id = true;
741
    boolean that_present_id = true;
742
    if (this_present_id || that_present_id) {
743
      if (!(this_present_id && that_present_id))
744
        return false;
745
      if (this.id != that.id)
746
        return false;
747
    }
748
 
749
    boolean this_present_storeId = true;
750
    boolean that_present_storeId = true;
751
    if (this_present_storeId || that_present_storeId) {
752
      if (!(this_present_storeId && that_present_storeId))
753
        return false;
754
      if (this.storeId != that.storeId)
755
        return false;
756
    }
757
 
758
    boolean this_present_productId = true;
759
    boolean that_present_productId = true;
760
    if (this_present_productId || that_present_productId) {
761
      if (!(this_present_productId && that_present_productId))
762
        return false;
763
      if (this.productId != that.productId)
764
        return false;
765
    }
766
 
767
    boolean this_present_pincode = true && this.isSetPincode();
768
    boolean that_present_pincode = true && that.isSetPincode();
769
    if (this_present_pincode || that_present_pincode) {
770
      if (!(this_present_pincode && that_present_pincode))
771
        return false;
772
      if (!this.pincode.equals(that.pincode))
773
        return false;
774
    }
775
 
776
    boolean this_present_name = true && this.isSetName();
777
    boolean that_present_name = true && that.isSetName();
778
    if (this_present_name || that_present_name) {
779
      if (!(this_present_name && that_present_name))
780
        return false;
781
      if (!this.name.equals(that.name))
782
        return false;
783
    }
784
 
785
    boolean this_present_email = true && this.isSetEmail();
786
    boolean that_present_email = true && that.isSetEmail();
787
    if (this_present_email || that_present_email) {
788
      if (!(this_present_email && that_present_email))
789
        return false;
790
      if (!this.email.equals(that.email))
791
        return false;
792
    }
793
 
794
    boolean this_present_phone = true && this.isSetPhone();
795
    boolean that_present_phone = true && that.isSetPhone();
796
    if (this_present_phone || that_present_phone) {
797
      if (!(this_present_phone && that_present_phone))
798
        return false;
799
      if (!this.phone.equals(that.phone))
800
        return false;
801
    }
802
 
803
    boolean this_present_line1 = true && this.isSetLine1();
804
    boolean that_present_line1 = true && that.isSetLine1();
805
    if (this_present_line1 || that_present_line1) {
806
      if (!(this_present_line1 && that_present_line1))
807
        return false;
808
      if (!this.line1.equals(that.line1))
809
        return false;
810
    }
811
 
812
    boolean this_present_line2 = true && this.isSetLine2();
813
    boolean that_present_line2 = true && that.isSetLine2();
814
    if (this_present_line2 || that_present_line2) {
815
      if (!(this_present_line2 && that_present_line2))
816
        return false;
817
      if (!this.line2.equals(that.line2))
818
        return false;
819
    }
820
 
821
    boolean this_present_city = true && this.isSetCity();
822
    boolean that_present_city = true && that.isSetCity();
823
    if (this_present_city || that_present_city) {
824
      if (!(this_present_city && that_present_city))
825
        return false;
826
      if (!this.city.equals(that.city))
827
        return false;
828
    }
829
 
830
    boolean this_present_state = true && this.isSetState();
831
    boolean that_present_state = true && that.isSetState();
832
    if (this_present_state || that_present_state) {
833
      if (!(this_present_state && that_present_state))
834
        return false;
835
      if (!this.state.equals(that.state))
836
        return false;
837
    }
838
 
839
    boolean this_present_createdOn = true;
840
    boolean that_present_createdOn = true;
841
    if (this_present_createdOn || that_present_createdOn) {
842
      if (!(this_present_createdOn && that_present_createdOn))
843
        return false;
844
      if (this.createdOn != that.createdOn)
845
        return false;
846
    }
847
 
848
    return true;
849
  }
850
 
851
  @Override
852
  public int hashCode() {
853
    return 0;
854
  }
855
 
856
  public int compareTo(PendingStoreOrder other) {
857
    if (!getClass().equals(other.getClass())) {
858
      return getClass().getName().compareTo(other.getClass().getName());
859
    }
860
 
861
    int lastComparison = 0;
862
    PendingStoreOrder typedOther = (PendingStoreOrder)other;
863
 
864
    lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
865
    if (lastComparison != 0) {
866
      return lastComparison;
867
    }
868
    if (isSetId()) {
869
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
870
      if (lastComparison != 0) {
871
        return lastComparison;
872
      }
873
    }
874
    lastComparison = Boolean.valueOf(isSetStoreId()).compareTo(typedOther.isSetStoreId());
875
    if (lastComparison != 0) {
876
      return lastComparison;
877
    }
878
    if (isSetStoreId()) {
879
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.storeId, typedOther.storeId);
880
      if (lastComparison != 0) {
881
        return lastComparison;
882
      }
883
    }
884
    lastComparison = Boolean.valueOf(isSetProductId()).compareTo(typedOther.isSetProductId());
885
    if (lastComparison != 0) {
886
      return lastComparison;
887
    }
888
    if (isSetProductId()) {
889
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.productId, typedOther.productId);
890
      if (lastComparison != 0) {
891
        return lastComparison;
892
      }
893
    }
894
    lastComparison = Boolean.valueOf(isSetPincode()).compareTo(typedOther.isSetPincode());
895
    if (lastComparison != 0) {
896
      return lastComparison;
897
    }
898
    if (isSetPincode()) {
899
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pincode, typedOther.pincode);
900
      if (lastComparison != 0) {
901
        return lastComparison;
902
      }
903
    }
904
    lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
905
    if (lastComparison != 0) {
906
      return lastComparison;
907
    }
908
    if (isSetName()) {
909
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
910
      if (lastComparison != 0) {
911
        return lastComparison;
912
      }
913
    }
914
    lastComparison = Boolean.valueOf(isSetEmail()).compareTo(typedOther.isSetEmail());
915
    if (lastComparison != 0) {
916
      return lastComparison;
917
    }
918
    if (isSetEmail()) {
919
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.email, typedOther.email);
920
      if (lastComparison != 0) {
921
        return lastComparison;
922
      }
923
    }
924
    lastComparison = Boolean.valueOf(isSetPhone()).compareTo(typedOther.isSetPhone());
925
    if (lastComparison != 0) {
926
      return lastComparison;
927
    }
928
    if (isSetPhone()) {
929
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.phone, typedOther.phone);
930
      if (lastComparison != 0) {
931
        return lastComparison;
932
      }
933
    }
934
    lastComparison = Boolean.valueOf(isSetLine1()).compareTo(typedOther.isSetLine1());
935
    if (lastComparison != 0) {
936
      return lastComparison;
937
    }
938
    if (isSetLine1()) {
939
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.line1, typedOther.line1);
940
      if (lastComparison != 0) {
941
        return lastComparison;
942
      }
943
    }
944
    lastComparison = Boolean.valueOf(isSetLine2()).compareTo(typedOther.isSetLine2());
945
    if (lastComparison != 0) {
946
      return lastComparison;
947
    }
948
    if (isSetLine2()) {
949
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.line2, typedOther.line2);
950
      if (lastComparison != 0) {
951
        return lastComparison;
952
      }
953
    }
954
    lastComparison = Boolean.valueOf(isSetCity()).compareTo(typedOther.isSetCity());
955
    if (lastComparison != 0) {
956
      return lastComparison;
957
    }
958
    if (isSetCity()) {
959
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.city, typedOther.city);
960
      if (lastComparison != 0) {
961
        return lastComparison;
962
      }
963
    }
964
    lastComparison = Boolean.valueOf(isSetState()).compareTo(typedOther.isSetState());
965
    if (lastComparison != 0) {
966
      return lastComparison;
967
    }
968
    if (isSetState()) {
969
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, typedOther.state);
970
      if (lastComparison != 0) {
971
        return lastComparison;
972
      }
973
    }
974
    lastComparison = Boolean.valueOf(isSetCreatedOn()).compareTo(typedOther.isSetCreatedOn());
975
    if (lastComparison != 0) {
976
      return lastComparison;
977
    }
978
    if (isSetCreatedOn()) {
979
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdOn, typedOther.createdOn);
980
      if (lastComparison != 0) {
981
        return lastComparison;
982
      }
983
    }
984
    return 0;
985
  }
986
 
987
  public _Fields fieldForId(int fieldId) {
988
    return _Fields.findByThriftId(fieldId);
989
  }
990
 
991
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
992
    org.apache.thrift.protocol.TField field;
993
    iprot.readStructBegin();
994
    while (true)
995
    {
996
      field = iprot.readFieldBegin();
997
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
998
        break;
999
      }
1000
      switch (field.id) {
1001
        case 1: // ID
1002
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1003
            this.id = iprot.readI64();
1004
            setIdIsSet(true);
1005
          } else { 
1006
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1007
          }
1008
          break;
1009
        case 2: // STORE_ID
1010
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1011
            this.storeId = iprot.readI64();
1012
            setStoreIdIsSet(true);
1013
          } else { 
1014
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1015
          }
1016
          break;
1017
        case 3: // PRODUCT_ID
1018
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1019
            this.productId = iprot.readI64();
1020
            setProductIdIsSet(true);
1021
          } else { 
1022
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1023
          }
1024
          break;
1025
        case 4: // PINCODE
1026
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1027
            this.pincode = iprot.readString();
1028
          } else { 
1029
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1030
          }
1031
          break;
1032
        case 5: // NAME
1033
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1034
            this.name = iprot.readString();
1035
          } else { 
1036
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1037
          }
1038
          break;
1039
        case 6: // EMAIL
1040
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1041
            this.email = iprot.readString();
1042
          } else { 
1043
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1044
          }
1045
          break;
1046
        case 7: // PHONE
1047
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1048
            this.phone = iprot.readString();
1049
          } else { 
1050
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1051
          }
1052
          break;
1053
        case 8: // LINE1
1054
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1055
            this.line1 = iprot.readString();
1056
          } else { 
1057
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1058
          }
1059
          break;
1060
        case 9: // LINE2
1061
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1062
            this.line2 = iprot.readString();
1063
          } else { 
1064
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1065
          }
1066
          break;
1067
        case 10: // CITY
1068
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1069
            this.city = iprot.readString();
1070
          } else { 
1071
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1072
          }
1073
          break;
1074
        case 11: // STATE
1075
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1076
            this.state = iprot.readString();
1077
          } else { 
1078
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1079
          }
1080
          break;
1081
        case 12: // CREATED_ON
1082
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1083
            this.createdOn = iprot.readI64();
1084
            setCreatedOnIsSet(true);
1085
          } else { 
1086
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1087
          }
1088
          break;
1089
        default:
1090
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1091
      }
1092
      iprot.readFieldEnd();
1093
    }
1094
    iprot.readStructEnd();
1095
    validate();
1096
  }
1097
 
1098
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1099
    validate();
1100
 
1101
    oprot.writeStructBegin(STRUCT_DESC);
1102
    oprot.writeFieldBegin(ID_FIELD_DESC);
1103
    oprot.writeI64(this.id);
1104
    oprot.writeFieldEnd();
1105
    oprot.writeFieldBegin(STORE_ID_FIELD_DESC);
1106
    oprot.writeI64(this.storeId);
1107
    oprot.writeFieldEnd();
1108
    oprot.writeFieldBegin(PRODUCT_ID_FIELD_DESC);
1109
    oprot.writeI64(this.productId);
1110
    oprot.writeFieldEnd();
1111
    if (this.pincode != null) {
1112
      oprot.writeFieldBegin(PINCODE_FIELD_DESC);
1113
      oprot.writeString(this.pincode);
1114
      oprot.writeFieldEnd();
1115
    }
1116
    if (this.name != null) {
1117
      oprot.writeFieldBegin(NAME_FIELD_DESC);
1118
      oprot.writeString(this.name);
1119
      oprot.writeFieldEnd();
1120
    }
1121
    if (this.email != null) {
1122
      oprot.writeFieldBegin(EMAIL_FIELD_DESC);
1123
      oprot.writeString(this.email);
1124
      oprot.writeFieldEnd();
1125
    }
1126
    if (this.phone != null) {
1127
      oprot.writeFieldBegin(PHONE_FIELD_DESC);
1128
      oprot.writeString(this.phone);
1129
      oprot.writeFieldEnd();
1130
    }
1131
    if (this.line1 != null) {
1132
      oprot.writeFieldBegin(LINE1_FIELD_DESC);
1133
      oprot.writeString(this.line1);
1134
      oprot.writeFieldEnd();
1135
    }
1136
    if (this.line2 != null) {
1137
      oprot.writeFieldBegin(LINE2_FIELD_DESC);
1138
      oprot.writeString(this.line2);
1139
      oprot.writeFieldEnd();
1140
    }
1141
    if (this.city != null) {
1142
      oprot.writeFieldBegin(CITY_FIELD_DESC);
1143
      oprot.writeString(this.city);
1144
      oprot.writeFieldEnd();
1145
    }
1146
    if (this.state != null) {
1147
      oprot.writeFieldBegin(STATE_FIELD_DESC);
1148
      oprot.writeString(this.state);
1149
      oprot.writeFieldEnd();
1150
    }
1151
    oprot.writeFieldBegin(CREATED_ON_FIELD_DESC);
1152
    oprot.writeI64(this.createdOn);
1153
    oprot.writeFieldEnd();
1154
    oprot.writeFieldStop();
1155
    oprot.writeStructEnd();
1156
  }
1157
 
1158
  @Override
1159
  public String toString() {
1160
    StringBuilder sb = new StringBuilder("PendingStoreOrder(");
1161
    boolean first = true;
1162
 
1163
    sb.append("id:");
1164
    sb.append(this.id);
1165
    first = false;
1166
    if (!first) sb.append(", ");
1167
    sb.append("storeId:");
1168
    sb.append(this.storeId);
1169
    first = false;
1170
    if (!first) sb.append(", ");
1171
    sb.append("productId:");
1172
    sb.append(this.productId);
1173
    first = false;
1174
    if (!first) sb.append(", ");
1175
    sb.append("pincode:");
1176
    if (this.pincode == null) {
1177
      sb.append("null");
1178
    } else {
1179
      sb.append(this.pincode);
1180
    }
1181
    first = false;
1182
    if (!first) sb.append(", ");
1183
    sb.append("name:");
1184
    if (this.name == null) {
1185
      sb.append("null");
1186
    } else {
1187
      sb.append(this.name);
1188
    }
1189
    first = false;
1190
    if (!first) sb.append(", ");
1191
    sb.append("email:");
1192
    if (this.email == null) {
1193
      sb.append("null");
1194
    } else {
1195
      sb.append(this.email);
1196
    }
1197
    first = false;
1198
    if (!first) sb.append(", ");
1199
    sb.append("phone:");
1200
    if (this.phone == null) {
1201
      sb.append("null");
1202
    } else {
1203
      sb.append(this.phone);
1204
    }
1205
    first = false;
1206
    if (!first) sb.append(", ");
1207
    sb.append("line1:");
1208
    if (this.line1 == null) {
1209
      sb.append("null");
1210
    } else {
1211
      sb.append(this.line1);
1212
    }
1213
    first = false;
1214
    if (!first) sb.append(", ");
1215
    sb.append("line2:");
1216
    if (this.line2 == null) {
1217
      sb.append("null");
1218
    } else {
1219
      sb.append(this.line2);
1220
    }
1221
    first = false;
1222
    if (!first) sb.append(", ");
1223
    sb.append("city:");
1224
    if (this.city == null) {
1225
      sb.append("null");
1226
    } else {
1227
      sb.append(this.city);
1228
    }
1229
    first = false;
1230
    if (!first) sb.append(", ");
1231
    sb.append("state:");
1232
    if (this.state == null) {
1233
      sb.append("null");
1234
    } else {
1235
      sb.append(this.state);
1236
    }
1237
    first = false;
1238
    if (!first) sb.append(", ");
1239
    sb.append("createdOn:");
1240
    sb.append(this.createdOn);
1241
    first = false;
1242
    sb.append(")");
1243
    return sb.toString();
1244
  }
1245
 
1246
  public void validate() throws org.apache.thrift.TException {
1247
    // check for required fields
1248
  }
1249
 
1250
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1251
    try {
1252
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1253
    } catch (org.apache.thrift.TException te) {
1254
      throw new java.io.IOException(te);
1255
    }
1256
  }
1257
 
1258
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1259
    try {
1260
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
1261
      __isset_bit_vector = new BitSet(1);
1262
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1263
    } catch (org.apache.thrift.TException te) {
1264
      throw new java.io.IOException(te);
1265
    }
1266
  }
1267
 
1268
}
1269