Subversion Repositories SmartDukaan

Rev

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

Rev 414 Rev 553
Line 27... Line 27...
27
 * Address
27
 * Address
28
 */
28
 */
29
public class Address implements TBase<Address._Fields>, java.io.Serializable, Cloneable, Comparable<Address> {
29
public class Address implements TBase<Address._Fields>, java.io.Serializable, Cloneable, Comparable<Address> {
30
  private static final TStruct STRUCT_DESC = new TStruct("Address");
30
  private static final TStruct STRUCT_DESC = new TStruct("Address");
31
 
31
 
32
  private static final TField LINE1_FIELD_DESC = new TField("line1", TType.STRING, (short)1);
32
  private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
33
  private static final TField LINE2_FIELD_DESC = new TField("line2", TType.STRING, (short)2);
33
  private static final TField LINE1_FIELD_DESC = new TField("line1", TType.STRING, (short)2);
34
  private static final TField LANDMARK_FIELD_DESC = new TField("landmark", TType.STRING, (short)3);
34
  private static final TField LINE2_FIELD_DESC = new TField("line2", TType.STRING, (short)3);
35
  private static final TField CITY_FIELD_DESC = new TField("city", TType.STRING, (short)4);
35
  private static final TField LANDMARK_FIELD_DESC = new TField("landmark", TType.STRING, (short)4);
36
  private static final TField STATE_FIELD_DESC = new TField("state", TType.STRING, (short)5);
36
  private static final TField CITY_FIELD_DESC = new TField("city", TType.STRING, (short)5);
37
  private static final TField PIN_FIELD_DESC = new TField("pin", TType.STRING, (short)6);
37
  private static final TField STATE_FIELD_DESC = new TField("state", TType.STRING, (short)6);
38
  private static final TField COUNTRY_FIELD_DESC = new TField("country", TType.STRING, (short)7);
38
  private static final TField PIN_FIELD_DESC = new TField("pin", TType.STRING, (short)7);
39
  private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)8);
39
  private static final TField COUNTRY_FIELD_DESC = new TField("country", TType.STRING, (short)8);
40
  private static final TField ENABLED_FIELD_DESC = new TField("enabled", TType.BOOL, (short)9);
40
  private static final TField ENABLED_FIELD_DESC = new TField("enabled", TType.BOOL, (short)9);
41
  private static final TField TYPE_FIELD_DESC = new TField("type", TType.I32, (short)10);
41
  private static final TField TYPE_FIELD_DESC = new TField("type", TType.I32, (short)10);
42
  private static final TField ADDED_ON_FIELD_DESC = new TField("addedOn", TType.I64, (short)11);
42
  private static final TField ADDED_ON_FIELD_DESC = new TField("addedOn", TType.I64, (short)11);
43
  private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)12);
43
  private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)12);
44
  private static final TField PHONE_FIELD_DESC = new TField("phone", TType.STRING, (short)13);
44
  private static final TField PHONE_FIELD_DESC = new TField("phone", TType.STRING, (short)13);
45
 
45
 
-
 
46
  private long id;
46
  private String line1;
47
  private String line1;
47
  private String line2;
48
  private String line2;
48
  private String landmark;
49
  private String landmark;
49
  private String city;
50
  private String city;
50
  private String state;
51
  private String state;
51
  private String pin;
52
  private String pin;
52
  private String country;
53
  private String country;
53
  private long id;
-
 
54
  private boolean enabled;
54
  private boolean enabled;
55
  private AddressType type;
55
  private AddressType type;
56
  private long addedOn;
56
  private long addedOn;
57
  private String name;
57
  private String name;
58
  private String phone;
58
  private String phone;
59
 
59
 
