Subversion Repositories SmartDukaan

Rev

Rev 5719 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5553 rajveer 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.logistics;
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 PickupStore implements org.apache.thrift.TBase<PickupStore, PickupStore._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PickupStore");
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 NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2);
28
  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)3);
29
  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)4);
30
  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)5);
31
  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)6);
32
  private static final org.apache.thrift.protocol.TField PIN_FIELD_DESC = new org.apache.thrift.protocol.TField("pin", org.apache.thrift.protocol.TType.STRING, (short)7);
33
  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)8);
34
 
35
  private long id; // required
36
  private String name; // required
37
  private String line1; // required
38
  private String line2; // required
39
  private String city; // required
40
  private String state; // required
41
  private String pin; // required
42
  private String phone; // required
43
 
44
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
45
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
46
    ID((short)1, "id"),
47
    NAME((short)2, "name"),
48
    LINE1((short)3, "line1"),
49
    LINE2((short)4, "line2"),
50
    CITY((short)5, "city"),
51
    STATE((short)6, "state"),
52
    PIN((short)7, "pin"),
53
    PHONE((short)8, "phone");
54
 
55
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
56
 
57
    static {
58
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
59
        byName.put(field.getFieldName(), field);
60
      }
61
    }
62
 
63
    /**
64
     * Find the _Fields constant that matches fieldId, or null if its not found.
65
     */
66
    public static _Fields findByThriftId(int fieldId) {
67
      switch(fieldId) {
68
        case 1: // ID
69
          return ID;
70
        case 2: // NAME
71
          return NAME;
72
        case 3: // LINE1
73
          return LINE1;
74
        case 4: // LINE2
75
          return LINE2;
76
        case 5: // CITY
77
          return CITY;
78
        case 6: // STATE
79
          return STATE;
80
        case 7: // PIN
81
          return PIN;
82
        case 8: // PHONE
83
          return PHONE;
84
        default:
85
          return null;
86
      }
87
    }
88
 
89
    /**
90
     * Find the _Fields constant that matches fieldId, throwing an exception
91
     * if it is not found.
92
     */
93
    public static _Fields findByThriftIdOrThrow(int fieldId) {
94
      _Fields fields = findByThriftId(fieldId);
95
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
96
      return fields;
97
    }
98
 
99
    /**
100
     * Find the _Fields constant that matches name, or null if its not found.
101
     */
102
    public static _Fields findByName(String name) {
103
      return byName.get(name);
104
    }
105
 
106
    private final short _thriftId;
107
    private final String _fieldName;
108
 
109
    _Fields(short thriftId, String fieldName) {
110
      _thriftId = thriftId;
111
      _fieldName = fieldName;
112
    }
113
 
114
    public short getThriftFieldId() {
115
      return _thriftId;
116
    }
117
 
118
    public String getFieldName() {
119
      return _fieldName;
120
    }
121
  }
122
 
123
  // isset id assignments
124
  private static final int __ID_ISSET_ID = 0;
125
  private BitSet __isset_bit_vector = new BitSet(1);
126
 
