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