PageRenderTime 113ms CodeModel.GetById 35ms RepoModel.GetById 0ms app.codeStats 1ms

/libs/evernote-sdk-php-master/lib/packages/NoteStore/NoteStore_types.php

https://github.com/armin-hackmann/EverYumRetroPublic
PHP | 3553 lines | 3440 code | 107 blank | 6 comment | 647 complexity | 9832d306f7510aa1a0cd48af48d6961b MD5 | raw file
Possible License(s): Apache-2.0, BSD-3-Clause-No-Nuclear-License-2014
  1. <?php
  2. namespace EDAM\NoteStore;
  3. /**
  4. * Autogenerated by Thrift Compiler (0.8.0)
  5. *
  6. * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  7. * @generated
  8. */
  9. include_once $GLOBALS['THRIFT_ROOT'].'/Thrift.php';
  10. include_once $GLOBALS['THRIFT_ROOT'].'/packages/UserStore/UserStore_types.php';
  11. include_once $GLOBALS['THRIFT_ROOT'].'/packages/Types/Types_types.php';
  12. include_once $GLOBALS['THRIFT_ROOT'].'/packages/Errors/Errors_types.php';
  13. include_once $GLOBALS['THRIFT_ROOT'].'/packages/Limits/Limits_types.php';
  14. class SyncState {
  15. static $_TSPEC;
  16. public $currentTime = null;
  17. public $fullSyncBefore = null;
  18. public $updateCount = null;
  19. public $uploaded = null;
  20. public function __construct($vals=null) {
  21. if (!isset(self::$_TSPEC)) {
  22. self::$_TSPEC = array(
  23. 1 => array(
  24. 'var' => 'currentTime',
  25. 'type' => \TType::I64,
  26. ),
  27. 2 => array(
  28. 'var' => 'fullSyncBefore',
  29. 'type' => \TType::I64,
  30. ),
  31. 3 => array(
  32. 'var' => 'updateCount',
  33. 'type' => \TType::I32,
  34. ),
  35. 4 => array(
  36. 'var' => 'uploaded',
  37. 'type' => \TType::I64,
  38. ),
  39. );
  40. }
  41. if (is_array($vals)) {
  42. if (isset($vals['currentTime'])) {
  43. $this->currentTime = $vals['currentTime'];
  44. }
  45. if (isset($vals['fullSyncBefore'])) {
  46. $this->fullSyncBefore = $vals['fullSyncBefore'];
  47. }
  48. if (isset($vals['updateCount'])) {
  49. $this->updateCount = $vals['updateCount'];
  50. }
  51. if (isset($vals['uploaded'])) {
  52. $this->uploaded = $vals['uploaded'];
  53. }
  54. }
  55. }
  56. public function getName() {
  57. return 'SyncState';
  58. }
  59. public function read($input)
  60. {
  61. $xfer = 0;
  62. $fname = null;
  63. $ftype = 0;
  64. $fid = 0;
  65. $xfer += $input->readStructBegin($fname);
  66. while (true)
  67. {
  68. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  69. if ($ftype == \TType::STOP) {
  70. break;
  71. }
  72. switch ($fid)
  73. {
  74. case 1:
  75. if ($ftype == \TType::I64) {
  76. $xfer += $input->readI64($this->currentTime);
  77. } else {
  78. $xfer += $input->skip($ftype);
  79. }
  80. break;
  81. case 2:
  82. if ($ftype == \TType::I64) {
  83. $xfer += $input->readI64($this->fullSyncBefore);
  84. } else {
  85. $xfer += $input->skip($ftype);
  86. }
  87. break;
  88. case 3:
  89. if ($ftype == \TType::I32) {
  90. $xfer += $input->readI32($this->updateCount);
  91. } else {
  92. $xfer += $input->skip($ftype);
  93. }
  94. break;
  95. case 4:
  96. if ($ftype == \TType::I64) {
  97. $xfer += $input->readI64($this->uploaded);
  98. } else {
  99. $xfer += $input->skip($ftype);
  100. }
  101. break;
  102. default:
  103. $xfer += $input->skip($ftype);
  104. break;
  105. }
  106. $xfer += $input->readFieldEnd();
  107. }
  108. $xfer += $input->readStructEnd();
  109. return $xfer;
  110. }
  111. public function write($output) {
  112. $xfer = 0;
  113. $xfer += $output->writeStructBegin('SyncState');
  114. if ($this->currentTime !== null) {
  115. $xfer += $output->writeFieldBegin('currentTime', \TType::I64, 1);
  116. $xfer += $output->writeI64($this->currentTime);
  117. $xfer += $output->writeFieldEnd();
  118. }
  119. if ($this->fullSyncBefore !== null) {
  120. $xfer += $output->writeFieldBegin('fullSyncBefore', \TType::I64, 2);
  121. $xfer += $output->writeI64($this->fullSyncBefore);
  122. $xfer += $output->writeFieldEnd();
  123. }
  124. if ($this->updateCount !== null) {
  125. $xfer += $output->writeFieldBegin('updateCount', \TType::I32, 3);
  126. $xfer += $output->writeI32($this->updateCount);
  127. $xfer += $output->writeFieldEnd();
  128. }
  129. if ($this->uploaded !== null) {
  130. $xfer += $output->writeFieldBegin('uploaded', \TType::I64, 4);
  131. $xfer += $output->writeI64($this->uploaded);
  132. $xfer += $output->writeFieldEnd();
  133. }
  134. $xfer += $output->writeFieldStop();
  135. $xfer += $output->writeStructEnd();
  136. return $xfer;
  137. }
  138. }
  139. class SyncChunk {
  140. static $_TSPEC;
  141. public $currentTime = null;
  142. public $chunkHighUSN = null;
  143. public $updateCount = null;
  144. public $notes = null;
  145. public $notebooks = null;
  146. public $tags = null;
  147. public $searches = null;
  148. public $resources = null;
  149. public $expungedNotes = null;
  150. public $expungedNotebooks = null;
  151. public $expungedTags = null;
  152. public $expungedSearches = null;
  153. public $linkedNotebooks = null;
  154. public $expungedLinkedNotebooks = null;
  155. public function __construct($vals=null) {
  156. if (!isset(self::$_TSPEC)) {
  157. self::$_TSPEC = array(
  158. 1 => array(
  159. 'var' => 'currentTime',
  160. 'type' => \TType::I64,
  161. ),
  162. 2 => array(
  163. 'var' => 'chunkHighUSN',
  164. 'type' => \TType::I32,
  165. ),
  166. 3 => array(
  167. 'var' => 'updateCount',
  168. 'type' => \TType::I32,
  169. ),
  170. 4 => array(
  171. 'var' => 'notes',
  172. 'type' => \TType::LST,
  173. 'etype' => \TType::STRUCT,
  174. 'elem' => array(
  175. 'type' => \TType::STRUCT,
  176. 'class' => '\EDAM\Types\Note',
  177. ),
  178. ),
  179. 5 => array(
  180. 'var' => 'notebooks',
  181. 'type' => \TType::LST,
  182. 'etype' => \TType::STRUCT,
  183. 'elem' => array(
  184. 'type' => \TType::STRUCT,
  185. 'class' => '\EDAM\Types\Notebook',
  186. ),
  187. ),
  188. 6 => array(
  189. 'var' => 'tags',
  190. 'type' => \TType::LST,
  191. 'etype' => \TType::STRUCT,
  192. 'elem' => array(
  193. 'type' => \TType::STRUCT,
  194. 'class' => '\EDAM\Types\Tag',
  195. ),
  196. ),
  197. 7 => array(
  198. 'var' => 'searches',
  199. 'type' => \TType::LST,
  200. 'etype' => \TType::STRUCT,
  201. 'elem' => array(
  202. 'type' => \TType::STRUCT,
  203. 'class' => '\EDAM\Types\SavedSearch',
  204. ),
  205. ),
  206. 8 => array(
  207. 'var' => 'resources',
  208. 'type' => \TType::LST,
  209. 'etype' => \TType::STRUCT,
  210. 'elem' => array(
  211. 'type' => \TType::STRUCT,
  212. 'class' => '\EDAM\Types\Resource',
  213. ),
  214. ),
  215. 9 => array(
  216. 'var' => 'expungedNotes',
  217. 'type' => \TType::LST,
  218. 'etype' => \TType::STRING,
  219. 'elem' => array(
  220. 'type' => \TType::STRING,
  221. ),
  222. ),
  223. 10 => array(
  224. 'var' => 'expungedNotebooks',
  225. 'type' => \TType::LST,
  226. 'etype' => \TType::STRING,
  227. 'elem' => array(
  228. 'type' => \TType::STRING,
  229. ),
  230. ),
  231. 11 => array(
  232. 'var' => 'expungedTags',
  233. 'type' => \TType::LST,
  234. 'etype' => \TType::STRING,
  235. 'elem' => array(
  236. 'type' => \TType::STRING,
  237. ),
  238. ),
  239. 12 => array(
  240. 'var' => 'expungedSearches',
  241. 'type' => \TType::LST,
  242. 'etype' => \TType::STRING,
  243. 'elem' => array(
  244. 'type' => \TType::STRING,
  245. ),
  246. ),
  247. 13 => array(
  248. 'var' => 'linkedNotebooks',
  249. 'type' => \TType::LST,
  250. 'etype' => \TType::STRUCT,
  251. 'elem' => array(
  252. 'type' => \TType::STRUCT,
  253. 'class' => '\EDAM\Types\LinkedNotebook',
  254. ),
  255. ),
  256. 14 => array(
  257. 'var' => 'expungedLinkedNotebooks',
  258. 'type' => \TType::LST,
  259. 'etype' => \TType::STRING,
  260. 'elem' => array(
  261. 'type' => \TType::STRING,
  262. ),
  263. ),
  264. );
  265. }
  266. if (is_array($vals)) {
  267. if (isset($vals['currentTime'])) {
  268. $this->currentTime = $vals['currentTime'];
  269. }
  270. if (isset($vals['chunkHighUSN'])) {
  271. $this->chunkHighUSN = $vals['chunkHighUSN'];
  272. }
  273. if (isset($vals['updateCount'])) {
  274. $this->updateCount = $vals['updateCount'];
  275. }
  276. if (isset($vals['notes'])) {
  277. $this->notes = $vals['notes'];
  278. }
  279. if (isset($vals['notebooks'])) {
  280. $this->notebooks = $vals['notebooks'];
  281. }
  282. if (isset($vals['tags'])) {
  283. $this->tags = $vals['tags'];
  284. }
  285. if (isset($vals['searches'])) {
  286. $this->searches = $vals['searches'];
  287. }
  288. if (isset($vals['resources'])) {
  289. $this->resources = $vals['resources'];
  290. }
  291. if (isset($vals['expungedNotes'])) {
  292. $this->expungedNotes = $vals['expungedNotes'];
  293. }
  294. if (isset($vals['expungedNotebooks'])) {
  295. $this->expungedNotebooks = $vals['expungedNotebooks'];
  296. }
  297. if (isset($vals['expungedTags'])) {
  298. $this->expungedTags = $vals['expungedTags'];
  299. }
  300. if (isset($vals['expungedSearches'])) {
  301. $this->expungedSearches = $vals['expungedSearches'];
  302. }
  303. if (isset($vals['linkedNotebooks'])) {
  304. $this->linkedNotebooks = $vals['linkedNotebooks'];
  305. }
  306. if (isset($vals['expungedLinkedNotebooks'])) {
  307. $this->expungedLinkedNotebooks = $vals['expungedLinkedNotebooks'];
  308. }
  309. }
  310. }
  311. public function getName() {
  312. return 'SyncChunk';
  313. }
  314. public function read($input)
  315. {
  316. $xfer = 0;
  317. $fname = null;
  318. $ftype = 0;
  319. $fid = 0;
  320. $xfer += $input->readStructBegin($fname);
  321. while (true)
  322. {
  323. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  324. if ($ftype == \TType::STOP) {
  325. break;
  326. }
  327. switch ($fid)
  328. {
  329. case 1:
  330. if ($ftype == \TType::I64) {
  331. $xfer += $input->readI64($this->currentTime);
  332. } else {
  333. $xfer += $input->skip($ftype);
  334. }
  335. break;
  336. case 2:
  337. if ($ftype == \TType::I32) {
  338. $xfer += $input->readI32($this->chunkHighUSN);
  339. } else {
  340. $xfer += $input->skip($ftype);
  341. }
  342. break;
  343. case 3:
  344. if ($ftype == \TType::I32) {
  345. $xfer += $input->readI32($this->updateCount);
  346. } else {
  347. $xfer += $input->skip($ftype);
  348. }
  349. break;
  350. case 4:
  351. if ($ftype == \TType::LST) {
  352. $this->notes = array();
  353. $_size0 = 0;
  354. $_etype3 = 0;
  355. $xfer += $input->readListBegin($_etype3, $_size0);
  356. for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
  357. {
  358. $elem5 = null;
  359. $elem5 = new \EDAM\Types\Note();
  360. $xfer += $elem5->read($input);
  361. $this->notes []= $elem5;
  362. }
  363. $xfer += $input->readListEnd();
  364. } else {
  365. $xfer += $input->skip($ftype);
  366. }
  367. break;
  368. case 5:
  369. if ($ftype == \TType::LST) {
  370. $this->notebooks = array();
  371. $_size6 = 0;
  372. $_etype9 = 0;
  373. $xfer += $input->readListBegin($_etype9, $_size6);
  374. for ($_i10 = 0; $_i10 < $_size6; ++$_i10)
  375. {
  376. $elem11 = null;
  377. $elem11 = new \EDAM\Types\Notebook();
  378. $xfer += $elem11->read($input);
  379. $this->notebooks []= $elem11;
  380. }
  381. $xfer += $input->readListEnd();
  382. } else {
  383. $xfer += $input->skip($ftype);
  384. }
  385. break;
  386. case 6:
  387. if ($ftype == \TType::LST) {
  388. $this->tags = array();
  389. $_size12 = 0;
  390. $_etype15 = 0;
  391. $xfer += $input->readListBegin($_etype15, $_size12);
  392. for ($_i16 = 0; $_i16 < $_size12; ++$_i16)
  393. {
  394. $elem17 = null;
  395. $elem17 = new \EDAM\Types\Tag();
  396. $xfer += $elem17->read($input);
  397. $this->tags []= $elem17;
  398. }
  399. $xfer += $input->readListEnd();
  400. } else {
  401. $xfer += $input->skip($ftype);
  402. }
  403. break;
  404. case 7:
  405. if ($ftype == \TType::LST) {
  406. $this->searches = array();
  407. $_size18 = 0;
  408. $_etype21 = 0;
  409. $xfer += $input->readListBegin($_etype21, $_size18);
  410. for ($_i22 = 0; $_i22 < $_size18; ++$_i22)
  411. {
  412. $elem23 = null;
  413. $elem23 = new \EDAM\Types\SavedSearch();
  414. $xfer += $elem23->read($input);
  415. $this->searches []= $elem23;
  416. }
  417. $xfer += $input->readListEnd();
  418. } else {
  419. $xfer += $input->skip($ftype);
  420. }
  421. break;
  422. case 8:
  423. if ($ftype == \TType::LST) {
  424. $this->resources = array();
  425. $_size24 = 0;
  426. $_etype27 = 0;
  427. $xfer += $input->readListBegin($_etype27, $_size24);
  428. for ($_i28 = 0; $_i28 < $_size24; ++$_i28)
  429. {
  430. $elem29 = null;
  431. $elem29 = new \EDAM\Types\Resource();
  432. $xfer += $elem29->read($input);
  433. $this->resources []= $elem29;
  434. }
  435. $xfer += $input->readListEnd();
  436. } else {
  437. $xfer += $input->skip($ftype);
  438. }
  439. break;
  440. case 9:
  441. if ($ftype == \TType::LST) {
  442. $this->expungedNotes = array();
  443. $_size30 = 0;
  444. $_etype33 = 0;
  445. $xfer += $input->readListBegin($_etype33, $_size30);
  446. for ($_i34 = 0; $_i34 < $_size30; ++$_i34)
  447. {
  448. $elem35 = null;
  449. $xfer += $input->readString($elem35);
  450. $this->expungedNotes []= $elem35;
  451. }
  452. $xfer += $input->readListEnd();
  453. } else {
  454. $xfer += $input->skip($ftype);
  455. }
  456. break;
  457. case 10:
  458. if ($ftype == \TType::LST) {
  459. $this->expungedNotebooks = array();
  460. $_size36 = 0;
  461. $_etype39 = 0;
  462. $xfer += $input->readListBegin($_etype39, $_size36);
  463. for ($_i40 = 0; $_i40 < $_size36; ++$_i40)
  464. {
  465. $elem41 = null;
  466. $xfer += $input->readString($elem41);
  467. $this->expungedNotebooks []= $elem41;
  468. }
  469. $xfer += $input->readListEnd();
  470. } else {
  471. $xfer += $input->skip($ftype);
  472. }
  473. break;
  474. case 11:
  475. if ($ftype == \TType::LST) {
  476. $this->expungedTags = array();
  477. $_size42 = 0;
  478. $_etype45 = 0;
  479. $xfer += $input->readListBegin($_etype45, $_size42);
  480. for ($_i46 = 0; $_i46 < $_size42; ++$_i46)
  481. {
  482. $elem47 = null;
  483. $xfer += $input->readString($elem47);
  484. $this->expungedTags []= $elem47;
  485. }
  486. $xfer += $input->readListEnd();
  487. } else {
  488. $xfer += $input->skip($ftype);
  489. }
  490. break;
  491. case 12:
  492. if ($ftype == \TType::LST) {
  493. $this->expungedSearches = array();
  494. $_size48 = 0;
  495. $_etype51 = 0;
  496. $xfer += $input->readListBegin($_etype51, $_size48);
  497. for ($_i52 = 0; $_i52 < $_size48; ++$_i52)
  498. {
  499. $elem53 = null;
  500. $xfer += $input->readString($elem53);
  501. $this->expungedSearches []= $elem53;
  502. }
  503. $xfer += $input->readListEnd();
  504. } else {
  505. $xfer += $input->skip($ftype);
  506. }
  507. break;
  508. case 13:
  509. if ($ftype == \TType::LST) {
  510. $this->linkedNotebooks = array();
  511. $_size54 = 0;
  512. $_etype57 = 0;
  513. $xfer += $input->readListBegin($_etype57, $_size54);
  514. for ($_i58 = 0; $_i58 < $_size54; ++$_i58)
  515. {
  516. $elem59 = null;
  517. $elem59 = new \EDAM\Types\LinkedNotebook();
  518. $xfer += $elem59->read($input);
  519. $this->linkedNotebooks []= $elem59;
  520. }
  521. $xfer += $input->readListEnd();
  522. } else {
  523. $xfer += $input->skip($ftype);
  524. }
  525. break;
  526. case 14:
  527. if ($ftype == \TType::LST) {
  528. $this->expungedLinkedNotebooks = array();
  529. $_size60 = 0;
  530. $_etype63 = 0;
  531. $xfer += $input->readListBegin($_etype63, $_size60);
  532. for ($_i64 = 0; $_i64 < $_size60; ++$_i64)
  533. {
  534. $elem65 = null;
  535. $xfer += $input->readString($elem65);
  536. $this->expungedLinkedNotebooks []= $elem65;
  537. }
  538. $xfer += $input->readListEnd();
  539. } else {
  540. $xfer += $input->skip($ftype);
  541. }
  542. break;
  543. default:
  544. $xfer += $input->skip($ftype);
  545. break;
  546. }
  547. $xfer += $input->readFieldEnd();
  548. }
  549. $xfer += $input->readStructEnd();
  550. return $xfer;
  551. }
  552. public function write($output) {
  553. $xfer = 0;
  554. $xfer += $output->writeStructBegin('SyncChunk');
  555. if ($this->currentTime !== null) {
  556. $xfer += $output->writeFieldBegin('currentTime', \TType::I64, 1);
  557. $xfer += $output->writeI64($this->currentTime);
  558. $xfer += $output->writeFieldEnd();
  559. }
  560. if ($this->chunkHighUSN !== null) {
  561. $xfer += $output->writeFieldBegin('chunkHighUSN', \TType::I32, 2);
  562. $xfer += $output->writeI32($this->chunkHighUSN);
  563. $xfer += $output->writeFieldEnd();
  564. }
  565. if ($this->updateCount !== null) {
  566. $xfer += $output->writeFieldBegin('updateCount', \TType::I32, 3);
  567. $xfer += $output->writeI32($this->updateCount);
  568. $xfer += $output->writeFieldEnd();
  569. }
  570. if ($this->notes !== null) {
  571. if (!is_array($this->notes)) {
  572. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  573. }
  574. $xfer += $output->writeFieldBegin('notes', \TType::LST, 4);
  575. {
  576. $output->writeListBegin(\TType::STRUCT, count($this->notes));
  577. {
  578. foreach ($this->notes as $iter66)
  579. {
  580. $xfer += $iter66->write($output);
  581. }
  582. }
  583. $output->writeListEnd();
  584. }
  585. $xfer += $output->writeFieldEnd();
  586. }
  587. if ($this->notebooks !== null) {
  588. if (!is_array($this->notebooks)) {
  589. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  590. }
  591. $xfer += $output->writeFieldBegin('notebooks', \TType::LST, 5);
  592. {
  593. $output->writeListBegin(\TType::STRUCT, count($this->notebooks));
  594. {
  595. foreach ($this->notebooks as $iter67)
  596. {
  597. $xfer += $iter67->write($output);
  598. }
  599. }
  600. $output->writeListEnd();
  601. }
  602. $xfer += $output->writeFieldEnd();
  603. }
  604. if ($this->tags !== null) {
  605. if (!is_array($this->tags)) {
  606. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  607. }
  608. $xfer += $output->writeFieldBegin('tags', \TType::LST, 6);
  609. {
  610. $output->writeListBegin(\TType::STRUCT, count($this->tags));
  611. {
  612. foreach ($this->tags as $iter68)
  613. {
  614. $xfer += $iter68->write($output);
  615. }
  616. }
  617. $output->writeListEnd();
  618. }
  619. $xfer += $output->writeFieldEnd();
  620. }
  621. if ($this->searches !== null) {
  622. if (!is_array($this->searches)) {
  623. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  624. }
  625. $xfer += $output->writeFieldBegin('searches', \TType::LST, 7);
  626. {
  627. $output->writeListBegin(\TType::STRUCT, count($this->searches));
  628. {
  629. foreach ($this->searches as $iter69)
  630. {
  631. $xfer += $iter69->write($output);
  632. }
  633. }
  634. $output->writeListEnd();
  635. }
  636. $xfer += $output->writeFieldEnd();
  637. }
  638. if ($this->resources !== null) {
  639. if (!is_array($this->resources)) {
  640. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  641. }
  642. $xfer += $output->writeFieldBegin('resources', \TType::LST, 8);
  643. {
  644. $output->writeListBegin(\TType::STRUCT, count($this->resources));
  645. {
  646. foreach ($this->resources as $iter70)
  647. {
  648. $xfer += $iter70->write($output);
  649. }
  650. }
  651. $output->writeListEnd();
  652. }
  653. $xfer += $output->writeFieldEnd();
  654. }
  655. if ($this->expungedNotes !== null) {
  656. if (!is_array($this->expungedNotes)) {
  657. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  658. }
  659. $xfer += $output->writeFieldBegin('expungedNotes', \TType::LST, 9);
  660. {
  661. $output->writeListBegin(\TType::STRING, count($this->expungedNotes));
  662. {
  663. foreach ($this->expungedNotes as $iter71)
  664. {
  665. $xfer += $output->writeString($iter71);
  666. }
  667. }
  668. $output->writeListEnd();
  669. }
  670. $xfer += $output->writeFieldEnd();
  671. }
  672. if ($this->expungedNotebooks !== null) {
  673. if (!is_array($this->expungedNotebooks)) {
  674. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  675. }
  676. $xfer += $output->writeFieldBegin('expungedNotebooks', \TType::LST, 10);
  677. {
  678. $output->writeListBegin(\TType::STRING, count($this->expungedNotebooks));
  679. {
  680. foreach ($this->expungedNotebooks as $iter72)
  681. {
  682. $xfer += $output->writeString($iter72);
  683. }
  684. }
  685. $output->writeListEnd();
  686. }
  687. $xfer += $output->writeFieldEnd();
  688. }
  689. if ($this->expungedTags !== null) {
  690. if (!is_array($this->expungedTags)) {
  691. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  692. }
  693. $xfer += $output->writeFieldBegin('expungedTags', \TType::LST, 11);
  694. {
  695. $output->writeListBegin(\TType::STRING, count($this->expungedTags));
  696. {
  697. foreach ($this->expungedTags as $iter73)
  698. {
  699. $xfer += $output->writeString($iter73);
  700. }
  701. }
  702. $output->writeListEnd();
  703. }
  704. $xfer += $output->writeFieldEnd();
  705. }
  706. if ($this->expungedSearches !== null) {
  707. if (!is_array($this->expungedSearches)) {
  708. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  709. }
  710. $xfer += $output->writeFieldBegin('expungedSearches', \TType::LST, 12);
  711. {
  712. $output->writeListBegin(\TType::STRING, count($this->expungedSearches));
  713. {
  714. foreach ($this->expungedSearches as $iter74)
  715. {
  716. $xfer += $output->writeString($iter74);
  717. }
  718. }
  719. $output->writeListEnd();
  720. }
  721. $xfer += $output->writeFieldEnd();
  722. }
  723. if ($this->linkedNotebooks !== null) {
  724. if (!is_array($this->linkedNotebooks)) {
  725. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  726. }
  727. $xfer += $output->writeFieldBegin('linkedNotebooks', \TType::LST, 13);
  728. {
  729. $output->writeListBegin(\TType::STRUCT, count($this->linkedNotebooks));
  730. {
  731. foreach ($this->linkedNotebooks as $iter75)
  732. {
  733. $xfer += $iter75->write($output);
  734. }
  735. }
  736. $output->writeListEnd();
  737. }
  738. $xfer += $output->writeFieldEnd();
  739. }
  740. if ($this->expungedLinkedNotebooks !== null) {
  741. if (!is_array($this->expungedLinkedNotebooks)) {
  742. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  743. }
  744. $xfer += $output->writeFieldBegin('expungedLinkedNotebooks', \TType::LST, 14);
  745. {
  746. $output->writeListBegin(\TType::STRING, count($this->expungedLinkedNotebooks));
  747. {
  748. foreach ($this->expungedLinkedNotebooks as $iter76)
  749. {
  750. $xfer += $output->writeString($iter76);
  751. }
  752. }
  753. $output->writeListEnd();
  754. }
  755. $xfer += $output->writeFieldEnd();
  756. }
  757. $xfer += $output->writeFieldStop();
  758. $xfer += $output->writeStructEnd();
  759. return $xfer;
  760. }
  761. }
  762. class SyncChunkFilter {
  763. static $_TSPEC;
  764. public $includeNotes = null;
  765. public $includeNoteResources = null;
  766. public $includeNoteAttributes = null;
  767. public $includeNotebooks = null;
  768. public $includeTags = null;
  769. public $includeSearches = null;
  770. public $includeResources = null;
  771. public $includeLinkedNotebooks = null;
  772. public $includeExpunged = null;
  773. public $includeNoteApplicationDataFullMap = null;
  774. public $includeResourceApplicationDataFullMap = null;
  775. public $includeNoteResourceApplicationDataFullMap = null;
  776. public $requireNoteContentClass = null;
  777. public function __construct($vals=null) {
  778. if (!isset(self::$_TSPEC)) {
  779. self::$_TSPEC = array(
  780. 1 => array(
  781. 'var' => 'includeNotes',
  782. 'type' => \TType::BOOL,
  783. ),
  784. 2 => array(
  785. 'var' => 'includeNoteResources',
  786. 'type' => \TType::BOOL,
  787. ),
  788. 3 => array(
  789. 'var' => 'includeNoteAttributes',
  790. 'type' => \TType::BOOL,
  791. ),
  792. 4 => array(
  793. 'var' => 'includeNotebooks',
  794. 'type' => \TType::BOOL,
  795. ),
  796. 5 => array(
  797. 'var' => 'includeTags',
  798. 'type' => \TType::BOOL,
  799. ),
  800. 6 => array(
  801. 'var' => 'includeSearches',
  802. 'type' => \TType::BOOL,
  803. ),
  804. 7 => array(
  805. 'var' => 'includeResources',
  806. 'type' => \TType::BOOL,
  807. ),
  808. 8 => array(
  809. 'var' => 'includeLinkedNotebooks',
  810. 'type' => \TType::BOOL,
  811. ),
  812. 9 => array(
  813. 'var' => 'includeExpunged',
  814. 'type' => \TType::BOOL,
  815. ),
  816. 10 => array(
  817. 'var' => 'includeNoteApplicationDataFullMap',
  818. 'type' => \TType::BOOL,
  819. ),
  820. 12 => array(
  821. 'var' => 'includeResourceApplicationDataFullMap',
  822. 'type' => \TType::BOOL,
  823. ),
  824. 13 => array(
  825. 'var' => 'includeNoteResourceApplicationDataFullMap',
  826. 'type' => \TType::BOOL,
  827. ),
  828. 11 => array(
  829. 'var' => 'requireNoteContentClass',
  830. 'type' => \TType::STRING,
  831. ),
  832. );
  833. }
  834. if (is_array($vals)) {
  835. if (isset($vals['includeNotes'])) {
  836. $this->includeNotes = $vals['includeNotes'];
  837. }
  838. if (isset($vals['includeNoteResources'])) {
  839. $this->includeNoteResources = $vals['includeNoteResources'];
  840. }
  841. if (isset($vals['includeNoteAttributes'])) {
  842. $this->includeNoteAttributes = $vals['includeNoteAttributes'];
  843. }
  844. if (isset($vals['includeNotebooks'])) {
  845. $this->includeNotebooks = $vals['includeNotebooks'];
  846. }
  847. if (isset($vals['includeTags'])) {
  848. $this->includeTags = $vals['includeTags'];
  849. }
  850. if (isset($vals['includeSearches'])) {
  851. $this->includeSearches = $vals['includeSearches'];
  852. }
  853. if (isset($vals['includeResources'])) {
  854. $this->includeResources = $vals['includeResources'];
  855. }
  856. if (isset($vals['includeLinkedNotebooks'])) {
  857. $this->includeLinkedNotebooks = $vals['includeLinkedNotebooks'];
  858. }
  859. if (isset($vals['includeExpunged'])) {
  860. $this->includeExpunged = $vals['includeExpunged'];
  861. }
  862. if (isset($vals['includeNoteApplicationDataFullMap'])) {
  863. $this->includeNoteApplicationDataFullMap = $vals['includeNoteApplicationDataFullMap'];
  864. }
  865. if (isset($vals['includeResourceApplicationDataFullMap'])) {
  866. $this->includeResourceApplicationDataFullMap = $vals['includeResourceApplicationDataFullMap'];
  867. }
  868. if (isset($vals['includeNoteResourceApplicationDataFullMap'])) {
  869. $this->includeNoteResourceApplicationDataFullMap = $vals['includeNoteResourceApplicationDataFullMap'];
  870. }
  871. if (isset($vals['requireNoteContentClass'])) {
  872. $this->requireNoteContentClass = $vals['requireNoteContentClass'];
  873. }
  874. }
  875. }
  876. public function getName() {
  877. return 'SyncChunkFilter';
  878. }
  879. public function read($input)
  880. {
  881. $xfer = 0;
  882. $fname = null;
  883. $ftype = 0;
  884. $fid = 0;
  885. $xfer += $input->readStructBegin($fname);
  886. while (true)
  887. {
  888. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  889. if ($ftype == \TType::STOP) {
  890. break;
  891. }
  892. switch ($fid)
  893. {
  894. case 1:
  895. if ($ftype == \TType::BOOL) {
  896. $xfer += $input->readBool($this->includeNotes);
  897. } else {
  898. $xfer += $input->skip($ftype);
  899. }
  900. break;
  901. case 2:
  902. if ($ftype == \TType::BOOL) {
  903. $xfer += $input->readBool($this->includeNoteResources);
  904. } else {
  905. $xfer += $input->skip($ftype);
  906. }
  907. break;
  908. case 3:
  909. if ($ftype == \TType::BOOL) {
  910. $xfer += $input->readBool($this->includeNoteAttributes);
  911. } else {
  912. $xfer += $input->skip($ftype);
  913. }
  914. break;
  915. case 4:
  916. if ($ftype == \TType::BOOL) {
  917. $xfer += $input->readBool($this->includeNotebooks);
  918. } else {
  919. $xfer += $input->skip($ftype);
  920. }
  921. break;
  922. case 5:
  923. if ($ftype == \TType::BOOL) {
  924. $xfer += $input->readBool($this->includeTags);
  925. } else {
  926. $xfer += $input->skip($ftype);
  927. }
  928. break;
  929. case 6:
  930. if ($ftype == \TType::BOOL) {
  931. $xfer += $input->readBool($this->includeSearches);
  932. } else {
  933. $xfer += $input->skip($ftype);
  934. }
  935. break;
  936. case 7:
  937. if ($ftype == \TType::BOOL) {
  938. $xfer += $input->readBool($this->includeResources);
  939. } else {
  940. $xfer += $input->skip($ftype);
  941. }
  942. break;
  943. case 8:
  944. if ($ftype == \TType::BOOL) {
  945. $xfer += $input->readBool($this->includeLinkedNotebooks);
  946. } else {
  947. $xfer += $input->skip($ftype);
  948. }
  949. break;
  950. case 9:
  951. if ($ftype == \TType::BOOL) {
  952. $xfer += $input->readBool($this->includeExpunged);
  953. } else {
  954. $xfer += $input->skip($ftype);
  955. }
  956. break;
  957. case 10:
  958. if ($ftype == \TType::BOOL) {
  959. $xfer += $input->readBool($this->includeNoteApplicationDataFullMap);
  960. } else {
  961. $xfer += $input->skip($ftype);
  962. }
  963. break;
  964. case 12:
  965. if ($ftype == \TType::BOOL) {
  966. $xfer += $input->readBool($this->includeResourceApplicationDataFullMap);
  967. } else {
  968. $xfer += $input->skip($ftype);
  969. }
  970. break;
  971. case 13:
  972. if ($ftype == \TType::BOOL) {
  973. $xfer += $input->readBool($this->includeNoteResourceApplicationDataFullMap);
  974. } else {
  975. $xfer += $input->skip($ftype);
  976. }
  977. break;
  978. case 11:
  979. if ($ftype == \TType::STRING) {
  980. $xfer += $input->readString($this->requireNoteContentClass);
  981. } else {
  982. $xfer += $input->skip($ftype);
  983. }
  984. break;
  985. default:
  986. $xfer += $input->skip($ftype);
  987. break;
  988. }
  989. $xfer += $input->readFieldEnd();
  990. }
  991. $xfer += $input->readStructEnd();
  992. return $xfer;
  993. }
  994. public function write($output) {
  995. $xfer = 0;
  996. $xfer += $output->writeStructBegin('SyncChunkFilter');
  997. if ($this->includeNotes !== null) {
  998. $xfer += $output->writeFieldBegin('includeNotes', \TType::BOOL, 1);
  999. $xfer += $output->writeBool($this->includeNotes);
  1000. $xfer += $output->writeFieldEnd();
  1001. }
  1002. if ($this->includeNoteResources !== null) {
  1003. $xfer += $output->writeFieldBegin('includeNoteResources', \TType::BOOL, 2);
  1004. $xfer += $output->writeBool($this->includeNoteResources);
  1005. $xfer += $output->writeFieldEnd();
  1006. }
  1007. if ($this->includeNoteAttributes !== null) {
  1008. $xfer += $output->writeFieldBegin('includeNoteAttributes', \TType::BOOL, 3);
  1009. $xfer += $output->writeBool($this->includeNoteAttributes);
  1010. $xfer += $output->writeFieldEnd();
  1011. }
  1012. if ($this->includeNotebooks !== null) {
  1013. $xfer += $output->writeFieldBegin('includeNotebooks', \TType::BOOL, 4);
  1014. $xfer += $output->writeBool($this->includeNotebooks);
  1015. $xfer += $output->writeFieldEnd();
  1016. }
  1017. if ($this->includeTags !== null) {
  1018. $xfer += $output->writeFieldBegin('includeTags', \TType::BOOL, 5);
  1019. $xfer += $output->writeBool($this->includeTags);
  1020. $xfer += $output->writeFieldEnd();
  1021. }
  1022. if ($this->includeSearches !== null) {
  1023. $xfer += $output->writeFieldBegin('includeSearches', \TType::BOOL, 6);
  1024. $xfer += $output->writeBool($this->includeSearches);
  1025. $xfer += $output->writeFieldEnd();
  1026. }
  1027. if ($this->includeResources !== null) {
  1028. $xfer += $output->writeFieldBegin('includeResources', \TType::BOOL, 7);
  1029. $xfer += $output->writeBool($this->includeResources);
  1030. $xfer += $output->writeFieldEnd();
  1031. }
  1032. if ($this->includeLinkedNotebooks !== null) {
  1033. $xfer += $output->writeFieldBegin('includeLinkedNotebooks', \TType::BOOL, 8);
  1034. $xfer += $output->writeBool($this->includeLinkedNotebooks);
  1035. $xfer += $output->writeFieldEnd();
  1036. }
  1037. if ($this->includeExpunged !== null) {
  1038. $xfer += $output->writeFieldBegin('includeExpunged', \TType::BOOL, 9);
  1039. $xfer += $output->writeBool($this->includeExpunged);
  1040. $xfer += $output->writeFieldEnd();
  1041. }
  1042. if ($this->includeNoteApplicationDataFullMap !== null) {
  1043. $xfer += $output->writeFieldBegin('includeNoteApplicationDataFullMap', \TType::BOOL, 10);
  1044. $xfer += $output->writeBool($this->includeNoteApplicationDataFullMap);
  1045. $xfer += $output->writeFieldEnd();
  1046. }
  1047. if ($this->requireNoteContentClass !== null) {
  1048. $xfer += $output->writeFieldBegin('requireNoteContentClass', \TType::STRING, 11);
  1049. $xfer += $output->writeString($this->requireNoteContentClass);
  1050. $xfer += $output->writeFieldEnd();
  1051. }
  1052. if ($this->includeResourceApplicationDataFullMap !== null) {
  1053. $xfer += $output->writeFieldBegin('includeResourceApplicationDataFullMap', \TType::BOOL, 12);
  1054. $xfer += $output->writeBool($this->includeResourceApplicationDataFullMap);
  1055. $xfer += $output->writeFieldEnd();
  1056. }
  1057. if ($this->includeNoteResourceApplicationDataFullMap !== null) {
  1058. $xfer += $output->writeFieldBegin('includeNoteResourceApplicationDataFullMap', \TType::BOOL, 13);
  1059. $xfer += $output->writeBool($this->includeNoteResourceApplicationDataFullMap);
  1060. $xfer += $output->writeFieldEnd();
  1061. }
  1062. $xfer += $output->writeFieldStop();
  1063. $xfer += $output->writeStructEnd();
  1064. return $xfer;
  1065. }
  1066. }
  1067. class NoteFilter {
  1068. static $_TSPEC;
  1069. public $order = null;
  1070. public $ascending = null;
  1071. public $words = null;
  1072. public $notebookGuid = null;
  1073. public $tagGuids = null;
  1074. public $timeZone = null;
  1075. public $inactive = null;
  1076. public $emphasized = null;
  1077. public function __construct($vals=null) {
  1078. if (!isset(self::$_TSPEC)) {
  1079. self::$_TSPEC = array(
  1080. 1 => array(
  1081. 'var' => 'order',
  1082. 'type' => \TType::I32,
  1083. ),
  1084. 2 => array(
  1085. 'var' => 'ascending',
  1086. 'type' => \TType::BOOL,
  1087. ),
  1088. 3 => array(
  1089. 'var' => 'words',
  1090. 'type' => \TType::STRING,
  1091. ),
  1092. 4 => array(
  1093. 'var' => 'notebookGuid',
  1094. 'type' => \TType::STRING,
  1095. ),
  1096. 5 => array(
  1097. 'var' => 'tagGuids',
  1098. 'type' => \TType::LST,
  1099. 'etype' => \TType::STRING,
  1100. 'elem' => array(
  1101. 'type' => \TType::STRING,
  1102. ),
  1103. ),
  1104. 6 => array(
  1105. 'var' => 'timeZone',
  1106. 'type' => \TType::STRING,
  1107. ),
  1108. 7 => array(
  1109. 'var' => 'inactive',
  1110. 'type' => \TType::BOOL,
  1111. ),
  1112. 8 => array(
  1113. 'var' => 'emphasized',
  1114. 'type' => \TType::STRING,
  1115. ),
  1116. );
  1117. }
  1118. if (is_array($vals)) {
  1119. if (isset($vals['order'])) {
  1120. $this->order = $vals['order'];
  1121. }
  1122. if (isset($vals['ascending'])) {
  1123. $this->ascending = $vals['ascending'];
  1124. }
  1125. if (isset($vals['words'])) {
  1126. $this->words = $vals['words'];
  1127. }
  1128. if (isset($vals['notebookGuid'])) {
  1129. $this->notebookGuid = $vals['notebookGuid'];
  1130. }
  1131. if (isset($vals['tagGuids'])) {
  1132. $this->tagGuids = $vals['tagGuids'];
  1133. }
  1134. if (isset($vals['timeZone'])) {
  1135. $this->timeZone = $vals['timeZone'];
  1136. }
  1137. if (isset($vals['inactive'])) {
  1138. $this->inactive = $vals['inactive'];
  1139. }
  1140. if (isset($vals['emphasized'])) {
  1141. $this->emphasized = $vals['emphasized'];
  1142. }
  1143. }
  1144. }
  1145. public function getName() {
  1146. return 'NoteFilter';
  1147. }
  1148. public function read($input)
  1149. {
  1150. $xfer = 0;
  1151. $fname = null;
  1152. $ftype = 0;
  1153. $fid = 0;
  1154. $xfer += $input->readStructBegin($fname);
  1155. while (true)
  1156. {
  1157. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  1158. if ($ftype == \TType::STOP) {
  1159. break;
  1160. }
  1161. switch ($fid)
  1162. {
  1163. case 1:
  1164. if ($ftype == \TType::I32) {
  1165. $xfer += $input->readI32($this->order);
  1166. } else {
  1167. $xfer += $input->skip($ftype);
  1168. }
  1169. break;
  1170. case 2:
  1171. if ($ftype == \TType::BOOL) {
  1172. $xfer += $input->readBool($this->ascending);
  1173. } else {
  1174. $xfer += $input->skip($ftype);
  1175. }
  1176. break;
  1177. case 3:
  1178. if ($ftype == \TType::STRING) {
  1179. $xfer += $input->readString($this->words);
  1180. } else {
  1181. $xfer += $input->skip($ftype);
  1182. }
  1183. break;
  1184. case 4:
  1185. if ($ftype == \TType::STRING) {
  1186. $xfer += $input->readString($this->notebookGuid);
  1187. } else {
  1188. $xfer += $input->skip($ftype);
  1189. }
  1190. break;
  1191. case 5:
  1192. if ($ftype == \TType::LST) {
  1193. $this->tagGuids = array();
  1194. $_size77 = 0;
  1195. $_etype80 = 0;
  1196. $xfer += $input->readListBegin($_etype80, $_size77);
  1197. for ($_i81 = 0; $_i81 < $_size77; ++$_i81)
  1198. {
  1199. $elem82 = null;
  1200. $xfer += $input->readString($elem82);
  1201. $this->tagGuids []= $elem82;
  1202. }
  1203. $xfer += $input->readListEnd();
  1204. } else {
  1205. $xfer += $input->skip($ftype);
  1206. }
  1207. break;
  1208. case 6:
  1209. if ($ftype == \TType::STRING) {
  1210. $xfer += $input->readString($this->timeZone);
  1211. } else {
  1212. $xfer += $input->skip($ftype);
  1213. }
  1214. break;
  1215. case 7:
  1216. if ($ftype == \TType::BOOL) {
  1217. $xfer += $input->readBool($this->inactive);
  1218. } else {
  1219. $xfer += $input->skip($ftype);
  1220. }
  1221. break;
  1222. case 8:
  1223. if ($ftype == \TType::STRING) {
  1224. $xfer += $input->readString($this->emphasized);
  1225. } else {
  1226. $xfer += $input->skip($ftype);
  1227. }
  1228. break;
  1229. default:
  1230. $xfer += $input->skip($ftype);
  1231. break;
  1232. }
  1233. $xfer += $input->readFieldEnd();
  1234. }
  1235. $xfer += $input->readStructEnd();
  1236. return $xfer;
  1237. }
  1238. public function write($output) {
  1239. $xfer = 0;
  1240. $xfer += $output->writeStructBegin('NoteFilter');
  1241. if ($this->order !== null) {
  1242. $xfer += $output->writeFieldBegin('order', \TType::I32, 1);
  1243. $xfer += $output->writeI32($this->order);
  1244. $xfer += $output->writeFieldEnd();
  1245. }
  1246. if ($this->ascending !== null) {
  1247. $xfer += $output->writeFieldBegin('ascending', \TType::BOOL, 2);
  1248. $xfer += $output->writeBool($this->ascending);
  1249. $xfer += $output->writeFieldEnd();
  1250. }
  1251. if ($this->words !== null) {
  1252. $xfer += $output->writeFieldBegin('words', \TType::STRING, 3);
  1253. $xfer += $output->writeString($this->words);
  1254. $xfer += $output->writeFieldEnd();
  1255. }
  1256. if ($this->notebookGuid !== null) {
  1257. $xfer += $output->writeFieldBegin('notebookGuid', \TType::STRING, 4);
  1258. $xfer += $output->writeString($this->notebookGuid);
  1259. $xfer += $output->writeFieldEnd();
  1260. }
  1261. if ($this->tagGuids !== null) {
  1262. if (!is_array($this->tagGuids)) {
  1263. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  1264. }
  1265. $xfer += $output->writeFieldBegin('tagGuids', \TType::LST, 5);
  1266. {
  1267. $output->writeListBegin(\TType::STRING, count($this->tagGuids));
  1268. {
  1269. foreach ($this->tagGuids as $iter83)
  1270. {
  1271. $xfer += $output->writeString($iter83);
  1272. }
  1273. }
  1274. $output->writeListEnd();
  1275. }
  1276. $xfer += $output->writeFieldEnd();
  1277. }
  1278. if ($this->timeZone !== null) {
  1279. $xfer += $output->writeFieldBegin('timeZone', \TType::STRING, 6);
  1280. $xfer += $output->writeString($this->timeZone);
  1281. $xfer += $output->writeFieldEnd();
  1282. }
  1283. if ($this->inactive !== null) {
  1284. $xfer += $output->writeFieldBegin('inactive', \TType::BOOL, 7);
  1285. $xfer += $output->writeBool($this->inactive);
  1286. $xfer += $output->writeFieldEnd();
  1287. }
  1288. if ($this->emphasized !== null) {
  1289. $xfer += $output->writeFieldBegin('emphasized', \TType::STRING, 8);
  1290. $xfer += $output->writeString($this->emphasized);
  1291. $xfer += $output->writeFieldEnd();
  1292. }
  1293. $xfer += $output->writeFieldStop();
  1294. $xfer += $output->writeStructEnd();
  1295. return $xfer;
  1296. }
  1297. }
  1298. class NoteList {
  1299. static $_TSPEC;
  1300. public $startIndex = null;
  1301. public $totalNotes = null;
  1302. public $notes = null;
  1303. public $stoppedWords = null;
  1304. public $searchedWords = null;
  1305. public $updateCount = null;
  1306. public function __construct($vals=null) {
  1307. if (!isset(self::$_TSPEC)) {
  1308. self::$_TSPEC = array(
  1309. 1 => array(
  1310. 'var' => 'startIndex',
  1311. 'type' => \TType::I32,
  1312. ),
  1313. 2 => array(
  1314. 'var' => 'totalNotes',
  1315. 'type' => \TType::I32,
  1316. ),
  1317. 3 => array(
  1318. 'var' => 'notes',
  1319. 'type' => \TType::LST,
  1320. 'etype' => \TType::STRUCT,
  1321. 'elem' => array(
  1322. 'type' => \TType::STRUCT,
  1323. 'class' => '\EDAM\Types\Note',
  1324. ),
  1325. ),
  1326. 4 => array(
  1327. 'var' => 'stoppedWords',
  1328. 'type' => \TType::LST,
  1329. 'etype' => \TType::STRING,
  1330. 'elem' => array(
  1331. 'type' => \TType::STRING,
  1332. ),
  1333. ),
  1334. 5 => array(
  1335. 'var' => 'searchedWords',
  1336. 'type' => \TType::LST,
  1337. 'etype' => \TType::STRING,
  1338. 'elem' => array(
  1339. 'type' => \TType::STRING,
  1340. ),
  1341. ),
  1342. 6 => array(
  1343. 'var' => 'updateCount',
  1344. 'type' => \TType::I32,
  1345. ),
  1346. );
  1347. }
  1348. if (is_array($vals)) {
  1349. if (isset($vals['startIndex'])) {
  1350. $this->startIndex = $vals['startIndex'];
  1351. }
  1352. if (isset($vals['totalNotes'])) {
  1353. $this->totalNotes = $vals['totalNotes'];
  1354. }
  1355. if (isset($vals['notes'])) {
  1356. $this->notes = $vals['notes'];
  1357. }
  1358. if (isset($vals['stoppedWords'])) {
  1359. $this->stoppedWords = $vals['stoppedWords'];
  1360. }
  1361. if (isset($vals['searchedWords'])) {
  1362. $this->searchedWords = $vals['searchedWords'];
  1363. }
  1364. if (isset($vals['updateCount'])) {
  1365. $this->updateCount = $vals['updateCount'];
  1366. }
  1367. }
  1368. }
  1369. public function getName() {
  1370. return 'NoteList';
  1371. }
  1372. public function read($input)
  1373. {
  1374. $xfer = 0;
  1375. $fname = null;
  1376. $ftype = 0;
  1377. $fid = 0;
  1378. $xfer += $input->readStructBegin($fname);
  1379. while (true)
  1380. {
  1381. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  1382. if ($ftype == \TType::STOP) {
  1383. break;
  1384. }
  1385. switch ($fid)
  1386. {
  1387. case 1:
  1388. if ($ftype == \TType::I32) {
  1389. $xfer += $input->readI32($this->startIndex);
  1390. } else {
  1391. $xfer += $input->skip($ftype);
  1392. }
  1393. break;
  1394. case 2:
  1395. if ($ftype == \TType::I32) {
  1396. $xfer += $input->readI32($this->totalNotes);
  1397. } else {
  1398. $xfer += $input->skip($ftype);
  1399. }
  1400. break;
  1401. case 3:
  1402. if ($ftype == \TType::LST) {
  1403. $this->notes = array();
  1404. $_size84 = 0;
  1405. $_etype87 = 0;
  1406. $xfer += $input->readListBegin($_etype87, $_size84);
  1407. for ($_i88 = 0; $_i88 < $_size84; ++$_i88)
  1408. {
  1409. $elem89 = null;
  1410. $elem89 = new \EDAM\Types\Note();
  1411. $xfer += $elem89->read($input);
  1412. $this->notes []= $elem89;
  1413. }
  1414. $xfer += $input->readListEnd();
  1415. } else {
  1416. $xfer += $input->skip($ftype);
  1417. }
  1418. break;
  1419. case 4:
  1420. if ($ftype == \TType::LST) {
  1421. $this->stoppedWords = array();
  1422. $_size90 = 0;
  1423. $_etype93 = 0;
  1424. $xfer += $input->readListBegin($_etype93, $_size90);
  1425. for ($_i94 = 0; $_i94 < $_size90; ++$_i94)
  1426. {
  1427. $elem95 = null;
  1428. $xfer += $input->readString($elem95);
  1429. $this->stoppedWords []= $elem95;
  1430. }
  1431. $xfer += $input->readListEnd();
  1432. } else {
  1433. $xfer += $input->skip($ftype);
  1434. }
  1435. break;
  1436. case 5:
  1437. if ($ftype == \TType::LST) {
  1438. $this->searchedWords = array();
  1439. $_size96 = 0;
  1440. $_etype99 = 0;
  1441. $xfer += $input->readListBegin($_etype99, $_size96);
  1442. for ($_i100 = 0; $_i100 < $_size96; ++$_i100)
  1443. {
  1444. $elem101 = null;
  1445. $xfer += $input->readString($elem101);
  1446. $this->searchedWords []= $elem101;
  1447. }
  1448. $xfer += $input->readListEnd();
  1449. } else {
  1450. $xfer += $input->skip($ftype);
  1451. }
  1452. break;
  1453. case 6:
  1454. if ($ftype == \TType::I32) {
  1455. $xfer += $input->readI32($this->updateCount);
  1456. } else {
  1457. $xfer += $input->skip($ftype);
  1458. }
  1459. break;
  1460. default:
  1461. $xfer += $input->skip($ftype);
  1462. break;
  1463. }
  1464. $xfer += $input->readFieldEnd();
  1465. }
  1466. $xfer += $input->readStructEnd();
  1467. return $xfer;
  1468. }
  1469. public function write($output) {
  1470. $xfer = 0;
  1471. $xfer += $output->writeStructBegin('NoteList');
  1472. if ($this->startIndex !== null) {
  1473. $xfer += $output->writeFieldBegin('startIndex', \TType::I32, 1);
  1474. $xfer += $output->writeI32($this->startIndex);
  1475. $xfer += $output->writeFieldEnd();
  1476. }
  1477. if ($this->totalNotes !== null) {
  1478. $xfer += $output->writeFieldBegin('totalNotes', \TType::I32, 2);
  1479. $xfer += $output->writeI32($this->totalNotes);
  1480. $xfer += $output->writeFieldEnd();
  1481. }
  1482. if ($this->notes !== null) {
  1483. if (!is_array($this->notes)) {
  1484. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  1485. }
  1486. $xfer += $output->writeFieldBegin('notes', \TType::LST, 3);
  1487. {
  1488. $output->writeListBegin(\TType::STRUCT, count($this->notes));
  1489. {
  1490. foreach ($this->notes as $iter102)
  1491. {
  1492. $xfer += $iter102->write($output);
  1493. }
  1494. }
  1495. $output->writeListEnd();
  1496. }
  1497. $xfer += $output->writeFieldEnd();
  1498. }
  1499. if ($this->stoppedWords !== null) {
  1500. if (!is_array($this->stoppedWords)) {
  1501. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  1502. }
  1503. $xfer += $output->writeFieldBegin('stoppedWords', \TType::LST, 4);
  1504. {
  1505. $output->writeListBegin(\TType::STRING, count($this->stoppedWords));
  1506. {
  1507. foreach ($this->stoppedWords as $iter103)
  1508. {
  1509. $xfer += $output->writeString($iter103);
  1510. }
  1511. }
  1512. $output->writeListEnd();
  1513. }
  1514. $xfer += $output->writeFieldEnd();
  1515. }
  1516. if ($this->searchedWords !== null) {
  1517. if (!is_array($this->searchedWords)) {
  1518. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  1519. }
  1520. $xfer += $output->writeFieldBegin('searchedWords', \TType::LST, 5);
  1521. {
  1522. $output->writeListBegin(\TType::STRING, count($this->searchedWords));
  1523. {
  1524. foreach ($this->searchedWords as $iter104)
  1525. {
  1526. $xfer += $output->writeString($iter104);
  1527. }
  1528. }
  1529. $output->writeListEnd();
  1530. }
  1531. $xfer += $output->writeFieldEnd();
  1532. }
  1533. if ($this->updateCount !== null) {
  1534. $xfer += $output->writeFieldBegin('updateCount', \TType::I32, 6);
  1535. $xfer += $output->writeI32($this->updateCount);
  1536. $xfer += $output->writeFieldEnd();
  1537. }
  1538. $xfer += $output->writeFieldStop();
  1539. $xfer += $output->writeStructEnd();
  1540. return $xfer;
  1541. }
  1542. }
  1543. class NoteMetadata {
  1544. static $_TSPEC;
  1545. public $guid = null;
  1546. public $title = null;
  1547. public $contentLength = null;
  1548. public $created = null;
  1549. public $updated = null;
  1550. public $updateSequenceNum = null;
  1551. public $notebookGuid = null;
  1552. public $tagGuids = null;
  1553. public $attributes = null;
  1554. public $largestResourceMime = null;
  1555. public $largestResourceSize = null;
  1556. public function __construct($vals=null) {
  1557. if (!isset(self::$_TSPEC)) {
  1558. self::$_TSPEC = array(
  1559. 1 => array(
  1560. 'var' => 'guid',
  1561. 'type' => \TType::STRING,
  1562. ),
  1563. 2 => array(
  1564. 'var' => 'title',
  1565. 'type' => \TType::STRING,
  1566. ),
  1567. 5 => array(
  1568. 'var' => 'contentLength',
  1569. 'type' => \TType::I32,
  1570. ),
  1571. 6 => array(
  1572. 'var' => 'created',
  1573. 'type' => \TType::I64,
  1574. ),
  1575. 7 => array(
  1576. 'var' => 'updated',
  1577. 'type' => \TType::I64,
  1578. ),
  1579. 10 => array(
  1580. 'var' => 'updateSequenceNum',
  1581. 'type' => \TType::I32,
  1582. ),
  1583. 11 => array(
  1584. 'var' => 'notebookGuid',
  1585. 'type' => \TType::STRING,
  1586. ),
  1587. 12 => array(
  1588. 'var' => 'tagGuids',
  1589. 'type' => \TType::LST,
  1590. 'etype' => \TType::STRING,
  1591. 'elem' => array(
  1592. 'type' => \TType::STRING,
  1593. ),
  1594. ),
  1595. 14 => array(
  1596. 'var' => 'attributes',
  1597. 'type' => \TType::STRUCT,
  1598. 'class' => '\EDAM\Types\NoteAttributes',
  1599. ),
  1600. 20 => array(
  1601. 'var' => 'largestResourceMime',
  1602. 'type' => \TType::STRING,
  1603. ),
  1604. 21 => array(
  1605. 'var' => 'largestResourceSize',
  1606. 'type' => \TType::I32,
  1607. ),
  1608. );
  1609. }
  1610. if (is_array($vals)) {
  1611. if (isset($vals['guid'])) {
  1612. $this->guid = $vals['guid'];
  1613. }
  1614. if (isset($vals['title'])) {
  1615. $this->title = $vals['title'];
  1616. }
  1617. if (isset($vals['contentLength'])) {
  1618. $this->contentLength = $vals['contentLength'];
  1619. }
  1620. if (isset($vals['created'])) {
  1621. $this->created = $vals['created'];
  1622. }
  1623. if (isset($vals['updated'])) {
  1624. $this->updated = $vals['updated'];
  1625. }
  1626. if (isset($vals['updateSequenceNum'])) {
  1627. $this->updateSequenceNum = $vals['updateSequenceNum'];
  1628. }
  1629. if (isset($vals['notebookGuid'])) {
  1630. $this->notebookGuid = $vals['notebookGuid'];
  1631. }
  1632. if (isset($vals['tagGuids'])) {
  1633. $this->tagGuids = $vals['tagGuids'];
  1634. }
  1635. if (isset($vals['attributes'])) {
  1636. $this->attributes = $vals['attributes'];
  1637. }
  1638. if (isset($vals['largestResourceMime'])) {
  1639. $this->largestResourceMime = $vals['largestResourceMime'];
  1640. }
  1641. if (isset($vals['largestResourceSize'])) {
  1642. $this->largestResourceSize = $vals['largestResourceSize'];
  1643. }
  1644. }
  1645. }
  1646. public function getName() {
  1647. return 'NoteMetadata';
  1648. }
  1649. public function read($input)
  1650. {
  1651. $xfer = 0;
  1652. $fname = null;
  1653. $ftype = 0;
  1654. $fid = 0;
  1655. $xfer += $input->readStructBegin($fname);
  1656. while (true)
  1657. {
  1658. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  1659. if ($ftype == \TType::STOP) {
  1660. break;
  1661. }
  1662. switch ($fid)
  1663. {
  1664. case 1:
  1665. if ($ftype == \TType::STRING) {
  1666. $xfer += $input->readString($this->guid);
  1667. } else {
  1668. $xfer += $input->skip($ftype);
  1669. }
  1670. break;
  1671. case 2:
  1672. if ($ftype == \TType::STRING) {
  1673. $xfer += $input->readString($this->title);
  1674. } else {
  1675. $xfer += $input->skip($ftype);
  1676. }
  1677. break;
  1678. case 5:
  1679. if ($ftype == \TType::I32) {
  1680. $xfer += $input->readI32($this->contentLength);
  1681. } else {
  1682. $xfer += $input->skip($ftype);
  1683. }
  1684. break;
  1685. case 6:
  1686. if ($ftype == \TType::I64) {
  1687. $xfer += $input->readI64($this->created);
  1688. } else {
  1689. $xfer += $input->skip($ftype);
  1690. }
  1691. break;
  1692. case 7:
  1693. if ($ftype == \TType::I64) {
  1694. $xfer += $input->readI64($this->updated);
  1695. } else {
  1696. $xfer += $input->skip($ftype);
  1697. }
  1698. break;
  1699. case 10:
  1700. if ($ftype == \TType::I32) {
  1701. $xfer += $input->readI32($this->updateSequenceNum);
  1702. } else {
  1703. $xfer += $input->skip($ftype);
  1704. }
  1705. break;
  1706. case 11:
  1707. if ($ftype == \TType::STRING) {
  1708. $xfer += $input->readString($this->notebookGuid);
  1709. } else {
  1710. $xfer += $input->skip($ftype);
  1711. }
  1712. break;
  1713. case 12:
  1714. if ($ftype == \TType::LST) {
  1715. $this->tagGuids = array();
  1716. $_size105 = 0;
  1717. $_etype108 = 0;
  1718. $xfer += $input->readListBegin($_etype108, $_size105);
  1719. for ($_i109 = 0; $_i109 < $_size105; ++$_i109)
  1720. {
  1721. $elem110 = null;
  1722. $xfer += $input->readString($elem110);
  1723. $this->tagGuids []= $elem110;
  1724. }
  1725. $xfer += $input->readListEnd();
  1726. } else {
  1727. $xfer += $input->skip($ftype);
  1728. }
  1729. break;
  1730. case 14:
  1731. if ($ftype == \TType::STRUCT) {
  1732. $this->attributes = new \EDAM\Types\NoteAttributes();
  1733. $xfer += $this->attributes->read($input);
  1734. } else {
  1735. $xfer += $input->skip($ftype);
  1736. }
  1737. break;
  1738. case 20:
  1739. if ($ftype == \TType::STRING) {
  1740. $xfer += $input->readString($this->largestResourceMime);
  1741. } else {
  1742. $xfer += $input->skip($ftype);
  1743. }
  1744. break;
  1745. case 21:
  1746. if ($ftype == \TType::I32) {
  1747. $xfer += $input->readI32($this->largestResourceSize);
  1748. } else {
  1749. $xfer += $input->skip($ftype);
  1750. }
  1751. break;
  1752. default:
  1753. $xfer += $input->skip($ftype);
  1754. break;
  1755. }
  1756. $xfer += $input->readFieldEnd();
  1757. }
  1758. $xfer += $input->readStructEnd();
  1759. return $xfer;
  1760. }
  1761. public function write($output) {
  1762. $xfer = 0;
  1763. $xfer += $output->writeStructBegin('NoteMetadata');
  1764. if ($this->guid !== null) {
  1765. $xfer += $output->writeFieldBegin('guid', \TType::STRING, 1);
  1766. $xfer += $output->writeString($this->guid);
  1767. $xfer += $output->writeFieldEnd();
  1768. }
  1769. if ($this->title !== null) {
  1770. $xfer += $output->writeFieldBegin('title', \TType::STRING, 2);
  1771. $xfer += $output->writeString($this->title);
  1772. $xfer += $output->writeFieldEnd();
  1773. }
  1774. if ($this->contentLength !== null) {
  1775. $xfer += $output->writeFieldBegin('contentLength', \TType::I32, 5);
  1776. $xfer += $output->writeI32($this->contentLength);
  1777. $xfer += $output->writeFieldEnd();
  1778. }
  1779. if ($this->created !== null) {
  1780. $xfer += $output->writeFieldBegin('created', \TType::I64, 6);
  1781. $xfer += $output->writeI64($this->created);
  1782. $xfer += $output->writeFieldEnd();
  1783. }
  1784. if ($this->updated !== null) {
  1785. $xfer += $output->writeFieldBegin('updated', \TType::I64, 7);
  1786. $xfer += $output->writeI64($this->updated);
  1787. $xfer += $output->writeFieldEnd();
  1788. }
  1789. if ($this->updateSequenceNum !== null) {
  1790. $xfer += $output->writeFieldBegin('updateSequenceNum', \TType::I32, 10);
  1791. $xfer += $output->writeI32($this->updateSequenceNum);
  1792. $xfer += $output->writeFieldEnd();
  1793. }
  1794. if ($this->notebookGuid !== null) {
  1795. $xfer += $output->writeFieldBegin('notebookGuid', \TType::STRING, 11);
  1796. $xfer += $output->writeString($this->notebookGuid);
  1797. $xfer += $output->writeFieldEnd();
  1798. }
  1799. if ($this->tagGuids !== null) {
  1800. if (!is_array($this->tagGuids)) {
  1801. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  1802. }
  1803. $xfer += $output->writeFieldBegin('tagGuids', \TType::LST, 12);
  1804. {
  1805. $output->writeListBegin(\TType::STRING, count($this->tagGuids));
  1806. {
  1807. foreach ($this->tagGuids as $iter111)
  1808. {
  1809. $xfer += $output->writeString($iter111);
  1810. }
  1811. }
  1812. $output->writeListEnd();
  1813. }
  1814. $xfer += $output->writeFieldEnd();
  1815. }
  1816. if ($this->attributes !== null) {
  1817. if (!is_object($this->attributes)) {
  1818. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  1819. }
  1820. $xfer += $output->writeFieldBegin('attributes', \TType::STRUCT, 14);
  1821. $xfer += $this->attributes->write($output);
  1822. $xfer += $output->writeFieldEnd();
  1823. }
  1824. if ($this->largestResourceMime !== null) {
  1825. $xfer += $output->writeFieldBegin('largestResourceMime', \TType::STRING, 20);
  1826. $xfer += $output->writeString($this->largestResourceMime);
  1827. $xfer += $output->writeFieldEnd();
  1828. }
  1829. if ($this->largestResourceSize !== null) {
  1830. $xfer += $output->writeFieldBegin('largestResourceSize', \TType::I32, 21);
  1831. $xfer += $output->writeI32($this->largestResourceSize);
  1832. $xfer += $output->writeFieldEnd();
  1833. }
  1834. $xfer += $output->writeFieldStop();
  1835. $xfer += $output->writeStructEnd();
  1836. return $xfer;
  1837. }
  1838. }
  1839. class NotesMetadataList {
  1840. static $_TSPEC;
  1841. public $startIndex = null;
  1842. public $totalNotes = null;
  1843. public $notes = null;
  1844. public $stoppedWords = null;
  1845. public $searchedWords = null;
  1846. public $updateCount = null;
  1847. public function __construct($vals=null) {
  1848. if (!isset(self::$_TSPEC)) {
  1849. self::$_TSPEC = array(
  1850. 1 => array(
  1851. 'var' => 'startIndex',
  1852. 'type' => \TType::I32,
  1853. ),
  1854. 2 => array(
  1855. 'var' => 'totalNotes',
  1856. 'type' => \TType::I32,
  1857. ),
  1858. 3 => array(
  1859. 'var' => 'notes',
  1860. 'type' => \TType::LST,
  1861. 'etype' => \TType::STRUCT,
  1862. 'elem' => array(
  1863. 'type' => \TType::STRUCT,
  1864. 'class' => '\EDAM\NoteStore\NoteMetadata',
  1865. ),
  1866. ),
  1867. 4 => array(
  1868. 'var' => 'stoppedWords',
  1869. 'type' => \TType::LST,
  1870. 'etype' => \TType::STRING,
  1871. 'elem' => array(
  1872. 'type' => \TType::STRING,
  1873. ),
  1874. ),
  1875. 5 => array(
  1876. 'var' => 'searchedWords',
  1877. 'type' => \TType::LST,
  1878. 'etype' => \TType::STRING,
  1879. 'elem' => array(
  1880. 'type' => \TType::STRING,
  1881. ),
  1882. ),
  1883. 6 => array(
  1884. 'var' => 'updateCount',
  1885. 'type' => \TType::I32,
  1886. ),
  1887. );
  1888. }
  1889. if (is_array($vals)) {
  1890. if (isset($vals['startIndex'])) {
  1891. $this->startIndex = $vals['startIndex'];
  1892. }
  1893. if (isset($vals['totalNotes'])) {
  1894. $this->totalNotes = $vals['totalNotes'];
  1895. }
  1896. if (isset($vals['notes'])) {
  1897. $this->notes = $vals['notes'];
  1898. }
  1899. if (isset($vals['stoppedWords'])) {
  1900. $this->stoppedWords = $vals['stoppedWords'];
  1901. }
  1902. if (isset($vals['searchedWords'])) {
  1903. $this->searchedWords = $vals['searchedWords'];
  1904. }
  1905. if (isset($vals['updateCount'])) {
  1906. $this->updateCount = $vals['updateCount'];
  1907. }
  1908. }
  1909. }
  1910. public function getName() {
  1911. return 'NotesMetadataList';
  1912. }
  1913. public function read($input)
  1914. {
  1915. $xfer = 0;
  1916. $fname = null;
  1917. $ftype = 0;
  1918. $fid = 0;
  1919. $xfer += $input->readStructBegin($fname);
  1920. while (true)
  1921. {
  1922. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  1923. if ($ftype == \TType::STOP) {
  1924. break;
  1925. }
  1926. switch ($fid)
  1927. {
  1928. case 1:
  1929. if ($ftype == \TType::I32) {
  1930. $xfer += $input->readI32($this->startIndex);
  1931. } else {
  1932. $xfer += $input->skip($ftype);
  1933. }
  1934. break;
  1935. case 2:
  1936. if ($ftype == \TType::I32) {
  1937. $xfer += $input->readI32($this->totalNotes);
  1938. } else {
  1939. $xfer += $input->skip($ftype);
  1940. }
  1941. break;
  1942. case 3:
  1943. if ($ftype == \TType::LST) {
  1944. $this->notes = array();
  1945. $_size112 = 0;
  1946. $_etype115 = 0;
  1947. $xfer += $input->readListBegin($_etype115, $_size112);
  1948. for ($_i116 = 0; $_i116 < $_size112; ++$_i116)
  1949. {
  1950. $elem117 = null;
  1951. $elem117 = new \EDAM\NoteStore\NoteMetadata();
  1952. $xfer += $elem117->read($input);
  1953. $this->notes []= $elem117;
  1954. }
  1955. $xfer += $input->readListEnd();
  1956. } else {
  1957. $xfer += $input->skip($ftype);
  1958. }
  1959. break;
  1960. case 4:
  1961. if ($ftype == \TType::LST) {
  1962. $this->stoppedWords = array();
  1963. $_size118 = 0;
  1964. $_etype121 = 0;
  1965. $xfer += $input->readListBegin($_etype121, $_size118);
  1966. for ($_i122 = 0; $_i122 < $_size118; ++$_i122)
  1967. {
  1968. $elem123 = null;
  1969. $xfer += $input->readString($elem123);
  1970. $this->stoppedWords []= $elem123;
  1971. }
  1972. $xfer += $input->readListEnd();
  1973. } else {
  1974. $xfer += $input->skip($ftype);
  1975. }
  1976. break;
  1977. case 5:
  1978. if ($ftype == \TType::LST) {
  1979. $this->searchedWords = array();
  1980. $_size124 = 0;
  1981. $_etype127 = 0;
  1982. $xfer += $input->readListBegin($_etype127, $_size124);
  1983. for ($_i128 = 0; $_i128 < $_size124; ++$_i128)
  1984. {
  1985. $elem129 = null;
  1986. $xfer += $input->readString($elem129);
  1987. $this->searchedWords []= $elem129;
  1988. }
  1989. $xfer += $input->readListEnd();
  1990. } else {
  1991. $xfer += $input->skip($ftype);
  1992. }
  1993. break;
  1994. case 6:
  1995. if ($ftype == \TType::I32) {
  1996. $xfer += $input->readI32($this->updateCount);
  1997. } else {
  1998. $xfer += $input->skip($ftype);
  1999. }
  2000. break;
  2001. default:
  2002. $xfer += $input->skip($ftype);
  2003. break;
  2004. }
  2005. $xfer += $input->readFieldEnd();
  2006. }
  2007. $xfer += $input->readStructEnd();
  2008. return $xfer;
  2009. }
  2010. public function write($output) {
  2011. $xfer = 0;
  2012. $xfer += $output->writeStructBegin('NotesMetadataList');
  2013. if ($this->startIndex !== null) {
  2014. $xfer += $output->writeFieldBegin('startIndex', \TType::I32, 1);
  2015. $xfer += $output->writeI32($this->startIndex);
  2016. $xfer += $output->writeFieldEnd();
  2017. }
  2018. if ($this->totalNotes !== null) {
  2019. $xfer += $output->writeFieldBegin('totalNotes', \TType::I32, 2);
  2020. $xfer += $output->writeI32($this->totalNotes);
  2021. $xfer += $output->writeFieldEnd();
  2022. }
  2023. if ($this->notes !== null) {
  2024. if (!is_array($this->notes)) {
  2025. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  2026. }
  2027. $xfer += $output->writeFieldBegin('notes', \TType::LST, 3);
  2028. {
  2029. $output->writeListBegin(\TType::STRUCT, count($this->notes));
  2030. {
  2031. foreach ($this->notes as $iter130)
  2032. {
  2033. $xfer += $iter130->write($output);
  2034. }
  2035. }
  2036. $output->writeListEnd();
  2037. }
  2038. $xfer += $output->writeFieldEnd();
  2039. }
  2040. if ($this->stoppedWords !== null) {
  2041. if (!is_array($this->stoppedWords)) {
  2042. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  2043. }
  2044. $xfer += $output->writeFieldBegin('stoppedWords', \TType::LST, 4);
  2045. {
  2046. $output->writeListBegin(\TType::STRING, count($this->stoppedWords));
  2047. {
  2048. foreach ($this->stoppedWords as $iter131)
  2049. {
  2050. $xfer += $output->writeString($iter131);
  2051. }
  2052. }
  2053. $output->writeListEnd();
  2054. }
  2055. $xfer += $output->writeFieldEnd();
  2056. }
  2057. if ($this->searchedWords !== null) {
  2058. if (!is_array($this->searchedWords)) {
  2059. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  2060. }
  2061. $xfer += $output->writeFieldBegin('searchedWords', \TType::LST, 5);
  2062. {
  2063. $output->writeListBegin(\TType::STRING, count($this->searchedWords));
  2064. {
  2065. foreach ($this->searchedWords as $iter132)
  2066. {
  2067. $xfer += $output->writeString($iter132);
  2068. }
  2069. }
  2070. $output->writeListEnd();
  2071. }
  2072. $xfer += $output->writeFieldEnd();
  2073. }
  2074. if ($this->updateCount !== null) {
  2075. $xfer += $output->writeFieldBegin('updateCount', \TType::I32, 6);
  2076. $xfer += $output->writeI32($this->updateCount);
  2077. $xfer += $output->writeFieldEnd();
  2078. }
  2079. $xfer += $output->writeFieldStop();
  2080. $xfer += $output->writeStructEnd();
  2081. return $xfer;
  2082. }
  2083. }
  2084. class NotesMetadataResultSpec {
  2085. static $_TSPEC;
  2086. public $includeTitle = null;
  2087. public $includeContentLength = null;
  2088. public $includeCreated = null;
  2089. public $includeUpdated = null;
  2090. public $includeUpdateSequenceNum = null;
  2091. public $includeNotebookGuid = null;
  2092. public $includeTagGuids = null;
  2093. public $includeAttributes = null;
  2094. public $includeLargestResourceMime = null;
  2095. public $includeLargestResourceSize = null;
  2096. public function __construct($vals=null) {
  2097. if (!isset(self::$_TSPEC)) {
  2098. self::$_TSPEC = array(
  2099. 2 => array(
  2100. 'var' => 'includeTitle',
  2101. 'type' => \TType::BOOL,
  2102. ),
  2103. 5 => array(
  2104. 'var' => 'includeContentLength',
  2105. 'type' => \TType::BOOL,
  2106. ),
  2107. 6 => array(
  2108. 'var' => 'includeCreated',
  2109. 'type' => \TType::BOOL,
  2110. ),
  2111. 7 => array(
  2112. 'var' => 'includeUpdated',
  2113. 'type' => \TType::BOOL,
  2114. ),
  2115. 10 => array(
  2116. 'var' => 'includeUpdateSequenceNum',
  2117. 'type' => \TType::BOOL,
  2118. ),
  2119. 11 => array(
  2120. 'var' => 'includeNotebookGuid',
  2121. 'type' => \TType::BOOL,
  2122. ),
  2123. 12 => array(
  2124. 'var' => 'includeTagGuids',
  2125. 'type' => \TType::BOOL,
  2126. ),
  2127. 14 => array(
  2128. 'var' => 'includeAttributes',
  2129. 'type' => \TType::BOOL,
  2130. ),
  2131. 20 => array(
  2132. 'var' => 'includeLargestResourceMime',
  2133. 'type' => \TType::BOOL,
  2134. ),
  2135. 21 => array(
  2136. 'var' => 'includeLargestResourceSize',
  2137. 'type' => \TType::BOOL,
  2138. ),
  2139. );
  2140. }
  2141. if (is_array($vals)) {
  2142. if (isset($vals['includeTitle'])) {
  2143. $this->includeTitle = $vals['includeTitle'];
  2144. }
  2145. if (isset($vals['includeContentLength'])) {
  2146. $this->includeContentLength = $vals['includeContentLength'];
  2147. }
  2148. if (isset($vals['includeCreated'])) {
  2149. $this->includeCreated = $vals['includeCreated'];
  2150. }
  2151. if (isset($vals['includeUpdated'])) {
  2152. $this->includeUpdated = $vals['includeUpdated'];
  2153. }
  2154. if (isset($vals['includeUpdateSequenceNum'])) {
  2155. $this->includeUpdateSequenceNum = $vals['includeUpdateSequenceNum'];
  2156. }
  2157. if (isset($vals['includeNotebookGuid'])) {
  2158. $this->includeNotebookGuid = $vals['includeNotebookGuid'];
  2159. }
  2160. if (isset($vals['includeTagGuids'])) {
  2161. $this->includeTagGuids = $vals['includeTagGuids'];
  2162. }
  2163. if (isset($vals['includeAttributes'])) {
  2164. $this->includeAttributes = $vals['includeAttributes'];
  2165. }
  2166. if (isset($vals['includeLargestResourceMime'])) {
  2167. $this->includeLargestResourceMime = $vals['includeLargestResourceMime'];
  2168. }
  2169. if (isset($vals['includeLargestResourceSize'])) {
  2170. $this->includeLargestResourceSize = $vals['includeLargestResourceSize'];
  2171. }
  2172. }
  2173. }
  2174. public function getName() {
  2175. return 'NotesMetadataResultSpec';
  2176. }
  2177. public function read($input)
  2178. {
  2179. $xfer = 0;
  2180. $fname = null;
  2181. $ftype = 0;
  2182. $fid = 0;
  2183. $xfer += $input->readStructBegin($fname);
  2184. while (true)
  2185. {
  2186. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  2187. if ($ftype == \TType::STOP) {
  2188. break;
  2189. }
  2190. switch ($fid)
  2191. {
  2192. case 2:
  2193. if ($ftype == \TType::BOOL) {
  2194. $xfer += $input->readBool($this->includeTitle);
  2195. } else {
  2196. $xfer += $input->skip($ftype);
  2197. }
  2198. break;
  2199. case 5:
  2200. if ($ftype == \TType::BOOL) {
  2201. $xfer += $input->readBool($this->includeContentLength);
  2202. } else {
  2203. $xfer += $input->skip($ftype);
  2204. }
  2205. break;
  2206. case 6:
  2207. if ($ftype == \TType::BOOL) {
  2208. $xfer += $input->readBool($this->includeCreated);
  2209. } else {
  2210. $xfer += $input->skip($ftype);
  2211. }
  2212. break;
  2213. case 7:
  2214. if ($ftype == \TType::BOOL) {
  2215. $xfer += $input->readBool($this->includeUpdated);
  2216. } else {
  2217. $xfer += $input->skip($ftype);
  2218. }
  2219. break;
  2220. case 10:
  2221. if ($ftype == \TType::BOOL) {
  2222. $xfer += $input->readBool($this->includeUpdateSequenceNum);
  2223. } else {
  2224. $xfer += $input->skip($ftype);
  2225. }
  2226. break;
  2227. case 11:
  2228. if ($ftype == \TType::BOOL) {
  2229. $xfer += $input->readBool($this->includeNotebookGuid);
  2230. } else {
  2231. $xfer += $input->skip($ftype);
  2232. }
  2233. break;
  2234. case 12:
  2235. if ($ftype == \TType::BOOL) {
  2236. $xfer += $input->readBool($this->includeTagGuids);
  2237. } else {
  2238. $xfer += $input->skip($ftype);
  2239. }
  2240. break;
  2241. case 14:
  2242. if ($ftype == \TType::BOOL) {
  2243. $xfer += $input->readBool($this->includeAttributes);
  2244. } else {
  2245. $xfer += $input->skip($ftype);
  2246. }
  2247. break;
  2248. case 20:
  2249. if ($ftype == \TType::BOOL) {
  2250. $xfer += $input->readBool($this->includeLargestResourceMime);
  2251. } else {
  2252. $xfer += $input->skip($ftype);
  2253. }
  2254. break;
  2255. case 21:
  2256. if ($ftype == \TType::BOOL) {
  2257. $xfer += $input->readBool($this->includeLargestResourceSize);
  2258. } else {
  2259. $xfer += $input->skip($ftype);
  2260. }
  2261. break;
  2262. default:
  2263. $xfer += $input->skip($ftype);
  2264. break;
  2265. }
  2266. $xfer += $input->readFieldEnd();
  2267. }
  2268. $xfer += $input->readStructEnd();
  2269. return $xfer;
  2270. }
  2271. public function write($output) {
  2272. $xfer = 0;
  2273. $xfer += $output->writeStructBegin('NotesMetadataResultSpec');
  2274. if ($this->includeTitle !== null) {
  2275. $xfer += $output->writeFieldBegin('includeTitle', \TType::BOOL, 2);
  2276. $xfer += $output->writeBool($this->includeTitle);
  2277. $xfer += $output->writeFieldEnd();
  2278. }
  2279. if ($this->includeContentLength !== null) {
  2280. $xfer += $output->writeFieldBegin('includeContentLength', \TType::BOOL, 5);
  2281. $xfer += $output->writeBool($this->includeContentLength);
  2282. $xfer += $output->writeFieldEnd();
  2283. }
  2284. if ($this->includeCreated !== null) {
  2285. $xfer += $output->writeFieldBegin('includeCreated', \TType::BOOL, 6);
  2286. $xfer += $output->writeBool($this->includeCreated);
  2287. $xfer += $output->writeFieldEnd();
  2288. }
  2289. if ($this->includeUpdated !== null) {
  2290. $xfer += $output->writeFieldBegin('includeUpdated', \TType::BOOL, 7);
  2291. $xfer += $output->writeBool($this->includeUpdated);
  2292. $xfer += $output->writeFieldEnd();
  2293. }
  2294. if ($this->includeUpdateSequenceNum !== null) {
  2295. $xfer += $output->writeFieldBegin('includeUpdateSequenceNum', \TType::BOOL, 10);
  2296. $xfer += $output->writeBool($this->includeUpdateSequenceNum);
  2297. $xfer += $output->writeFieldEnd();
  2298. }
  2299. if ($this->includeNotebookGuid !== null) {
  2300. $xfer += $output->writeFieldBegin('includeNotebookGuid', \TType::BOOL, 11);
  2301. $xfer += $output->writeBool($this->includeNotebookGuid);
  2302. $xfer += $output->writeFieldEnd();
  2303. }
  2304. if ($this->includeTagGuids !== null) {
  2305. $xfer += $output->writeFieldBegin('includeTagGuids', \TType::BOOL, 12);
  2306. $xfer += $output->writeBool($this->includeTagGuids);
  2307. $xfer += $output->writeFieldEnd();
  2308. }
  2309. if ($this->includeAttributes !== null) {
  2310. $xfer += $output->writeFieldBegin('includeAttributes', \TType::BOOL, 14);
  2311. $xfer += $output->writeBool($this->includeAttributes);
  2312. $xfer += $output->writeFieldEnd();
  2313. }
  2314. if ($this->includeLargestResourceMime !== null) {
  2315. $xfer += $output->writeFieldBegin('includeLargestResourceMime', \TType::BOOL, 20);
  2316. $xfer += $output->writeBool($this->includeLargestResourceMime);
  2317. $xfer += $output->writeFieldEnd();
  2318. }
  2319. if ($this->includeLargestResourceSize !== null) {
  2320. $xfer += $output->writeFieldBegin('includeLargestResourceSize', \TType::BOOL, 21);
  2321. $xfer += $output->writeBool($this->includeLargestResourceSize);
  2322. $xfer += $output->writeFieldEnd();
  2323. }
  2324. $xfer += $output->writeFieldStop();
  2325. $xfer += $output->writeStructEnd();
  2326. return $xfer;
  2327. }
  2328. }
  2329. class NoteCollectionCounts {
  2330. static $_TSPEC;
  2331. public $notebookCounts = null;
  2332. public $tagCounts = null;
  2333. public $trashCount = null;
  2334. public function __construct($vals=null) {
  2335. if (!isset(self::$_TSPEC)) {
  2336. self::$_TSPEC = array(
  2337. 1 => array(
  2338. 'var' => 'notebookCounts',
  2339. 'type' => \TType::MAP,
  2340. 'ktype' => \TType::STRING,
  2341. 'vtype' => \TType::I32,
  2342. 'key' => array(
  2343. 'type' => \TType::STRING,
  2344. ),
  2345. 'val' => array(
  2346. 'type' => \TType::I32,
  2347. ),
  2348. ),
  2349. 2 => array(
  2350. 'var' => 'tagCounts',
  2351. 'type' => \TType::MAP,
  2352. 'ktype' => \TType::STRING,
  2353. 'vtype' => \TType::I32,
  2354. 'key' => array(
  2355. 'type' => \TType::STRING,
  2356. ),
  2357. 'val' => array(
  2358. 'type' => \TType::I32,
  2359. ),
  2360. ),
  2361. 3 => array(
  2362. 'var' => 'trashCount',
  2363. 'type' => \TType::I32,
  2364. ),
  2365. );
  2366. }
  2367. if (is_array($vals)) {
  2368. if (isset($vals['notebookCounts'])) {
  2369. $this->notebookCounts = $vals['notebookCounts'];
  2370. }
  2371. if (isset($vals['tagCounts'])) {
  2372. $this->tagCounts = $vals['tagCounts'];
  2373. }
  2374. if (isset($vals['trashCount'])) {
  2375. $this->trashCount = $vals['trashCount'];
  2376. }
  2377. }
  2378. }
  2379. public function getName() {
  2380. return 'NoteCollectionCounts';
  2381. }
  2382. public function read($input)
  2383. {
  2384. $xfer = 0;
  2385. $fname = null;
  2386. $ftype = 0;
  2387. $fid = 0;
  2388. $xfer += $input->readStructBegin($fname);
  2389. while (true)
  2390. {
  2391. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  2392. if ($ftype == \TType::STOP) {
  2393. break;
  2394. }
  2395. switch ($fid)
  2396. {
  2397. case 1:
  2398. if ($ftype == \TType::MAP) {
  2399. $this->notebookCounts = array();
  2400. $_size133 = 0;
  2401. $_ktype134 = 0;
  2402. $_vtype135 = 0;
  2403. $xfer += $input->readMapBegin($_ktype134, $_vtype135, $_size133);
  2404. for ($_i137 = 0; $_i137 < $_size133; ++$_i137)
  2405. {
  2406. $key138 = '';
  2407. $val139 = 0;
  2408. $xfer += $input->readString($key138);
  2409. $xfer += $input->readI32($val139);
  2410. $this->notebookCounts[$key138] = $val139;
  2411. }
  2412. $xfer += $input->readMapEnd();
  2413. } else {
  2414. $xfer += $input->skip($ftype);
  2415. }
  2416. break;
  2417. case 2:
  2418. if ($ftype == \TType::MAP) {
  2419. $this->tagCounts = array();
  2420. $_size140 = 0;
  2421. $_ktype141 = 0;
  2422. $_vtype142 = 0;
  2423. $xfer += $input->readMapBegin($_ktype141, $_vtype142, $_size140);
  2424. for ($_i144 = 0; $_i144 < $_size140; ++$_i144)
  2425. {
  2426. $key145 = '';
  2427. $val146 = 0;
  2428. $xfer += $input->readString($key145);
  2429. $xfer += $input->readI32($val146);
  2430. $this->tagCounts[$key145] = $val146;
  2431. }
  2432. $xfer += $input->readMapEnd();
  2433. } else {
  2434. $xfer += $input->skip($ftype);
  2435. }
  2436. break;
  2437. case 3:
  2438. if ($ftype == \TType::I32) {
  2439. $xfer += $input->readI32($this->trashCount);
  2440. } else {
  2441. $xfer += $input->skip($ftype);
  2442. }
  2443. break;
  2444. default:
  2445. $xfer += $input->skip($ftype);
  2446. break;
  2447. }
  2448. $xfer += $input->readFieldEnd();
  2449. }
  2450. $xfer += $input->readStructEnd();
  2451. return $xfer;
  2452. }
  2453. public function write($output) {
  2454. $xfer = 0;
  2455. $xfer += $output->writeStructBegin('NoteCollectionCounts');
  2456. if ($this->notebookCounts !== null) {
  2457. if (!is_array($this->notebookCounts)) {
  2458. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  2459. }
  2460. $xfer += $output->writeFieldBegin('notebookCounts', \TType::MAP, 1);
  2461. {
  2462. $output->writeMapBegin(\TType::STRING, \TType::I32, count($this->notebookCounts));
  2463. {
  2464. foreach ($this->notebookCounts as $kiter147 => $viter148)
  2465. {
  2466. $xfer += $output->writeString($kiter147);
  2467. $xfer += $output->writeI32($viter148);
  2468. }
  2469. }
  2470. $output->writeMapEnd();
  2471. }
  2472. $xfer += $output->writeFieldEnd();
  2473. }
  2474. if ($this->tagCounts !== null) {
  2475. if (!is_array($this->tagCounts)) {
  2476. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  2477. }
  2478. $xfer += $output->writeFieldBegin('tagCounts', \TType::MAP, 2);
  2479. {
  2480. $output->writeMapBegin(\TType::STRING, \TType::I32, count($this->tagCounts));
  2481. {
  2482. foreach ($this->tagCounts as $kiter149 => $viter150)
  2483. {
  2484. $xfer += $output->writeString($kiter149);
  2485. $xfer += $output->writeI32($viter150);
  2486. }
  2487. }
  2488. $output->writeMapEnd();
  2489. }
  2490. $xfer += $output->writeFieldEnd();
  2491. }
  2492. if ($this->trashCount !== null) {
  2493. $xfer += $output->writeFieldBegin('trashCount', \TType::I32, 3);
  2494. $xfer += $output->writeI32($this->trashCount);
  2495. $xfer += $output->writeFieldEnd();
  2496. }
  2497. $xfer += $output->writeFieldStop();
  2498. $xfer += $output->writeStructEnd();
  2499. return $xfer;
  2500. }
  2501. }
  2502. class NoteEmailParameters {
  2503. static $_TSPEC;
  2504. public $guid = null;
  2505. public $note = null;
  2506. public $toAddresses = null;
  2507. public $ccAddresses = null;
  2508. public $subject = null;
  2509. public $message = null;
  2510. public function __construct($vals=null) {
  2511. if (!isset(self::$_TSPEC)) {
  2512. self::$_TSPEC = array(
  2513. 1 => array(
  2514. 'var' => 'guid',
  2515. 'type' => \TType::STRING,
  2516. ),
  2517. 2 => array(
  2518. 'var' => 'note',
  2519. 'type' => \TType::STRUCT,
  2520. 'class' => '\EDAM\Types\Note',
  2521. ),
  2522. 3 => array(
  2523. 'var' => 'toAddresses',
  2524. 'type' => \TType::LST,
  2525. 'etype' => \TType::STRING,
  2526. 'elem' => array(
  2527. 'type' => \TType::STRING,
  2528. ),
  2529. ),
  2530. 4 => array(
  2531. 'var' => 'ccAddresses',
  2532. 'type' => \TType::LST,
  2533. 'etype' => \TType::STRING,
  2534. 'elem' => array(
  2535. 'type' => \TType::STRING,
  2536. ),
  2537. ),
  2538. 5 => array(
  2539. 'var' => 'subject',
  2540. 'type' => \TType::STRING,
  2541. ),
  2542. 6 => array(
  2543. 'var' => 'message',
  2544. 'type' => \TType::STRING,
  2545. ),
  2546. );
  2547. }
  2548. if (is_array($vals)) {
  2549. if (isset($vals['guid'])) {
  2550. $this->guid = $vals['guid'];
  2551. }
  2552. if (isset($vals['note'])) {
  2553. $this->note = $vals['note'];
  2554. }
  2555. if (isset($vals['toAddresses'])) {
  2556. $this->toAddresses = $vals['toAddresses'];
  2557. }
  2558. if (isset($vals['ccAddresses'])) {
  2559. $this->ccAddresses = $vals['ccAddresses'];
  2560. }
  2561. if (isset($vals['subject'])) {
  2562. $this->subject = $vals['subject'];
  2563. }
  2564. if (isset($vals['message'])) {
  2565. $this->message = $vals['message'];
  2566. }
  2567. }
  2568. }
  2569. public function getName() {
  2570. return 'NoteEmailParameters';
  2571. }
  2572. public function read($input)
  2573. {
  2574. $xfer = 0;
  2575. $fname = null;
  2576. $ftype = 0;
  2577. $fid = 0;
  2578. $xfer += $input->readStructBegin($fname);
  2579. while (true)
  2580. {
  2581. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  2582. if ($ftype == \TType::STOP) {
  2583. break;
  2584. }
  2585. switch ($fid)
  2586. {
  2587. case 1:
  2588. if ($ftype == \TType::STRING) {
  2589. $xfer += $input->readString($this->guid);
  2590. } else {
  2591. $xfer += $input->skip($ftype);
  2592. }
  2593. break;
  2594. case 2:
  2595. if ($ftype == \TType::STRUCT) {
  2596. $this->note = new \EDAM\Types\Note();
  2597. $xfer += $this->note->read($input);
  2598. } else {
  2599. $xfer += $input->skip($ftype);
  2600. }
  2601. break;
  2602. case 3:
  2603. if ($ftype == \TType::LST) {
  2604. $this->toAddresses = array();
  2605. $_size151 = 0;
  2606. $_etype154 = 0;
  2607. $xfer += $input->readListBegin($_etype154, $_size151);
  2608. for ($_i155 = 0; $_i155 < $_size151; ++$_i155)
  2609. {
  2610. $elem156 = null;
  2611. $xfer += $input->readString($elem156);
  2612. $this->toAddresses []= $elem156;
  2613. }
  2614. $xfer += $input->readListEnd();
  2615. } else {
  2616. $xfer += $input->skip($ftype);
  2617. }
  2618. break;
  2619. case 4:
  2620. if ($ftype == \TType::LST) {
  2621. $this->ccAddresses = array();
  2622. $_size157 = 0;
  2623. $_etype160 = 0;
  2624. $xfer += $input->readListBegin($_etype160, $_size157);
  2625. for ($_i161 = 0; $_i161 < $_size157; ++$_i161)
  2626. {
  2627. $elem162 = null;
  2628. $xfer += $input->readString($elem162);
  2629. $this->ccAddresses []= $elem162;
  2630. }
  2631. $xfer += $input->readListEnd();
  2632. } else {
  2633. $xfer += $input->skip($ftype);
  2634. }
  2635. break;
  2636. case 5:
  2637. if ($ftype == \TType::STRING) {
  2638. $xfer += $input->readString($this->subject);
  2639. } else {
  2640. $xfer += $input->skip($ftype);
  2641. }
  2642. break;
  2643. case 6:
  2644. if ($ftype == \TType::STRING) {
  2645. $xfer += $input->readString($this->message);
  2646. } else {
  2647. $xfer += $input->skip($ftype);
  2648. }
  2649. break;
  2650. default:
  2651. $xfer += $input->skip($ftype);
  2652. break;
  2653. }
  2654. $xfer += $input->readFieldEnd();
  2655. }
  2656. $xfer += $input->readStructEnd();
  2657. return $xfer;
  2658. }
  2659. public function write($output) {
  2660. $xfer = 0;
  2661. $xfer += $output->writeStructBegin('NoteEmailParameters');
  2662. if ($this->guid !== null) {
  2663. $xfer += $output->writeFieldBegin('guid', \TType::STRING, 1);
  2664. $xfer += $output->writeString($this->guid);
  2665. $xfer += $output->writeFieldEnd();
  2666. }
  2667. if ($this->note !== null) {
  2668. if (!is_object($this->note)) {
  2669. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  2670. }
  2671. $xfer += $output->writeFieldBegin('note', \TType::STRUCT, 2);
  2672. $xfer += $this->note->write($output);
  2673. $xfer += $output->writeFieldEnd();
  2674. }
  2675. if ($this->toAddresses !== null) {
  2676. if (!is_array($this->toAddresses)) {
  2677. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  2678. }
  2679. $xfer += $output->writeFieldBegin('toAddresses', \TType::LST, 3);
  2680. {
  2681. $output->writeListBegin(\TType::STRING, count($this->toAddresses));
  2682. {
  2683. foreach ($this->toAddresses as $iter163)
  2684. {
  2685. $xfer += $output->writeString($iter163);
  2686. }
  2687. }
  2688. $output->writeListEnd();
  2689. }
  2690. $xfer += $output->writeFieldEnd();
  2691. }
  2692. if ($this->ccAddresses !== null) {
  2693. if (!is_array($this->ccAddresses)) {
  2694. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  2695. }
  2696. $xfer += $output->writeFieldBegin('ccAddresses', \TType::LST, 4);
  2697. {
  2698. $output->writeListBegin(\TType::STRING, count($this->ccAddresses));
  2699. {
  2700. foreach ($this->ccAddresses as $iter164)
  2701. {
  2702. $xfer += $output->writeString($iter164);
  2703. }
  2704. }
  2705. $output->writeListEnd();
  2706. }
  2707. $xfer += $output->writeFieldEnd();
  2708. }
  2709. if ($this->subject !== null) {
  2710. $xfer += $output->writeFieldBegin('subject', \TType::STRING, 5);
  2711. $xfer += $output->writeString($this->subject);
  2712. $xfer += $output->writeFieldEnd();
  2713. }
  2714. if ($this->message !== null) {
  2715. $xfer += $output->writeFieldBegin('message', \TType::STRING, 6);
  2716. $xfer += $output->writeString($this->message);
  2717. $xfer += $output->writeFieldEnd();
  2718. }
  2719. $xfer += $output->writeFieldStop();
  2720. $xfer += $output->writeStructEnd();
  2721. return $xfer;
  2722. }
  2723. }
  2724. class NoteVersionId {
  2725. static $_TSPEC;
  2726. public $updateSequenceNum = null;
  2727. public $updated = null;
  2728. public $saved = null;
  2729. public $title = null;
  2730. public function __construct($vals=null) {
  2731. if (!isset(self::$_TSPEC)) {
  2732. self::$_TSPEC = array(
  2733. 1 => array(
  2734. 'var' => 'updateSequenceNum',
  2735. 'type' => \TType::I32,
  2736. ),
  2737. 2 => array(
  2738. 'var' => 'updated',
  2739. 'type' => \TType::I64,
  2740. ),
  2741. 3 => array(
  2742. 'var' => 'saved',
  2743. 'type' => \TType::I64,
  2744. ),
  2745. 4 => array(
  2746. 'var' => 'title',
  2747. 'type' => \TType::STRING,
  2748. ),
  2749. );
  2750. }
  2751. if (is_array($vals)) {
  2752. if (isset($vals['updateSequenceNum'])) {
  2753. $this->updateSequenceNum = $vals['updateSequenceNum'];
  2754. }
  2755. if (isset($vals['updated'])) {
  2756. $this->updated = $vals['updated'];
  2757. }
  2758. if (isset($vals['saved'])) {
  2759. $this->saved = $vals['saved'];
  2760. }
  2761. if (isset($vals['title'])) {
  2762. $this->title = $vals['title'];
  2763. }
  2764. }
  2765. }
  2766. public function getName() {
  2767. return 'NoteVersionId';
  2768. }
  2769. public function read($input)
  2770. {
  2771. $xfer = 0;
  2772. $fname = null;
  2773. $ftype = 0;
  2774. $fid = 0;
  2775. $xfer += $input->readStructBegin($fname);
  2776. while (true)
  2777. {
  2778. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  2779. if ($ftype == \TType::STOP) {
  2780. break;
  2781. }
  2782. switch ($fid)
  2783. {
  2784. case 1:
  2785. if ($ftype == \TType::I32) {
  2786. $xfer += $input->readI32($this->updateSequenceNum);
  2787. } else {
  2788. $xfer += $input->skip($ftype);
  2789. }
  2790. break;
  2791. case 2:
  2792. if ($ftype == \TType::I64) {
  2793. $xfer += $input->readI64($this->updated);
  2794. } else {
  2795. $xfer += $input->skip($ftype);
  2796. }
  2797. break;
  2798. case 3:
  2799. if ($ftype == \TType::I64) {
  2800. $xfer += $input->readI64($this->saved);
  2801. } else {
  2802. $xfer += $input->skip($ftype);
  2803. }
  2804. break;
  2805. case 4:
  2806. if ($ftype == \TType::STRING) {
  2807. $xfer += $input->readString($this->title);
  2808. } else {
  2809. $xfer += $input->skip($ftype);
  2810. }
  2811. break;
  2812. default:
  2813. $xfer += $input->skip($ftype);
  2814. break;
  2815. }
  2816. $xfer += $input->readFieldEnd();
  2817. }
  2818. $xfer += $input->readStructEnd();
  2819. return $xfer;
  2820. }
  2821. public function write($output) {
  2822. $xfer = 0;
  2823. $xfer += $output->writeStructBegin('NoteVersionId');
  2824. if ($this->updateSequenceNum !== null) {
  2825. $xfer += $output->writeFieldBegin('updateSequenceNum', \TType::I32, 1);
  2826. $xfer += $output->writeI32($this->updateSequenceNum);
  2827. $xfer += $output->writeFieldEnd();
  2828. }
  2829. if ($this->updated !== null) {
  2830. $xfer += $output->writeFieldBegin('updated', \TType::I64, 2);
  2831. $xfer += $output->writeI64($this->updated);
  2832. $xfer += $output->writeFieldEnd();
  2833. }
  2834. if ($this->saved !== null) {
  2835. $xfer += $output->writeFieldBegin('saved', \TType::I64, 3);
  2836. $xfer += $output->writeI64($this->saved);
  2837. $xfer += $output->writeFieldEnd();
  2838. }
  2839. if ($this->title !== null) {
  2840. $xfer += $output->writeFieldBegin('title', \TType::STRING, 4);
  2841. $xfer += $output->writeString($this->title);
  2842. $xfer += $output->writeFieldEnd();
  2843. }
  2844. $xfer += $output->writeFieldStop();
  2845. $xfer += $output->writeStructEnd();
  2846. return $xfer;
  2847. }
  2848. }
  2849. class ClientUsageMetrics {
  2850. static $_TSPEC;
  2851. public $sessions = null;
  2852. public function __construct($vals=null) {
  2853. if (!isset(self::$_TSPEC)) {
  2854. self::$_TSPEC = array(
  2855. 1 => array(
  2856. 'var' => 'sessions',
  2857. 'type' => \TType::I32,
  2858. ),
  2859. );
  2860. }
  2861. if (is_array($vals)) {
  2862. if (isset($vals['sessions'])) {
  2863. $this->sessions = $vals['sessions'];
  2864. }
  2865. }
  2866. }
  2867. public function getName() {
  2868. return 'ClientUsageMetrics';
  2869. }
  2870. public function read($input)
  2871. {
  2872. $xfer = 0;
  2873. $fname = null;
  2874. $ftype = 0;
  2875. $fid = 0;
  2876. $xfer += $input->readStructBegin($fname);
  2877. while (true)
  2878. {
  2879. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  2880. if ($ftype == \TType::STOP) {
  2881. break;
  2882. }
  2883. switch ($fid)
  2884. {
  2885. case 1:
  2886. if ($ftype == \TType::I32) {
  2887. $xfer += $input->readI32($this->sessions);
  2888. } else {
  2889. $xfer += $input->skip($ftype);
  2890. }
  2891. break;
  2892. default:
  2893. $xfer += $input->skip($ftype);
  2894. break;
  2895. }
  2896. $xfer += $input->readFieldEnd();
  2897. }
  2898. $xfer += $input->readStructEnd();
  2899. return $xfer;
  2900. }
  2901. public function write($output) {
  2902. $xfer = 0;
  2903. $xfer += $output->writeStructBegin('ClientUsageMetrics');
  2904. if ($this->sessions !== null) {
  2905. $xfer += $output->writeFieldBegin('sessions', \TType::I32, 1);
  2906. $xfer += $output->writeI32($this->sessions);
  2907. $xfer += $output->writeFieldEnd();
  2908. }
  2909. $xfer += $output->writeFieldStop();
  2910. $xfer += $output->writeStructEnd();
  2911. return $xfer;
  2912. }
  2913. }
  2914. class RelatedQuery {
  2915. static $_TSPEC;
  2916. public $noteGuid = null;
  2917. public $plainText = null;
  2918. public $filter = null;
  2919. public function __construct($vals=null) {
  2920. if (!isset(self::$_TSPEC)) {
  2921. self::$_TSPEC = array(
  2922. 1 => array(
  2923. 'var' => 'noteGuid',
  2924. 'type' => \TType::STRING,
  2925. ),
  2926. 2 => array(
  2927. 'var' => 'plainText',
  2928. 'type' => \TType::STRING,
  2929. ),
  2930. 3 => array(
  2931. 'var' => 'filter',
  2932. 'type' => \TType::STRUCT,
  2933. 'class' => '\EDAM\NoteStore\NoteFilter',
  2934. ),
  2935. );
  2936. }
  2937. if (is_array($vals)) {
  2938. if (isset($vals['noteGuid'])) {
  2939. $this->noteGuid = $vals['noteGuid'];
  2940. }
  2941. if (isset($vals['plainText'])) {
  2942. $this->plainText = $vals['plainText'];
  2943. }
  2944. if (isset($vals['filter'])) {
  2945. $this->filter = $vals['filter'];
  2946. }
  2947. }
  2948. }
  2949. public function getName() {
  2950. return 'RelatedQuery';
  2951. }
  2952. public function read($input)
  2953. {
  2954. $xfer = 0;
  2955. $fname = null;
  2956. $ftype = 0;
  2957. $fid = 0;
  2958. $xfer += $input->readStructBegin($fname);
  2959. while (true)
  2960. {
  2961. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  2962. if ($ftype == \TType::STOP) {
  2963. break;
  2964. }
  2965. switch ($fid)
  2966. {
  2967. case 1:
  2968. if ($ftype == \TType::STRING) {
  2969. $xfer += $input->readString($this->noteGuid);
  2970. } else {
  2971. $xfer += $input->skip($ftype);
  2972. }
  2973. break;
  2974. case 2:
  2975. if ($ftype == \TType::STRING) {
  2976. $xfer += $input->readString($this->plainText);
  2977. } else {
  2978. $xfer += $input->skip($ftype);
  2979. }
  2980. break;
  2981. case 3:
  2982. if ($ftype == \TType::STRUCT) {
  2983. $this->filter = new \EDAM\NoteStore\NoteFilter();
  2984. $xfer += $this->filter->read($input);
  2985. } else {
  2986. $xfer += $input->skip($ftype);
  2987. }
  2988. break;
  2989. default:
  2990. $xfer += $input->skip($ftype);
  2991. break;
  2992. }
  2993. $xfer += $input->readFieldEnd();
  2994. }
  2995. $xfer += $input->readStructEnd();
  2996. return $xfer;
  2997. }
  2998. public function write($output) {
  2999. $xfer = 0;
  3000. $xfer += $output->writeStructBegin('RelatedQuery');
  3001. if ($this->noteGuid !== null) {
  3002. $xfer += $output->writeFieldBegin('noteGuid', \TType::STRING, 1);
  3003. $xfer += $output->writeString($this->noteGuid);
  3004. $xfer += $output->writeFieldEnd();
  3005. }
  3006. if ($this->plainText !== null) {
  3007. $xfer += $output->writeFieldBegin('plainText', \TType::STRING, 2);
  3008. $xfer += $output->writeString($this->plainText);
  3009. $xfer += $output->writeFieldEnd();
  3010. }
  3011. if ($this->filter !== null) {
  3012. if (!is_object($this->filter)) {
  3013. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  3014. }
  3015. $xfer += $output->writeFieldBegin('filter', \TType::STRUCT, 3);
  3016. $xfer += $this->filter->write($output);
  3017. $xfer += $output->writeFieldEnd();
  3018. }
  3019. $xfer += $output->writeFieldStop();
  3020. $xfer += $output->writeStructEnd();
  3021. return $xfer;
  3022. }
  3023. }
  3024. class RelatedResult {
  3025. static $_TSPEC;
  3026. public $notes = null;
  3027. public $notebooks = null;
  3028. public $tags = null;
  3029. public $containingNotebooks = null;
  3030. public $debugInfo = null;
  3031. public function __construct($vals=null) {
  3032. if (!isset(self::$_TSPEC)) {
  3033. self::$_TSPEC = array(
  3034. 1 => array(
  3035. 'var' => 'notes',
  3036. 'type' => \TType::LST,
  3037. 'etype' => \TType::STRUCT,
  3038. 'elem' => array(
  3039. 'type' => \TType::STRUCT,
  3040. 'class' => '\EDAM\Types\Note',
  3041. ),
  3042. ),
  3043. 2 => array(
  3044. 'var' => 'notebooks',
  3045. 'type' => \TType::LST,
  3046. 'etype' => \TType::STRUCT,
  3047. 'elem' => array(
  3048. 'type' => \TType::STRUCT,
  3049. 'class' => '\EDAM\Types\Notebook',
  3050. ),
  3051. ),
  3052. 3 => array(
  3053. 'var' => 'tags',
  3054. 'type' => \TType::LST,
  3055. 'etype' => \TType::STRUCT,
  3056. 'elem' => array(
  3057. 'type' => \TType::STRUCT,
  3058. 'class' => '\EDAM\Types\Tag',
  3059. ),
  3060. ),
  3061. 4 => array(
  3062. 'var' => 'containingNotebooks',
  3063. 'type' => \TType::LST,
  3064. 'etype' => \TType::STRUCT,
  3065. 'elem' => array(
  3066. 'type' => \TType::STRUCT,
  3067. 'class' => '\EDAM\Types\NotebookDescriptor',
  3068. ),
  3069. ),
  3070. 5 => array(
  3071. 'var' => 'debugInfo',
  3072. 'type' => \TType::STRING,
  3073. ),
  3074. );
  3075. }
  3076. if (is_array($vals)) {
  3077. if (isset($vals['notes'])) {
  3078. $this->notes = $vals['notes'];
  3079. }
  3080. if (isset($vals['notebooks'])) {
  3081. $this->notebooks = $vals['notebooks'];
  3082. }
  3083. if (isset($vals['tags'])) {
  3084. $this->tags = $vals['tags'];
  3085. }
  3086. if (isset($vals['containingNotebooks'])) {
  3087. $this->containingNotebooks = $vals['containingNotebooks'];
  3088. }
  3089. if (isset($vals['debugInfo'])) {
  3090. $this->debugInfo = $vals['debugInfo'];
  3091. }
  3092. }
  3093. }
  3094. public function getName() {
  3095. return 'RelatedResult';
  3096. }
  3097. public function read($input)
  3098. {
  3099. $xfer = 0;
  3100. $fname = null;
  3101. $ftype = 0;
  3102. $fid = 0;
  3103. $xfer += $input->readStructBegin($fname);
  3104. while (true)
  3105. {
  3106. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  3107. if ($ftype == \TType::STOP) {
  3108. break;
  3109. }
  3110. switch ($fid)
  3111. {
  3112. case 1:
  3113. if ($ftype == \TType::LST) {
  3114. $this->notes = array();
  3115. $_size165 = 0;
  3116. $_etype168 = 0;
  3117. $xfer += $input->readListBegin($_etype168, $_size165);
  3118. for ($_i169 = 0; $_i169 < $_size165; ++$_i169)
  3119. {
  3120. $elem170 = null;
  3121. $elem170 = new \EDAM\Types\Note();
  3122. $xfer += $elem170->read($input);
  3123. $this->notes []= $elem170;
  3124. }
  3125. $xfer += $input->readListEnd();
  3126. } else {
  3127. $xfer += $input->skip($ftype);
  3128. }
  3129. break;
  3130. case 2:
  3131. if ($ftype == \TType::LST) {
  3132. $this->notebooks = array();
  3133. $_size171 = 0;
  3134. $_etype174 = 0;
  3135. $xfer += $input->readListBegin($_etype174, $_size171);
  3136. for ($_i175 = 0; $_i175 < $_size171; ++$_i175)
  3137. {
  3138. $elem176 = null;
  3139. $elem176 = new \EDAM\Types\Notebook();
  3140. $xfer += $elem176->read($input);
  3141. $this->notebooks []= $elem176;
  3142. }
  3143. $xfer += $input->readListEnd();
  3144. } else {
  3145. $xfer += $input->skip($ftype);
  3146. }
  3147. break;
  3148. case 3:
  3149. if ($ftype == \TType::LST) {
  3150. $this->tags = array();
  3151. $_size177 = 0;
  3152. $_etype180 = 0;
  3153. $xfer += $input->readListBegin($_etype180, $_size177);
  3154. for ($_i181 = 0; $_i181 < $_size177; ++$_i181)
  3155. {
  3156. $elem182 = null;
  3157. $elem182 = new \EDAM\Types\Tag();
  3158. $xfer += $elem182->read($input);
  3159. $this->tags []= $elem182;
  3160. }
  3161. $xfer += $input->readListEnd();
  3162. } else {
  3163. $xfer += $input->skip($ftype);
  3164. }
  3165. break;
  3166. case 4:
  3167. if ($ftype == \TType::LST) {
  3168. $this->containingNotebooks = array();
  3169. $_size183 = 0;
  3170. $_etype186 = 0;
  3171. $xfer += $input->readListBegin($_etype186, $_size183);
  3172. for ($_i187 = 0; $_i187 < $_size183; ++$_i187)
  3173. {
  3174. $elem188 = null;
  3175. $elem188 = new \EDAM\Types\NotebookDescriptor();
  3176. $xfer += $elem188->read($input);
  3177. $this->containingNotebooks []= $elem188;
  3178. }
  3179. $xfer += $input->readListEnd();
  3180. } else {
  3181. $xfer += $input->skip($ftype);
  3182. }
  3183. break;
  3184. case 5:
  3185. if ($ftype == \TType::STRING) {
  3186. $xfer += $input->readString($this->debugInfo);
  3187. } else {
  3188. $xfer += $input->skip($ftype);
  3189. }
  3190. break;
  3191. default:
  3192. $xfer += $input->skip($ftype);
  3193. break;
  3194. }
  3195. $xfer += $input->readFieldEnd();
  3196. }
  3197. $xfer += $input->readStructEnd();
  3198. return $xfer;
  3199. }
  3200. public function write($output) {
  3201. $xfer = 0;
  3202. $xfer += $output->writeStructBegin('RelatedResult');
  3203. if ($this->notes !== null) {
  3204. if (!is_array($this->notes)) {
  3205. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  3206. }
  3207. $xfer += $output->writeFieldBegin('notes', \TType::LST, 1);
  3208. {
  3209. $output->writeListBegin(\TType::STRUCT, count($this->notes));
  3210. {
  3211. foreach ($this->notes as $iter189)
  3212. {
  3213. $xfer += $iter189->write($output);
  3214. }
  3215. }
  3216. $output->writeListEnd();
  3217. }
  3218. $xfer += $output->writeFieldEnd();
  3219. }
  3220. if ($this->notebooks !== null) {
  3221. if (!is_array($this->notebooks)) {
  3222. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  3223. }
  3224. $xfer += $output->writeFieldBegin('notebooks', \TType::LST, 2);
  3225. {
  3226. $output->writeListBegin(\TType::STRUCT, count($this->notebooks));
  3227. {
  3228. foreach ($this->notebooks as $iter190)
  3229. {
  3230. $xfer += $iter190->write($output);
  3231. }
  3232. }
  3233. $output->writeListEnd();
  3234. }
  3235. $xfer += $output->writeFieldEnd();
  3236. }
  3237. if ($this->tags !== null) {
  3238. if (!is_array($this->tags)) {
  3239. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  3240. }
  3241. $xfer += $output->writeFieldBegin('tags', \TType::LST, 3);
  3242. {
  3243. $output->writeListBegin(\TType::STRUCT, count($this->tags));
  3244. {
  3245. foreach ($this->tags as $iter191)
  3246. {
  3247. $xfer += $iter191->write($output);
  3248. }
  3249. }
  3250. $output->writeListEnd();
  3251. }
  3252. $xfer += $output->writeFieldEnd();
  3253. }
  3254. if ($this->containingNotebooks !== null) {
  3255. if (!is_array($this->containingNotebooks)) {
  3256. throw new \TProtocolException('Bad type in structure.', \TProtocolException::INVALID_DATA);
  3257. }
  3258. $xfer += $output->writeFieldBegin('containingNotebooks', \TType::LST, 4);
  3259. {
  3260. $output->writeListBegin(\TType::STRUCT, count($this->containingNotebooks));
  3261. {
  3262. foreach ($this->containingNotebooks as $iter192)
  3263. {
  3264. $xfer += $iter192->write($output);
  3265. }
  3266. }
  3267. $output->writeListEnd();
  3268. }
  3269. $xfer += $output->writeFieldEnd();
  3270. }
  3271. if ($this->debugInfo !== null) {
  3272. $xfer += $output->writeFieldBegin('debugInfo', \TType::STRING, 5);
  3273. $xfer += $output->writeString($this->debugInfo);
  3274. $xfer += $output->writeFieldEnd();
  3275. }
  3276. $xfer += $output->writeFieldStop();
  3277. $xfer += $output->writeStructEnd();
  3278. return $xfer;
  3279. }
  3280. }
  3281. class RelatedResultSpec {
  3282. static $_TSPEC;
  3283. public $maxNotes = null;
  3284. public $maxNotebooks = null;
  3285. public $maxTags = null;
  3286. public $writableNotebooksOnly = null;
  3287. public $includeContainingNotebooks = null;
  3288. public $includeDebugInfo = null;
  3289. public function __construct($vals=null) {
  3290. if (!isset(self::$_TSPEC)) {
  3291. self::$_TSPEC = array(
  3292. 1 => array(
  3293. 'var' => 'maxNotes',
  3294. 'type' => \TType::I32,
  3295. ),
  3296. 2 => array(
  3297. 'var' => 'maxNotebooks',
  3298. 'type' => \TType::I32,
  3299. ),
  3300. 3 => array(
  3301. 'var' => 'maxTags',
  3302. 'type' => \TType::I32,
  3303. ),
  3304. 4 => array(
  3305. 'var' => 'writableNotebooksOnly',
  3306. 'type' => \TType::BOOL,
  3307. ),
  3308. 5 => array(
  3309. 'var' => 'includeContainingNotebooks',
  3310. 'type' => \TType::BOOL,
  3311. ),
  3312. 6 => array(
  3313. 'var' => 'includeDebugInfo',
  3314. 'type' => \TType::BOOL,
  3315. ),
  3316. );
  3317. }
  3318. if (is_array($vals)) {
  3319. if (isset($vals['maxNotes'])) {
  3320. $this->maxNotes = $vals['maxNotes'];
  3321. }
  3322. if (isset($vals['maxNotebooks'])) {
  3323. $this->maxNotebooks = $vals['maxNotebooks'];
  3324. }
  3325. if (isset($vals['maxTags'])) {
  3326. $this->maxTags = $vals['maxTags'];
  3327. }
  3328. if (isset($vals['writableNotebooksOnly'])) {
  3329. $this->writableNotebooksOnly = $vals['writableNotebooksOnly'];
  3330. }
  3331. if (isset($vals['includeContainingNotebooks'])) {
  3332. $this->includeContainingNotebooks = $vals['includeContainingNotebooks'];
  3333. }
  3334. if (isset($vals['includeDebugInfo'])) {
  3335. $this->includeDebugInfo = $vals['includeDebugInfo'];
  3336. }
  3337. }
  3338. }
  3339. public function getName() {
  3340. return 'RelatedResultSpec';
  3341. }
  3342. public function read($input)
  3343. {
  3344. $xfer = 0;
  3345. $fname = null;
  3346. $ftype = 0;
  3347. $fid = 0;
  3348. $xfer += $input->readStructBegin($fname);
  3349. while (true)
  3350. {
  3351. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  3352. if ($ftype == \TType::STOP) {
  3353. break;
  3354. }
  3355. switch ($fid)
  3356. {
  3357. case 1:
  3358. if ($ftype == \TType::I32) {
  3359. $xfer += $input->readI32($this->maxNotes);
  3360. } else {
  3361. $xfer += $input->skip($ftype);
  3362. }
  3363. break;
  3364. case 2:
  3365. if ($ftype == \TType::I32) {
  3366. $xfer += $input->readI32($this->maxNotebooks);
  3367. } else {
  3368. $xfer += $input->skip($ftype);
  3369. }
  3370. break;
  3371. case 3:
  3372. if ($ftype == \TType::I32) {
  3373. $xfer += $input->readI32($this->maxTags);
  3374. } else {
  3375. $xfer += $input->skip($ftype);
  3376. }
  3377. break;
  3378. case 4:
  3379. if ($ftype == \TType::BOOL) {
  3380. $xfer += $input->readBool($this->writableNotebooksOnly);
  3381. } else {
  3382. $xfer += $input->skip($ftype);
  3383. }
  3384. break;
  3385. case 5:
  3386. if ($ftype == \TType::BOOL) {
  3387. $xfer += $input->readBool($this->includeContainingNotebooks);
  3388. } else {
  3389. $xfer += $input->skip($ftype);
  3390. }
  3391. break;
  3392. case 6:
  3393. if ($ftype == \TType::BOOL) {
  3394. $xfer += $input->readBool($this->includeDebugInfo);
  3395. } else {
  3396. $xfer += $input->skip($ftype);
  3397. }
  3398. break;
  3399. default:
  3400. $xfer += $input->skip($ftype);
  3401. break;
  3402. }
  3403. $xfer += $input->readFieldEnd();
  3404. }
  3405. $xfer += $input->readStructEnd();
  3406. return $xfer;
  3407. }
  3408. public function write($output) {
  3409. $xfer = 0;
  3410. $xfer += $output->writeStructBegin('RelatedResultSpec');
  3411. if ($this->maxNotes !== null) {
  3412. $xfer += $output->writeFieldBegin('maxNotes', \TType::I32, 1);
  3413. $xfer += $output->writeI32($this->maxNotes);
  3414. $xfer += $output->writeFieldEnd();
  3415. }
  3416. if ($this->maxNotebooks !== null) {
  3417. $xfer += $output->writeFieldBegin('maxNotebooks', \TType::I32, 2);
  3418. $xfer += $output->writeI32($this->maxNotebooks);
  3419. $xfer += $output->writeFieldEnd();
  3420. }
  3421. if ($this->maxTags !== null) {
  3422. $xfer += $output->writeFieldBegin('maxTags', \TType::I32, 3);
  3423. $xfer += $output->writeI32($this->maxTags);
  3424. $xfer += $output->writeFieldEnd();
  3425. }
  3426. if ($this->writableNotebooksOnly !== null) {
  3427. $xfer += $output->writeFieldBegin('writableNotebooksOnly', \TType::BOOL, 4);
  3428. $xfer += $output->writeBool($this->writableNotebooksOnly);
  3429. $xfer += $output->writeFieldEnd();
  3430. }
  3431. if ($this->includeContainingNotebooks !== null) {
  3432. $xfer += $output->writeFieldBegin('includeContainingNotebooks', \TType::BOOL, 5);
  3433. $xfer += $output->writeBool($this->includeContainingNotebooks);
  3434. $xfer += $output->writeFieldEnd();
  3435. }
  3436. if ($this->includeDebugInfo !== null) {
  3437. $xfer += $output->writeFieldBegin('includeDebugInfo', \TType::BOOL, 6);
  3438. $xfer += $output->writeBool($this->includeDebugInfo);
  3439. $xfer += $output->writeFieldEnd();
  3440. }
  3441. $xfer += $output->writeFieldStop();
  3442. $xfer += $output->writeStructEnd();
  3443. return $xfer;
  3444. }
  3445. }
  3446. ?>