127
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
128
  static {
129
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
130
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
131
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
132
    tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
133
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
134
    tmpMap.put(_Fields.LINE1, new org.apache.thrift.meta_data.FieldMetaData("line1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
135
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
136
    tmpMap.put(_Fields.LINE2, new org.apache.thrift.meta_data.FieldMetaData("line2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
137
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
138
    tmpMap.put(_Fields.CITY, new org.apache.thrift.meta_data.FieldMetaData("city", org.apache.thrift.TFieldRequirementType.DEFAULT, 
139
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
140
    tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.DEFAULT, 
141
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
142
    tmpMap.put(_Fields.PIN, new org.apache.thrift.meta_data.FieldMetaData("pin", org.apache.thrift.TFieldRequirementType.DEFAULT, 
143
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
144
    tmpMap.put(_Fields.PHONE, new org.apache.thrift.meta_data.FieldMetaData("phone", org.apache.thrift.TFieldRequirementType.DEFAULT, 
145
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
146
    metaDataMap = Collections.unmodifiableMap(tmpMap);
147
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PickupStore.class, metaDataMap);
148
  }
149
 
150
  public PickupStore() {
151
  }
152
 
153
  public PickupStore(
154
    long id,
155
    String name,
156
    String line1,
157
    String line2,
158
    String city,
159
    String state,
160
    String pin,
161
    String phone)
162
  {
163
    this();
164
    this.id = id;
165
    setIdIsSet(true);
166
    this.name = name;
167
    this.line1 = line1;
168
    this.line2 = line2;
169
    this.city = city;
170
    this.state = state;
171
    this.pin = pin;
172
    this.phone = phone;
173
  }
174
 
175
  /**
176
   * Performs a deep copy on <i>other</i>.
177
   */
178
  public PickupStore(PickupStore other) {
179
    __isset_bit_vector.clear();
180
    __isset_bit_vector.or(other.__isset_bit_vector);
181
    this.id = other.id;
182
    if (other.isSetName()) {
183
      this.name = other.name;
184
    }
185
    if (other.isSetLine1()) {
186
      this.line1 = other.line1;
187
    }
188
    if (other.isSetLine2()) {
189
      this.line2 = other.line2;
190
    }
191
    if (other.isSetCity()) {
192
      this.city = other.city;
193
    }
194
    if (other.isSetState()) {
195
      this.state = other.state;
196
    }
197
    if (other.isSetPin()) {
198
      this.pin = other.pin;
199
    }
200
    if (other.isSetPhone()) {
201
      this.phone = other.phone;
202
    }
203
  }
204
 
205
  public PickupStore deepCopy() {
206
    return new PickupStore(this);
207
  }
208
 
209
  @Override
210
  public void clear() {
211
    setIdIsSet(false);
212
    this.id = 0;
213
    this.name = null;
214
    this.line1 = null;
215
    this.line2 = null;
216
    this.city = null;
217
    this.state = null;
218
    this.pin = null;
219
    this.phone = null;
220
  }
221
 
222
  public long getId() {
223
    return this.id;
224
  }
225
 
226
  public void setId(long id) {
227
    this.id = id;
228
    setIdIsSet(true);
229
  }
230
 
231
  public void unsetId() {
232
    __isset_bit_vector.clear(__ID_ISSET_ID);
233
  }
234
 
235
  /** Returns true if field id is set (has been assigned a value) and false otherwise */
236
  public boolean isSetId() {
237
    return __isset_bit_vector.get(__ID_ISSET_ID);
238
  }
239
 
240
  public void setIdIsSet(boolean value) {
241
    __isset_bit_vector.set(__ID_ISSET_ID, value);
242
  }
243
 
244
  public String getName() {
245
    return this.name;
246
  }
247
 
248
  public void setName(String name) {
249
    this.name = name;
250
  }
251
 
252
  public void unsetName() {
253
    this.name = null;
254
  }
255
 
256
  /** Returns true if field name is set (has been assigned a value) and false otherwise */
257
  public boolean isSetName() {
258
    return this.name != null;
259
  }
260
 
261
  public void setNameIsSet(boolean value) {
262
    if (!value) {
263
      this.name = null;
264
    }
265
  }
266
 
267
  public String getLine1() {
268
    return this.line1;
269
  }
270
 
271
  public void setLine1(String line1) {
272
    this.line1 = line1;
273
  }
274
 
275
  public void unsetLine1() {
276
    this.line1 = null;
277
  }
278
 
279
  /** Returns true if field line1 is set (has been assigned a value) and false otherwise */
280
  public boolean isSetLine1() {
281
    return this.line1 != null;
282
  }
283
 
284
  public void setLine1IsSet(boolean value) {
285
    if (!value) {
286
      this.line1 = null;
287
    }
288
  }
289
 
290
  public String getLine2() {
291
    return this.line2;
292
  }
293
 
294
  public void setLine2(String line2) {
295
    this.line2 = line2;
296
  }
297
 
298
  public void unsetLine2() {
299
    this.line2 = null;
300
  }
301
 
302
  /** Returns true if field line2 is set (has been assigned a value) and false otherwise */
303
  public boolean isSetLine2() {
304
    return this.line2 != null;
305
  }
306
 
307
  public void setLine2IsSet(boolean value) {
308
    if (!value) {
309
      this.line2 = null;
310
    }
311
  }
312
 
313
  public String getCity() {
314
    return this.city;
315
  }
316
 
317
  public void setCity(String city) {
318
    this.city = city;
319
  }
320
 
321
  public void unsetCity() {
322
    this.city = null;
323
  }
324
 
325
  /** Returns true if field city is set (has been assigned a value) and false otherwise */
326
  public boolean isSetCity() {
327
    return this.city != null;
328
  }
329
 
330
  public void setCityIsSet(boolean value) {
331
    if (!value) {
332
      this.city = null;
333
    }
334
  }
335
 
336
  public String getState() {
337
    return this.state;
338
  }
339
 
340
  public void setState(String state) {
341
    this.state = state;
342
  }
343
 
344
  public void unsetState() {
345
    this.state = null;
346
  }
347
 
348
  /** Returns true if field state is set (has been assigned a value) and false otherwise */
349
  public boolean isSetState() {
350
    return this.state != null;
351
  }
352
 
353
  public void setStateIsSet(boolean value) {
354
    if (!value) {
355
      this.state = null;
356
    }
357
  }
358
 
359
  public String getPin() {
360
    return this.pin;
361
  }
362
 
363
  public void setPin(String pin) {
364
    this.pin = pin;
365
  }
366
 
367
  public void unsetPin() {
368
    this.pin = null;
369
  }
370
 
371
  /** Returns true if field pin is set (has been assigned a value) and false otherwise */
372
  public boolean isSetPin() {
373
    return this.pin != null;
374
  }
375
 
376
  public void setPinIsSet(boolean value) {
377
    if (!value) {
378
      this.pin = null;
379
    }
380
  }
381
 
382
  public String getPhone() {
383
    return this.phone;
384
  }
385
 
386
  public void setPhone(String phone) {
387
    this.phone = phone;
388
  }
389
 
390
  public void unsetPhone() {
391
    this.phone = null;
392
  }
393
 
394
  /** Returns true if field phone is set (has been assigned a value) and false otherwise */
395
  public boolean isSetPhone() {
396
    return this.phone != null;
397
  }
398
 
399
  public void setPhoneIsSet(boolean value) {
400
    if (!value) {
401
      this.phone = null;
402
    }
403
  }
404
 
405
  public void setFieldValue(_Fields field, Object value) {
406
    switch (field) {
407
    case ID:
408
      if (value == null) {
409
        unsetId();
410
      } else {
411
        setId((Long)value);
412
      }
413
      break;
414
 
415
    case NAME:
416
      if (value == null) {
417
        unsetName();
418
      } else {
419
        setName((String)value);
420
      }
421
      break;
422
 
423
    case LINE1:
424
      if (value == null) {
425
        unsetLine1();
426
      } else {
427
        setLine1((String)value);
428
      }
429
      break;
430
 
431
    case LINE2:
432
      if (value == null) {
433
        unsetLine2();
434
      } else {
435
        setLine2((String)value);
436
      }
437
      break;
438
 
439
    case CITY:
440
      if (value == null) {
441
        unsetCity();
442
      } else {
443
        setCity((String)value);
444
      }
445
      break;
446
 
447
    case STATE:
448
      if (value == null) {
449
        unsetState();
450
      } else {
451
        setState((String)value);
452
      }
453
      break;
454
 
455
    case PIN:
456
      if (value == null) {
457
        unsetPin();
458
      } else {
459
        setPin((String)value);
460
      }
461
      break;
462
 
463
    case PHONE:
464
      if (value == null) {
465
        unsetPhone();
466
      } else {
467
        setPhone((String)value);
468
      }
469
      break;
470
 
471
    }
472
  }
473
 
474
  public Object getFieldValue(_Fields field) {
475
    switch (field) {
476
    case ID:
477
      return Long.valueOf(getId());
478
 
479
    case NAME:
480
      return getName();
481
 
482
    case LINE1:
483
      return getLine1();
484
 
485
    case LINE2:
486
      return getLine2();
487
 
488
    case CITY:
489
      return getCity();
490
 
491
    case STATE:
492
      return getState();
493
 
494
    case PIN:
495
      return getPin();
496
 
497
    case PHONE:
498
      return getPhone();
499
 
500
    }
501
    throw new IllegalStateException();
502
  }
503
 
504
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
505
  public boolean isSet(_Fields field) {
506
    if (field == null) {
507
      throw new IllegalArgumentException();
508
    }
509
 
510
    switch (field) {
511
    case ID:
512
      return isSetId();
513
    case NAME:
514
      return isSetName();
515
    case LINE1:
516
      return isSetLine1();
517
    case LINE2:
518
      return isSetLine2();
519
    case CITY:
520
      return isSetCity();
521
    case STATE:
522
      return isSetState();
523
    case PIN:
524
      return isSetPin();
525
    case PHONE:
526
      return isSetPhone();
527
    }
528
    throw new IllegalStateException();
529
  }
530
 
531
  @Override
532
  public boolean equals(Object that) {
533
    if (that == null)
534
      return false;
535
    if (that instanceof PickupStore)
536
      return this.equals((PickupStore)that);
537
    return false;
538
  }
539
 
540
  public boolean equals(PickupStore that) {
541
    if (that == null)
542
      return false;
543
 
544
    boolean this_present_id = true;
545
    boolean that_present_id = true;
546
    if (this_present_id || that_present_id) {
547
      if (!(this_present_id && that_present_id))
548
        return false;
549
      if (this.id != that.id)
550
        return false;
551
    }
552
 
553
    boolean this_present_name = true && this.isSetName();
554
    boolean that_present_name = true && that.isSetName();
555
    if (this_present_name || that_present_name) {
556
      if (!(this_present_name && that_present_name))
557
        return false;
558
      if (!this.name.equals(that.name))
559
        return false;
560
    }
561
 
562
    boolean this_present_line1 = true && this.isSetLine1();
563
    boolean that_present_line1 = true && that.isSetLine1();
564
    if (this_present_line1 || that_present_line1) {
565
      if (!(this_present_line1 && that_present_line1))
566
        return false;
567
      if (!this.line1.equals(that.line1))
568
        return false;
569
    }
570
 
571
    boolean this_present_line2 = true && this.isSetLine2();
572
    boolean that_present_line2 = true && that.isSetLine2();
573
    if (this_present_line2 || that_present_line2) {
574
      if (!(this_present_line2 && that_present_line2))
575
        return false;
576
      if (!this.line2.equals(that.line2))
577
        return false;
578
    }
579
 
580
    boolean this_present_city = true && this.isSetCity();
581
    boolean that_present_city = true && that.isSetCity();
582
    if (this_present_city || that_present_city) {
583
      if (!(this_present_city && that_present_city))
584
        return false;
585
      if (!this.city.equals(that.city))
586
        return false;
587
    }
588
 
589
    boolean this_present_state = true && this.isSetState();
590
    boolean that_present_state = true && that.isSetState();
591
    if (this_present_state || that_present_state) {
592
      if (!(this_present_state && that_present_state))
593
        return false;
594
      if (!this.state.equals(that.state))
595
        return false;
596
    }
597
 
598
    boolean this_present_pin = true && this.isSetPin();
599
    boolean that_present_pin = true && that.isSetPin();
600
    if (this_present_pin || that_present_pin) {
601
      if (!(this_present_pin && that_present_pin))
602
        return false;
603
      if (!this.pin.equals(that.pin))
604
        return false;
605
    }
606
 
607
    boolean this_present_phone = true && this.isSetPhone();
608
    boolean that_present_phone = true && that.isSetPhone();
609
    if (this_present_phone || that_present_phone) {
610
      if (!(this_present_phone && that_present_phone))
611
        return false;
612
      if (!this.phone.equals(that.phone))
613
        return false;
614
    }
615
 
616
    return true;
617
  }
618
 
619
  @Override
620
  public int hashCode() {
621
    return 0;
622
  }
623
 
624
  public int compareTo(PickupStore other) {
625
    if (!getClass().equals(other.getClass())) {
626
      return getClass().getName().compareTo(other.getClass().getName());
627
    }
628
 
629
    int lastComparison = 0;
630
    PickupStore typedOther = (PickupStore)other;
631
 
632
    lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
633
    if (lastComparison != 0) {
634
      return lastComparison;
635
    }
636
    if (isSetId()) {
637
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
638
      if (lastComparison != 0) {
639
        return lastComparison;
640
      }
641
    }
642
    lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
643
    if (lastComparison != 0) {
644
      return lastComparison;
645
    }
646
    if (isSetName()) {
647
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
648
      if (lastComparison != 0) {
649
        return lastComparison;
650
      }
651
    }
652
    lastComparison = Boolean.valueOf(isSetLine1()).compareTo(typedOther.isSetLine1());
653
    if (lastComparison != 0) {
654
      return lastComparison;
655
    }
656
    if (isSetLine1()) {
657
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.line1, typedOther.line1);
658
      if (lastComparison != 0) {
659
        return lastComparison;
660
      }
661
    }
662
    lastComparison = Boolean.valueOf(isSetLine2()).compareTo(typedOther.isSetLine2());
663
    if (lastComparison != 0) {
664
      return lastComparison;
665
    }
666
    if (isSetLine2()) {
667
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.line2, typedOther.line2);
668
      if (lastComparison != 0) {
669
        return lastComparison;
670
      }
671
    }
672
    lastComparison = Boolean.valueOf(isSetCity()).compareTo(typedOther.isSetCity());
673
    if (lastComparison != 0) {
674
      return lastComparison;
675
    }
676
    if (isSetCity()) {
677
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.city, typedOther.city);
678
      if (lastComparison != 0) {
679
        return lastComparison;
680
      }
681
    }
682
    lastComparison = Boolean.valueOf(isSetState()).compareTo(typedOther.isSetState());
683
    if (lastComparison != 0) {
684
      return lastComparison;
685
    }
686
    if (isSetState()) {
687
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, typedOther.state);
688
      if (lastComparison != 0) {
689
        return lastComparison;
690
      }
691
    }
692
    lastComparison = Boolean.valueOf(isSetPin()).compareTo(typedOther.isSetPin());
693
    if (lastComparison != 0) {
694
      return lastComparison;
695
    }
696
    if (isSetPin()) {
697
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pin, typedOther.pin);
698
      if (lastComparison != 0) {
699
        return lastComparison;
700
      }
701
    }
702
    lastComparison = Boolean.valueOf(isSetPhone()).compareTo(typedOther.isSetPhone());
703
    if (lastComparison != 0) {
704
      return lastComparison;
705
    }
706
    if (isSetPhone()) {
707
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.phone, typedOther.phone);
708
      if (lastComparison != 0) {
709
        return lastComparison;
710
      }
711
    }
712
    return 0;
713
  }
714
 
715
  public _Fields fieldForId(int fieldId) {
716
    return _Fields.findByThriftId(fieldId);
717
  }
718
 
719
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
720
    org.apache.thrift.protocol.TField field;
721
    iprot.readStructBegin();
722
    while (true)
723
    {
724
      field = iprot.readFieldBegin();
725
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
726
        break;
727
      }
728
      switch (field.id) {
729
        case 1: // ID
730
          if (field.type == org.apache.thrift.protocol.TType.I64) {
731
            this.id = iprot.readI64();
732
            setIdIsSet(true);
733
          } else { 
734
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
735
          }
736
          break;
737
        case 2: // NAME
738
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
739
            this.name = iprot.readString();
740
          } else { 
741
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
742
          }
743
          break;
744
        case 3: // LINE1
745
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
746
            this.line1 = iprot.readString();
747
          } else { 
748
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
749
          }
750
          break;
751
        case 4: // LINE2
752
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
753
            this.line2 = iprot.readString();
754
          } else { 
755
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
756
          }
757
          break;
758
        case 5: // CITY
759
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
760
            this.city = iprot.readString();
761
          } else { 
762
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
763
          }
