Subversion Repositories SmartDukaan

Rev

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