Subversion Repositories SmartDukaan

Rev

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

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