Subversion Repositories SmartDukaan

Rev

Rev 1013 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1013 Rev 3430
Line 1... Line 1...
1
/**
1
/**
2
 * Autogenerated by Thrift
2
 * Autogenerated by Thrift Compiler (0.7.0)
3
 *
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
5
 */
6
package in.shop2020.model.v1.user;
6
package in.shop2020.model.v1.user;
7
 
7
 
Line 13... Line 13...
13
import java.util.Set;
13
import java.util.Set;
14
import java.util.HashSet;
14
import java.util.HashSet;
15
import java.util.EnumSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
16
import java.util.Collections;
17
import java.util.BitSet;
17
import java.util.BitSet;
-
 
18
import java.nio.ByteBuffer;
18
import java.util.Arrays;
19
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
import org.slf4j.LoggerFactory;
21
 
22
 
22
import org.apache.thrift.*;
-
 
23
import org.apache.thrift.meta_data.*;
-
 
24
import org.apache.thrift.protocol.*;
-
 
25
 
-
 
26
/**
23
/**
27
 * Phone
24
 * Phone
28
 * 
25
 * 
29
 */
26
 */
30
public class Phone implements TBase<Phone._Fields>, java.io.Serializable, Cloneable, Comparable<Phone> {
27
public class Phone implements org.apache.thrift.TBase<Phone, Phone._Fields>, java.io.Serializable, Cloneable {
31
  private static final TStruct STRUCT_DESC = new TStruct("Phone");
28
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Phone");
32
 
29
 
33
  private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
30
  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);
34
  private static final TField COUNTRY_CODE_FIELD_DESC = new TField("countryCode", TType.STRING, (short)2);
31
  private static final org.apache.thrift.protocol.TField COUNTRY_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("countryCode", org.apache.thrift.protocol.TType.STRING, (short)2);
35
  private static final TField AREA_CODE_FIELD_DESC = new TField("areaCode", TType.STRING, (short)3);
32
  private static final org.apache.thrift.protocol.TField AREA_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("areaCode", org.apache.thrift.protocol.TType.STRING, (short)3);
36
  private static final TField NUMBER_FIELD_DESC = new TField("number", TType.STRING, (short)4);
33
  private static final org.apache.thrift.protocol.TField NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("number", org.apache.thrift.protocol.TType.STRING, (short)4);
37
  private static final TField EXTENSION_FIELD_DESC = new TField("extension", TType.STRING, (short)5);
34
  private static final org.apache.thrift.protocol.TField EXTENSION_FIELD_DESC = new org.apache.thrift.protocol.TField("extension", org.apache.thrift.protocol.TType.STRING, (short)5);
38
  private static final TField TYPE_FIELD_DESC = new TField("type", TType.I32, (short)6);
35
  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)6);
39
 
36
 
40
  private long id;
37
  private long id; // required
41
  private String countryCode;
38
  private String countryCode; // required
42
  private String areaCode;
39
  private String areaCode; // required
43
  private String number;
40
  private String number; // required
44
  private String extension;
41
  private String extension; // required
45
  private PhoneType type;
42
  private PhoneType type; // required
46
 
43
 
47
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
44
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
48
  public enum _Fields implements TFieldIdEnum {
45
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
49
    ID((short)1, "id"),
46
    ID((short)1, "id"),
50
    COUNTRY_CODE((short)2, "countryCode"),
47
    COUNTRY_CODE((short)2, "countryCode"),
51
    AREA_CODE((short)3, "areaCode"),
48
    AREA_CODE((short)3, "areaCode"),
52
    NUMBER((short)4, "number"),
49
    NUMBER((short)4, "number"),
53
    EXTENSION((short)5, "extension"),
50
    EXTENSION((short)5, "extension"),
Line 55... Line 52...
55
     * 
52
     * 
56
     * @see PhoneType
53
     * @see PhoneType
57
     */
54
     */
58
    TYPE((short)6, "type");
55
    TYPE((short)6, "type");
59
 
56
 
60
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
61
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
57
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
62
 
58
 
63
    static {
59
    static {
64
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
60
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
65
        byId.put((int)field._thriftId, field);
-
 
66
        byName.put(field.getFieldName(), field);
61
        byName.put(field.getFieldName(), field);
67
      }
62
      }
68
    }