764
          break;
765
        case 6: // STATE
766
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
767
            this.state = iprot.readString();
768
          } else { 
769
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
770
          }
771
          break;
772
        case 7: // PIN
773
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
774
            this.pin = iprot.readString();
775
          } else { 
776
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
777
          }
778
          break;
779
        case 8: // PHONE
780
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
781
            this.phone = iprot.readString();
782
          } else { 
783
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
784
          }
785
          break;
786
        default:
787
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
788
      }
789
      iprot.readFieldEnd();
790
    }
791
    iprot.readStructEnd();
792
    validate();
793
  }
794
 
795
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
796
    validate();
797
 
798
    oprot.writeStructBegin(STRUCT_DESC);
799
    oprot.writeFieldBegin(ID_FIELD_DESC);
800
    oprot.writeI64(this.id);
801
    oprot.writeFieldEnd();
802
    if (this.name != null) {
803
      oprot.writeFieldBegin(NAME_FIELD_DESC);
804
      oprot.writeString(this.name);
805
      oprot.writeFieldEnd();
806
    }
807
    if (this.line1 != null) {
808
      oprot.writeFieldBegin(LINE1_FIELD_DESC);
809
      oprot.writeString(this.line1);
810
      oprot.writeFieldEnd();
811
    }
812
    if (this.line2 != null) {
813
      oprot.writeFieldBegin(LINE2_FIELD_DESC);
814
      oprot.writeString(this.line2);
815
      oprot.writeFieldEnd();
816
    }