60
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
60
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
61
  public enum _Fields implements TFieldIdEnum {
61
  public enum _Fields implements TFieldIdEnum {
-
 
62
    ID((short)1, "id"),
62
    LINE1((short)1, "line1"),
63
    LINE1((short)2, "line1"),
63
    LINE2((short)2, "line2"),
64
    LINE2((short)3, "line2"),
64
    LANDMARK((short)3, "landmark"),
65
    LANDMARK((short)4, "landmark"),
65
    CITY((short)4, "city"),
66
    CITY((short)5, "city"),
66
    STATE((short)5, "state"),
67
    STATE((short)6, "state"),
67
    PIN((short)6, "pin"),
68
    PIN((short)7, "pin"),
68
    COUNTRY((short)7, "country"),
69
    COUNTRY((short)8, "country"),
69
    ID((short)8, "id"),
-
 
70
    ENABLED((short)9, "enabled"),
70
    ENABLED((short)9, "enabled"),
71
    /**
71
    /**
72
     * 
72
     * 
73
     * @see AddressType
73
     * @see AddressType
74
     */
74
     */
Line 133... Line 133...
133
  private static final int __ENABLED_ISSET_ID = 1;
133
  private static final int __ENABLED_ISSET_ID = 1;
134
  private static final int __ADDEDON_ISSET_ID = 2;
134
  private static final int __ADDEDON_ISSET_ID = 2;
135
  private BitSet __isset_bit_vector = new BitSet(3);
135
  private BitSet __isset_bit_vector = new BitSet(3);
136
 
136
 
137
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
137
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
138
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
-
 
139
        new FieldValueMetaData(TType.I64)));
138
    put(_Fields.LINE1, new FieldMetaData("line1", TFieldRequirementType.DEFAULT, 
140
    put(_Fields.LINE1, new FieldMetaData("line1", TFieldRequirementType.DEFAULT, 
139
        new FieldValueMetaData(TType.STRING)));
141
        new FieldValueMetaData(TType.STRING)));
140
    put(_Fields.LINE2, new FieldMetaData("line2", TFieldRequirementType.DEFAULT, 
142
    put(_Fields.LINE2, new FieldMetaData("line2", TFieldRequirementType.DEFAULT, 
141
        new FieldValueMetaData(TType.STRING)));
143
        new FieldValueMetaData(TType.STRING)));
142
    put(_Fields.LANDMARK, new FieldMetaData("landmark", TFieldRequirementType.DEFAULT, 
144
    put(_Fields.LANDMARK, new FieldMetaData("landmark", TFieldRequirementType.DEFAULT, 
Line 147... Line 149...
147
        new FieldValueMetaData(TType.STRING)));
149
        new FieldValueMetaData(TType.STRING)));
148
    put(_Fields.PIN, new FieldMetaData("pin", TFieldRequirementType.DEFAULT, 
150
    put(_Fields.PIN, new FieldMetaData("pin", TFieldRequirementType.DEFAULT, 
149
        new FieldValueMetaData(TType.STRING)));
151
        new FieldValueMetaData(TType.STRING)));
150
    put(_Fields.COUNTRY, new FieldMetaData("country", TFieldRequirementType.DEFAULT, 
152
    put(_Fields.COUNTRY, new FieldMetaData("country", TFieldRequirementType.DEFAULT, 
151
        new FieldValueMetaData(TType.STRING)));
153
        new FieldValueMetaData(TType.STRING)));
152
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
-
 
153
        new FieldValueMetaData(TType.I64)));
-
 
154
    put(_Fields.ENABLED, new FieldMetaData("enabled", TFieldRequirementType.DEFAULT, 
154
    put(_Fields.ENABLED, new FieldMetaData("enabled", TFieldRequirementType.DEFAULT, 
155
        new FieldValueMetaData(TType.BOOL)));
155
        new FieldValueMetaData(TType.BOOL)));
156
    put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
156
    put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
157
        new EnumMetaData(TType.ENUM, AddressType.class)));
157
        new EnumMetaData(TType.ENUM, AddressType.class)));