63
    }
69
 
64
 
70
    /**
65
    /**
71
     * Find the _Fields constant that matches fieldId, or null if its not found.
66
     * Find the _Fields constant that matches fieldId, or null if its not found.
72
     */
67
     */
73
    public static _Fields findByThriftId(int fieldId) {
68
    public static _Fields findByThriftId(int fieldId) {
74
      return byId.get(fieldId);
69
      switch(fieldId) {
-
 
70
        case 1: // ID
-
 
71
          return ID;
-
 
72
        case 2: // COUNTRY_CODE
-
 
73
          return COUNTRY_CODE;
-
 
74
        case 3: // AREA_CODE
-
 
75
          return AREA_CODE;
-
 
76
        case 4: // NUMBER
-
 
77
          return NUMBER;
-
 
78
        case 5: // EXTENSION
-
 
79
          return EXTENSION;
-
 
80
        case 6: // TYPE
-
 
81
          return TYPE;
-
 
82
        default:
-
 
83
          return null;
-
 
84
      }
75
    }
85
    }
76
 
86
 
77
    /**
87
    /**
78
     * Find the _Fields constant that matches fieldId, throwing an exception
88
     * Find the _Fields constant that matches fieldId, throwing an exception
79
     * if it is not found.
89
     * if it is not found.
Line 110... Line 120...
110
 
120
 
111
  // isset id assignments
121
  // isset id assignments
112
  private static final int __ID_ISSET_ID = 0;
122
  private static final int __ID_ISSET_ID = 0;
113
  private BitSet __isset_bit_vector = new BitSet(1);
123
  private BitSet __isset_bit_vector = new BitSet(1);
114
 
124
 
115
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
125
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
116
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
-
 
117
        new FieldValueMetaData(TType.I64)));
-
 
118
    put(_Fields.COUNTRY_CODE, new FieldMetaData("countryCode", TFieldRequirementType.DEFAULT, 
-
 
119
        new FieldValueMetaData(TType.STRING)));
-
 
120
    put(_Fields.AREA_CODE, new FieldMetaData("areaCode", TFieldRequirementType.DEFAULT, 
-
 
121
        new FieldValueMetaData(TType.STRING)));
-
 
122
    put(_Fields.NUMBER, new FieldMetaData("number", TFieldRequirementType.DEFAULT, 
-
 
123
        new FieldValueMetaData(TType.STRING)));
-
 
124
    put(_Fields.EXTENSION, new FieldMetaData("extension", TFieldRequirementType.DEFAULT, 
-
 
125
        new FieldValueMetaData(TType.STRING)));
-
 
126
    put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
-
 
127
        new EnumMetaData(TType.ENUM, PhoneType.class)));
-
 
128
  }});
-
 
129
 
-
 
130
  static {
126
  static {
-
 
127
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
128
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
129
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
130
    tmpMap.put(_Fields.COUNTRY_CODE, new org.apache.thrift.meta_data.FieldMetaData("countryCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
131
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
132
    tmpMap.put(_Fields.AREA_CODE, new org.apache.thrift.meta_data.FieldMetaData("areaCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
133
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
134
    tmpMap.put(_Fields.NUMBER, new org.apache.thrift.meta_data.FieldMetaData("number", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
135
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
136
    tmpMap.put(_Fields.EXTENSION, new org.apache.thrift.meta_data.FieldMetaData("extension", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
137
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
138
    tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
139
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PhoneType.class)));
-
 
140
    metaDataMap = Collections.unmodifiableMap(tmpMap);
131
    FieldMetaData.addStructMetaDataMap(Phone.class, metaDataMap);
141
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Phone.class, metaDataMap);
132
  }
142
  }
133
 
143
 
134
  public Phone() {
144
  public Phone() {
135
  }
145
  }
136
 
146
 
Line 178... Line 188...
178
 
188
 
179
  public Phone deepCopy() {
189
  public Phone deepCopy() {
180
    return new Phone(this);
190
    return new Phone(this);
181
  }
191
  }
182
 
192
 
183
  @Deprecated
193
  @Override
184
  public Phone clone() {
194
  public void clear() {
185
    return new Phone(this);
195
    setIdIsSet(false);
-
 
196
    this.id = 0;
-
 
197
    this.countryCode = null;
-
 
198
    this.areaCode = null;
-
 
199
    this.number = null;
-
 
200
    this.extension = null;
-
 
201
    this.type = null;
186
  }
202
  }
187
 
203
 
188
  public long getId() {
204
  public long getId() {
189
    return this.id;
205
    return this.id;
190
  }
206
  }
191
 
207
 
192
  public Phone setId(long id) {
208
  public void setId(long id) {
193
    this.id = id;
209
    this.id = id;
194
    setIdIsSet(true);
210
    setIdIsSet(true);
195
    return this;
-
 
196
  }
211
  }
197
 
212
 
198
  public void unsetId() {
213
  public void unsetId() {
199
    __isset_bit_vector.clear(__ID_ISSET_ID);
214
    __isset_bit_vector.clear(__ID_ISSET_ID);
200
  }
215
  }
201
 
216
 
202
  /** Returns true if field id is set (has been asigned a value) and false otherwise */
