PageRenderTime 105ms CodeModel.GetById 21ms app.highlight 77ms RepoModel.GetById 2ms app.codeStats 0ms

/tags/release-0.0.0-rc0/hive/external/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/Complex.java

#
Java | 901 lines | 768 code | 105 blank | 28 comment | 197 complexity | 7ca72ee9bf6634de0dddc75b3dc1db57 MD5 | raw file
  1/**
  2 * Autogenerated by Thrift
  3 *
  4 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  5 */
  6package org.apache.hadoop.hive.serde2.thrift.test;
  7
  8import java.util.List;
  9import java.util.ArrayList;
 10import java.util.Map;
 11import java.util.HashMap;
 12import java.util.EnumMap;
 13import java.util.Set;
 14import java.util.HashSet;
 15import java.util.EnumSet;
 16import java.util.Collections;
 17import java.util.BitSet;
 18import java.nio.ByteBuffer;
 19import java.util.Arrays;
 20import org.slf4j.Logger;
 21import org.slf4j.LoggerFactory;
 22
 23import org.apache.thrift.*;
 24import org.apache.thrift.async.*;
 25import org.apache.thrift.meta_data.*;
 26import org.apache.thrift.transport.*;
 27import org.apache.thrift.protocol.*;
 28
 29public class Complex implements TBase<Complex, Complex._Fields>, java.io.Serializable, Cloneable {
 30  private static final TStruct STRUCT_DESC = new TStruct("Complex");
 31
 32  private static final TField AINT_FIELD_DESC = new TField("aint", TType.I32, (short)1);
 33  private static final TField A_STRING_FIELD_DESC = new TField("aString", TType.STRING, (short)2);
 34  private static final TField LINT_FIELD_DESC = new TField("lint", TType.LIST, (short)3);
 35  private static final TField L_STRING_FIELD_DESC = new TField("lString", TType.LIST, (short)4);
 36  private static final TField LINT_STRING_FIELD_DESC = new TField("lintString", TType.LIST, (short)5);
 37  private static final TField M_STRING_STRING_FIELD_DESC = new TField("mStringString", TType.MAP, (short)6);
 38
 39  private int aint;
 40  private String aString;
 41  private List<Integer> lint;
 42  private List<String> lString;
 43  private List<IntString> lintString;
 44  private Map<String,String> mStringString;
 45
 46  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
 47  public enum _Fields implements TFieldIdEnum {
 48    AINT((short)1, "aint"),
 49    A_STRING((short)2, "aString"),
 50    LINT((short)3, "lint"),
 51    L_STRING((short)4, "lString"),
 52    LINT_STRING((short)5, "lintString"),
 53    M_STRING_STRING((short)6, "mStringString");
 54
 55    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 56
 57    static {
 58      for (_Fields field : EnumSet.allOf(_Fields.class)) {
 59        byName.put(field.getFieldName(), field);
 60      }
 61    }
 62
 63    /**
 64     * Find the _Fields constant that matches fieldId, or null if its not found.
 65     */
 66    public static _Fields findByThriftId(int fieldId) {
 67      switch(fieldId) {
 68        case 1: // AINT
 69          return AINT;
 70        case 2: // A_STRING
 71          return A_STRING;
 72        case 3: // LINT
 73          return LINT;
 74        case 4: // L_STRING
 75          return L_STRING;
 76        case 5: // LINT_STRING
 77          return LINT_STRING;
 78        case 6: // M_STRING_STRING
 79          return M_STRING_STRING;
 80        default:
 81          return null;
 82      }
 83    }
 84
 85    /**
 86     * Find the _Fields constant that matches fieldId, throwing an exception
 87     * if it is not found.
 88     */
 89    public static _Fields findByThriftIdOrThrow(int fieldId) {
 90      _Fields fields = findByThriftId(fieldId);
 91      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
 92      return fields;
 93    }
 94
 95    /**
 96     * Find the _Fields constant that matches name, or null if its not found.
 97     */
 98    public static _Fields findByName(String name) {
 99      return byName.get(name);
100    }
101
102    private final short _thriftId;
103    private final String _fieldName;
104
105    _Fields(short thriftId, String fieldName) {
106      _thriftId = thriftId;
107      _fieldName = fieldName;
108    }
109
110    public short getThriftFieldId() {
111      return _thriftId;
112    }
113
114    public String getFieldName() {
115      return _fieldName;
116    }
117  }
118
119  // isset id assignments
120  private static final int __AINT_ISSET_ID = 0;
121  private BitSet __isset_bit_vector = new BitSet(1);
122
123  public static final Map<_Fields, FieldMetaData> metaDataMap;
124  static {
125    Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
126    tmpMap.put(_Fields.AINT, new FieldMetaData("aint", TFieldRequirementType.DEFAULT, 
127        new FieldValueMetaData(TType.I32)));
128    tmpMap.put(_Fields.A_STRING, new FieldMetaData("aString", TFieldRequirementType.DEFAULT, 
129        new FieldValueMetaData(TType.STRING)));
130    tmpMap.put(_Fields.LINT, new FieldMetaData("lint", TFieldRequirementType.DEFAULT, 
131        new ListMetaData(TType.LIST, 
132            new FieldValueMetaData(TType.I32))));
133    tmpMap.put(_Fields.L_STRING, new FieldMetaData("lString", TFieldRequirementType.DEFAULT, 
134        new ListMetaData(TType.LIST, 
135            new FieldValueMetaData(TType.STRING))));
136    tmpMap.put(_Fields.LINT_STRING, new FieldMetaData("lintString", TFieldRequirementType.DEFAULT, 
137        new ListMetaData(TType.LIST, 
138            new StructMetaData(TType.STRUCT, IntString.class))));
139    tmpMap.put(_Fields.M_STRING_STRING, new FieldMetaData("mStringString", TFieldRequirementType.DEFAULT, 
140        new MapMetaData(TType.MAP, 
141            new FieldValueMetaData(TType.STRING), 
142            new FieldValueMetaData(TType.STRING))));
143    metaDataMap = Collections.unmodifiableMap(tmpMap);
144    FieldMetaData.addStructMetaDataMap(Complex.class, metaDataMap);
145  }
146
147  public Complex() {
148  }
149
150  public Complex(
151    int aint,
152    String aString,
153    List<Integer> lint,
154    List<String> lString,
155    List<IntString> lintString,
156    Map<String,String> mStringString)
157  {
158    this();
159    this.aint = aint;
160    setAintIsSet(true);
161    this.aString = aString;
162    this.lint = lint;
163    this.lString = lString;
164    this.lintString = lintString;
165    this.mStringString = mStringString;
166  }
167
168  /**
169   * Performs a deep copy on <i>other</i>.
170   */
171  public Complex(Complex other) {
172    __isset_bit_vector.clear();
173    __isset_bit_vector.or(other.__isset_bit_vector);
174    this.aint = other.aint;
175    if (other.isSetAString()) {
176      this.aString = other.aString;
177    }
178    if (other.isSetLint()) {
179      List<Integer> __this__lint = new ArrayList<Integer>();
180      for (Integer other_element : other.lint) {
181        __this__lint.add(other_element);
182      }
183      this.lint = __this__lint;
184    }
185    if (other.isSetLString()) {
186      List<String> __this__lString = new ArrayList<String>();
187      for (String other_element : other.lString) {
188        __this__lString.add(other_element);
189      }
190      this.lString = __this__lString;
191    }
192    if (other.isSetLintString()) {
193      List<IntString> __this__lintString = new ArrayList<IntString>();
194      for (IntString other_element : other.lintString) {
195        __this__lintString.add(new IntString(other_element));
196      }
197      this.lintString = __this__lintString;
198    }
199    if (other.isSetMStringString()) {
200      Map<String,String> __this__mStringString = new HashMap<String,String>();
201      for (Map.Entry<String, String> other_element : other.mStringString.entrySet()) {
202
203        String other_element_key = other_element.getKey();
204        String other_element_value = other_element.getValue();
205
206        String __this__mStringString_copy_key = other_element_key;
207
208        String __this__mStringString_copy_value = other_element_value;
209
210        __this__mStringString.put(__this__mStringString_copy_key, __this__mStringString_copy_value);
211      }
212      this.mStringString = __this__mStringString;
213    }
214  }
215
216  public Complex deepCopy() {
217    return new Complex(this);
218  }
219
220  @Override
221  public void clear() {
222    setAintIsSet(false);
223    this.aint = 0;
224    this.aString = null;
225    this.lint = null;
226    this.lString = null;
227    this.lintString = null;
228    this.mStringString = null;
229  }
230
231  public int getAint() {
232    return this.aint;
233  }
234
235  public void setAint(int aint) {
236    this.aint = aint;
237    setAintIsSet(true);
238  }
239
240  public void unsetAint() {
241    __isset_bit_vector.clear(__AINT_ISSET_ID);
242  }
243
244  /** Returns true if field aint is set (has been asigned a value) and false otherwise */
245  public boolean isSetAint() {
246    return __isset_bit_vector.get(__AINT_ISSET_ID);
247  }
248
249  public void setAintIsSet(boolean value) {
250    __isset_bit_vector.set(__AINT_ISSET_ID, value);
251  }
252
253  public String getAString() {
254    return this.aString;
255  }
256
257  public void setAString(String aString) {
258    this.aString = aString;
259  }
260
261  public void unsetAString() {
262    this.aString = null;
263  }
264
265  /** Returns true if field aString is set (has been asigned a value) and false otherwise */
266  public boolean isSetAString() {
267    return this.aString != null;
268  }
269
270  public void setAStringIsSet(boolean value) {
271    if (!value) {
272      this.aString = null;
273    }
274  }
275
276  public int getLintSize() {
277    return (this.lint == null) ? 0 : this.lint.size();
278  }
279
280  public java.util.Iterator<Integer> getLintIterator() {
281    return (this.lint == null) ? null : this.lint.iterator();
282  }
283
284  public void addToLint(int elem) {
285    if (this.lint == null) {
286      this.lint = new ArrayList<Integer>();
287    }
288    this.lint.add(elem);
289  }
290
291  public List<Integer> getLint() {
292    return this.lint;
293  }
294
295  public void setLint(List<Integer> lint) {
296    this.lint = lint;
297  }
298
299  public void unsetLint() {
300    this.lint = null;
301  }
302
303  /** Returns true if field lint is set (has been asigned a value) and false otherwise */
304  public boolean isSetLint() {
305    return this.lint != null;
306  }
307
308  public void setLintIsSet(boolean value) {
309    if (!value) {
310      this.lint = null;
311    }
312  }
313
314  public int getLStringSize() {
315    return (this.lString == null) ? 0 : this.lString.size();
316  }
317
318  public java.util.Iterator<String> getLStringIterator() {
319    return (this.lString == null) ? null : this.lString.iterator();
320  }
321
322  public void addToLString(String elem) {
323    if (this.lString == null) {
324      this.lString = new ArrayList<String>();
325    }
326    this.lString.add(elem);
327  }
328
329  public List<String> getLString() {
330    return this.lString;
331  }
332
333  public void setLString(List<String> lString) {
334    this.lString = lString;
335  }
336
337  public void unsetLString() {
338    this.lString = null;
339  }
340
341  /** Returns true if field lString is set (has been asigned a value) and false otherwise */
342  public boolean isSetLString() {
343    return this.lString != null;
344  }
345
346  public void setLStringIsSet(boolean value) {
347    if (!value) {
348      this.lString = null;
349    }
350  }
351
352  public int getLintStringSize() {
353    return (this.lintString == null) ? 0 : this.lintString.size();
354  }
355
356  public java.util.Iterator<IntString> getLintStringIterator() {
357    return (this.lintString == null) ? null : this.lintString.iterator();
358  }
359
360  public void addToLintString(IntString elem) {
361    if (this.lintString == null) {
362      this.lintString = new ArrayList<IntString>();
363    }
364    this.lintString.add(elem);
365  }
366
367  public List<IntString> getLintString() {
368    return this.lintString;
369  }
370
371  public void setLintString(List<IntString> lintString) {
372    this.lintString = lintString;
373  }
374
375  public void unsetLintString() {
376    this.lintString = null;
377  }
378
379  /** Returns true if field lintString is set (has been asigned a value) and false otherwise */
380  public boolean isSetLintString() {
381    return this.lintString != null;
382  }
383
384  public void setLintStringIsSet(boolean value) {
385    if (!value) {
386      this.lintString = null;
387    }
388  }
389
390  public int getMStringStringSize() {
391    return (this.mStringString == null) ? 0 : this.mStringString.size();
392  }
393
394  public void putToMStringString(String key, String val) {
395    if (this.mStringString == null) {
396      this.mStringString = new HashMap<String,String>();
397    }
398    this.mStringString.put(key, val);
399  }
400
401  public Map<String,String> getMStringString() {
402    return this.mStringString;
403  }
404
405  public void setMStringString(Map<String,String> mStringString) {
406    this.mStringString = mStringString;
407  }
408
409  public void unsetMStringString() {
410    this.mStringString = null;
411  }
412
413  /** Returns true if field mStringString is set (has been asigned a value) and false otherwise */
414  public boolean isSetMStringString() {
415    return this.mStringString != null;
416  }
417
418  public void setMStringStringIsSet(boolean value) {
419    if (!value) {
420      this.mStringString = null;
421    }
422  }
423
424  public void setFieldValue(_Fields field, Object value) {
425    switch (field) {
426    case AINT:
427      if (value == null) {
428        unsetAint();
429      } else {
430        setAint((Integer)value);
431      }
432      break;
433
434    case A_STRING:
435      if (value == null) {
436        unsetAString();
437      } else {
438        setAString((String)value);
439      }
440      break;
441
442    case LINT:
443      if (value == null) {
444        unsetLint();
445      } else {
446        setLint((List<Integer>)value);
447      }
448      break;
449
450    case L_STRING:
451      if (value == null) {
452        unsetLString();
453      } else {
454        setLString((List<String>)value);
455      }
456      break;
457
458    case LINT_STRING:
459      if (value == null) {
460        unsetLintString();
461      } else {
462        setLintString((List<IntString>)value);
463      }
464      break;
465
466    case M_STRING_STRING:
467      if (value == null) {
468        unsetMStringString();
469      } else {
470        setMStringString((Map<String,String>)value);
471      }
472      break;
473
474    }
475  }
476
477  public Object getFieldValue(_Fields field) {
478    switch (field) {
479    case AINT:
480      return new Integer(getAint());
481
482    case A_STRING:
483      return getAString();
484
485    case LINT:
486      return getLint();
487
488    case L_STRING:
489      return getLString();
490
491    case LINT_STRING:
492      return getLintString();
493
494    case M_STRING_STRING:
495      return getMStringString();
496
497    }
498    throw new IllegalStateException();
499  }
500
501  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
502  public boolean isSet(_Fields field) {
503    if (field == null) {
504      throw new IllegalArgumentException();
505    }
506
507    switch (field) {
508    case AINT:
509      return isSetAint();
510    case A_STRING:
511      return isSetAString();
512    case LINT:
513      return isSetLint();
514    case L_STRING:
515      return isSetLString();
516    case LINT_STRING:
517      return isSetLintString();
518    case M_STRING_STRING:
519      return isSetMStringString();
520    }
521    throw new IllegalStateException();
522  }
523
524  @Override
525  public boolean equals(Object that) {
526    if (that == null)
527      return false;
528    if (that instanceof Complex)
529      return this.equals((Complex)that);
530    return false;
531  }
532
533  public boolean equals(Complex that) {
534    if (that == null)
535      return false;
536
537    boolean this_present_aint = true;
538    boolean that_present_aint = true;
539    if (this_present_aint || that_present_aint) {
540      if (!(this_present_aint && that_present_aint))
541        return false;
542      if (this.aint != that.aint)
543        return false;
544    }
545
546    boolean this_present_aString = true && this.isSetAString();
547    boolean that_present_aString = true && that.isSetAString();
548    if (this_present_aString || that_present_aString) {
549      if (!(this_present_aString && that_present_aString))
550        return false;
551      if (!this.aString.equals(that.aString))
552        return false;
553    }
554
555    boolean this_present_lint = true && this.isSetLint();
556    boolean that_present_lint = true && that.isSetLint();
557    if (this_present_lint || that_present_lint) {
558      if (!(this_present_lint && that_present_lint))
559        return false;
560      if (!this.lint.equals(that.lint))
561        return false;
562    }
563
564    boolean this_present_lString = true && this.isSetLString();
565    boolean that_present_lString = true && that.isSetLString();
566    if (this_present_lString || that_present_lString) {
567      if (!(this_present_lString && that_present_lString))
568        return false;
569      if (!this.lString.equals(that.lString))
570        return false;
571    }
572
573    boolean this_present_lintString = true && this.isSetLintString();
574    boolean that_present_lintString = true && that.isSetLintString();
575    if (this_present_lintString || that_present_lintString) {
576      if (!(this_present_lintString && that_present_lintString))
577        return false;
578      if (!this.lintString.equals(that.lintString))
579        return false;
580    }
581
582    boolean this_present_mStringString = true && this.isSetMStringString();
583    boolean that_present_mStringString = true && that.isSetMStringString();
584    if (this_present_mStringString || that_present_mStringString) {
585      if (!(this_present_mStringString && that_present_mStringString))
586        return false;
587      if (!this.mStringString.equals(that.mStringString))
588        return false;
589    }
590
591    return true;
592  }
593
594  @Override
595  public int hashCode() {
596    return 0;
597  }
598
599  public int compareTo(Complex other) {
600    if (!getClass().equals(other.getClass())) {
601      return getClass().getName().compareTo(other.getClass().getName());
602    }
603
604    int lastComparison = 0;
605    Complex typedOther = (Complex)other;
606
607    lastComparison = Boolean.valueOf(isSetAint()).compareTo(typedOther.isSetAint());
608    if (lastComparison != 0) {
609      return lastComparison;
610    }
611    if (isSetAint()) {
612      lastComparison = TBaseHelper.compareTo(this.aint, typedOther.aint);
613      if (lastComparison != 0) {
614        return lastComparison;
615      }
616    }
617    lastComparison = Boolean.valueOf(isSetAString()).compareTo(typedOther.isSetAString());
618    if (lastComparison != 0) {
619      return lastComparison;
620    }
621    if (isSetAString()) {
622      lastComparison = TBaseHelper.compareTo(this.aString, typedOther.aString);
623      if (lastComparison != 0) {
624        return lastComparison;
625      }
626    }
627    lastComparison = Boolean.valueOf(isSetLint()).compareTo(typedOther.isSetLint());
628    if (lastComparison != 0) {
629      return lastComparison;
630    }
631    if (isSetLint()) {
632      lastComparison = TBaseHelper.compareTo(this.lint, typedOther.lint);
633      if (lastComparison != 0) {
634        return lastComparison;
635      }
636    }
637    lastComparison = Boolean.valueOf(isSetLString()).compareTo(typedOther.isSetLString());
638    if (lastComparison != 0) {
639      return lastComparison;
640    }
641    if (isSetLString()) {
642      lastComparison = TBaseHelper.compareTo(this.lString, typedOther.lString);
643      if (lastComparison != 0) {
644        return lastComparison;
645      }
646    }
647    lastComparison = Boolean.valueOf(isSetLintString()).compareTo(typedOther.isSetLintString());
648    if (lastComparison != 0) {
649      return lastComparison;
650    }
651    if (isSetLintString()) {
652      lastComparison = TBaseHelper.compareTo(this.lintString, typedOther.lintString);
653      if (lastComparison != 0) {
654        return lastComparison;
655      }
656    }
657    lastComparison = Boolean.valueOf(isSetMStringString()).compareTo(typedOther.isSetMStringString());
658    if (lastComparison != 0) {
659      return lastComparison;
660    }
661    if (isSetMStringString()) {
662      lastComparison = TBaseHelper.compareTo(this.mStringString, typedOther.mStringString);
663      if (lastComparison != 0) {
664        return lastComparison;
665      }
666    }
667    return 0;
668  }
669
670  public _Fields fieldForId(int fieldId) {
671    return _Fields.findByThriftId(fieldId);
672  }
673
674  public void read(TProtocol iprot) throws TException {
675    TField field;
676    iprot.readStructBegin();
677    while (true)
678    {
679      field = iprot.readFieldBegin();
680      if (field.type == TType.STOP) { 
681        break;
682      }
683      switch (field.id) {
684        case 1: // AINT
685          if (field.type == TType.I32) {
686            this.aint = iprot.readI32();
687            setAintIsSet(true);
688          } else { 
689            TProtocolUtil.skip(iprot, field.type);
690          }
691          break;
692        case 2: // A_STRING
693          if (field.type == TType.STRING) {
694            this.aString = iprot.readString();
695          } else { 
696            TProtocolUtil.skip(iprot, field.type);
697          }
698          break;
699        case 3: // LINT
700          if (field.type == TType.LIST) {
701            {
702              TList _list0 = iprot.readListBegin();
703              this.lint = new ArrayList<Integer>(_list0.size);
704              for (int _i1 = 0; _i1 < _list0.size; ++_i1)
705              {
706                int _elem2;
707                _elem2 = iprot.readI32();
708                this.lint.add(_elem2);
709              }
710              iprot.readListEnd();
711            }
712          } else { 
713            TProtocolUtil.skip(iprot, field.type);
714          }
715          break;
716        case 4: // L_STRING
717          if (field.type == TType.LIST) {
718            {
719              TList _list3 = iprot.readListBegin();
720              this.lString = new ArrayList<String>(_list3.size);
721              for (int _i4 = 0; _i4 < _list3.size; ++_i4)
722              {
723                String _elem5;
724                _elem5 = iprot.readString();
725                this.lString.add(_elem5);
726              }
727              iprot.readListEnd();
728            }
729          } else { 
730            TProtocolUtil.skip(iprot, field.type);
731          }
732          break;
733        case 5: // LINT_STRING
734          if (field.type == TType.LIST) {
735            {
736              TList _list6 = iprot.readListBegin();
737              this.lintString = new ArrayList<IntString>(_list6.size);
738              for (int _i7 = 0; _i7 < _list6.size; ++_i7)
739              {
740                IntString _elem8;
741                _elem8 = new IntString();
742                _elem8.read(iprot);
743                this.lintString.add(_elem8);
744              }
745              iprot.readListEnd();
746            }
747          } else { 
748            TProtocolUtil.skip(iprot, field.type);
749          }
750          break;
751        case 6: // M_STRING_STRING
752          if (field.type == TType.MAP) {
753            {
754              TMap _map9 = iprot.readMapBegin();
755              this.mStringString = new HashMap<String,String>(2*_map9.size);
756              for (int _i10 = 0; _i10 < _map9.size; ++_i10)
757              {
758                String _key11;
759                String _val12;
760                _key11 = iprot.readString();
761                _val12 = iprot.readString();
762                this.mStringString.put(_key11, _val12);
763              }
764              iprot.readMapEnd();
765            }
766          } else { 
767            TProtocolUtil.skip(iprot, field.type);
768          }
769          break;
770        default:
771          TProtocolUtil.skip(iprot, field.type);
772      }
773      iprot.readFieldEnd();
774    }
775    iprot.readStructEnd();
776    validate();
777  }
778
779  public void write(TProtocol oprot) throws TException {
780    validate();
781
782    oprot.writeStructBegin(STRUCT_DESC);
783    oprot.writeFieldBegin(AINT_FIELD_DESC);
784    oprot.writeI32(this.aint);
785    oprot.writeFieldEnd();
786    if (this.aString != null) {
787      oprot.writeFieldBegin(A_STRING_FIELD_DESC);
788      oprot.writeString(this.aString);
789      oprot.writeFieldEnd();
790    }
791    if (this.lint != null) {
792      oprot.writeFieldBegin(LINT_FIELD_DESC);
793      {
794        oprot.writeListBegin(new TList(TType.I32, this.lint.size()));
795        for (int _iter13 : this.lint)
796        {
797          oprot.writeI32(_iter13);
798        }
799        oprot.writeListEnd();
800      }
801      oprot.writeFieldEnd();
802    }
803    if (this.lString != null) {
804      oprot.writeFieldBegin(L_STRING_FIELD_DESC);
805      {
806        oprot.writeListBegin(new TList(TType.STRING, this.lString.size()));
807        for (String _iter14 : this.lString)
808        {
809          oprot.writeString(_iter14);
810        }
811        oprot.writeListEnd();
812      }
813      oprot.writeFieldEnd();
814    }
815    if (this.lintString != null) {
816      oprot.writeFieldBegin(LINT_STRING_FIELD_DESC);
817      {
818        oprot.writeListBegin(new TList(TType.STRUCT, this.lintString.size()));
819        for (IntString _iter15 : this.lintString)
820        {
821          _iter15.write(oprot);
822        }
823        oprot.writeListEnd();
824      }
825      oprot.writeFieldEnd();
826    }
827    if (this.mStringString != null) {
828      oprot.writeFieldBegin(M_STRING_STRING_FIELD_DESC);
829      {
830        oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.mStringString.size()));
831        for (Map.Entry<String, String> _iter16 : this.mStringString.entrySet())
832        {
833          oprot.writeString(_iter16.getKey());
834          oprot.writeString(_iter16.getValue());
835        }
836        oprot.writeMapEnd();
837      }
838      oprot.writeFieldEnd();
839    }
840    oprot.writeFieldStop();
841    oprot.writeStructEnd();
842  }
843
844  @Override
845  public String toString() {
846    StringBuilder sb = new StringBuilder("Complex(");
847    boolean first = true;
848
849    sb.append("aint:");
850    sb.append(this.aint);
851    first = false;
852    if (!first) sb.append(", ");
853    sb.append("aString:");
854    if (this.aString == null) {
855      sb.append("null");
856    } else {
857      sb.append(this.aString);
858    }
859    first = false;
860    if (!first) sb.append(", ");
861    sb.append("lint:");
862    if (this.lint == null) {
863      sb.append("null");
864    } else {
865      sb.append(this.lint);
866    }
867    first = false;
868    if (!first) sb.append(", ");
869    sb.append("lString:");
870    if (this.lString == null) {
871      sb.append("null");
872    } else {
873      sb.append(this.lString);
874    }
875    first = false;
876    if (!first) sb.append(", ");
877    sb.append("lintString:");
878    if (this.lintString == null) {
879      sb.append("null");
880    } else {
881      sb.append(this.lintString);
882    }
883    first = false;
884    if (!first) sb.append(", ");
885    sb.append("mStringString:");
886    if (this.mStringString == null) {
887      sb.append("null");
888    } else {
889      sb.append(this.mStringString);
890    }
891    first = false;
892    sb.append(")");
893    return sb.toString();
894  }
895
896  public void validate() throws TException {
897    // check for required fields
898  }
899
900}
901