158
    put(_Fields.ADDED_ON, new FieldMetaData("addedOn", TFieldRequirementType.DEFAULT, 
158
    put(_Fields.ADDED_ON, new FieldMetaData("addedOn", TFieldRequirementType.DEFAULT, 
Line 169... Line 169...
169
 
169
 
170
  public Address() {
170
  public Address() {
171
  }
171
  }
172
 
172
 
173
  public Address(
173
  public Address(
-
 
174
    long id,
174
    String line1,
175
    String line1,
175
    String line2,
176
    String line2,
176
    String landmark,
177
    String landmark,
177
    String city,
178
    String city,
178
    String state,
179
    String state,
179
    String pin,
180
    String pin,
180
    String country,
181
    String country,
181
    long id,
-
 
182
    boolean enabled,
182
    boolean enabled,
183
    AddressType type,
183
    AddressType type,
184
    long addedOn,
184
    long addedOn,
185
    String name,
185
    String name,
186
    String phone)
186
    String phone)
187
  {
187
  {
188
    this();
188
    this();
-
 
189
    this.id = id;
-
 
190
    setIdIsSet(true);
189
    this.line1 = line1;
191
    this.line1 = line1;
190
    this.line2 = line2;
192
    this.line2 = line2;
191
    this.landmark = landmark;
193
    this.landmark = landmark;
192
    this.city = city;
194
    this.city = city;
193
    this.state = state;
195
    this.state = state;
194
    this.pin = pin;
196
    this.pin = pin;
195
    this.country = country;
197
    this.country = country;
196
    this.id = id;
-
 
197
    setIdIsSet(true);
-
 
198
    this.enabled = enabled;
198
    this.enabled = enabled;
199
    setEnabledIsSet(true);
199
    setEnabledIsSet(true);
200
    this.type = type;
200
    this.type = type;
201
    this.addedOn = addedOn;
201
    this.addedOn = addedOn;
202
    setAddedOnIsSet(true);
202
    setAddedOnIsSet(true);
Line 208... Line 208...
208
   * Performs a deep copy on <i>other</i>.
208
   * Performs a deep copy on <i>other</i>.
209
   */
209
   */
210
  public Address(Address other) {
210
  public Address(Address other) {
211
    __isset_bit_vector.clear();
211
    __isset_bit_vector.clear();
212
    __isset_bit_vector.or(other.__isset_bit_vector);
212
    __isset_bit_vector.or(other.__isset_bit_vector);
-
 
213
    this.id = other.id;
213
    if (other.isSetLine1()) {
214
    if (other.isSetLine1()) {
214
      this.line1 = other.line1;
215
      this.line1 = other.line1;
215
    }
216
    }
216
    if (other.isSetLine2()) {
217
    if (other.isSetLine2()) {
217
      this.line2 = other.line2;
218
      this.line2 = other.line2;
Line 229... Line 230...
229
      this.pin = other.pin;
230
      this.pin = other.pin;
230
    }
231
    }
231
    if (other.isSetCountry()) {
232
    if (other.isSetCountry()) {
232
      this.country = other.country;
233
      this.country = other.country;
233
    }
234
    }
234
    this.id = other.id;
-
 
235
    this.enabled = other.enabled;
235
    this.enabled = other.enabled;
236
    if (other.isSetType()) {
236
    if (other.isSetType()) {
237
      this.type = other.type;
237
      this.type = other.type;
238
    }
238
    }
239
    this.addedOn = other.addedOn;
239
    this.addedOn = other.addedOn;
Line 252... Line 252...
252
  @Deprecated
252
  @Deprecated
253
  public Address clone() {
253
  public Address clone() {
254
    return new Address(this);
254
    return new Address(this);
255
  }
255
  }
256
 
256
 
-
 
257
  public long getId() {
-
 
258
    return this.id;
-
 
259
  }
-
 
260
 
-
 
261
  public Address setId(long id) {
-
 
262
    this.id = id;
-
 
263
    setIdIsSet(true);
-
 
264
    return this;
-
 
265
  }
-
 
266
 
-
 
267
  public void unsetId() {
-
 
268
    __isset_bit_vector.clear(__ID_ISSET_ID);
-
 
269
  }
-
 
270
 
-
 
271
  /** Returns true if field id is set (has been asigned a value) and false otherwise */
-
 
272
  public boolean isSetId() {
-
 
273
    return __isset_bit_vector.get(__ID_ISSET_ID);
-
 
274
  }
-
 
275
 
-
 
276
  public void setIdIsSet(boolean value) {
-
 
277
    __isset_bit_vector.set(__ID_ISSET_ID, value);
-
 
278
  }
-
 
279
 
257
  public String getLine1() {
280
  public String getLine1() {
258
    return this.line1;
281
    return this.line1;
259
  }
282
  }
260
 
283
 
261
  public Address setLine1(String line1) {
284
  public Address setLine1(String line1) {
Line 420... Line 443...
420
    if (!value) {
443
    if (!value) {
421
      this.country = null;
444
      this.country = null;
422
    }
445
    }
423
  }
446
  }
424
 
447
 
425
  public long getId() {
-
 
426
    return this.id;
-
 
427
  }
-
 
428
 
-
 
429
  public Address setId(long id) {
-
 
430
    this.id = id;
-
 
431
    setIdIsSet(true);
-
 
432
    return this;
-
 
433
  }
-
 
434
 
-
 
435
  public void unsetId() {
-
 
436
    __isset_bit_vector.clear(__ID_ISSET_ID);
-
 
437
  }
-
 
438
 
-
 
439
  /** Returns true if field id is set (has been asigned a value) and false otherwise */
-
 
440
  public boolean isSetId() {
-
 
441
    return __isset_bit_vector.get(__ID_ISSET_ID);
-
 
442
  }
-
 
443
 
-
 
444
  public void setIdIsSet(boolean value) {
-
 
445
    __isset_bit_vector.set(__ID_ISSET_ID, value);
-
 
446
  }
-
 
447
 
-
 
448
  public boolean isEnabled() {
448
  public boolean isEnabled() {
449
    return this.enabled;
449
    return this.enabled;
450
  }
450
  }
451
 
451
 
452
  public Address setEnabled(boolean enabled) {
452
  public Address setEnabled(boolean enabled) {
Line 571... Line 571...
571
    }
571
    }
572
  }
572
  }
573
 
573
 
574
  public void setFieldValue(_Fields field, Object value) {
574
  public void setFieldValue(_Fields field, Object value) {
575
    switch (field) {
575
    switch (field) {
-
 
576
    case ID:
-
 
577
      if (value == null) {
-
 
578
        unsetId();
-
 
579
      } else {
-
 
580
        setId((Long)value);
-
 
581
      }
-
 
582
      break;
-
 
583
 
576
    case LINE1:
584
    case LINE1:
577
      if (value == null) {
585
      if (value == null) {
578
        unsetLine1();
586
        unsetLine1();
579
      } else {
587
      } else {
580
        setLine1((String)value);
588
        setLine1((String)value);
Line 627... Line 635...
627
      } else {
635
      } else {
628
        setCountry((String)value);
636
        setCountry((String)value);
629
      }
637
      }
630
      break;
638
      break;
631
 
639
 
632
    case ID:
-
 
633
      if (value == null) {
-
 
634
        unsetId();
-
 
635
      } else {
-
 
636
        setId((Long)value);
-
 
637
      }
-
 
638
      break;
-
 
639
 
-
 
640
    case ENABLED:
640
    case ENABLED:
641
      if (value == null) {
641
      if (value == null) {
642
        unsetEnabled();
642
        unsetEnabled();
643
      } else {
643
      } else {
644
        setEnabled((Boolean)value);
644
        setEnabled((Boolean)value);
Line 684... Line 684...
684
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
684
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
685
  }
685
  }
686
 
686
 
687
  public Object getFieldValue(_Fields field) {
687
  public Object getFieldValue(_Fields field) {
688
    switch (field) {
688
    switch (field) {
-
 
689
    case ID:
-
 
690
      return new Long(getId());
-
 
691
 
689
    case LINE1:
692
    case LINE1:
690
      return getLine1();
693
      return getLine1();
691
 
694
 
692
    case LINE2:
695
    case LINE2:
693
      return getLine2();
696
      return getLine2();
Line 705... Line 708...
705
      return getPin();
708
      return getPin();
706
 
709
 
707
    case COUNTRY:
710
    case COUNTRY:
708
      return getCountry();
711
      return getCountry();
709
 
712
 
710
    case ID:
-
 
711
      return new Long(getId());
-
 
712
 
-
 
713
    case ENABLED:
713
    case ENABLED:
714
      return new Boolean(isEnabled());
714
      return new Boolean(isEnabled());
715
 
715
 
716
    case TYPE:
716
    case TYPE:
717
      return getType();
717
      return getType();
Line 734... Line 734...
734
  }
734
  }
735
 
735
 
736
  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
736
  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
737
  public boolean isSet(_Fields field) {
737
  public boolean isSet(_Fields field) {
738
    switch (field) {
738
    switch (field) {
-
 
739
    case ID:
-
 
740
      return isSetId();
739
    case LINE1:
741
    case LINE1:
740
      return isSetLine1();
742
      return isSetLine1();
741
    case LINE2:
743
    case LINE2:
742
      return isSetLine2();
744
      return isSetLine2();
743
    case LANDMARK:
745
    case LANDMARK:
Line 748... Line 750...
748
      return isSetState();
750
      return isSetState();
749
    case PIN:
751
    case PIN:
750
      return isSetPin();
752
      return isSetPin();
751
    case COUNTRY:
753
    case COUNTRY:
752
      return isSetCountry();
754
      return isSetCountry();
753
    case ID:
-
 
754
      return isSetId();
-
 
755
    case ENABLED:
755
    case ENABLED:
756
      return isSetEnabled();
756
      return isSetEnabled();
757
    case TYPE:
757
    case TYPE:
758
      return isSetType();
758
      return isSetType();
759
    case ADDED_ON:
759
    case ADDED_ON:
Line 781... Line 781...
781
 
781
 
782
  public boolean equals(Address that) {
782
  public boolean equals(Address that) {
783
    if (that == null)
783
    if (that == null)
784
      return false;
784
      return false;
785
 
785
 
-
 
786
    boolean this_present_id = true;
-
 
787
    boolean that_present_id = true;
-
 
788
    if (this_present_id || that_present_id) {
-
 
789
      if (!(this_present_id && that_present_id))
-
 
790
        return false;
-
 
791
      if (this.id != that.id)
-
 
792
        return false;
-
 
793
    }
-
 
794
 
786
    boolean this_present_line1 = true && this.isSetLine1();
795
    boolean this_present_line1 = true && this.isSetLine1();
787
    boolean that_present_line1 = true && that.isSetLine1();
796
    boolean that_present_line1 = true && that.isSetLine1();
788
    if (this_present_line1 || that_present_line1) {
797
    if (this_present_line1 || that_present_line1) {
789
      if (!(this_present_line1 && that_present_line1))
798
      if (!(this_present_line1 && that_present_line1))
790
        return false;
799
        return false;
Line 844... Line 853...
844
        return false;
853
        return false;
845
      if (!this.country.equals(that.country))
854
      if (!this.country.equals(that.country))
846
        return false;
855
        return false;
847
    }
856
    }
848
 
857
 
849
    boolean this_present_id = true;
-
 
850
    boolean that_present_id = true;
-
 
851
    if (this_present_id || that_present_id) {
-
 
852
      if (!(this_present_id && that_present_id))
-
 
853
        return false;
-
 
854
      if (this.id != that.id)
-
 
855
        return false;
-
 
856
    }
-
 
857
 
-
 
858
    boolean this_present_enabled = true;
858
    boolean this_present_enabled = true;
859
    boolean that_present_enabled = true;
859
    boolean that_present_enabled = true;
860
    if (this_present_enabled || that_present_enabled) {
860
    if (this_present_enabled || that_present_enabled) {
861
      if (!(this_present_enabled && that_present_enabled))
861
      if (!(this_present_enabled && that_present_enabled))
862
        return false;
862
        return false;
Line 914... Line 914...
914
    }
914
    }
915
 
915
 
916
    int lastComparison = 0;
916
    int lastComparison = 0;
917
    Address typedOther = (Address)other;
917
    Address typedOther = (Address)other;
918
 
918
 
-
 
919
    lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
-
 
920
    if (lastComparison != 0) {
-
 
921
      return lastComparison;
-
 
922
    }
-
 
923
    lastComparison = TBaseHelper.compareTo(id, typedOther.id);
-
 
924
    if (lastComparison != 0) {
-
 
925
      return lastComparison;
-
 
926
    }
919
    lastComparison = Boolean.valueOf(isSetLine1()).compareTo(isSetLine1());
927
    lastComparison = Boolean.valueOf(isSetLine1()).compareTo(isSetLine1());
920
    if (lastComparison != 0) {
928
    if (lastComparison != 0) {
921
      return lastComparison;
929
      return lastComparison;
922
    }
930
    }
923
    lastComparison = TBaseHelper.compareTo(line1, typedOther.line1);
931
    lastComparison = TBaseHelper.compareTo(line1, typedOther.line1);
Line 970... Line 978...
970
    }
978
    }
971
    lastComparison = TBaseHelper.compareTo(country, typedOther.country);
979
    lastComparison = TBaseHelper.compareTo(country, typedOther.country);
972
    if (lastComparison != 0) {
980
    if (lastComparison != 0) {
973
      return lastComparison;
981
      return lastComparison;
974
    }
982
    }
975
    lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
-
 
976
    if (lastComparison != 0) {
-
 
977
      return lastComparison;
-
 
978
    }
-
 
979
    lastComparison = TBaseHelper.compareTo(id, typedOther.id);
-
 
980
    if (lastComparison != 0) {
-
 
981
      return lastComparison;
-
 
982
    }
-
 
983
    lastComparison = Boolean.valueOf(isSetEnabled()).compareTo(isSetEnabled());
983
    lastComparison = Boolean.valueOf(isSetEnabled()).compareTo(isSetEnabled());
984
    if (lastComparison != 0) {
984
    if (lastComparison != 0) {
985
      return lastComparison;
985
      return lastComparison;
986
    }
986
    }
987
    lastComparison = TBaseHelper.compareTo(enabled, typedOther.enabled);
987
    lastComparison = TBaseHelper.compareTo(enabled, typedOther.enabled);
Line 1035... Line 1035...
1035
      _Fields fieldId = _Fields.findByThriftId(field.id);
1035
      _Fields fieldId = _Fields.findByThriftId(field.id);
1036
      if (fieldId == null) {
1036
      if (fieldId == null) {
1037
        TProtocolUtil.skip(iprot, field.type);
1037
        TProtocolUtil.skip(iprot, field.type);
1038
      } else {
1038
      } else {
1039
        switch (fieldId) {
1039
        switch (fieldId) {
-
 
1040
          case ID:
-
 
1041
            if (field.type == TType.I64) {
-
 
1042
              this.id = iprot.readI64();
-
 
1043
              setIdIsSet(true);
-
 
1044
            } else { 
-
 
1045
              TProtocolUtil.skip(iprot, field.type);
-
 
1046
            }
-
 
1047
            break;
1040
          case LINE1:
1048
          case LINE1:
1041
            if (field.type == TType.STRING) {
1049
            if (field.type == TType.STRING) {
1042
              this.line1 = iprot.readString();
1050
              this.line1 = iprot.readString();
1043
            } else { 
1051
            } else { 
1044
              TProtocolUtil.skip(iprot, field.type);
1052
              TProtocolUtil.skip(iprot, field.type);
Line 1084... Line 1092...
1084
              this.country = iprot.readString();
1092
              this.country = iprot.readString();
1085
            } else { 
1093
            } else { 
1086
              TProtocolUtil.skip(iprot, field.type);
1094
              TProtocolUtil.skip(iprot, field.type);
1087
            }
1095
            }
1088
            break;
1096
            break;
1089
          case ID:
-
 
1090
            if (field.type == TType.I64) {
-
 
1091
              this.id = iprot.readI64();
-
 
1092
              setIdIsSet(true);
-
 
1093
            } else { 
-
 
1094
              TProtocolUtil.skip(iprot, field.type);
-
 
1095
            }
-
 
1096
            break;
-
 
1097
          case ENABLED:
1097
          case ENABLED:
1098
            if (field.type == TType.BOOL) {
1098
            if (field.type == TType.BOOL) {
1099
              this.enabled = iprot.readBool();
1099
              this.enabled = iprot.readBool();
1100
              setEnabledIsSet(true);
1100
              setEnabledIsSet(true);
1101
            } else { 
1101
            } else { 
Line 1141... Line 1141...
1141
 
1141
 
1142
  public void write(TProtocol oprot) throws TException {
1142
  public void write(TProtocol oprot) throws TException {
1143
    validate();
1143
    validate();
1144
 
1144
 
1145
    oprot.writeStructBegin(STRUCT_DESC);
1145
    oprot.writeStructBegin(STRUCT_DESC);
-
 
1146
    oprot.writeFieldBegin(ID_FIELD_DESC);
-
 
1147
    oprot.writeI64(this.id);
-
 
1148
    oprot.writeFieldEnd();
1146
    if (this.line1 != null) {
1149
    if (this.line1 != null) {
1147
      oprot.writeFieldBegin(LINE1_FIELD_DESC);
1150
      oprot.writeFieldBegin(LINE1_FIELD_DESC);
1148
      oprot.writeString(this.line1);
1151
      oprot.writeString(this.line1);
1149
      oprot.writeFieldEnd();
1152
      oprot.writeFieldEnd();
1150
    }
1153
    }
Line 1176... Line 1179...
1176
    if (this.country != null) {
1179
    if (this.country != null) {
1177
      oprot.writeFieldBegin(COUNTRY_FIELD_DESC);
1180
      oprot.writeFieldBegin(COUNTRY_FIELD_DESC);
1178
      oprot.writeString(this.country);
1181
      oprot.writeString(this.country);
1179
      oprot.writeFieldEnd();
1182
      oprot.writeFieldEnd();
1180
    }
1183
    }
1181
    oprot.writeFieldBegin(ID_FIELD_DESC);
-
 
1182
    oprot.writeI64(this.id);
-
 
1183
    oprot.writeFieldEnd();
-
 
1184
    oprot.writeFieldBegin(ENABLED_FIELD_DESC);
1184
    oprot.writeFieldBegin(ENABLED_FIELD_DESC);
1185
    oprot.writeBool(this.enabled);
1185
    oprot.writeBool(this.enabled);
1186
    oprot.writeFieldEnd();
1186
    oprot.writeFieldEnd();
1187
    if (this.type != null) {
1187
    if (this.type != null) {
1188
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
1188
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
Line 1209... Line 1209...
1209
  @Override
1209
  @Override
1210
  public String toString() {
1210
  public String toString() {
1211
    StringBuilder sb = new StringBuilder("Address(");
1211
    StringBuilder sb = new StringBuilder("Address(");
1212
    boolean first = true;
1212
    boolean first = true;
1213
 
1213
 
-
 
1214
    sb.append("id:");
-
 
1215
    sb.append(this.id);
-
 
1216
    first = false;
-
 
1217
    if (!first) sb.append(", ");
1214
    sb.append("line1:");
1218
    sb.append("line1:");
1215
    if (this.line1 == null) {
1219
    if (this.line1 == null) {
1216
      sb.append("null");
1220
      sb.append("null");
1217
    } else {
1221
    } else {
1218
      sb.append(this.line1);
1222
      sb.append(this.line1);
Line 1265... Line 1269...
1265
    } else {
1269
    } else {
1266
      sb.append(this.country);
1270
      sb.append(this.country);
1267
    }
1271
    }
1268
    first = false;
1272
    first = false;
1269
    if (!first) sb.append(", ");
1273
    if (!first) sb.append(", ");
1270
    sb.append("id:");
-
 
1271
    sb.append(this.id);
-
 
1272
    first = false;
-
 
1273
    if (!first) sb.append(", ");
-
 
1274
    sb.append("enabled:");
1274
    sb.append("enabled:");
1275
    sb.append(this.enabled);
1275
    sb.append(this.enabled);
1276
    first = false;
1276
    first = false;
1277
    if (!first) sb.append(", ");
1277
    if (!first) sb.append(", ");
1278
    sb.append("type:");
1278
    sb.append("type:");