217
  /** Returns true if field id is set (has been assigned a value) and false otherwise */
203
  public boolean isSetId() {
218
  public boolean isSetId() {
204
    return __isset_bit_vector.get(__ID_ISSET_ID);
219
    return __isset_bit_vector.get(__ID_ISSET_ID);
205
  }
220
  }
206
 
221
 
207
  public void setIdIsSet(boolean value) {
222
  public void setIdIsSet(boolean value) {
Line 210... Line 225...
210
 
225
 
211
  public String getCountryCode() {
226
  public String getCountryCode() {
212
    return this.countryCode;
227
    return this.countryCode;
213
  }
228
  }
214
 
229
 
215
  public Phone setCountryCode(String countryCode) {
230
  public void setCountryCode(String countryCode) {
216
    this.countryCode = countryCode;
231
    this.countryCode = countryCode;
217
    return this;
-
 
218
  }
232
  }
219
 
233
 
220
  public void unsetCountryCode() {
234
  public void unsetCountryCode() {
221
    this.countryCode = null;
235
    this.countryCode = null;
222
  }
236
  }
223
 
237
 
224
  /** Returns true if field countryCode is set (has been asigned a value) and false otherwise */
238
  /** Returns true if field countryCode is set (has been assigned a value) and false otherwise */
225
  public boolean isSetCountryCode() {
239
  public boolean isSetCountryCode() {
226
    return this.countryCode != null;
240
    return this.countryCode != null;
227
  }
241
  }
228
 
242
 
229
  public void setCountryCodeIsSet(boolean value) {
243
  public void setCountryCodeIsSet(boolean value) {
Line 234... Line 248...
234
 
248
 
235
  public String getAreaCode() {
249
  public String getAreaCode() {
236
    return this.areaCode;
250
    return this.areaCode;
237
  }
251
  }
238
 
252
 
239
  public Phone setAreaCode(String areaCode) {
253
  public void setAreaCode(String areaCode) {
240
    this.areaCode = areaCode;
254
    this.areaCode = areaCode;
241
    return this;
-
 
242
  }
255
  }
243
 
256
 
244
  public void unsetAreaCode() {
257
  public void unsetAreaCode() {
245
    this.areaCode = null;
258
    this.areaCode = null;
246
  }
259
  }
247
 
260
 
248
  /** Returns true if field areaCode is set (has been asigned a value) and false otherwise */
261
  /** Returns true if field areaCode is set (has been assigned a value) and false otherwise */
249
  public boolean isSetAreaCode() {
262
  public boolean isSetAreaCode() {
250
    return this.areaCode != null;
263
    return this.areaCode != null;
251
  }
264
  }
252
 
265
 
253
  public void setAreaCodeIsSet(boolean value) {
266
  public void setAreaCodeIsSet(boolean value) {
Line 258... Line 271...
258
 
271
 
259
  public String getNumber() {
272
  public String getNumber() {
260
    return this.number;
273
    return this.number;
261
  }
274
  }
262
 
275
 
263
  public Phone setNumber(String number) {
276
  public void setNumber(String number) {
264
    this.number = number;
277
    this.number = number;
265
    return this;
-
 
266
  }
278
  }
267
 
279
 
268
  public void unsetNumber() {
280
  public void unsetNumber() {
269
    this.number = null;
281
    this.number = null;
270
  }
282
  }
271
 
283
 
272
  /** Returns true if field number is set (has been asigned a value) and false otherwise */
284
  /** Returns true if field number is set (has been assigned a value) and false otherwise */
273
  public boolean isSetNumber() {
285
  public boolean isSetNumber() {
274
    return this.number != null;
286
    return this.number != null;
275
  }
287
  }
276
 
288
 
277
  public void setNumberIsSet(boolean value) {
289
  public void setNumberIsSet(boolean value) {
Line 282... Line 294...
282
 
294
 
283
  public String getExtension() {
295
  public String getExtension() {
284
    return this.extension;
296
    return this.extension;
285
  }
297
  }
286
 
298
 
287
  public Phone setExtension(String extension) {
299
  public void setExtension(String extension) {
288
    this.extension = extension;
300
    this.extension = extension;
289
    return this;
-
 
290
  }
301
  }
291
 
302
 
292
  public void unsetExtension() {
303
  public void unsetExtension() {
293
    this.extension = null;
304
    this.extension = null;
294
  }
305
  }
295
 
306
 
296
  /** Returns true if field extension is set (has been asigned a value) and false otherwise */
307
  /** Returns true if field extension is set (has been assigned a value) and false otherwise */
297
  public boolean isSetExtension() {
308
  public boolean isSetExtension() {
298
    return this.extension != null;
309
    return this.extension != null;
299
  }
310
  }
300
 
311
 
301
  public void setExtensionIsSet(boolean value) {
312
  public void setExtensionIsSet(boolean value) {
Line 314... Line 325...
314
 
325
 
315
  /**
326
  /**
316
   * 
327
   * 
317
   * @see PhoneType
328
   * @see PhoneType
318
   */
329
   */
319
  public Phone setType(PhoneType type) {
330
  public void setType(PhoneType type) {
320
    this.type = type;
331
    this.type = type;
321
    return this;
-
 
322
  }
332
  }
323
 
333
 
324
  public void unsetType() {
334
  public void unsetType() {
325
    this.type = null;
335
    this.type = null;
326
  }
336
  }
327
 
337
 
328
  /** Returns true if field type is set (has been asigned a value) and false otherwise */
338
  /** Returns true if field type is set (has been assigned a value) and false otherwise */
329
  public boolean isSetType() {
339
  public boolean isSetType() {
330
    return this.type != null;
340
    return this.type != null;
331
  }
341
  }
332
 
342
 
333
  public void setTypeIsSet(boolean value) {
343
  public void setTypeIsSet(boolean value) {
Line 387... Line 397...
387
      break;
397
      break;
388
 
398
 
389
    }
399
    }
390
  }
400
  }
391
 
401
 
392
  public void setFieldValue(int fieldID, Object value) {
-
 
393
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
394
  }
-
 
395
 
-
 
396
  public Object getFieldValue(_Fields field) {
402
  public Object getFieldValue(_Fields field) {
397
    switch (field) {
403
    switch (field) {
398
    case ID:
404
    case ID:
399
      return new Long(getId());
405
      return Long.valueOf(getId());
400
 
406
 
401
    case COUNTRY_CODE:
407
    case COUNTRY_CODE:
402
      return getCountryCode();
408
      return getCountryCode();
403
 
409
 
404
    case AREA_CODE:
410
    case AREA_CODE:
Line 415... Line 421...
415
 
421
 
416
    }
422
    }
417
    throw new IllegalStateException();
423
    throw new IllegalStateException();
418
  }
424
  }
419
 
425
 
420
  public Object getFieldValue(int fieldId) {
-
 
421
    return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
422
  }
-
 
423
 
-
 
424
  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
426
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
425
  public boolean isSet(_Fields field) {
427
  public boolean isSet(_Fields field) {
-
 
428
    if (field == null) {
-
 
429
      throw new IllegalArgumentException();
-
 
430
    }
-
 
431
 
426
    switch (field) {
432
    switch (field) {
427
    case ID:
433
    case ID:
428
      return isSetId();
434
      return isSetId();
429
    case COUNTRY_CODE:
435
    case COUNTRY_CODE:
430
      return isSetCountryCode();
436
      return isSetCountryCode();
Line 438... Line 444...
438
      return isSetType();
444
      return isSetType();
439
    }
445
    }
440
    throw new IllegalStateException();
446
    throw new IllegalStateException();
441
  }
447
  }
442
 
448
 
443
  public boolean isSet(int fieldID) {
-
 
444
    return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
445
  }
-
 
446
 
-
 
447
  @Override
449
  @Override
448
  public boolean equals(Object that) {
450
  public boolean equals(Object that) {
449
    if (that == null)
451
    if (that == null)
450
      return false;
452
      return false;
451
    if (that instanceof Phone)
453
    if (that instanceof Phone)
Line 525... Line 527...
525
    }
527
    }
526
 
528
 
527
    int lastComparison = 0;
529
    int lastComparison = 0;
528
    Phone typedOther = (Phone)other;
530
    Phone typedOther = (Phone)other;
529
 
531
 
530
    lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
532
    lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
531
    if (lastComparison != 0) {
533
    if (lastComparison != 0) {
532
      return lastComparison;
534
      return lastComparison;
533
    }
535
    }
-
 
536
    if (isSetId()) {
534
    lastComparison = TBaseHelper.compareTo(id, typedOther.id);
537
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
535
    if (lastComparison != 0) {
538
      if (lastComparison != 0) {
536
      return lastComparison;
539
        return lastComparison;
-
 
540
      }
537
    }
541
    }
538
    lastComparison = Boolean.valueOf(isSetCountryCode()).compareTo(isSetCountryCode());
542
    lastComparison = Boolean.valueOf(isSetCountryCode()).compareTo(typedOther.isSetCountryCode());
539
    if (lastComparison != 0) {
543
    if (lastComparison != 0) {
540
      return lastComparison;
544
      return lastComparison;
541
    }
545
    }
-
 
546
    if (isSetCountryCode()) {
542
    lastComparison = TBaseHelper.compareTo(countryCode, typedOther.countryCode);
547
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.countryCode, typedOther.countryCode);
543
    if (lastComparison != 0) {
548
      if (lastComparison != 0) {
544
      return lastComparison;
549
        return lastComparison;
-
 
550
      }
545
    }
551
    }
546
    lastComparison = Boolean.valueOf(isSetAreaCode()).compareTo(isSetAreaCode());
552
    lastComparison = Boolean.valueOf(isSetAreaCode()).compareTo(typedOther.isSetAreaCode());
547
    if (lastComparison != 0) {
553
    if (lastComparison != 0) {
548
      return lastComparison;
554
      return lastComparison;
549
    }
555
    }
-
 
556
    if (isSetAreaCode()) {
550
    lastComparison = TBaseHelper.compareTo(areaCode, typedOther.areaCode);
557
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.areaCode, typedOther.areaCode);
551
    if (lastComparison != 0) {
558
      if (lastComparison != 0) {
552
      return lastComparison;
559
        return lastComparison;
-
 
560
      }
553
    }
561
    }
554
    lastComparison = Boolean.valueOf(isSetNumber()).compareTo(isSetNumber());
562
    lastComparison = Boolean.valueOf(isSetNumber()).compareTo(typedOther.isSetNumber());
555
    if (lastComparison != 0) {
563
    if (lastComparison != 0) {
556
      return lastComparison;
564
      return lastComparison;
557
    }
565
    }
-
 
566
    if (isSetNumber()) {
558
    lastComparison = TBaseHelper.compareTo(number, typedOther.number);
567
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.number, typedOther.number);
559
    if (lastComparison != 0) {
568
      if (lastComparison != 0) {
560
      return lastComparison;
569
        return lastComparison;
-
 
570
      }
561
    }
571
    }
562
    lastComparison = Boolean.valueOf(isSetExtension()).compareTo(isSetExtension());
572
    lastComparison = Boolean.valueOf(isSetExtension()).compareTo(typedOther.isSetExtension());
563
    if (lastComparison != 0) {
573
    if (lastComparison != 0) {
564
      return lastComparison;
574
      return lastComparison;
565
    }
575
    }
-
 
576
    if (isSetExtension()) {
566
    lastComparison = TBaseHelper.compareTo(extension, typedOther.extension);
577
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extension, typedOther.extension);
567
    if (lastComparison != 0) {
578
      if (lastComparison != 0) {
568
      return lastComparison;
579
        return lastComparison;
-
 
580
      }
569
    }
581
    }
570
    lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
582
    lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
571
    if (lastComparison != 0) {
583
    if (lastComparison != 0) {
572
      return lastComparison;
584
      return lastComparison;
573
    }
585
    }
-
 
586
    if (isSetType()) {
574
    lastComparison = TBaseHelper.compareTo(type, typedOther.type);
587
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
575
    if (lastComparison != 0) {
588
      if (lastComparison != 0) {
576
      return lastComparison;
589
        return lastComparison;
-
 
590
      }
577
    }
591
    }
578
    return 0;
592
    return 0;
579
  }
593
  }
580
 
594
 
-
 
595
  public _Fields fieldForId(int fieldId) {
-
 
596
    return _Fields.findByThriftId(fieldId);
-
 
597
  }
-
 
598
 
581
  public void read(TProtocol iprot) throws TException {
599
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
582
    TField field;
600
    org.apache.thrift.protocol.TField field;
583
    iprot.readStructBegin();
601
    iprot.readStructBegin();
584
    while (true)
602
    while (true)
585
    {
603
    {
586
      field = iprot.readFieldBegin();
604
      field = iprot.readFieldBegin();
587
      if (field.type == TType.STOP) { 
605
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
588
        break;
606
        break;
589
      }
607
      }
590
      _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
591
      if (fieldId == null) {
-
 
592
        TProtocolUtil.skip(iprot, field.type);
-
 
593
      } else {
-
 
594
        switch (fieldId) {
608
      switch (field.id) {
595
          case ID:
609
        case 1: // ID
596
            if (field.type == TType.I64) {
610
          if (field.type == org.apache.thrift.protocol.TType.I64) {
597
              this.id = iprot.readI64();
611
            this.id = iprot.readI64();
598
              setIdIsSet(true);
612
            setIdIsSet(true);
599
            } else { 
613
          } else { 
600
              TProtocolUtil.skip(iprot, field.type);
614
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
601
            }
615
          }
602
            break;
616
          break;
603
          case COUNTRY_CODE:
617
        case 2: // COUNTRY_CODE
604
            if (field.type == TType.STRING) {
618
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
605
              this.countryCode = iprot.readString();
619
            this.countryCode = iprot.readString();
606
            } else { 
620
          } else { 
607
              TProtocolUtil.skip(iprot, field.type);
621
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
608
            }
622
          }
609
            break;
623
          break;
610
          case AREA_CODE:
624
        case 3: // AREA_CODE
611
            if (field.type == TType.STRING) {
625
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
612
              this.areaCode = iprot.readString();
626
            this.areaCode = iprot.readString();
613
            } else { 
627
          } else { 
614
              TProtocolUtil.skip(iprot, field.type);
628
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
615
            }
629
          }
616
            break;
630
          break;
617
          case NUMBER:
631
        case 4: // NUMBER
618
            if (field.type == TType.STRING) {
632
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
619
              this.number = iprot.readString();
633
            this.number = iprot.readString();
620
            } else { 
634
          } else { 
621
              TProtocolUtil.skip(iprot, field.type);
635
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
622
            }
636
          }
623
            break;
637
          break;
624
          case EXTENSION:
638
        case 5: // EXTENSION
625
            if (field.type == TType.STRING) {
639
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
626
              this.extension = iprot.readString();
640
            this.extension = iprot.readString();
627
            } else { 
641
          } else { 
628
              TProtocolUtil.skip(iprot, field.type);
642
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
629
            }
643
          }
630
            break;
644
          break;
631
          case TYPE:
645
        case 6: // TYPE
632
            if (field.type == TType.I32) {
646
          if (field.type == org.apache.thrift.protocol.TType.I32) {
633
              this.type = PhoneType.findByValue(iprot.readI32());
647
            this.type = PhoneType.findByValue(iprot.readI32());
634
            } else { 
648
          } else { 
635
              TProtocolUtil.skip(iprot, field.type);
649
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
636
            }
650
          }
637
            break;
651
          break;
638
        }
652
        default:
639
        iprot.readFieldEnd();
653
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
640
      }
654
      }
