Subversion Repositories SmartDukaan

Rev

Rev 20818 | Details | Compare with Previous | Last modification | View Log | RSS feed

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