PageRenderTime 57ms CodeModel.GetById 19ms 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

Large files files are truncated, but you can click here to view the full file

  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' => 'updateSequenceN…

Large files files are truncated, but you can click here to view the full file