-
 
655
      iprot.readFieldEnd();
641
    }
656
    }
642
    iprot.readStructEnd();
657
    iprot.readStructEnd();
643
    validate();
658
    validate();
644
  }
659
  }
645
 
660
 
646
  public void write(TProtocol oprot) throws TException {
661
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
647
    validate();
662
    validate();
648
 
663
 
649
    oprot.writeStructBegin(STRUCT_DESC);
664
    oprot.writeStructBegin(STRUCT_DESC);
650
    oprot.writeFieldBegin(ID_FIELD_DESC);
665
    oprot.writeFieldBegin(ID_FIELD_DESC);
651
    oprot.writeI64(this.id);
666
    oprot.writeI64(this.id);
Line 722... Line 737...
722
    if (!first) sb.append(", ");
737
    if (!first) sb.append(", ");
723
    sb.append("type:");
738
    sb.append("type:");
724
    if (this.type == null) {
739
    if (this.type == null) {
725
      sb.append("null");
740
      sb.append("null");
726
    } else {
741
    } else {
727
      String type_name = type.name();
-
 
728
      if (type_name != null) {
-
 
729
        sb.append(type_name);
-
 
730
        sb.append(" (");
-
 
731
      }
-
 
732
      sb.append(this.type);
742
      sb.append(this.type);
733
      if (type_name != null) {
-
 
734
        sb.append(")");
-
 
735
      }
-
 
736
    }
743
    }
737
    first = false;
744
    first = false;
738
    sb.append(")");
745
    sb.append(")");
739
    return sb.toString();
746
    return sb.toString();
740
  }
747
  }
741
 
748
 
742
  public void validate() throws TException {
749
  public void validate() throws org.apache.thrift.TException {
743
    // check for required fields
750
    // check for required fields
744
  }
751
  }
745
 
752
 
-
 
753
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
754
    try {
-
 
755
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
756
    } catch (org.apache.thrift.TException te) {
-
 
757
      throw new java.io.IOException(te);
-
 
758
    }
-
 
759
  }
-
 
760
 
-
 
761
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
762
    try {
-
 
763
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
764
      __isset_bit_vector = new BitSet(1);
-
 
765
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
766
    } catch (org.apache.thrift.TException te) {
-
 
767
      throw new java.io.IOException(te);
-
 
768
    }
-
 
769
  }
-
 
770
 
746
}
771
}
747
 
772