817
    if (this.city != null) {
818
      oprot.writeFieldBegin(CITY_FIELD_DESC);
819
      oprot.writeString(this.city);
820
      oprot.writeFieldEnd();
821
    }
822
    if (this.state != null) {
823
      oprot.writeFieldBegin(STATE_FIELD_DESC);
824
      oprot.writeString(this.state);
825
      oprot.writeFieldEnd();
826
    }
827
    if (this.pin != null) {
828
      oprot.writeFieldBegin(PIN_FIELD_DESC);
829
      oprot.writeString(this.pin);
830
      oprot.writeFieldEnd();
831
    }
832
    if (this.phone != null) {
833
      oprot.writeFieldBegin(PHONE_FIELD_DESC);
834
      oprot.writeString(this.phone);
835
      oprot.writeFieldEnd();
836
    }
837
    oprot.writeFieldStop();
838
    oprot.writeStructEnd();
839
  }
840
 
841
  @Override
842
  public String toString() {
843
    StringBuilder sb = new StringBuilder("PickupStore(");
844
    boolean first = true;
845
 
846
    sb.append("id:");
847
    sb.append(this.id);
848
    first = false;
849
    if (!first) sb.append(", ");
850
    sb.append("name:");
851
    if (this.name == null) {
852
      sb.append("null");
853
    } else {
854
      sb.append(this.name);
855
    }
856
    first = false;
857
    if (!first) sb.append(", ");
858
    sb.append("line1:");
859
    if (this.line1 == null) {
860
      sb.append("null");
861
    } else {
862
      sb.append(this.line1);
863
    }
864
    first = false;
865
    if (!first) sb.append(", ");
866
    sb.append("line2:");
867
    if (this.line2 == null) {
868
      sb.append("null");
869
    } else {
870
      sb.append(this.line2);
871
    }
872
    first = false;
873
    if (!first) sb.append(", ");
874
    sb.append("city:");
875
    if (this.city == null) {
876
      sb.append("null");
877
    } else {
878
      sb.append(this.city);
879
    }
880
    first = false;
881
    if (!first) sb.append(", ");
882
    sb.append("state:");
883
    if (this.state == null) {
884
      sb.append("null");
885
    } else {
886
      sb.append(this.state);
887
    }
888
    first = false;
889
    if (!first) sb.append(", ");
890
    sb.append("pin:");
891
    if (this.pin == null) {
892
      sb.append("null");
893
    } else {
894
      sb.append(this.pin);
895
    }
896
    first = false;
897
    if (!first) sb.append(", ");
898
    sb.append("phone:");
899
    if (this.phone == null) {
900
      sb.append("null");
901
    } else {
902
      sb.append(this.phone);
903
    }
904
    first = false;
905
    sb.append(")");
906
    return sb.toString();
907
  }
908
 
909
  public void validate() throws org.apache.thrift.TException {
910
    // check for required fields
911
  }
912
 
913
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
914
    try {
915
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
916
    } catch (org.apache.thrift.TException te) {
917
      throw new java.io.IOException(te);
918
    }
919
  }
920
 
921
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
922
    try {
923
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
924
      __isset_bit_vector = new BitSet(1);
925
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
926
    } catch (org.apache.thrift.TException te) {
927
      throw new java.io.IOException(te);
928
    }
929
  }
930
 
931
}
932