PageRenderTime 120ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 2ms

/src/main/java/com/evernote/edam/notestore/NoteStore.java

http://github.com/evernote/evernote-sdk-java
Java | 13456 lines | 11499 code | 1487 blank | 470 comment | 3059 complexity | fcb37622fb0c50662ba30817f74025f3 MD5 | raw file
Possible License(s): BSD-3-Clause-No-Nuclear-License-2014
  1. /**
  2. * Autogenerated by Thrift
  3. *
  4. * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  5. */
  6. package com.evernote.edam.notestore;
  7. import java.util.List;
  8. import java.util.ArrayList;
  9. import java.util.Map;
  10. import java.util.HashMap;
  11. import java.util.Set;
  12. import java.util.HashSet;
  13. import com.evernote.thrift.*;
  14. import com.evernote.thrift.protocol.*;
  15. public class NoteStore {
  16. public interface Iface extends NoteStoreIface { }
  17. public static class Client implements TServiceClient, Iface {
  18. public Client(TProtocol prot)
  19. {
  20. this(prot, prot);
  21. }
  22. public Client(TProtocol iprot, TProtocol oprot)
  23. {
  24. iprot_ = iprot;
  25. oprot_ = oprot;
  26. }
  27. protected TProtocol iprot_;
  28. protected TProtocol oprot_;
  29. protected int seqid_;
  30. public TProtocol getInputProtocol()
  31. {
  32. return this.iprot_;
  33. }
  34. public TProtocol getOutputProtocol()
  35. {
  36. return this.oprot_;
  37. }
  38. public SyncState getSyncState(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
  39. {
  40. send_getSyncState(authenticationToken);
  41. return recv_getSyncState();
  42. }
  43. public void send_getSyncState(String authenticationToken) throws TException
  44. {
  45. oprot_.writeMessageBegin(new TMessage("getSyncState", TMessageType.CALL, ++seqid_));
  46. getSyncState_args args = new getSyncState_args();
  47. args.setAuthenticationToken(authenticationToken);
  48. args.write(oprot_);
  49. oprot_.writeMessageEnd();
  50. oprot_.getTransport().flush();
  51. }
  52. public SyncState recv_getSyncState() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
  53. {
  54. TMessage msg = iprot_.readMessageBegin();
  55. if (msg.type == TMessageType.EXCEPTION) {
  56. TApplicationException x = TApplicationException.read(iprot_);
  57. iprot_.readMessageEnd();
  58. throw x;
  59. }
  60. if (msg.seqid != seqid_) {
  61. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getSyncState failed: out of sequence response");
  62. }
  63. getSyncState_result result = new getSyncState_result();
  64. result.read(iprot_);
  65. iprot_.readMessageEnd();
  66. if (result.isSetSuccess()) {
  67. return result.success;
  68. }
  69. if (result.userException != null) {
  70. throw result.userException;
  71. }
  72. if (result.systemException != null) {
  73. throw result.systemException;
  74. }
  75. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getSyncState failed: unknown result");
  76. }
  77. public SyncState getSyncStateWithMetrics(String authenticationToken, ClientUsageMetrics clientMetrics) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
  78. {
  79. send_getSyncStateWithMetrics(authenticationToken, clientMetrics);
  80. return recv_getSyncStateWithMetrics();
  81. }
  82. public void send_getSyncStateWithMetrics(String authenticationToken, ClientUsageMetrics clientMetrics) throws TException
  83. {
  84. oprot_.writeMessageBegin(new TMessage("getSyncStateWithMetrics", TMessageType.CALL, ++seqid_));
  85. getSyncStateWithMetrics_args args = new getSyncStateWithMetrics_args();
  86. args.setAuthenticationToken(authenticationToken);
  87. args.setClientMetrics(clientMetrics);
  88. args.write(oprot_);
  89. oprot_.writeMessageEnd();
  90. oprot_.getTransport().flush();
  91. }
  92. public SyncState recv_getSyncStateWithMetrics() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
  93. {
  94. TMessage msg = iprot_.readMessageBegin();
  95. if (msg.type == TMessageType.EXCEPTION) {
  96. TApplicationException x = TApplicationException.read(iprot_);
  97. iprot_.readMessageEnd();
  98. throw x;
  99. }
  100. if (msg.seqid != seqid_) {
  101. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getSyncStateWithMetrics failed: out of sequence response");
  102. }
  103. getSyncStateWithMetrics_result result = new getSyncStateWithMetrics_result();
  104. result.read(iprot_);
  105. iprot_.readMessageEnd();
  106. if (result.isSetSuccess()) {
  107. return result.success;
  108. }
  109. if (result.userException != null) {
  110. throw result.userException;
  111. }
  112. if (result.systemException != null) {
  113. throw result.systemException;
  114. }
  115. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getSyncStateWithMetrics failed: unknown result");
  116. }
  117. public SyncChunk getSyncChunk(String authenticationToken, int afterUSN, int maxEntries, boolean fullSyncOnly) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
  118. {
  119. send_getSyncChunk(authenticationToken, afterUSN, maxEntries, fullSyncOnly);
  120. return recv_getSyncChunk();
  121. }
  122. public void send_getSyncChunk(String authenticationToken, int afterUSN, int maxEntries, boolean fullSyncOnly) throws TException
  123. {
  124. oprot_.writeMessageBegin(new TMessage("getSyncChunk", TMessageType.CALL, ++seqid_));
  125. getSyncChunk_args args = new getSyncChunk_args();
  126. args.setAuthenticationToken(authenticationToken);
  127. args.setAfterUSN(afterUSN);
  128. args.setMaxEntries(maxEntries);
  129. args.setFullSyncOnly(fullSyncOnly);
  130. args.write(oprot_);
  131. oprot_.writeMessageEnd();
  132. oprot_.getTransport().flush();
  133. }
  134. public SyncChunk recv_getSyncChunk() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
  135. {
  136. TMessage msg = iprot_.readMessageBegin();
  137. if (msg.type == TMessageType.EXCEPTION) {
  138. TApplicationException x = TApplicationException.read(iprot_);
  139. iprot_.readMessageEnd();
  140. throw x;
  141. }
  142. if (msg.seqid != seqid_) {
  143. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getSyncChunk failed: out of sequence response");
  144. }
  145. getSyncChunk_result result = new getSyncChunk_result();
  146. result.read(iprot_);
  147. iprot_.readMessageEnd();
  148. if (result.isSetSuccess()) {
  149. return result.success;
  150. }
  151. if (result.userException != null) {
  152. throw result.userException;
  153. }
  154. if (result.systemException != null) {
  155. throw result.systemException;
  156. }
  157. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getSyncChunk failed: unknown result");
  158. }
  159. public SyncChunk getFilteredSyncChunk(String authenticationToken, int afterUSN, int maxEntries, SyncChunkFilter filter) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
  160. {
  161. send_getFilteredSyncChunk(authenticationToken, afterUSN, maxEntries, filter);
  162. return recv_getFilteredSyncChunk();
  163. }
  164. public void send_getFilteredSyncChunk(String authenticationToken, int afterUSN, int maxEntries, SyncChunkFilter filter) throws TException
  165. {
  166. oprot_.writeMessageBegin(new TMessage("getFilteredSyncChunk", TMessageType.CALL, ++seqid_));
  167. getFilteredSyncChunk_args args = new getFilteredSyncChunk_args();
  168. args.setAuthenticationToken(authenticationToken);
  169. args.setAfterUSN(afterUSN);
  170. args.setMaxEntries(maxEntries);
  171. args.setFilter(filter);
  172. args.write(oprot_);
  173. oprot_.writeMessageEnd();
  174. oprot_.getTransport().flush();
  175. }
  176. public SyncChunk recv_getFilteredSyncChunk() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
  177. {
  178. TMessage msg = iprot_.readMessageBegin();
  179. if (msg.type == TMessageType.EXCEPTION) {
  180. TApplicationException x = TApplicationException.read(iprot_);
  181. iprot_.readMessageEnd();
  182. throw x;
  183. }
  184. if (msg.seqid != seqid_) {
  185. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getFilteredSyncChunk failed: out of sequence response");
  186. }
  187. getFilteredSyncChunk_result result = new getFilteredSyncChunk_result();
  188. result.read(iprot_);
  189. iprot_.readMessageEnd();
  190. if (result.isSetSuccess()) {
  191. return result.success;
  192. }
  193. if (result.userException != null) {
  194. throw result.userException;
  195. }
  196. if (result.systemException != null) {
  197. throw result.systemException;
  198. }
  199. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getFilteredSyncChunk failed: unknown result");
  200. }
  201. public SyncState getLinkedNotebookSyncState(String authenticationToken, com.evernote.edam.type.LinkedNotebook linkedNotebook) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  202. {
  203. send_getLinkedNotebookSyncState(authenticationToken, linkedNotebook);
  204. return recv_getLinkedNotebookSyncState();
  205. }
  206. public void send_getLinkedNotebookSyncState(String authenticationToken, com.evernote.edam.type.LinkedNotebook linkedNotebook) throws TException
  207. {
  208. oprot_.writeMessageBegin(new TMessage("getLinkedNotebookSyncState", TMessageType.CALL, ++seqid_));
  209. getLinkedNotebookSyncState_args args = new getLinkedNotebookSyncState_args();
  210. args.setAuthenticationToken(authenticationToken);
  211. args.setLinkedNotebook(linkedNotebook);
  212. args.write(oprot_);
  213. oprot_.writeMessageEnd();
  214. oprot_.getTransport().flush();
  215. }
  216. public SyncState recv_getLinkedNotebookSyncState() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  217. {
  218. TMessage msg = iprot_.readMessageBegin();
  219. if (msg.type == TMessageType.EXCEPTION) {
  220. TApplicationException x = TApplicationException.read(iprot_);
  221. iprot_.readMessageEnd();
  222. throw x;
  223. }
  224. if (msg.seqid != seqid_) {
  225. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getLinkedNotebookSyncState failed: out of sequence response");
  226. }
  227. getLinkedNotebookSyncState_result result = new getLinkedNotebookSyncState_result();
  228. result.read(iprot_);
  229. iprot_.readMessageEnd();
  230. if (result.isSetSuccess()) {
  231. return result.success;
  232. }
  233. if (result.userException != null) {
  234. throw result.userException;
  235. }
  236. if (result.systemException != null) {
  237. throw result.systemException;
  238. }
  239. if (result.notFoundException != null) {
  240. throw result.notFoundException;
  241. }
  242. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLinkedNotebookSyncState failed: unknown result");
  243. }
  244. public SyncChunk getLinkedNotebookSyncChunk(String authenticationToken, com.evernote.edam.type.LinkedNotebook linkedNotebook, int afterUSN, int maxEntries, boolean fullSyncOnly) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  245. {
  246. send_getLinkedNotebookSyncChunk(authenticationToken, linkedNotebook, afterUSN, maxEntries, fullSyncOnly);
  247. return recv_getLinkedNotebookSyncChunk();
  248. }
  249. public void send_getLinkedNotebookSyncChunk(String authenticationToken, com.evernote.edam.type.LinkedNotebook linkedNotebook, int afterUSN, int maxEntries, boolean fullSyncOnly) throws TException
  250. {
  251. oprot_.writeMessageBegin(new TMessage("getLinkedNotebookSyncChunk", TMessageType.CALL, ++seqid_));
  252. getLinkedNotebookSyncChunk_args args = new getLinkedNotebookSyncChunk_args();
  253. args.setAuthenticationToken(authenticationToken);
  254. args.setLinkedNotebook(linkedNotebook);
  255. args.setAfterUSN(afterUSN);
  256. args.setMaxEntries(maxEntries);
  257. args.setFullSyncOnly(fullSyncOnly);
  258. args.write(oprot_);
  259. oprot_.writeMessageEnd();
  260. oprot_.getTransport().flush();
  261. }
  262. public SyncChunk recv_getLinkedNotebookSyncChunk() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  263. {
  264. TMessage msg = iprot_.readMessageBegin();
  265. if (msg.type == TMessageType.EXCEPTION) {
  266. TApplicationException x = TApplicationException.read(iprot_);
  267. iprot_.readMessageEnd();
  268. throw x;
  269. }
  270. if (msg.seqid != seqid_) {
  271. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getLinkedNotebookSyncChunk failed: out of sequence response");
  272. }
  273. getLinkedNotebookSyncChunk_result result = new getLinkedNotebookSyncChunk_result();
  274. result.read(iprot_);
  275. iprot_.readMessageEnd();
  276. if (result.isSetSuccess()) {
  277. return result.success;
  278. }
  279. if (result.userException != null) {
  280. throw result.userException;
  281. }
  282. if (result.systemException != null) {
  283. throw result.systemException;
  284. }
  285. if (result.notFoundException != null) {
  286. throw result.notFoundException;
  287. }
  288. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLinkedNotebookSyncChunk failed: unknown result");
  289. }
  290. public List<com.evernote.edam.type.Notebook> listNotebooks(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
  291. {
  292. send_listNotebooks(authenticationToken);
  293. return recv_listNotebooks();
  294. }
  295. public void send_listNotebooks(String authenticationToken) throws TException
  296. {
  297. oprot_.writeMessageBegin(new TMessage("listNotebooks", TMessageType.CALL, ++seqid_));
  298. listNotebooks_args args = new listNotebooks_args();
  299. args.setAuthenticationToken(authenticationToken);
  300. args.write(oprot_);
  301. oprot_.writeMessageEnd();
  302. oprot_.getTransport().flush();
  303. }
  304. public List<com.evernote.edam.type.Notebook> recv_listNotebooks() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
  305. {
  306. TMessage msg = iprot_.readMessageBegin();
  307. if (msg.type == TMessageType.EXCEPTION) {
  308. TApplicationException x = TApplicationException.read(iprot_);
  309. iprot_.readMessageEnd();
  310. throw x;
  311. }
  312. if (msg.seqid != seqid_) {
  313. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "listNotebooks failed: out of sequence response");
  314. }
  315. listNotebooks_result result = new listNotebooks_result();
  316. result.read(iprot_);
  317. iprot_.readMessageEnd();
  318. if (result.isSetSuccess()) {
  319. return result.success;
  320. }
  321. if (result.userException != null) {
  322. throw result.userException;
  323. }
  324. if (result.systemException != null) {
  325. throw result.systemException;
  326. }
  327. throw new TApplicationException(TApplicationException.MISSING_RESULT, "listNotebooks failed: unknown result");
  328. }
  329. public com.evernote.edam.type.Notebook getNotebook(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  330. {
  331. send_getNotebook(authenticationToken, guid);
  332. return recv_getNotebook();
  333. }
  334. public void send_getNotebook(String authenticationToken, String guid) throws TException
  335. {
  336. oprot_.writeMessageBegin(new TMessage("getNotebook", TMessageType.CALL, ++seqid_));
  337. getNotebook_args args = new getNotebook_args();
  338. args.setAuthenticationToken(authenticationToken);
  339. args.setGuid(guid);
  340. args.write(oprot_);
  341. oprot_.writeMessageEnd();
  342. oprot_.getTransport().flush();
  343. }
  344. public com.evernote.edam.type.Notebook recv_getNotebook() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  345. {
  346. TMessage msg = iprot_.readMessageBegin();
  347. if (msg.type == TMessageType.EXCEPTION) {
  348. TApplicationException x = TApplicationException.read(iprot_);
  349. iprot_.readMessageEnd();
  350. throw x;
  351. }
  352. if (msg.seqid != seqid_) {
  353. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getNotebook failed: out of sequence response");
  354. }
  355. getNotebook_result result = new getNotebook_result();
  356. result.read(iprot_);
  357. iprot_.readMessageEnd();
  358. if (result.isSetSuccess()) {
  359. return result.success;
  360. }
  361. if (result.userException != null) {
  362. throw result.userException;
  363. }
  364. if (result.systemException != null) {
  365. throw result.systemException;
  366. }
  367. if (result.notFoundException != null) {
  368. throw result.notFoundException;
  369. }
  370. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getNotebook failed: unknown result");
  371. }
  372. public com.evernote.edam.type.Notebook getDefaultNotebook(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
  373. {
  374. send_getDefaultNotebook(authenticationToken);
  375. return recv_getDefaultNotebook();
  376. }
  377. public void send_getDefaultNotebook(String authenticationToken) throws TException
  378. {
  379. oprot_.writeMessageBegin(new TMessage("getDefaultNotebook", TMessageType.CALL, ++seqid_));
  380. getDefaultNotebook_args args = new getDefaultNotebook_args();
  381. args.setAuthenticationToken(authenticationToken);
  382. args.write(oprot_);
  383. oprot_.writeMessageEnd();
  384. oprot_.getTransport().flush();
  385. }
  386. public com.evernote.edam.type.Notebook recv_getDefaultNotebook() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
  387. {
  388. TMessage msg = iprot_.readMessageBegin();
  389. if (msg.type == TMessageType.EXCEPTION) {
  390. TApplicationException x = TApplicationException.read(iprot_);
  391. iprot_.readMessageEnd();
  392. throw x;
  393. }
  394. if (msg.seqid != seqid_) {
  395. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getDefaultNotebook failed: out of sequence response");
  396. }
  397. getDefaultNotebook_result result = new getDefaultNotebook_result();
  398. result.read(iprot_);
  399. iprot_.readMessageEnd();
  400. if (result.isSetSuccess()) {
  401. return result.success;
  402. }
  403. if (result.userException != null) {
  404. throw result.userException;
  405. }
  406. if (result.systemException != null) {
  407. throw result.systemException;
  408. }
  409. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getDefaultNotebook failed: unknown result");
  410. }
  411. public com.evernote.edam.type.Notebook createNotebook(String authenticationToken, com.evernote.edam.type.Notebook notebook) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
  412. {
  413. send_createNotebook(authenticationToken, notebook);
  414. return recv_createNotebook();
  415. }
  416. public void send_createNotebook(String authenticationToken, com.evernote.edam.type.Notebook notebook) throws TException
  417. {
  418. oprot_.writeMessageBegin(new TMessage("createNotebook", TMessageType.CALL, ++seqid_));
  419. createNotebook_args args = new createNotebook_args();
  420. args.setAuthenticationToken(authenticationToken);
  421. args.setNotebook(notebook);
  422. args.write(oprot_);
  423. oprot_.writeMessageEnd();
  424. oprot_.getTransport().flush();
  425. }
  426. public com.evernote.edam.type.Notebook recv_createNotebook() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
  427. {
  428. TMessage msg = iprot_.readMessageBegin();
  429. if (msg.type == TMessageType.EXCEPTION) {
  430. TApplicationException x = TApplicationException.read(iprot_);
  431. iprot_.readMessageEnd();
  432. throw x;
  433. }
  434. if (msg.seqid != seqid_) {
  435. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "createNotebook failed: out of sequence response");
  436. }
  437. createNotebook_result result = new createNotebook_result();
  438. result.read(iprot_);
  439. iprot_.readMessageEnd();
  440. if (result.isSetSuccess()) {
  441. return result.success;
  442. }
  443. if (result.userException != null) {
  444. throw result.userException;
  445. }
  446. if (result.systemException != null) {
  447. throw result.systemException;
  448. }
  449. throw new TApplicationException(TApplicationException.MISSING_RESULT, "createNotebook failed: unknown result");
  450. }
  451. public int updateNotebook(String authenticationToken, com.evernote.edam.type.Notebook notebook) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  452. {
  453. send_updateNotebook(authenticationToken, notebook);
  454. return recv_updateNotebook();
  455. }
  456. public void send_updateNotebook(String authenticationToken, com.evernote.edam.type.Notebook notebook) throws TException
  457. {
  458. oprot_.writeMessageBegin(new TMessage("updateNotebook", TMessageType.CALL, ++seqid_));
  459. updateNotebook_args args = new updateNotebook_args();
  460. args.setAuthenticationToken(authenticationToken);
  461. args.setNotebook(notebook);
  462. args.write(oprot_);
  463. oprot_.writeMessageEnd();
  464. oprot_.getTransport().flush();
  465. }
  466. public int recv_updateNotebook() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  467. {
  468. TMessage msg = iprot_.readMessageBegin();
  469. if (msg.type == TMessageType.EXCEPTION) {
  470. TApplicationException x = TApplicationException.read(iprot_);
  471. iprot_.readMessageEnd();
  472. throw x;
  473. }
  474. if (msg.seqid != seqid_) {
  475. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "updateNotebook failed: out of sequence response");
  476. }
  477. updateNotebook_result result = new updateNotebook_result();
  478. result.read(iprot_);
  479. iprot_.readMessageEnd();
  480. if (result.isSetSuccess()) {
  481. return result.success;
  482. }
  483. if (result.userException != null) {
  484. throw result.userException;
  485. }
  486. if (result.systemException != null) {
  487. throw result.systemException;
  488. }
  489. if (result.notFoundException != null) {
  490. throw result.notFoundException;
  491. }
  492. throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateNotebook failed: unknown result");
  493. }
  494. public int expungeNotebook(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  495. {
  496. send_expungeNotebook(authenticationToken, guid);
  497. return recv_expungeNotebook();
  498. }
  499. public void send_expungeNotebook(String authenticationToken, String guid) throws TException
  500. {
  501. oprot_.writeMessageBegin(new TMessage("expungeNotebook", TMessageType.CALL, ++seqid_));
  502. expungeNotebook_args args = new expungeNotebook_args();
  503. args.setAuthenticationToken(authenticationToken);
  504. args.setGuid(guid);
  505. args.write(oprot_);
  506. oprot_.writeMessageEnd();
  507. oprot_.getTransport().flush();
  508. }
  509. public int recv_expungeNotebook() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  510. {
  511. TMessage msg = iprot_.readMessageBegin();
  512. if (msg.type == TMessageType.EXCEPTION) {
  513. TApplicationException x = TApplicationException.read(iprot_);
  514. iprot_.readMessageEnd();
  515. throw x;
  516. }
  517. if (msg.seqid != seqid_) {
  518. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "expungeNotebook failed: out of sequence response");
  519. }
  520. expungeNotebook_result result = new expungeNotebook_result();
  521. result.read(iprot_);
  522. iprot_.readMessageEnd();
  523. if (result.isSetSuccess()) {
  524. return result.success;
  525. }
  526. if (result.userException != null) {
  527. throw result.userException;
  528. }
  529. if (result.systemException != null) {
  530. throw result.systemException;
  531. }
  532. if (result.notFoundException != null) {
  533. throw result.notFoundException;
  534. }
  535. throw new TApplicationException(TApplicationException.MISSING_RESULT, "expungeNotebook failed: unknown result");
  536. }
  537. public List<com.evernote.edam.type.Tag> listTags(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
  538. {
  539. send_listTags(authenticationToken);
  540. return recv_listTags();
  541. }
  542. public void send_listTags(String authenticationToken) throws TException
  543. {
  544. oprot_.writeMessageBegin(new TMessage("listTags", TMessageType.CALL, ++seqid_));
  545. listTags_args args = new listTags_args();
  546. args.setAuthenticationToken(authenticationToken);
  547. args.write(oprot_);
  548. oprot_.writeMessageEnd();
  549. oprot_.getTransport().flush();
  550. }
  551. public List<com.evernote.edam.type.Tag> recv_listTags() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
  552. {
  553. TMessage msg = iprot_.readMessageBegin();
  554. if (msg.type == TMessageType.EXCEPTION) {
  555. TApplicationException x = TApplicationException.read(iprot_);
  556. iprot_.readMessageEnd();
  557. throw x;
  558. }
  559. if (msg.seqid != seqid_) {
  560. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "listTags failed: out of sequence response");
  561. }
  562. listTags_result result = new listTags_result();
  563. result.read(iprot_);
  564. iprot_.readMessageEnd();
  565. if (result.isSetSuccess()) {
  566. return result.success;
  567. }
  568. if (result.userException != null) {
  569. throw result.userException;
  570. }
  571. if (result.systemException != null) {
  572. throw result.systemException;
  573. }
  574. throw new TApplicationException(TApplicationException.MISSING_RESULT, "listTags failed: unknown result");
  575. }
  576. public List<com.evernote.edam.type.Tag> listTagsByNotebook(String authenticationToken, String notebookGuid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  577. {
  578. send_listTagsByNotebook(authenticationToken, notebookGuid);
  579. return recv_listTagsByNotebook();
  580. }
  581. public void send_listTagsByNotebook(String authenticationToken, String notebookGuid) throws TException
  582. {
  583. oprot_.writeMessageBegin(new TMessage("listTagsByNotebook", TMessageType.CALL, ++seqid_));
  584. listTagsByNotebook_args args = new listTagsByNotebook_args();
  585. args.setAuthenticationToken(authenticationToken);
  586. args.setNotebookGuid(notebookGuid);
  587. args.write(oprot_);
  588. oprot_.writeMessageEnd();
  589. oprot_.getTransport().flush();
  590. }
  591. public List<com.evernote.edam.type.Tag> recv_listTagsByNotebook() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  592. {
  593. TMessage msg = iprot_.readMessageBegin();
  594. if (msg.type == TMessageType.EXCEPTION) {
  595. TApplicationException x = TApplicationException.read(iprot_);
  596. iprot_.readMessageEnd();
  597. throw x;
  598. }
  599. if (msg.seqid != seqid_) {
  600. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "listTagsByNotebook failed: out of sequence response");
  601. }
  602. listTagsByNotebook_result result = new listTagsByNotebook_result();
  603. result.read(iprot_);
  604. iprot_.readMessageEnd();
  605. if (result.isSetSuccess()) {
  606. return result.success;
  607. }
  608. if (result.userException != null) {
  609. throw result.userException;
  610. }
  611. if (result.systemException != null) {
  612. throw result.systemException;
  613. }
  614. if (result.notFoundException != null) {
  615. throw result.notFoundException;
  616. }
  617. throw new TApplicationException(TApplicationException.MISSING_RESULT, "listTagsByNotebook failed: unknown result");
  618. }
  619. public com.evernote.edam.type.Tag getTag(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  620. {
  621. send_getTag(authenticationToken, guid);
  622. return recv_getTag();
  623. }
  624. public void send_getTag(String authenticationToken, String guid) throws TException
  625. {
  626. oprot_.writeMessageBegin(new TMessage("getTag", TMessageType.CALL, ++seqid_));
  627. getTag_args args = new getTag_args();
  628. args.setAuthenticationToken(authenticationToken);
  629. args.setGuid(guid);
  630. args.write(oprot_);
  631. oprot_.writeMessageEnd();
  632. oprot_.getTransport().flush();
  633. }
  634. public com.evernote.edam.type.Tag recv_getTag() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  635. {
  636. TMessage msg = iprot_.readMessageBegin();
  637. if (msg.type == TMessageType.EXCEPTION) {
  638. TApplicationException x = TApplicationException.read(iprot_);
  639. iprot_.readMessageEnd();
  640. throw x;
  641. }
  642. if (msg.seqid != seqid_) {
  643. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getTag failed: out of sequence response");
  644. }
  645. getTag_result result = new getTag_result();
  646. result.read(iprot_);
  647. iprot_.readMessageEnd();
  648. if (result.isSetSuccess()) {
  649. return result.success;
  650. }
  651. if (result.userException != null) {
  652. throw result.userException;
  653. }
  654. if (result.systemException != null) {
  655. throw result.systemException;
  656. }
  657. if (result.notFoundException != null) {
  658. throw result.notFoundException;
  659. }
  660. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTag failed: unknown result");
  661. }
  662. public com.evernote.edam.type.Tag createTag(String authenticationToken, com.evernote.edam.type.Tag tag) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  663. {
  664. send_createTag(authenticationToken, tag);
  665. return recv_createTag();
  666. }
  667. public void send_createTag(String authenticationToken, com.evernote.edam.type.Tag tag) throws TException
  668. {
  669. oprot_.writeMessageBegin(new TMessage("createTag", TMessageType.CALL, ++seqid_));
  670. createTag_args args = new createTag_args();
  671. args.setAuthenticationToken(authenticationToken);
  672. args.setTag(tag);
  673. args.write(oprot_);
  674. oprot_.writeMessageEnd();
  675. oprot_.getTransport().flush();
  676. }
  677. public com.evernote.edam.type.Tag recv_createTag() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  678. {
  679. TMessage msg = iprot_.readMessageBegin();
  680. if (msg.type == TMessageType.EXCEPTION) {
  681. TApplicationException x = TApplicationException.read(iprot_);
  682. iprot_.readMessageEnd();
  683. throw x;
  684. }
  685. if (msg.seqid != seqid_) {
  686. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "createTag failed: out of sequence response");
  687. }
  688. createTag_result result = new createTag_result();
  689. result.read(iprot_);
  690. iprot_.readMessageEnd();
  691. if (result.isSetSuccess()) {
  692. return result.success;
  693. }
  694. if (result.userException != null) {
  695. throw result.userException;
  696. }
  697. if (result.systemException != null) {
  698. throw result.systemException;
  699. }
  700. if (result.notFoundException != null) {
  701. throw result.notFoundException;
  702. }
  703. throw new TApplicationException(TApplicationException.MISSING_RESULT, "createTag failed: unknown result");
  704. }
  705. public int updateTag(String authenticationToken, com.evernote.edam.type.Tag tag) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  706. {
  707. send_updateTag(authenticationToken, tag);
  708. return recv_updateTag();
  709. }
  710. public void send_updateTag(String authenticationToken, com.evernote.edam.type.Tag tag) throws TException
  711. {
  712. oprot_.writeMessageBegin(new TMessage("updateTag", TMessageType.CALL, ++seqid_));
  713. updateTag_args args = new updateTag_args();
  714. args.setAuthenticationToken(authenticationToken);
  715. args.setTag(tag);
  716. args.write(oprot_);
  717. oprot_.writeMessageEnd();
  718. oprot_.getTransport().flush();
  719. }
  720. public int recv_updateTag() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  721. {
  722. TMessage msg = iprot_.readMessageBegin();
  723. if (msg.type == TMessageType.EXCEPTION) {
  724. TApplicationException x = TApplicationException.read(iprot_);
  725. iprot_.readMessageEnd();
  726. throw x;
  727. }
  728. if (msg.seqid != seqid_) {
  729. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "updateTag failed: out of sequence response");
  730. }
  731. updateTag_result result = new updateTag_result();
  732. result.read(iprot_);
  733. iprot_.readMessageEnd();
  734. if (result.isSetSuccess()) {
  735. return result.success;
  736. }
  737. if (result.userException != null) {
  738. throw result.userException;
  739. }
  740. if (result.systemException != null) {
  741. throw result.systemException;
  742. }
  743. if (result.notFoundException != null) {
  744. throw result.notFoundException;
  745. }
  746. throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateTag failed: unknown result");
  747. }
  748. public void untagAll(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  749. {
  750. send_untagAll(authenticationToken, guid);
  751. recv_untagAll();
  752. }
  753. public void send_untagAll(String authenticationToken, String guid) throws TException
  754. {
  755. oprot_.writeMessageBegin(new TMessage("untagAll", TMessageType.CALL, ++seqid_));
  756. untagAll_args args = new untagAll_args();
  757. args.setAuthenticationToken(authenticationToken);
  758. args.setGuid(guid);
  759. args.write(oprot_);
  760. oprot_.writeMessageEnd();
  761. oprot_.getTransport().flush();
  762. }
  763. public void recv_untagAll() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  764. {
  765. TMessage msg = iprot_.readMessageBegin();
  766. if (msg.type == TMessageType.EXCEPTION) {
  767. TApplicationException x = TApplicationException.read(iprot_);
  768. iprot_.readMessageEnd();
  769. throw x;
  770. }
  771. if (msg.seqid != seqid_) {
  772. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "untagAll failed: out of sequence response");
  773. }
  774. untagAll_result result = new untagAll_result();
  775. result.read(iprot_);
  776. iprot_.readMessageEnd();
  777. if (result.userException != null) {
  778. throw result.userException;
  779. }
  780. if (result.systemException != null) {
  781. throw result.systemException;
  782. }
  783. if (result.notFoundException != null) {
  784. throw result.notFoundException;
  785. }
  786. return;
  787. }
  788. public int expungeTag(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  789. {
  790. send_expungeTag(authenticationToken, guid);
  791. return recv_expungeTag();
  792. }
  793. public void send_expungeTag(String authenticationToken, String guid) throws TException
  794. {
  795. oprot_.writeMessageBegin(new TMessage("expungeTag", TMessageType.CALL, ++seqid_));
  796. expungeTag_args args = new expungeTag_args();
  797. args.setAuthenticationToken(authenticationToken);
  798. args.setGuid(guid);
  799. args.write(oprot_);
  800. oprot_.writeMessageEnd();
  801. oprot_.getTransport().flush();
  802. }
  803. public int recv_expungeTag() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  804. {
  805. TMessage msg = iprot_.readMessageBegin();
  806. if (msg.type == TMessageType.EXCEPTION) {
  807. TApplicationException x = TApplicationException.read(iprot_);
  808. iprot_.readMessageEnd();
  809. throw x;
  810. }
  811. if (msg.seqid != seqid_) {
  812. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "expungeTag failed: out of sequence response");
  813. }
  814. expungeTag_result result = new expungeTag_result();
  815. result.read(iprot_);
  816. iprot_.readMessageEnd();
  817. if (result.isSetSuccess()) {
  818. return result.success;
  819. }
  820. if (result.userException != null) {
  821. throw result.userException;
  822. }
  823. if (result.systemException != null) {
  824. throw result.systemException;
  825. }
  826. if (result.notFoundException != null) {
  827. throw result.notFoundException;
  828. }
  829. throw new TApplicationException(TApplicationException.MISSING_RESULT, "expungeTag failed: unknown result");
  830. }
  831. public List<com.evernote.edam.type.SavedSearch> listSearches(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
  832. {
  833. send_listSearches(authenticationToken);
  834. return recv_listSearches();
  835. }
  836. public void send_listSearches(String authenticationToken) throws TException
  837. {
  838. oprot_.writeMessageBegin(new TMessage("listSearches", TMessageType.CALL, ++seqid_));
  839. listSearches_args args = new listSearches_args();
  840. args.setAuthenticationToken(authenticationToken);
  841. args.write(oprot_);
  842. oprot_.writeMessageEnd();
  843. oprot_.getTransport().flush();
  844. }
  845. public List<com.evernote.edam.type.SavedSearch> recv_listSearches() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
  846. {
  847. TMessage msg = iprot_.readMessageBegin();
  848. if (msg.type == TMessageType.EXCEPTION) {
  849. TApplicationException x = TApplicationException.read(iprot_);
  850. iprot_.readMessageEnd();
  851. throw x;
  852. }
  853. if (msg.seqid != seqid_) {
  854. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "listSearches failed: out of sequence response");
  855. }
  856. listSearches_result result = new listSearches_result();
  857. result.read(iprot_);
  858. iprot_.readMessageEnd();
  859. if (result.isSetSuccess()) {
  860. return result.success;
  861. }
  862. if (result.userException != null) {
  863. throw result.userException;
  864. }
  865. if (result.systemException != null) {
  866. throw result.systemException;
  867. }
  868. throw new TApplicationException(TApplicationException.MISSING_RESULT, "listSearches failed: unknown result");
  869. }
  870. public com.evernote.edam.type.SavedSearch getSearch(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  871. {
  872. send_getSearch(authenticationToken, guid);
  873. return recv_getSearch();
  874. }
  875. public void send_getSearch(String authenticationToken, String guid) throws TException
  876. {
  877. oprot_.writeMessageBegin(new TMessage("getSearch", TMessageType.CALL, ++seqid_));
  878. getSearch_args args = new getSearch_args();
  879. args.setAuthenticationToken(authenticationToken);
  880. args.setGuid(guid);
  881. args.write(oprot_);
  882. oprot_.writeMessageEnd();
  883. oprot_.getTransport().flush();
  884. }
  885. public com.evernote.edam.type.SavedSearch recv_getSearch() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  886. {
  887. TMessage msg = iprot_.readMessageBegin();
  888. if (msg.type == TMessageType.EXCEPTION) {
  889. TApplicationException x = TApplicationException.read(iprot_);
  890. iprot_.readMessageEnd();
  891. throw x;
  892. }
  893. if (msg.seqid != seqid_) {
  894. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getSearch failed: out of sequence response");
  895. }
  896. getSearch_result result = new getSearch_result();
  897. result.read(iprot_);
  898. iprot_.readMessageEnd();
  899. if (result.isSetSuccess()) {
  900. return result.success;
  901. }
  902. if (result.userException != null) {
  903. throw result.userException;
  904. }
  905. if (result.systemException != null) {
  906. throw result.systemException;
  907. }
  908. if (result.notFoundException != null) {
  909. throw result.notFoundException;
  910. }
  911. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getSearch failed: unknown result");
  912. }
  913. public com.evernote.edam.type.SavedSearch createSearch(String authenticationToken, com.evernote.edam.type.SavedSearch search) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
  914. {
  915. send_createSearch(authenticationToken, search);
  916. return recv_createSearch();
  917. }
  918. public void send_createSearch(String authenticationToken, com.evernote.edam.type.SavedSearch search) throws TException
  919. {
  920. oprot_.writeMessageBegin(new TMessage("createSearch", TMessageType.CALL, ++seqid_));
  921. createSearch_args args = new createSearch_args();
  922. args.setAuthenticationToken(authenticationToken);
  923. args.setSearch(search);
  924. args.write(oprot_);
  925. oprot_.writeMessageEnd();
  926. oprot_.getTransport().flush();
  927. }
  928. public com.evernote.edam.type.SavedSearch recv_createSearch() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
  929. {
  930. TMessage msg = iprot_.readMessageBegin();
  931. if (msg.type == TMessageType.EXCEPTION) {
  932. TApplicationException x = TApplicationException.read(iprot_);
  933. iprot_.readMessageEnd();
  934. throw x;
  935. }
  936. if (msg.seqid != seqid_) {
  937. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "createSearch failed: out of sequence response");
  938. }
  939. createSearch_result result = new createSearch_result();
  940. result.read(iprot_);
  941. iprot_.readMessageEnd();
  942. if (result.isSetSuccess()) {
  943. return result.success;
  944. }
  945. if (result.userException != null) {
  946. throw result.userException;
  947. }
  948. if (result.systemException != null) {
  949. throw result.systemException;
  950. }
  951. throw new TApplicationException(TApplicationException.MISSING_RESULT, "createSearch failed: unknown result");
  952. }
  953. public int updateSearch(String authenticationToken, com.evernote.edam.type.SavedSearch search) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  954. {
  955. send_updateSearch(authenticationToken, search);
  956. return recv_updateSearch();
  957. }
  958. public void send_updateSearch(String authenticationToken, com.evernote.edam.type.SavedSearch search) throws TException
  959. {
  960. oprot_.writeMessageBegin(new TMessage("updateSearch", TMessageType.CALL, ++seqid_));
  961. updateSearch_args args = new updateSearch_args();
  962. args.setAuthenticationToken(authenticationToken);
  963. args.setSearch(search);
  964. args.write(oprot_);
  965. oprot_.writeMessageEnd();
  966. oprot_.getTransport().flush();
  967. }
  968. public int recv_updateSearch() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  969. {
  970. TMessage msg = iprot_.readMessageBegin();
  971. if (msg.type == TMessageType.EXCEPTION) {
  972. TApplicationException x = TApplicationException.read(iprot_);
  973. iprot_.readMessageEnd();
  974. throw x;
  975. }
  976. if (msg.seqid != seqid_) {
  977. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "updateSearch failed: out of sequence response");
  978. }
  979. updateSearch_result result = new updateSearch_result();
  980. result.read(iprot_);
  981. iprot_.readMessageEnd();
  982. if (result.isSetSuccess()) {
  983. return result.success;
  984. }
  985. if (result.userException != null) {
  986. throw result.userException;
  987. }
  988. if (result.systemException != null) {
  989. throw result.systemException;
  990. }
  991. if (result.notFoundException != null) {
  992. throw result.notFoundException;
  993. }
  994. throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateSearch failed: unknown result");
  995. }
  996. public int expungeSearch(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  997. {
  998. send_expungeSearch(authenticationToken, guid);
  999. return recv_expungeSearch();
  1000. }
  1001. public void send_expungeSearch(String authenticationToken, String guid) throws TException
  1002. {
  1003. oprot_.writeMessageBegin(new TMessage("expungeSearch", TMessageType.CALL, ++seqid_));
  1004. expungeSearch_args args = new expungeSearch_args();
  1005. args.setAuthenticationToken(authenticationToken);
  1006. args.setGuid(guid);
  1007. args.write(oprot_);
  1008. oprot_.writeMessageEnd();
  1009. oprot_.getTransport().flush();
  1010. }
  1011. public int recv_expungeSearch() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1012. {
  1013. TMessage msg = iprot_.readMessageBegin();
  1014. if (msg.type == TMessageType.EXCEPTION) {
  1015. TApplicationException x = TApplicationException.read(iprot_);
  1016. iprot_.readMessageEnd();
  1017. throw x;
  1018. }
  1019. if (msg.seqid != seqid_) {
  1020. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "expungeSearch failed: out of sequence response");
  1021. }
  1022. expungeSearch_result result = new expungeSearch_result();
  1023. result.read(iprot_);
  1024. iprot_.readMessageEnd();
  1025. if (result.isSetSuccess()) {
  1026. return result.success;
  1027. }
  1028. if (result.userException != null) {
  1029. throw result.userException;
  1030. }
  1031. if (result.systemException != null) {
  1032. throw result.systemException;
  1033. }
  1034. if (result.notFoundException != null) {
  1035. throw result.notFoundException;
  1036. }
  1037. throw new TApplicationException(TApplicationException.MISSING_RESULT, "expungeSearch failed: unknown result");
  1038. }
  1039. public NoteList findNotes(String authenticationToken, NoteFilter filter, int offset, int maxNotes) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1040. {
  1041. send_findNotes(authenticationToken, filter, offset, maxNotes);
  1042. return recv_findNotes();
  1043. }
  1044. public void send_findNotes(String authenticationToken, NoteFilter filter, int offset, int maxNotes) throws TException
  1045. {
  1046. oprot_.writeMessageBegin(new TMessage("findNotes", TMessageType.CALL, ++seqid_));
  1047. findNotes_args args = new findNotes_args();
  1048. args.setAuthenticationToken(authenticationToken);
  1049. args.setFilter(filter);
  1050. args.setOffset(offset);
  1051. args.setMaxNotes(maxNotes);
  1052. args.write(oprot_);
  1053. oprot_.writeMessageEnd();
  1054. oprot_.getTransport().flush();
  1055. }
  1056. public NoteList recv_findNotes() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1057. {
  1058. TMessage msg = iprot_.readMessageBegin();
  1059. if (msg.type == TMessageType.EXCEPTION) {
  1060. TApplicationException x = TApplicationException.read(iprot_);
  1061. iprot_.readMessageEnd();
  1062. throw x;
  1063. }
  1064. if (msg.seqid != seqid_) {
  1065. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "findNotes failed: out of sequence response");
  1066. }
  1067. findNotes_result result = new findNotes_result();
  1068. result.read(iprot_);
  1069. iprot_.readMessageEnd();
  1070. if (result.isSetSuccess()) {
  1071. return result.success;
  1072. }
  1073. if (result.userException != null) {
  1074. throw result.userException;
  1075. }
  1076. if (result.systemException != null) {
  1077. throw result.systemException;
  1078. }
  1079. if (result.notFoundException != null) {
  1080. throw result.notFoundException;
  1081. }
  1082. throw new TApplicationException(TApplicationException.MISSING_RESULT, "findNotes failed: unknown result");
  1083. }
  1084. public int findNoteOffset(String authenticationToken, NoteFilter filter, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1085. {
  1086. send_findNoteOffset(authenticationToken, filter, guid);
  1087. return recv_findNoteOffset();
  1088. }
  1089. public void send_findNoteOffset(String authenticationToken, NoteFilter filter, String guid) throws TException
  1090. {
  1091. oprot_.writeMessageBegin(new TMessage("findNoteOffset", TMessageType.CALL, ++seqid_));
  1092. findNoteOffset_args args = new findNoteOffset_args();
  1093. args.setAuthenticationToken(authenticationToken);
  1094. args.setFilter(filter);
  1095. args.setGuid(guid);
  1096. args.write(oprot_);
  1097. oprot_.writeMessageEnd();
  1098. oprot_.getTransport().flush();
  1099. }
  1100. public int recv_findNoteOffset() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1101. {
  1102. TMessage msg = iprot_.readMessageBegin();
  1103. if (msg.type == TMessageType.EXCEPTION) {
  1104. TApplicationException x = TApplicationException.read(iprot_);
  1105. iprot_.readMessageEnd();
  1106. throw x;
  1107. }
  1108. if (msg.seqid != seqid_) {
  1109. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "findNoteOffset failed: out of sequence response");
  1110. }
  1111. findNoteOffset_result result = new findNoteOffset_result();
  1112. result.read(iprot_);
  1113. iprot_.readMessageEnd();
  1114. if (result.isSetSuccess()) {
  1115. return result.success;
  1116. }
  1117. if (result.userException != null) {
  1118. throw result.userException;
  1119. }
  1120. if (result.systemException != null) {
  1121. throw result.systemException;
  1122. }
  1123. if (result.notFoundException != null) {
  1124. throw result.notFoundException;
  1125. }
  1126. throw new TApplicationException(TApplicationException.MISSING_RESULT, "findNoteOffset failed: unknown result");
  1127. }
  1128. public NotesMetadataList findNotesMetadata(String authenticationToken, NoteFilter filter, int offset, int maxNotes, NotesMetadataResultSpec resultSpec) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1129. {
  1130. send_findNotesMetadata(authenticationToken, filter, offset, maxNotes, resultSpec);
  1131. return recv_findNotesMetadata();
  1132. }
  1133. public void send_findNotesMetadata(String authenticationToken, NoteFilter filter, int offset, int maxNotes, NotesMetadataResultSpec resultSpec) throws TException
  1134. {
  1135. oprot_.writeMessageBegin(new TMessage("findNotesMetadata", TMessageType.CALL, ++seqid_));
  1136. findNotesMetadata_args args = new findNotesMetadata_args();
  1137. args.setAuthenticationToken(authenticationToken);
  1138. args.setFilter(filter);
  1139. args.setOffset(offset);
  1140. args.setMaxNotes(maxNotes);
  1141. args.setResultSpec(resultSpec);
  1142. args.write(oprot_);
  1143. oprot_.writeMessageEnd();
  1144. oprot_.getTransport().flush();
  1145. }
  1146. public NotesMetadataList recv_findNotesMetadata() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1147. {
  1148. TMessage msg = iprot_.readMessageBegin();
  1149. if (msg.type == TMessageType.EXCEPTION) {
  1150. TApplicationException x = TApplicationException.read(iprot_);
  1151. iprot_.readMessageEnd();
  1152. throw x;
  1153. }
  1154. if (msg.seqid != seqid_) {
  1155. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "findNotesMetadata failed: out of sequence response");
  1156. }
  1157. findNotesMetadata_result result = new findNotesMetadata_result();
  1158. result.read(iprot_);
  1159. iprot_.readMessageEnd();
  1160. if (result.isSetSuccess()) {
  1161. return result.success;
  1162. }
  1163. if (result.userException != null) {
  1164. throw result.userException;
  1165. }
  1166. if (result.systemException != null) {
  1167. throw result.systemException;
  1168. }
  1169. if (result.notFoundException != null) {
  1170. throw result.notFoundException;
  1171. }
  1172. throw new TApplicationException(TApplicationException.MISSING_RESULT, "findNotesMetadata failed: unknown result");
  1173. }
  1174. public NoteCollectionCounts findNoteCounts(String authenticationToken, NoteFilter filter, boolean withTrash) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1175. {
  1176. send_findNoteCounts(authenticationToken, filter, withTrash);
  1177. return recv_findNoteCounts();
  1178. }
  1179. public void send_findNoteCounts(String authenticationToken, NoteFilter filter, boolean withTrash) throws TException
  1180. {
  1181. oprot_.writeMessageBegin(new TMessage("findNoteCounts", TMessageType.CALL, ++seqid_));
  1182. findNoteCounts_args args = new findNoteCounts_args();
  1183. args.setAuthenticationToken(authenticationToken);
  1184. args.setFilter(filter);
  1185. args.setWithTrash(withTrash);
  1186. args.write(oprot_);
  1187. oprot_.writeMessageEnd();
  1188. oprot_.getTransport().flush();
  1189. }
  1190. public NoteCollectionCounts recv_findNoteCounts() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1191. {
  1192. TMessage msg = iprot_.readMessageBegin();
  1193. if (msg.type == TMessageType.EXCEPTION) {
  1194. TApplicationException x = TApplicationException.read(iprot_);
  1195. iprot_.readMessageEnd();
  1196. throw x;
  1197. }
  1198. if (msg.seqid != seqid_) {
  1199. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "findNoteCounts failed: out of sequence response");
  1200. }
  1201. findNoteCounts_result result = new findNoteCounts_result();
  1202. result.read(iprot_);
  1203. iprot_.readMessageEnd();
  1204. if (result.isSetSuccess()) {
  1205. return result.success;
  1206. }
  1207. if (result.userException != null) {
  1208. throw result.userException;
  1209. }
  1210. if (result.systemException != null) {
  1211. throw result.systemException;
  1212. }
  1213. if (result.notFoundException != null) {
  1214. throw result.notFoundException;
  1215. }
  1216. throw new TApplicationException(TApplicationException.MISSING_RESULT, "findNoteCounts failed: unknown result");
  1217. }
  1218. public com.evernote.edam.type.Note getNote(String authenticationToken, String guid, boolean withContent, boolean withResourcesData, boolean withResourcesRecognition, boolean withResourcesAlternateData) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1219. {
  1220. send_getNote(authenticationToken, guid, withContent, withResourcesData, withResourcesRecognition, withResourcesAlternateData);
  1221. return recv_getNote();
  1222. }
  1223. public void send_getNote(String authenticationToken, String guid, boolean withContent, boolean withResourcesData, boolean withResourcesRecognition, boolean withResourcesAlternateData) throws TException
  1224. {
  1225. oprot_.writeMessageBegin(new TMessage("getNote", TMessageType.CALL, ++seqid_));
  1226. getNote_args args = new getNote_args();
  1227. args.setAuthenticationToken(authenticationToken);
  1228. args.setGuid(guid);
  1229. args.setWithContent(withContent);
  1230. args.setWithResourcesData(withResourcesData);
  1231. args.setWithResourcesRecognition(withResourcesRecognition);
  1232. args.setWithResourcesAlternateData(withResourcesAlternateData);
  1233. args.write(oprot_);
  1234. oprot_.writeMessageEnd();
  1235. oprot_.getTransport().flush();
  1236. }
  1237. public com.evernote.edam.type.Note recv_getNote() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1238. {
  1239. TMessage msg = iprot_.readMessageBegin();
  1240. if (msg.type == TMessageType.EXCEPTION) {
  1241. TApplicationException x = TApplicationException.read(iprot_);
  1242. iprot_.readMessageEnd();
  1243. throw x;
  1244. }
  1245. if (msg.seqid != seqid_) {
  1246. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getNote failed: out of sequence response");
  1247. }
  1248. getNote_result result = new getNote_result();
  1249. result.read(iprot_);
  1250. iprot_.readMessageEnd();
  1251. if (result.isSetSuccess()) {
  1252. return result.success;
  1253. }
  1254. if (result.userException != null) {
  1255. throw result.userException;
  1256. }
  1257. if (result.systemException != null) {
  1258. throw result.systemException;
  1259. }
  1260. if (result.notFoundException != null) {
  1261. throw result.notFoundException;
  1262. }
  1263. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getNote failed: unknown result");
  1264. }
  1265. public com.evernote.edam.type.LazyMap getNoteApplicationData(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1266. {
  1267. send_getNoteApplicationData(authenticationToken, guid);
  1268. return recv_getNoteApplicationData();
  1269. }
  1270. public void send_getNoteApplicationData(String authenticationToken, String guid) throws TException
  1271. {
  1272. oprot_.writeMessageBegin(new TMessage("getNoteApplicationData", TMessageType.CALL, ++seqid_));
  1273. getNoteApplicationData_args args = new getNoteApplicationData_args();
  1274. args.setAuthenticationToken(authenticationToken);
  1275. args.setGuid(guid);
  1276. args.write(oprot_);
  1277. oprot_.writeMessageEnd();
  1278. oprot_.getTransport().flush();
  1279. }
  1280. public com.evernote.edam.type.LazyMap recv_getNoteApplicationData() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1281. {
  1282. TMessage msg = iprot_.readMessageBegin();
  1283. if (msg.type == TMessageType.EXCEPTION) {
  1284. TApplicationException x = TApplicationException.read(iprot_);
  1285. iprot_.readMessageEnd();
  1286. throw x;
  1287. }
  1288. if (msg.seqid != seqid_) {
  1289. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getNoteApplicationData failed: out of sequence response");
  1290. }
  1291. getNoteApplicationData_result result = new getNoteApplicationData_result();
  1292. result.read(iprot_);
  1293. iprot_.readMessageEnd();
  1294. if (result.isSetSuccess()) {
  1295. return result.success;
  1296. }
  1297. if (result.userException != null) {
  1298. throw result.userException;
  1299. }
  1300. if (result.systemException != null) {
  1301. throw result.systemException;
  1302. }
  1303. if (result.notFoundException != null) {
  1304. throw result.notFoundException;
  1305. }
  1306. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getNoteApplicationData failed: unknown result");
  1307. }
  1308. public String getNoteApplicationDataEntry(String authenticationToken, String guid, String key) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1309. {
  1310. send_getNoteApplicationDataEntry(authenticationToken, guid, key);
  1311. return recv_getNoteApplicationDataEntry();
  1312. }
  1313. public void send_getNoteApplicationDataEntry(String authenticationToken, String guid, String key) throws TException
  1314. {
  1315. oprot_.writeMessageBegin(new TMessage("getNoteApplicationDataEntry", TMessageType.CALL, ++seqid_));
  1316. getNoteApplicationDataEntry_args args = new getNoteApplicationDataEntry_args();
  1317. args.setAuthenticationToken(authenticationToken);
  1318. args.setGuid(guid);
  1319. args.setKey(key);
  1320. args.write(oprot_);
  1321. oprot_.writeMessageEnd();
  1322. oprot_.getTransport().flush();
  1323. }
  1324. public String recv_getNoteApplicationDataEntry() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1325. {
  1326. TMessage msg = iprot_.readMessageBegin();
  1327. if (msg.type == TMessageType.EXCEPTION) {
  1328. TApplicationException x = TApplicationException.read(iprot_);
  1329. iprot_.readMessageEnd();
  1330. throw x;
  1331. }
  1332. if (msg.seqid != seqid_) {
  1333. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getNoteApplicationDataEntry failed: out of sequence response");
  1334. }
  1335. getNoteApplicationDataEntry_result result = new getNoteApplicationDataEntry_result();
  1336. result.read(iprot_);
  1337. iprot_.readMessageEnd();
  1338. if (result.isSetSuccess()) {
  1339. return result.success;
  1340. }
  1341. if (result.userException != null) {
  1342. throw result.userException;
  1343. }
  1344. if (result.systemException != null) {
  1345. throw result.systemException;
  1346. }
  1347. if (result.notFoundException != null) {
  1348. throw result.notFoundException;
  1349. }
  1350. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getNoteApplicationDataEntry failed: unknown result");
  1351. }
  1352. public int setNoteApplicationDataEntry(String authenticationToken, String guid, String key, String value) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1353. {
  1354. send_setNoteApplicationDataEntry(authenticationToken, guid, key, value);
  1355. return recv_setNoteApplicationDataEntry();
  1356. }
  1357. public void send_setNoteApplicationDataEntry(String authenticationToken, String guid, String key, String value) throws TException
  1358. {
  1359. oprot_.writeMessageBegin(new TMessage("setNoteApplicationDataEntry", TMessageType.CALL, ++seqid_));
  1360. setNoteApplicationDataEntry_args args = new setNoteApplicationDataEntry_args();
  1361. args.setAuthenticationToken(authenticationToken);
  1362. args.setGuid(guid);
  1363. args.setKey(key);
  1364. args.setValue(value);
  1365. args.write(oprot_);
  1366. oprot_.writeMessageEnd();
  1367. oprot_.getTransport().flush();
  1368. }
  1369. public int recv_setNoteApplicationDataEntry() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1370. {
  1371. TMessage msg = iprot_.readMessageBegin();
  1372. if (msg.type == TMessageType.EXCEPTION) {
  1373. TApplicationException x = TApplicationException.read(iprot_);
  1374. iprot_.readMessageEnd();
  1375. throw x;
  1376. }
  1377. if (msg.seqid != seqid_) {
  1378. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "setNoteApplicationDataEntry failed: out of sequence response");
  1379. }
  1380. setNoteApplicationDataEntry_result result = new setNoteApplicationDataEntry_result();
  1381. result.read(iprot_);
  1382. iprot_.readMessageEnd();
  1383. if (result.isSetSuccess()) {
  1384. return result.success;
  1385. }
  1386. if (result.userException != null) {
  1387. throw result.userException;
  1388. }
  1389. if (result.systemException != null) {
  1390. throw result.systemException;
  1391. }
  1392. if (result.notFoundException != null) {
  1393. throw result.notFoundException;
  1394. }
  1395. throw new TApplicationException(TApplicationException.MISSING_RESULT, "setNoteApplicationDataEntry failed: unknown result");
  1396. }
  1397. public int unsetNoteApplicationDataEntry(String authenticationToken, String guid, String key) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1398. {
  1399. send_unsetNoteApplicationDataEntry(authenticationToken, guid, key);
  1400. return recv_unsetNoteApplicationDataEntry();
  1401. }
  1402. public void send_unsetNoteApplicationDataEntry(String authenticationToken, String guid, String key) throws TException
  1403. {
  1404. oprot_.writeMessageBegin(new TMessage("unsetNoteApplicationDataEntry", TMessageType.CALL, ++seqid_));
  1405. unsetNoteApplicationDataEntry_args args = new unsetNoteApplicationDataEntry_args();
  1406. args.setAuthenticationToken(authenticationToken);
  1407. args.setGuid(guid);
  1408. args.setKey(key);
  1409. args.write(oprot_);
  1410. oprot_.writeMessageEnd();
  1411. oprot_.getTransport().flush();
  1412. }
  1413. public int recv_unsetNoteApplicationDataEntry() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1414. {
  1415. TMessage msg = iprot_.readMessageBegin();
  1416. if (msg.type == TMessageType.EXCEPTION) {
  1417. TApplicationException x = TApplicationException.read(iprot_);
  1418. iprot_.readMessageEnd();
  1419. throw x;
  1420. }
  1421. if (msg.seqid != seqid_) {
  1422. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "unsetNoteApplicationDataEntry failed: out of sequence response");
  1423. }
  1424. unsetNoteApplicationDataEntry_result result = new unsetNoteApplicationDataEntry_result();
  1425. result.read(iprot_);
  1426. iprot_.readMessageEnd();
  1427. if (result.isSetSuccess()) {
  1428. return result.success;
  1429. }
  1430. if (result.userException != null) {
  1431. throw result.userException;
  1432. }
  1433. if (result.systemException != null) {
  1434. throw result.systemException;
  1435. }
  1436. if (result.notFoundException != null) {
  1437. throw result.notFoundException;
  1438. }
  1439. throw new TApplicationException(TApplicationException.MISSING_RESULT, "unsetNoteApplicationDataEntry failed: unknown result");
  1440. }
  1441. public String getNoteContent(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1442. {
  1443. send_getNoteContent(authenticationToken, guid);
  1444. return recv_getNoteContent();
  1445. }
  1446. public void send_getNoteContent(String authenticationToken, String guid) throws TException
  1447. {
  1448. oprot_.writeMessageBegin(new TMessage("getNoteContent", TMessageType.CALL, ++seqid_));
  1449. getNoteContent_args args = new getNoteContent_args();
  1450. args.setAuthenticationToken(authenticationToken);
  1451. args.setGuid(guid);
  1452. args.write(oprot_);
  1453. oprot_.writeMessageEnd();
  1454. oprot_.getTransport().flush();
  1455. }
  1456. public String recv_getNoteContent() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1457. {
  1458. TMessage msg = iprot_.readMessageBegin();
  1459. if (msg.type == TMessageType.EXCEPTION) {
  1460. TApplicationException x = TApplicationException.read(iprot_);
  1461. iprot_.readMessageEnd();
  1462. throw x;
  1463. }
  1464. if (msg.seqid != seqid_) {
  1465. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getNoteContent failed: out of sequence response");
  1466. }
  1467. getNoteContent_result result = new getNoteContent_result();
  1468. result.read(iprot_);
  1469. iprot_.readMessageEnd();
  1470. if (result.isSetSuccess()) {
  1471. return result.success;
  1472. }
  1473. if (result.userException != null) {
  1474. throw result.userException;
  1475. }
  1476. if (result.systemException != null) {
  1477. throw result.systemException;
  1478. }
  1479. if (result.notFoundException != null) {
  1480. throw result.notFoundException;
  1481. }
  1482. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getNoteContent failed: unknown result");
  1483. }
  1484. public String getNoteSearchText(String authenticationToken, String guid, boolean noteOnly, boolean tokenizeForIndexing) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1485. {
  1486. send_getNoteSearchText(authenticationToken, guid, noteOnly, tokenizeForIndexing);
  1487. return recv_getNoteSearchText();
  1488. }
  1489. public void send_getNoteSearchText(String authenticationToken, String guid, boolean noteOnly, boolean tokenizeForIndexing) throws TException
  1490. {
  1491. oprot_.writeMessageBegin(new TMessage("getNoteSearchText", TMessageType.CALL, ++seqid_));
  1492. getNoteSearchText_args args = new getNoteSearchText_args();
  1493. args.setAuthenticationToken(authenticationToken);
  1494. args.setGuid(guid);
  1495. args.setNoteOnly(noteOnly);
  1496. args.setTokenizeForIndexing(tokenizeForIndexing);
  1497. args.write(oprot_);
  1498. oprot_.writeMessageEnd();
  1499. oprot_.getTransport().flush();
  1500. }
  1501. public String recv_getNoteSearchText() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1502. {
  1503. TMessage msg = iprot_.readMessageBegin();
  1504. if (msg.type == TMessageType.EXCEPTION) {
  1505. TApplicationException x = TApplicationException.read(iprot_);
  1506. iprot_.readMessageEnd();
  1507. throw x;
  1508. }
  1509. if (msg.seqid != seqid_) {
  1510. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getNoteSearchText failed: out of sequence response");
  1511. }
  1512. getNoteSearchText_result result = new getNoteSearchText_result();
  1513. result.read(iprot_);
  1514. iprot_.readMessageEnd();
  1515. if (result.isSetSuccess()) {
  1516. return result.success;
  1517. }
  1518. if (result.userException != null) {
  1519. throw result.userException;
  1520. }
  1521. if (result.systemException != null) {
  1522. throw result.systemException;
  1523. }
  1524. if (result.notFoundException != null) {
  1525. throw result.notFoundException;
  1526. }
  1527. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getNoteSearchText failed: unknown result");
  1528. }
  1529. public String getResourceSearchText(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1530. {
  1531. send_getResourceSearchText(authenticationToken, guid);
  1532. return recv_getResourceSearchText();
  1533. }
  1534. public void send_getResourceSearchText(String authenticationToken, String guid) throws TException
  1535. {
  1536. oprot_.writeMessageBegin(new TMessage("getResourceSearchText", TMessageType.CALL, ++seqid_));
  1537. getResourceSearchText_args args = new getResourceSearchText_args();
  1538. args.setAuthenticationToken(authenticationToken);
  1539. args.setGuid(guid);
  1540. args.write(oprot_);
  1541. oprot_.writeMessageEnd();
  1542. oprot_.getTransport().flush();
  1543. }
  1544. public String recv_getResourceSearchText() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1545. {
  1546. TMessage msg = iprot_.readMessageBegin();
  1547. if (msg.type == TMessageType.EXCEPTION) {
  1548. TApplicationException x = TApplicationException.read(iprot_);
  1549. iprot_.readMessageEnd();
  1550. throw x;
  1551. }
  1552. if (msg.seqid != seqid_) {
  1553. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getResourceSearchText failed: out of sequence response");
  1554. }
  1555. getResourceSearchText_result result = new getResourceSearchText_result();
  1556. result.read(iprot_);
  1557. iprot_.readMessageEnd();
  1558. if (result.isSetSuccess()) {
  1559. return result.success;
  1560. }
  1561. if (result.userException != null) {
  1562. throw result.userException;
  1563. }
  1564. if (result.systemException != null) {
  1565. throw result.systemException;
  1566. }
  1567. if (result.notFoundException != null) {
  1568. throw result.notFoundException;
  1569. }
  1570. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getResourceSearchText failed: unknown result");
  1571. }
  1572. public List<String> getNoteTagNames(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1573. {
  1574. send_getNoteTagNames(authenticationToken, guid);
  1575. return recv_getNoteTagNames();
  1576. }
  1577. public void send_getNoteTagNames(String authenticationToken, String guid) throws TException
  1578. {
  1579. oprot_.writeMessageBegin(new TMessage("getNoteTagNames", TMessageType.CALL, ++seqid_));
  1580. getNoteTagNames_args args = new getNoteTagNames_args();
  1581. args.setAuthenticationToken(authenticationToken);
  1582. args.setGuid(guid);
  1583. args.write(oprot_);
  1584. oprot_.writeMessageEnd();
  1585. oprot_.getTransport().flush();
  1586. }
  1587. public List<String> recv_getNoteTagNames() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1588. {
  1589. TMessage msg = iprot_.readMessageBegin();
  1590. if (msg.type == TMessageType.EXCEPTION) {
  1591. TApplicationException x = TApplicationException.read(iprot_);
  1592. iprot_.readMessageEnd();
  1593. throw x;
  1594. }
  1595. if (msg.seqid != seqid_) {
  1596. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getNoteTagNames failed: out of sequence response");
  1597. }
  1598. getNoteTagNames_result result = new getNoteTagNames_result();
  1599. result.read(iprot_);
  1600. iprot_.readMessageEnd();
  1601. if (result.isSetSuccess()) {
  1602. return result.success;
  1603. }
  1604. if (result.userException != null) {
  1605. throw result.userException;
  1606. }
  1607. if (result.systemException != null) {
  1608. throw result.systemException;
  1609. }
  1610. if (result.notFoundException != null) {
  1611. throw result.notFoundException;
  1612. }
  1613. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getNoteTagNames failed: unknown result");
  1614. }
  1615. public com.evernote.edam.type.Note createNote(String authenticationToken, com.evernote.edam.type.Note note) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1616. {
  1617. send_createNote(authenticationToken, note);
  1618. return recv_createNote();
  1619. }
  1620. public void send_createNote(String authenticationToken, com.evernote.edam.type.Note note) throws TException
  1621. {
  1622. oprot_.writeMessageBegin(new TMessage("createNote", TMessageType.CALL, ++seqid_));
  1623. createNote_args args = new createNote_args();
  1624. args.setAuthenticationToken(authenticationToken);
  1625. args.setNote(note);
  1626. args.write(oprot_);
  1627. oprot_.writeMessageEnd();
  1628. oprot_.getTransport().flush();
  1629. }
  1630. public com.evernote.edam.type.Note recv_createNote() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1631. {
  1632. TMessage msg = iprot_.readMessageBegin();
  1633. if (msg.type == TMessageType.EXCEPTION) {
  1634. TApplicationException x = TApplicationException.read(iprot_);
  1635. iprot_.readMessageEnd();
  1636. throw x;
  1637. }
  1638. if (msg.seqid != seqid_) {
  1639. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "createNote failed: out of sequence response");
  1640. }
  1641. createNote_result result = new createNote_result();
  1642. result.read(iprot_);
  1643. iprot_.readMessageEnd();
  1644. if (result.isSetSuccess()) {
  1645. return result.success;
  1646. }
  1647. if (result.userException != null) {
  1648. throw result.userException;
  1649. }
  1650. if (result.systemException != null) {
  1651. throw result.systemException;
  1652. }
  1653. if (result.notFoundException != null) {
  1654. throw result.notFoundException;
  1655. }
  1656. throw new TApplicationException(TApplicationException.MISSING_RESULT, "createNote failed: unknown result");
  1657. }
  1658. public com.evernote.edam.type.Note updateNote(String authenticationToken, com.evernote.edam.type.Note note) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1659. {
  1660. send_updateNote(authenticationToken, note);
  1661. return recv_updateNote();
  1662. }
  1663. public void send_updateNote(String authenticationToken, com.evernote.edam.type.Note note) throws TException
  1664. {
  1665. oprot_.writeMessageBegin(new TMessage("updateNote", TMessageType.CALL, ++seqid_));
  1666. updateNote_args args = new updateNote_args();
  1667. args.setAuthenticationToken(authenticationToken);
  1668. args.setNote(note);
  1669. args.write(oprot_);
  1670. oprot_.writeMessageEnd();
  1671. oprot_.getTransport().flush();
  1672. }
  1673. public com.evernote.edam.type.Note recv_updateNote() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1674. {
  1675. TMessage msg = iprot_.readMessageBegin();
  1676. if (msg.type == TMessageType.EXCEPTION) {
  1677. TApplicationException x = TApplicationException.read(iprot_);
  1678. iprot_.readMessageEnd();
  1679. throw x;
  1680. }
  1681. if (msg.seqid != seqid_) {
  1682. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "updateNote failed: out of sequence response");
  1683. }
  1684. updateNote_result result = new updateNote_result();
  1685. result.read(iprot_);
  1686. iprot_.readMessageEnd();
  1687. if (result.isSetSuccess()) {
  1688. return result.success;
  1689. }
  1690. if (result.userException != null) {
  1691. throw result.userException;
  1692. }
  1693. if (result.systemException != null) {
  1694. throw result.systemException;
  1695. }
  1696. if (result.notFoundException != null) {
  1697. throw result.notFoundException;
  1698. }
  1699. throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateNote failed: unknown result");
  1700. }
  1701. public int deleteNote(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1702. {
  1703. send_deleteNote(authenticationToken, guid);
  1704. return recv_deleteNote();
  1705. }
  1706. public void send_deleteNote(String authenticationToken, String guid) throws TException
  1707. {
  1708. oprot_.writeMessageBegin(new TMessage("deleteNote", TMessageType.CALL, ++seqid_));
  1709. deleteNote_args args = new deleteNote_args();
  1710. args.setAuthenticationToken(authenticationToken);
  1711. args.setGuid(guid);
  1712. args.write(oprot_);
  1713. oprot_.writeMessageEnd();
  1714. oprot_.getTransport().flush();
  1715. }
  1716. public int recv_deleteNote() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1717. {
  1718. TMessage msg = iprot_.readMessageBegin();
  1719. if (msg.type == TMessageType.EXCEPTION) {
  1720. TApplicationException x = TApplicationException.read(iprot_);
  1721. iprot_.readMessageEnd();
  1722. throw x;
  1723. }
  1724. if (msg.seqid != seqid_) {
  1725. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "deleteNote failed: out of sequence response");
  1726. }
  1727. deleteNote_result result = new deleteNote_result();
  1728. result.read(iprot_);
  1729. iprot_.readMessageEnd();
  1730. if (result.isSetSuccess()) {
  1731. return result.success;
  1732. }
  1733. if (result.userException != null) {
  1734. throw result.userException;
  1735. }
  1736. if (result.systemException != null) {
  1737. throw result.systemException;
  1738. }
  1739. if (result.notFoundException != null) {
  1740. throw result.notFoundException;
  1741. }
  1742. throw new TApplicationException(TApplicationException.MISSING_RESULT, "deleteNote failed: unknown result");
  1743. }
  1744. public int expungeNote(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1745. {
  1746. send_expungeNote(authenticationToken, guid);
  1747. return recv_expungeNote();
  1748. }
  1749. public void send_expungeNote(String authenticationToken, String guid) throws TException
  1750. {
  1751. oprot_.writeMessageBegin(new TMessage("expungeNote", TMessageType.CALL, ++seqid_));
  1752. expungeNote_args args = new expungeNote_args();
  1753. args.setAuthenticationToken(authenticationToken);
  1754. args.setGuid(guid);
  1755. args.write(oprot_);
  1756. oprot_.writeMessageEnd();
  1757. oprot_.getTransport().flush();
  1758. }
  1759. public int recv_expungeNote() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1760. {
  1761. TMessage msg = iprot_.readMessageBegin();
  1762. if (msg.type == TMessageType.EXCEPTION) {
  1763. TApplicationException x = TApplicationException.read(iprot_);
  1764. iprot_.readMessageEnd();
  1765. throw x;
  1766. }
  1767. if (msg.seqid != seqid_) {
  1768. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "expungeNote failed: out of sequence response");
  1769. }
  1770. expungeNote_result result = new expungeNote_result();
  1771. result.read(iprot_);
  1772. iprot_.readMessageEnd();
  1773. if (result.isSetSuccess()) {
  1774. return result.success;
  1775. }
  1776. if (result.userException != null) {
  1777. throw result.userException;
  1778. }
  1779. if (result.systemException != null) {
  1780. throw result.systemException;
  1781. }
  1782. if (result.notFoundException != null) {
  1783. throw result.notFoundException;
  1784. }
  1785. throw new TApplicationException(TApplicationException.MISSING_RESULT, "expungeNote failed: unknown result");
  1786. }
  1787. public int expungeNotes(String authenticationToken, List<String> noteGuids) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1788. {
  1789. send_expungeNotes(authenticationToken, noteGuids);
  1790. return recv_expungeNotes();
  1791. }
  1792. public void send_expungeNotes(String authenticationToken, List<String> noteGuids) throws TException
  1793. {
  1794. oprot_.writeMessageBegin(new TMessage("expungeNotes", TMessageType.CALL, ++seqid_));
  1795. expungeNotes_args args = new expungeNotes_args();
  1796. args.setAuthenticationToken(authenticationToken);
  1797. args.setNoteGuids(noteGuids);
  1798. args.write(oprot_);
  1799. oprot_.writeMessageEnd();
  1800. oprot_.getTransport().flush();
  1801. }
  1802. public int recv_expungeNotes() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1803. {
  1804. TMessage msg = iprot_.readMessageBegin();
  1805. if (msg.type == TMessageType.EXCEPTION) {
  1806. TApplicationException x = TApplicationException.read(iprot_);
  1807. iprot_.readMessageEnd();
  1808. throw x;
  1809. }
  1810. if (msg.seqid != seqid_) {
  1811. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "expungeNotes failed: out of sequence response");
  1812. }
  1813. expungeNotes_result result = new expungeNotes_result();
  1814. result.read(iprot_);
  1815. iprot_.readMessageEnd();
  1816. if (result.isSetSuccess()) {
  1817. return result.success;
  1818. }
  1819. if (result.userException != null) {
  1820. throw result.userException;
  1821. }
  1822. if (result.systemException != null) {
  1823. throw result.systemException;
  1824. }
  1825. if (result.notFoundException != null) {
  1826. throw result.notFoundException;
  1827. }
  1828. throw new TApplicationException(TApplicationException.MISSING_RESULT, "expungeNotes failed: unknown result");
  1829. }
  1830. public int expungeInactiveNotes(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
  1831. {
  1832. send_expungeInactiveNotes(authenticationToken);
  1833. return recv_expungeInactiveNotes();
  1834. }
  1835. public void send_expungeInactiveNotes(String authenticationToken) throws TException
  1836. {
  1837. oprot_.writeMessageBegin(new TMessage("expungeInactiveNotes", TMessageType.CALL, ++seqid_));
  1838. expungeInactiveNotes_args args = new expungeInactiveNotes_args();
  1839. args.setAuthenticationToken(authenticationToken);
  1840. args.write(oprot_);
  1841. oprot_.writeMessageEnd();
  1842. oprot_.getTransport().flush();
  1843. }
  1844. public int recv_expungeInactiveNotes() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
  1845. {
  1846. TMessage msg = iprot_.readMessageBegin();
  1847. if (msg.type == TMessageType.EXCEPTION) {
  1848. TApplicationException x = TApplicationException.read(iprot_);
  1849. iprot_.readMessageEnd();
  1850. throw x;
  1851. }
  1852. if (msg.seqid != seqid_) {
  1853. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "expungeInactiveNotes failed: out of sequence response");
  1854. }
  1855. expungeInactiveNotes_result result = new expungeInactiveNotes_result();
  1856. result.read(iprot_);
  1857. iprot_.readMessageEnd();
  1858. if (result.isSetSuccess()) {
  1859. return result.success;
  1860. }
  1861. if (result.userException != null) {
  1862. throw result.userException;
  1863. }
  1864. if (result.systemException != null) {
  1865. throw result.systemException;
  1866. }
  1867. throw new TApplicationException(TApplicationException.MISSING_RESULT, "expungeInactiveNotes failed: unknown result");
  1868. }
  1869. public com.evernote.edam.type.Note copyNote(String authenticationToken, String noteGuid, String toNotebookGuid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1870. {
  1871. send_copyNote(authenticationToken, noteGuid, toNotebookGuid);
  1872. return recv_copyNote();
  1873. }
  1874. public void send_copyNote(String authenticationToken, String noteGuid, String toNotebookGuid) throws TException
  1875. {
  1876. oprot_.writeMessageBegin(new TMessage("copyNote", TMessageType.CALL, ++seqid_));
  1877. copyNote_args args = new copyNote_args();
  1878. args.setAuthenticationToken(authenticationToken);
  1879. args.setNoteGuid(noteGuid);
  1880. args.setToNotebookGuid(toNotebookGuid);
  1881. args.write(oprot_);
  1882. oprot_.writeMessageEnd();
  1883. oprot_.getTransport().flush();
  1884. }
  1885. public com.evernote.edam.type.Note recv_copyNote() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1886. {
  1887. TMessage msg = iprot_.readMessageBegin();
  1888. if (msg.type == TMessageType.EXCEPTION) {
  1889. TApplicationException x = TApplicationException.read(iprot_);
  1890. iprot_.readMessageEnd();
  1891. throw x;
  1892. }
  1893. if (msg.seqid != seqid_) {
  1894. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "copyNote failed: out of sequence response");
  1895. }
  1896. copyNote_result result = new copyNote_result();
  1897. result.read(iprot_);
  1898. iprot_.readMessageEnd();
  1899. if (result.isSetSuccess()) {
  1900. return result.success;
  1901. }
  1902. if (result.userException != null) {
  1903. throw result.userException;
  1904. }
  1905. if (result.systemException != null) {
  1906. throw result.systemException;
  1907. }
  1908. if (result.notFoundException != null) {
  1909. throw result.notFoundException;
  1910. }
  1911. throw new TApplicationException(TApplicationException.MISSING_RESULT, "copyNote failed: unknown result");
  1912. }
  1913. public List<NoteVersionId> listNoteVersions(String authenticationToken, String noteGuid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1914. {
  1915. send_listNoteVersions(authenticationToken, noteGuid);
  1916. return recv_listNoteVersions();
  1917. }
  1918. public void send_listNoteVersions(String authenticationToken, String noteGuid) throws TException
  1919. {
  1920. oprot_.writeMessageBegin(new TMessage("listNoteVersions", TMessageType.CALL, ++seqid_));
  1921. listNoteVersions_args args = new listNoteVersions_args();
  1922. args.setAuthenticationToken(authenticationToken);
  1923. args.setNoteGuid(noteGuid);
  1924. args.write(oprot_);
  1925. oprot_.writeMessageEnd();
  1926. oprot_.getTransport().flush();
  1927. }
  1928. public List<NoteVersionId> recv_listNoteVersions() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1929. {
  1930. TMessage msg = iprot_.readMessageBegin();
  1931. if (msg.type == TMessageType.EXCEPTION) {
  1932. TApplicationException x = TApplicationException.read(iprot_);
  1933. iprot_.readMessageEnd();
  1934. throw x;
  1935. }
  1936. if (msg.seqid != seqid_) {
  1937. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "listNoteVersions failed: out of sequence response");
  1938. }
  1939. listNoteVersions_result result = new listNoteVersions_result();
  1940. result.read(iprot_);
  1941. iprot_.readMessageEnd();
  1942. if (result.isSetSuccess()) {
  1943. return result.success;
  1944. }
  1945. if (result.userException != null) {
  1946. throw result.userException;
  1947. }
  1948. if (result.systemException != null) {
  1949. throw result.systemException;
  1950. }
  1951. if (result.notFoundException != null) {
  1952. throw result.notFoundException;
  1953. }
  1954. throw new TApplicationException(TApplicationException.MISSING_RESULT, "listNoteVersions failed: unknown result");
  1955. }
  1956. public com.evernote.edam.type.Note getNoteVersion(String authenticationToken, String noteGuid, int updateSequenceNum, boolean withResourcesData, boolean withResourcesRecognition, boolean withResourcesAlternateData) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1957. {
  1958. send_getNoteVersion(authenticationToken, noteGuid, updateSequenceNum, withResourcesData, withResourcesRecognition, withResourcesAlternateData);
  1959. return recv_getNoteVersion();
  1960. }
  1961. public void send_getNoteVersion(String authenticationToken, String noteGuid, int updateSequenceNum, boolean withResourcesData, boolean withResourcesRecognition, boolean withResourcesAlternateData) throws TException
  1962. {
  1963. oprot_.writeMessageBegin(new TMessage("getNoteVersion", TMessageType.CALL, ++seqid_));
  1964. getNoteVersion_args args = new getNoteVersion_args();
  1965. args.setAuthenticationToken(authenticationToken);
  1966. args.setNoteGuid(noteGuid);
  1967. args.setUpdateSequenceNum(updateSequenceNum);
  1968. args.setWithResourcesData(withResourcesData);
  1969. args.setWithResourcesRecognition(withResourcesRecognition);
  1970. args.setWithResourcesAlternateData(withResourcesAlternateData);
  1971. args.write(oprot_);
  1972. oprot_.writeMessageEnd();
  1973. oprot_.getTransport().flush();
  1974. }
  1975. public com.evernote.edam.type.Note recv_getNoteVersion() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  1976. {
  1977. TMessage msg = iprot_.readMessageBegin();
  1978. if (msg.type == TMessageType.EXCEPTION) {
  1979. TApplicationException x = TApplicationException.read(iprot_);
  1980. iprot_.readMessageEnd();
  1981. throw x;
  1982. }
  1983. if (msg.seqid != seqid_) {
  1984. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getNoteVersion failed: out of sequence response");
  1985. }
  1986. getNoteVersion_result result = new getNoteVersion_result();
  1987. result.read(iprot_);
  1988. iprot_.readMessageEnd();
  1989. if (result.isSetSuccess()) {
  1990. return result.success;
  1991. }
  1992. if (result.userException != null) {
  1993. throw result.userException;
  1994. }
  1995. if (result.systemException != null) {
  1996. throw result.systemException;
  1997. }
  1998. if (result.notFoundException != null) {
  1999. throw result.notFoundException;
  2000. }
  2001. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getNoteVersion failed: unknown result");
  2002. }
  2003. public com.evernote.edam.type.Resource getResource(String authenticationToken, String guid, boolean withData, boolean withRecognition, boolean withAttributes, boolean withAlternateData) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  2004. {
  2005. send_getResource(authenticationToken, guid, withData, withRecognition, withAttributes, withAlternateData);
  2006. return recv_getResource();
  2007. }
  2008. public void send_getResource(String authenticationToken, String guid, boolean withData, boolean withRecognition, boolean withAttributes, boolean withAlternateData) throws TException
  2009. {
  2010. oprot_.writeMessageBegin(new TMessage("getResource", TMessageType.CALL, ++seqid_));
  2011. getResource_args args = new getResource_args();
  2012. args.setAuthenticationToken(authenticationToken);
  2013. args.setGuid(guid);
  2014. args.setWithData(withData);
  2015. args.setWithRecognition(withRecognition);
  2016. args.setWithAttributes(withAttributes);
  2017. args.setWithAlternateData(withAlternateData);
  2018. args.write(oprot_);
  2019. oprot_.writeMessageEnd();
  2020. oprot_.getTransport().flush();
  2021. }
  2022. public com.evernote.edam.type.Resource recv_getResource() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  2023. {
  2024. TMessage msg = iprot_.readMessageBegin();
  2025. if (msg.type == TMessageType.EXCEPTION) {
  2026. TApplicationException x = TApplicationException.read(iprot_);
  2027. iprot_.readMessageEnd();
  2028. throw x;
  2029. }
  2030. if (msg.seqid != seqid_) {
  2031. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getResource failed: out of sequence response");
  2032. }
  2033. getResource_result result = new getResource_result();
  2034. result.read(iprot_);
  2035. iprot_.readMessageEnd();
  2036. if (result.isSetSuccess()) {
  2037. return result.success;
  2038. }
  2039. if (result.userException != null) {
  2040. throw result.userException;
  2041. }
  2042. if (result.systemException != null) {
  2043. throw result.systemException;
  2044. }
  2045. if (result.notFoundException != null) {
  2046. throw result.notFoundException;
  2047. }
  2048. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getResource failed: unknown result");
  2049. }
  2050. public com.evernote.edam.type.LazyMap getResourceApplicationData(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  2051. {
  2052. send_getResourceApplicationData(authenticationToken, guid);
  2053. return recv_getResourceApplicationData();
  2054. }
  2055. public void send_getResourceApplicationData(String authenticationToken, String guid) throws TException
  2056. {
  2057. oprot_.writeMessageBegin(new TMessage("getResourceApplicationData", TMessageType.CALL, ++seqid_));
  2058. getResourceApplicationData_args args = new getResourceApplicationData_args();
  2059. args.setAuthenticationToken(authenticationToken);
  2060. args.setGuid(guid);
  2061. args.write(oprot_);
  2062. oprot_.writeMessageEnd();
  2063. oprot_.getTransport().flush();
  2064. }
  2065. public com.evernote.edam.type.LazyMap recv_getResourceApplicationData() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  2066. {
  2067. TMessage msg = iprot_.readMessageBegin();
  2068. if (msg.type == TMessageType.EXCEPTION) {
  2069. TApplicationException x = TApplicationException.read(iprot_);
  2070. iprot_.readMessageEnd();
  2071. throw x;
  2072. }
  2073. if (msg.seqid != seqid_) {
  2074. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getResourceApplicationData failed: out of sequence response");
  2075. }
  2076. getResourceApplicationData_result result = new getResourceApplicationData_result();
  2077. result.read(iprot_);
  2078. iprot_.readMessageEnd();
  2079. if (result.isSetSuccess()) {
  2080. return result.success;
  2081. }
  2082. if (result.userException != null) {
  2083. throw result.userException;
  2084. }
  2085. if (result.systemException != null) {
  2086. throw result.systemException;
  2087. }
  2088. if (result.notFoundException != null) {
  2089. throw result.notFoundException;
  2090. }
  2091. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getResourceApplicationData failed: unknown result");
  2092. }
  2093. public String getResourceApplicationDataEntry(String authenticationToken, String guid, String key) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  2094. {
  2095. send_getResourceApplicationDataEntry(authenticationToken, guid, key);
  2096. return recv_getResourceApplicationDataEntry();
  2097. }
  2098. public void send_getResourceApplicationDataEntry(String authenticationToken, String guid, String key) throws TException
  2099. {
  2100. oprot_.writeMessageBegin(new TMessage("getResourceApplicationDataEntry", TMessageType.CALL, ++seqid_));
  2101. getResourceApplicationDataEntry_args args = new getResourceApplicationDataEntry_args();
  2102. args.setAuthenticationToken(authenticationToken);
  2103. args.setGuid(guid);
  2104. args.setKey(key);
  2105. args.write(oprot_);
  2106. oprot_.writeMessageEnd();
  2107. oprot_.getTransport().flush();
  2108. }
  2109. public String recv_getResourceApplicationDataEntry() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  2110. {
  2111. TMessage msg = iprot_.readMessageBegin();
  2112. if (msg.type == TMessageType.EXCEPTION) {
  2113. TApplicationException x = TApplicationException.read(iprot_);
  2114. iprot_.readMessageEnd();
  2115. throw x;
  2116. }
  2117. if (msg.seqid != seqid_) {
  2118. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getResourceApplicationDataEntry failed: out of sequence response");
  2119. }
  2120. getResourceApplicationDataEntry_result result = new getResourceApplicationDataEntry_result();
  2121. result.read(iprot_);
  2122. iprot_.readMessageEnd();
  2123. if (result.isSetSuccess()) {
  2124. return result.success;
  2125. }
  2126. if (result.userException != null) {
  2127. throw result.userException;
  2128. }
  2129. if (result.systemException != null) {
  2130. throw result.systemException;
  2131. }
  2132. if (result.notFoundException != null) {
  2133. throw result.notFoundException;
  2134. }
  2135. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getResourceApplicationDataEntry failed: unknown result");
  2136. }
  2137. public int setResourceApplicationDataEntry(String authenticationToken, String guid, String key, String value) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  2138. {
  2139. send_setResourceApplicationDataEntry(authenticationToken, guid, key, value);
  2140. return recv_setResourceApplicationDataEntry();
  2141. }
  2142. public void send_setResourceApplicationDataEntry(String authenticationToken, String guid, String key, String value) throws TException
  2143. {
  2144. oprot_.writeMessageBegin(new TMessage("setResourceApplicationDataEntry", TMessageType.CALL, ++seqid_));
  2145. setResourceApplicationDataEntry_args args = new setResourceApplicationDataEntry_args();
  2146. args.setAuthenticationToken(authenticationToken);
  2147. args.setGuid(guid);
  2148. args.setKey(key);
  2149. args.setValue(value);
  2150. args.write(oprot_);
  2151. oprot_.writeMessageEnd();
  2152. oprot_.getTransport().flush();
  2153. }
  2154. public int recv_setResourceApplicationDataEntry() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  2155. {
  2156. TMessage msg = iprot_.readMessageBegin();
  2157. if (msg.type == TMessageType.EXCEPTION) {
  2158. TApplicationException x = TApplicationException.read(iprot_);
  2159. iprot_.readMessageEnd();
  2160. throw x;
  2161. }
  2162. if (msg.seqid != seqid_) {
  2163. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "setResourceApplicationDataEntry failed: out of sequence response");
  2164. }
  2165. setResourceApplicationDataEntry_result result = new setResourceApplicationDataEntry_result();
  2166. result.read(iprot_);
  2167. iprot_.readMessageEnd();
  2168. if (result.isSetSuccess()) {
  2169. return result.success;
  2170. }
  2171. if (result.userException != null) {
  2172. throw result.userException;
  2173. }
  2174. if (result.systemException != null) {
  2175. throw result.systemException;
  2176. }
  2177. if (result.notFoundException != null) {
  2178. throw result.notFoundException;
  2179. }
  2180. throw new TApplicationException(TApplicationException.MISSING_RESULT, "setResourceApplicationDataEntry failed: unknown result");
  2181. }
  2182. public int unsetResourceApplicationDataEntry(String authenticationToken, String guid, String key) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  2183. {
  2184. send_unsetResourceApplicationDataEntry(authenticationToken, guid, key);
  2185. return recv_unsetResourceApplicationDataEntry();
  2186. }
  2187. public void send_unsetResourceApplicationDataEntry(String authenticationToken, String guid, String key) throws TException
  2188. {
  2189. oprot_.writeMessageBegin(new TMessage("unsetResourceApplicationDataEntry", TMessageType.CALL, ++seqid_));
  2190. unsetResourceApplicationDataEntry_args args = new unsetResourceApplicationDataEntry_args();
  2191. args.setAuthenticationToken(authenticationToken);
  2192. args.setGuid(guid);
  2193. args.setKey(key);
  2194. args.write(oprot_);
  2195. oprot_.writeMessageEnd();
  2196. oprot_.getTransport().flush();
  2197. }
  2198. public int recv_unsetResourceApplicationDataEntry() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  2199. {
  2200. TMessage msg = iprot_.readMessageBegin();
  2201. if (msg.type == TMessageType.EXCEPTION) {
  2202. TApplicationException x = TApplicationException.read(iprot_);
  2203. iprot_.readMessageEnd();
  2204. throw x;
  2205. }
  2206. if (msg.seqid != seqid_) {
  2207. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "unsetResourceApplicationDataEntry failed: out of sequence response");
  2208. }
  2209. unsetResourceApplicationDataEntry_result result = new unsetResourceApplicationDataEntry_result();
  2210. result.read(iprot_);
  2211. iprot_.readMessageEnd();
  2212. if (result.isSetSuccess()) {
  2213. return result.success;
  2214. }
  2215. if (result.userException != null) {
  2216. throw result.userException;
  2217. }
  2218. if (result.systemException != null) {
  2219. throw result.systemException;
  2220. }
  2221. if (result.notFoundException != null) {
  2222. throw result.notFoundException;
  2223. }
  2224. throw new TApplicationException(TApplicationException.MISSING_RESULT, "unsetResourceApplicationDataEntry failed: unknown result");
  2225. }
  2226. public int updateResource(String authenticationToken, com.evernote.edam.type.Resource resource) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  2227. {
  2228. send_updateResource(authenticationToken, resource);
  2229. return recv_updateResource();
  2230. }
  2231. public void send_updateResource(String authenticationToken, com.evernote.edam.type.Resource resource) throws TException
  2232. {
  2233. oprot_.writeMessageBegin(new TMessage("updateResource", TMessageType.CALL, ++seqid_));
  2234. updateResource_args args = new updateResource_args();
  2235. args.setAuthenticationToken(authenticationToken);
  2236. args.setResource(resource);
  2237. args.write(oprot_);
  2238. oprot_.writeMessageEnd();
  2239. oprot_.getTransport().flush();
  2240. }
  2241. public int recv_updateResource() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  2242. {
  2243. TMessage msg = iprot_.readMessageBegin();
  2244. if (msg.type == TMessageType.EXCEPTION) {
  2245. TApplicationException x = TApplicationException.read(iprot_);
  2246. iprot_.readMessageEnd();
  2247. throw x;
  2248. }
  2249. if (msg.seqid != seqid_) {
  2250. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "updateResource failed: out of sequence response");
  2251. }
  2252. updateResource_result result = new updateResource_result();
  2253. result.read(iprot_);
  2254. iprot_.readMessageEnd();
  2255. if (result.isSetSuccess()) {
  2256. return result.success;
  2257. }
  2258. if (result.userException != null) {
  2259. throw result.userException;
  2260. }
  2261. if (result.systemException != null) {
  2262. throw result.systemException;
  2263. }
  2264. if (result.notFoundException != null) {
  2265. throw result.notFoundException;
  2266. }
  2267. throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateResource failed: unknown result");
  2268. }
  2269. public byte[] getResourceData(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  2270. {
  2271. send_getResourceData(authenticationToken, guid);
  2272. return recv_getResourceData();
  2273. }
  2274. public void send_getResourceData(String authenticationToken, String guid) throws TException
  2275. {
  2276. oprot_.writeMessageBegin(new TMessage("getResourceData", TMessageType.CALL, ++seqid_));
  2277. getResourceData_args args = new getResourceData_args();
  2278. args.setAuthenticationToken(authenticationToken);
  2279. args.setGuid(guid);
  2280. args.write(oprot_);
  2281. oprot_.writeMessageEnd();
  2282. oprot_.getTransport().flush();
  2283. }
  2284. public byte[] recv_getResourceData() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  2285. {
  2286. TMessage msg = iprot_.readMessageBegin();
  2287. if (msg.type == TMessageType.EXCEPTION) {
  2288. TApplicationException x = TApplicationException.read(iprot_);
  2289. iprot_.readMessageEnd();
  2290. throw x;
  2291. }
  2292. if (msg.seqid != seqid_) {
  2293. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getResourceData failed: out of sequence response");
  2294. }
  2295. getResourceData_result result = new getResourceData_result();
  2296. result.read(iprot_);
  2297. iprot_.readMessageEnd();
  2298. if (result.isSetSuccess()) {
  2299. return result.success;
  2300. }
  2301. if (result.userException != null) {
  2302. throw result.userException;
  2303. }
  2304. if (result.systemException != null) {
  2305. throw result.systemException;
  2306. }
  2307. if (result.notFoundException != null) {
  2308. throw result.notFoundException;
  2309. }
  2310. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getResourceData failed: unknown result");
  2311. }
  2312. public com.evernote.edam.type.Resource getResourceByHash(String authenticationToken, String noteGuid, byte[] contentHash, boolean withData, boolean withRecognition, boolean withAlternateData) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  2313. {
  2314. send_getResourceByHash(authenticationToken, noteGuid, contentHash, withData, withRecognition, withAlternateData);
  2315. return recv_getResourceByHash();
  2316. }
  2317. public void send_getResourceByHash(String authenticationToken, String noteGuid, byte[] contentHash, boolean withData, boolean withRecognition, boolean withAlternateData) throws TException
  2318. {
  2319. oprot_.writeMessageBegin(new TMessage("getResourceByHash", TMessageType.CALL, ++seqid_));
  2320. getResourceByHash_args args = new getResourceByHash_args();
  2321. args.setAuthenticationToken(authenticationToken);
  2322. args.setNoteGuid(noteGuid);
  2323. args.setContentHash(contentHash);
  2324. args.setWithData(withData);
  2325. args.setWithRecognition(withRecognition);
  2326. args.setWithAlternateData(withAlternateData);
  2327. args.write(oprot_);
  2328. oprot_.writeMessageEnd();
  2329. oprot_.getTransport().flush();
  2330. }
  2331. public com.evernote.edam.type.Resource recv_getResourceByHash() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  2332. {
  2333. TMessage msg = iprot_.readMessageBegin();
  2334. if (msg.type == TMessageType.EXCEPTION) {
  2335. TApplicationException x = TApplicationException.read(iprot_);
  2336. iprot_.readMessageEnd();
  2337. throw x;
  2338. }
  2339. if (msg.seqid != seqid_) {
  2340. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getResourceByHash failed: out of sequence response");
  2341. }
  2342. getResourceByHash_result result = new getResourceByHash_result();
  2343. result.read(iprot_);
  2344. iprot_.readMessageEnd();
  2345. if (result.isSetSuccess()) {
  2346. return result.success;
  2347. }
  2348. if (result.userException != null) {
  2349. throw result.userException;
  2350. }
  2351. if (result.systemException != null) {
  2352. throw result.systemException;
  2353. }
  2354. if (result.notFoundException != null) {
  2355. throw result.notFoundException;
  2356. }
  2357. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getResourceByHash failed: unknown result");
  2358. }
  2359. public byte[] getResourceRecognition(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  2360. {
  2361. send_getResourceRecognition(authenticationToken, guid);
  2362. return recv_getResourceRecognition();
  2363. }
  2364. public void send_getResourceRecognition(String authenticationToken, String guid) throws TException
  2365. {
  2366. oprot_.writeMessageBegin(new TMessage("getResourceRecognition", TMessageType.CALL, ++seqid_));
  2367. getResourceRecognition_args args = new getResourceRecognition_args();
  2368. args.setAuthenticationToken(authenticationToken);
  2369. args.setGuid(guid);
  2370. args.write(oprot_);
  2371. oprot_.writeMessageEnd();
  2372. oprot_.getTransport().flush();
  2373. }
  2374. public byte[] recv_getResourceRecognition() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  2375. {
  2376. TMessage msg = iprot_.readMessageBegin();
  2377. if (msg.type == TMessageType.EXCEPTION) {
  2378. TApplicationException x = TApplicationException.read(iprot_);
  2379. iprot_.readMessageEnd();
  2380. throw x;
  2381. }
  2382. if (msg.seqid != seqid_) {
  2383. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getResourceRecognition failed: out of sequence response");
  2384. }
  2385. getResourceRecognition_result result = new getResourceRecognition_result();
  2386. result.read(iprot_);
  2387. iprot_.readMessageEnd();
  2388. if (result.isSetSuccess()) {
  2389. return result.success;
  2390. }
  2391. if (result.userException != null) {
  2392. throw result.userException;
  2393. }
  2394. if (result.systemException != null) {
  2395. throw result.systemException;
  2396. }
  2397. if (result.notFoundException != null) {
  2398. throw result.notFoundException;
  2399. }
  2400. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getResourceRecognition failed: unknown result");
  2401. }
  2402. public byte[] getResourceAlternateData(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  2403. {
  2404. send_getResourceAlternateData(authenticationToken, guid);
  2405. return recv_getResourceAlternateData();
  2406. }
  2407. public void send_getResourceAlternateData(String authenticationToken, String guid) throws TException
  2408. {
  2409. oprot_.writeMessageBegin(new TMessage("getResourceAlternateData", TMessageType.CALL, ++seqid_));
  2410. getResourceAlternateData_args args = new getResourceAlternateData_args();
  2411. args.setAuthenticationToken(authenticationToken);
  2412. args.setGuid(guid);
  2413. args.write(oprot_);
  2414. oprot_.writeMessageEnd();
  2415. oprot_.getTransport().flush();
  2416. }
  2417. public byte[] recv_getResourceAlternateData() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  2418. {
  2419. TMessage msg = iprot_.readMessageBegin();
  2420. if (msg.type == TMessageType.EXCEPTION) {
  2421. TApplicationException x = TApplicationException.read(iprot_);
  2422. iprot_.readMessageEnd();
  2423. throw x;
  2424. }
  2425. if (msg.seqid != seqid_) {
  2426. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getResourceAlternateData failed: out of sequence response");
  2427. }
  2428. getResourceAlternateData_result result = new getResourceAlternateData_result();
  2429. result.read(iprot_);
  2430. iprot_.readMessageEnd();
  2431. if (result.isSetSuccess()) {
  2432. return result.success;
  2433. }
  2434. if (result.userException != null) {
  2435. throw result.userException;
  2436. }
  2437. if (result.systemException != null) {
  2438. throw result.systemException;
  2439. }
  2440. if (result.notFoundException != null) {
  2441. throw result.notFoundException;
  2442. }
  2443. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getResourceAlternateData failed: unknown result");
  2444. }
  2445. public com.evernote.edam.type.ResourceAttributes getResourceAttributes(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  2446. {
  2447. send_getResourceAttributes(authenticationToken, guid);
  2448. return recv_getResourceAttributes();
  2449. }
  2450. public void send_getResourceAttributes(String authenticationToken, String guid) throws TException
  2451. {
  2452. oprot_.writeMessageBegin(new TMessage("getResourceAttributes", TMessageType.CALL, ++seqid_));
  2453. getResourceAttributes_args args = new getResourceAttributes_args();
  2454. args.setAuthenticationToken(authenticationToken);
  2455. args.setGuid(guid);
  2456. args.write(oprot_);
  2457. oprot_.writeMessageEnd();
  2458. oprot_.getTransport().flush();
  2459. }
  2460. public com.evernote.edam.type.ResourceAttributes recv_getResourceAttributes() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  2461. {
  2462. TMessage msg = iprot_.readMessageBegin();
  2463. if (msg.type == TMessageType.EXCEPTION) {
  2464. TApplicationException x = TApplicationException.read(iprot_);
  2465. iprot_.readMessageEnd();
  2466. throw x;
  2467. }
  2468. if (msg.seqid != seqid_) {
  2469. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getResourceAttributes failed: out of sequence response");
  2470. }
  2471. getResourceAttributes_result result = new getResourceAttributes_result();
  2472. result.read(iprot_);
  2473. iprot_.readMessageEnd();
  2474. if (result.isSetSuccess()) {
  2475. return result.success;
  2476. }
  2477. if (result.userException != null) {
  2478. throw result.userException;
  2479. }
  2480. if (result.systemException != null) {
  2481. throw result.systemException;
  2482. }
  2483. if (result.notFoundException != null) {
  2484. throw result.notFoundException;
  2485. }
  2486. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getResourceAttributes failed: unknown result");
  2487. }
  2488. public com.evernote.edam.type.Notebook getPublicNotebook(int userId, String publicUri) throws com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  2489. {
  2490. send_getPublicNotebook(userId, publicUri);
  2491. return recv_getPublicNotebook();
  2492. }
  2493. public void send_getPublicNotebook(int userId, String publicUri) throws TException
  2494. {
  2495. oprot_.writeMessageBegin(new TMessage("getPublicNotebook", TMessageType.CALL, ++seqid_));
  2496. getPublicNotebook_args args = new getPublicNotebook_args();
  2497. args.setUserId(userId);
  2498. args.setPublicUri(publicUri);
  2499. args.write(oprot_);
  2500. oprot_.writeMessageEnd();
  2501. oprot_.getTransport().flush();
  2502. }
  2503. public com.evernote.edam.type.Notebook recv_getPublicNotebook() throws com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  2504. {
  2505. TMessage msg = iprot_.readMessageBegin();
  2506. if (msg.type == TMessageType.EXCEPTION) {
  2507. TApplicationException x = TApplicationException.read(iprot_);
  2508. iprot_.readMessageEnd();
  2509. throw x;
  2510. }
  2511. if (msg.seqid != seqid_) {
  2512. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getPublicNotebook failed: out of sequence response");
  2513. }
  2514. getPublicNotebook_result result = new getPublicNotebook_result();
  2515. result.read(iprot_);
  2516. iprot_.readMessageEnd();
  2517. if (result.isSetSuccess()) {
  2518. return result.success;
  2519. }
  2520. if (result.systemException != null) {
  2521. throw result.systemException;
  2522. }
  2523. if (result.notFoundException != null) {
  2524. throw result.notFoundException;
  2525. }
  2526. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getPublicNotebook failed: unknown result");
  2527. }
  2528. public com.evernote.edam.type.SharedNotebook createSharedNotebook(String authenticationToken, com.evernote.edam.type.SharedNotebook sharedNotebook) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  2529. {
  2530. send_createSharedNotebook(authenticationToken, sharedNotebook);
  2531. return recv_createSharedNotebook();
  2532. }
  2533. public void send_createSharedNotebook(String authenticationToken, com.evernote.edam.type.SharedNotebook sharedNotebook) throws TException
  2534. {
  2535. oprot_.writeMessageBegin(new TMessage("createSharedNotebook", TMessageType.CALL, ++seqid_));
  2536. createSharedNotebook_args args = new createSharedNotebook_args();
  2537. args.setAuthenticationToken(authenticationToken);
  2538. args.setSharedNotebook(sharedNotebook);
  2539. args.write(oprot_);
  2540. oprot_.writeMessageEnd();
  2541. oprot_.getTransport().flush();
  2542. }
  2543. public com.evernote.edam.type.SharedNotebook recv_createSharedNotebook() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  2544. {
  2545. TMessage msg = iprot_.readMessageBegin();
  2546. if (msg.type == TMessageType.EXCEPTION) {
  2547. TApplicationException x = TApplicationException.read(iprot_);
  2548. iprot_.readMessageEnd();
  2549. throw x;
  2550. }
  2551. if (msg.seqid != seqid_) {
  2552. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "createSharedNotebook failed: out of sequence response");
  2553. }
  2554. createSharedNotebook_result result = new createSharedNotebook_result();
  2555. result.read(iprot_);
  2556. iprot_.readMessageEnd();
  2557. if (result.isSetSuccess()) {
  2558. return result.success;
  2559. }
  2560. if (result.userException != null) {
  2561. throw result.userException;
  2562. }
  2563. if (result.notFoundException != null) {
  2564. throw result.notFoundException;
  2565. }
  2566. if (result.systemException != null) {
  2567. throw result.systemException;
  2568. }
  2569. throw new TApplicationException(TApplicationException.MISSING_RESULT, "createSharedNotebook failed: unknown result");
  2570. }
  2571. public int updateSharedNotebook(String authenticationToken, com.evernote.edam.type.SharedNotebook sharedNotebook) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  2572. {
  2573. send_updateSharedNotebook(authenticationToken, sharedNotebook);
  2574. return recv_updateSharedNotebook();
  2575. }
  2576. public void send_updateSharedNotebook(String authenticationToken, com.evernote.edam.type.SharedNotebook sharedNotebook) throws TException
  2577. {
  2578. oprot_.writeMessageBegin(new TMessage("updateSharedNotebook", TMessageType.CALL, ++seqid_));
  2579. updateSharedNotebook_args args = new updateSharedNotebook_args();
  2580. args.setAuthenticationToken(authenticationToken);
  2581. args.setSharedNotebook(sharedNotebook);
  2582. args.write(oprot_);
  2583. oprot_.writeMessageEnd();
  2584. oprot_.getTransport().flush();
  2585. }
  2586. public int recv_updateSharedNotebook() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  2587. {
  2588. TMessage msg = iprot_.readMessageBegin();
  2589. if (msg.type == TMessageType.EXCEPTION) {
  2590. TApplicationException x = TApplicationException.read(iprot_);
  2591. iprot_.readMessageEnd();
  2592. throw x;
  2593. }
  2594. if (msg.seqid != seqid_) {
  2595. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "updateSharedNotebook failed: out of sequence response");
  2596. }
  2597. updateSharedNotebook_result result = new updateSharedNotebook_result();
  2598. result.read(iprot_);
  2599. iprot_.readMessageEnd();
  2600. if (result.isSetSuccess()) {
  2601. return result.success;
  2602. }
  2603. if (result.userException != null) {
  2604. throw result.userException;
  2605. }
  2606. if (result.notFoundException != null) {
  2607. throw result.notFoundException;
  2608. }
  2609. if (result.systemException != null) {
  2610. throw result.systemException;
  2611. }
  2612. throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateSharedNotebook failed: unknown result");
  2613. }
  2614. public int setSharedNotebookRecipientSettings(String authenticationToken, long sharedNotebookId, com.evernote.edam.type.SharedNotebookRecipientSettings recipientSettings) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  2615. {
  2616. send_setSharedNotebookRecipientSettings(authenticationToken, sharedNotebookId, recipientSettings);
  2617. return recv_setSharedNotebookRecipientSettings();
  2618. }
  2619. public void send_setSharedNotebookRecipientSettings(String authenticationToken, long sharedNotebookId, com.evernote.edam.type.SharedNotebookRecipientSettings recipientSettings) throws TException
  2620. {
  2621. oprot_.writeMessageBegin(new TMessage("setSharedNotebookRecipientSettings", TMessageType.CALL, ++seqid_));
  2622. setSharedNotebookRecipientSettings_args args = new setSharedNotebookRecipientSettings_args();
  2623. args.setAuthenticationToken(authenticationToken);
  2624. args.setSharedNotebookId(sharedNotebookId);
  2625. args.setRecipientSettings(recipientSettings);
  2626. args.write(oprot_);
  2627. oprot_.writeMessageEnd();
  2628. oprot_.getTransport().flush();
  2629. }
  2630. public int recv_setSharedNotebookRecipientSettings() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  2631. {
  2632. TMessage msg = iprot_.readMessageBegin();
  2633. if (msg.type == TMessageType.EXCEPTION) {
  2634. TApplicationException x = TApplicationException.read(iprot_);
  2635. iprot_.readMessageEnd();
  2636. throw x;
  2637. }
  2638. if (msg.seqid != seqid_) {
  2639. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "setSharedNotebookRecipientSettings failed: out of sequence response");
  2640. }
  2641. setSharedNotebookRecipientSettings_result result = new setSharedNotebookRecipientSettings_result();
  2642. result.read(iprot_);
  2643. iprot_.readMessageEnd();
  2644. if (result.isSetSuccess()) {
  2645. return result.success;
  2646. }
  2647. if (result.userException != null) {
  2648. throw result.userException;
  2649. }
  2650. if (result.notFoundException != null) {
  2651. throw result.notFoundException;
  2652. }
  2653. if (result.systemException != null) {
  2654. throw result.systemException;
  2655. }
  2656. throw new TApplicationException(TApplicationException.MISSING_RESULT, "setSharedNotebookRecipientSettings failed: unknown result");
  2657. }
  2658. public int sendMessageToSharedNotebookMembers(String authenticationToken, String notebookGuid, String messageText, List<String> recipients) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  2659. {
  2660. send_sendMessageToSharedNotebookMembers(authenticationToken, notebookGuid, messageText, recipients);
  2661. return recv_sendMessageToSharedNotebookMembers();
  2662. }
  2663. public void send_sendMessageToSharedNotebookMembers(String authenticationToken, String notebookGuid, String messageText, List<String> recipients) throws TException
  2664. {
  2665. oprot_.writeMessageBegin(new TMessage("sendMessageToSharedNotebookMembers", TMessageType.CALL, ++seqid_));
  2666. sendMessageToSharedNotebookMembers_args args = new sendMessageToSharedNotebookMembers_args();
  2667. args.setAuthenticationToken(authenticationToken);
  2668. args.setNotebookGuid(notebookGuid);
  2669. args.setMessageText(messageText);
  2670. args.setRecipients(recipients);
  2671. args.write(oprot_);
  2672. oprot_.writeMessageEnd();
  2673. oprot_.getTransport().flush();
  2674. }
  2675. public int recv_sendMessageToSharedNotebookMembers() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  2676. {
  2677. TMessage msg = iprot_.readMessageBegin();
  2678. if (msg.type == TMessageType.EXCEPTION) {
  2679. TApplicationException x = TApplicationException.read(iprot_);
  2680. iprot_.readMessageEnd();
  2681. throw x;
  2682. }
  2683. if (msg.seqid != seqid_) {
  2684. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "sendMessageToSharedNotebookMembers failed: out of sequence response");
  2685. }
  2686. sendMessageToSharedNotebookMembers_result result = new sendMessageToSharedNotebookMembers_result();
  2687. result.read(iprot_);
  2688. iprot_.readMessageEnd();
  2689. if (result.isSetSuccess()) {
  2690. return result.success;
  2691. }
  2692. if (result.userException != null) {
  2693. throw result.userException;
  2694. }
  2695. if (result.notFoundException != null) {
  2696. throw result.notFoundException;
  2697. }
  2698. if (result.systemException != null) {
  2699. throw result.systemException;
  2700. }
  2701. throw new TApplicationException(TApplicationException.MISSING_RESULT, "sendMessageToSharedNotebookMembers failed: unknown result");
  2702. }
  2703. public List<com.evernote.edam.type.SharedNotebook> listSharedNotebooks(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  2704. {
  2705. send_listSharedNotebooks(authenticationToken);
  2706. return recv_listSharedNotebooks();
  2707. }
  2708. public void send_listSharedNotebooks(String authenticationToken) throws TException
  2709. {
  2710. oprot_.writeMessageBegin(new TMessage("listSharedNotebooks", TMessageType.CALL, ++seqid_));
  2711. listSharedNotebooks_args args = new listSharedNotebooks_args();
  2712. args.setAuthenticationToken(authenticationToken);
  2713. args.write(oprot_);
  2714. oprot_.writeMessageEnd();
  2715. oprot_.getTransport().flush();
  2716. }
  2717. public List<com.evernote.edam.type.SharedNotebook> recv_listSharedNotebooks() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  2718. {
  2719. TMessage msg = iprot_.readMessageBegin();
  2720. if (msg.type == TMessageType.EXCEPTION) {
  2721. TApplicationException x = TApplicationException.read(iprot_);
  2722. iprot_.readMessageEnd();
  2723. throw x;
  2724. }
  2725. if (msg.seqid != seqid_) {
  2726. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "listSharedNotebooks failed: out of sequence response");
  2727. }
  2728. listSharedNotebooks_result result = new listSharedNotebooks_result();
  2729. result.read(iprot_);
  2730. iprot_.readMessageEnd();
  2731. if (result.isSetSuccess()) {
  2732. return result.success;
  2733. }
  2734. if (result.userException != null) {
  2735. throw result.userException;
  2736. }
  2737. if (result.notFoundException != null) {
  2738. throw result.notFoundException;
  2739. }
  2740. if (result.systemException != null) {
  2741. throw result.systemException;
  2742. }
  2743. throw new TApplicationException(TApplicationException.MISSING_RESULT, "listSharedNotebooks failed: unknown result");
  2744. }
  2745. public int expungeSharedNotebooks(String authenticationToken, List<Long> sharedNotebookIds) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  2746. {
  2747. send_expungeSharedNotebooks(authenticationToken, sharedNotebookIds);
  2748. return recv_expungeSharedNotebooks();
  2749. }
  2750. public void send_expungeSharedNotebooks(String authenticationToken, List<Long> sharedNotebookIds) throws TException
  2751. {
  2752. oprot_.writeMessageBegin(new TMessage("expungeSharedNotebooks", TMessageType.CALL, ++seqid_));
  2753. expungeSharedNotebooks_args args = new expungeSharedNotebooks_args();
  2754. args.setAuthenticationToken(authenticationToken);
  2755. args.setSharedNotebookIds(sharedNotebookIds);
  2756. args.write(oprot_);
  2757. oprot_.writeMessageEnd();
  2758. oprot_.getTransport().flush();
  2759. }
  2760. public int recv_expungeSharedNotebooks() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  2761. {
  2762. TMessage msg = iprot_.readMessageBegin();
  2763. if (msg.type == TMessageType.EXCEPTION) {
  2764. TApplicationException x = TApplicationException.read(iprot_);
  2765. iprot_.readMessageEnd();
  2766. throw x;
  2767. }
  2768. if (msg.seqid != seqid_) {
  2769. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "expungeSharedNotebooks failed: out of sequence response");
  2770. }
  2771. expungeSharedNotebooks_result result = new expungeSharedNotebooks_result();
  2772. result.read(iprot_);
  2773. iprot_.readMessageEnd();
  2774. if (result.isSetSuccess()) {
  2775. return result.success;
  2776. }
  2777. if (result.userException != null) {
  2778. throw result.userException;
  2779. }
  2780. if (result.notFoundException != null) {
  2781. throw result.notFoundException;
  2782. }
  2783. if (result.systemException != null) {
  2784. throw result.systemException;
  2785. }
  2786. throw new TApplicationException(TApplicationException.MISSING_RESULT, "expungeSharedNotebooks failed: unknown result");
  2787. }
  2788. public com.evernote.edam.type.LinkedNotebook createLinkedNotebook(String authenticationToken, com.evernote.edam.type.LinkedNotebook linkedNotebook) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  2789. {
  2790. send_createLinkedNotebook(authenticationToken, linkedNotebook);
  2791. return recv_createLinkedNotebook();
  2792. }
  2793. public void send_createLinkedNotebook(String authenticationToken, com.evernote.edam.type.LinkedNotebook linkedNotebook) throws TException
  2794. {
  2795. oprot_.writeMessageBegin(new TMessage("createLinkedNotebook", TMessageType.CALL, ++seqid_));
  2796. createLinkedNotebook_args args = new createLinkedNotebook_args();
  2797. args.setAuthenticationToken(authenticationToken);
  2798. args.setLinkedNotebook(linkedNotebook);
  2799. args.write(oprot_);
  2800. oprot_.writeMessageEnd();
  2801. oprot_.getTransport().flush();
  2802. }
  2803. public com.evernote.edam.type.LinkedNotebook recv_createLinkedNotebook() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  2804. {
  2805. TMessage msg = iprot_.readMessageBegin();
  2806. if (msg.type == TMessageType.EXCEPTION) {
  2807. TApplicationException x = TApplicationException.read(iprot_);
  2808. iprot_.readMessageEnd();
  2809. throw x;
  2810. }
  2811. if (msg.seqid != seqid_) {
  2812. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "createLinkedNotebook failed: out of sequence response");
  2813. }
  2814. createLinkedNotebook_result result = new createLinkedNotebook_result();
  2815. result.read(iprot_);
  2816. iprot_.readMessageEnd();
  2817. if (result.isSetSuccess()) {
  2818. return result.success;
  2819. }
  2820. if (result.userException != null) {
  2821. throw result.userException;
  2822. }
  2823. if (result.notFoundException != null) {
  2824. throw result.notFoundException;
  2825. }
  2826. if (result.systemException != null) {
  2827. throw result.systemException;
  2828. }
  2829. throw new TApplicationException(TApplicationException.MISSING_RESULT, "createLinkedNotebook failed: unknown result");
  2830. }
  2831. public int updateLinkedNotebook(String authenticationToken, com.evernote.edam.type.LinkedNotebook linkedNotebook) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  2832. {
  2833. send_updateLinkedNotebook(authenticationToken, linkedNotebook);
  2834. return recv_updateLinkedNotebook();
  2835. }
  2836. public void send_updateLinkedNotebook(String authenticationToken, com.evernote.edam.type.LinkedNotebook linkedNotebook) throws TException
  2837. {
  2838. oprot_.writeMessageBegin(new TMessage("updateLinkedNotebook", TMessageType.CALL, ++seqid_));
  2839. updateLinkedNotebook_args args = new updateLinkedNotebook_args();
  2840. args.setAuthenticationToken(authenticationToken);
  2841. args.setLinkedNotebook(linkedNotebook);
  2842. args.write(oprot_);
  2843. oprot_.writeMessageEnd();
  2844. oprot_.getTransport().flush();
  2845. }
  2846. public int recv_updateLinkedNotebook() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  2847. {
  2848. TMessage msg = iprot_.readMessageBegin();
  2849. if (msg.type == TMessageType.EXCEPTION) {
  2850. TApplicationException x = TApplicationException.read(iprot_);
  2851. iprot_.readMessageEnd();
  2852. throw x;
  2853. }
  2854. if (msg.seqid != seqid_) {
  2855. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "updateLinkedNotebook failed: out of sequence response");
  2856. }
  2857. updateLinkedNotebook_result result = new updateLinkedNotebook_result();
  2858. result.read(iprot_);
  2859. iprot_.readMessageEnd();
  2860. if (result.isSetSuccess()) {
  2861. return result.success;
  2862. }
  2863. if (result.userException != null) {
  2864. throw result.userException;
  2865. }
  2866. if (result.notFoundException != null) {
  2867. throw result.notFoundException;
  2868. }
  2869. if (result.systemException != null) {
  2870. throw result.systemException;
  2871. }
  2872. throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateLinkedNotebook failed: unknown result");
  2873. }
  2874. public List<com.evernote.edam.type.LinkedNotebook> listLinkedNotebooks(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  2875. {
  2876. send_listLinkedNotebooks(authenticationToken);
  2877. return recv_listLinkedNotebooks();
  2878. }
  2879. public void send_listLinkedNotebooks(String authenticationToken) throws TException
  2880. {
  2881. oprot_.writeMessageBegin(new TMessage("listLinkedNotebooks", TMessageType.CALL, ++seqid_));
  2882. listLinkedNotebooks_args args = new listLinkedNotebooks_args();
  2883. args.setAuthenticationToken(authenticationToken);
  2884. args.write(oprot_);
  2885. oprot_.writeMessageEnd();
  2886. oprot_.getTransport().flush();
  2887. }
  2888. public List<com.evernote.edam.type.LinkedNotebook> recv_listLinkedNotebooks() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  2889. {
  2890. TMessage msg = iprot_.readMessageBegin();
  2891. if (msg.type == TMessageType.EXCEPTION) {
  2892. TApplicationException x = TApplicationException.read(iprot_);
  2893. iprot_.readMessageEnd();
  2894. throw x;
  2895. }
  2896. if (msg.seqid != seqid_) {
  2897. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "listLinkedNotebooks failed: out of sequence response");
  2898. }
  2899. listLinkedNotebooks_result result = new listLinkedNotebooks_result();
  2900. result.read(iprot_);
  2901. iprot_.readMessageEnd();
  2902. if (result.isSetSuccess()) {
  2903. return result.success;
  2904. }
  2905. if (result.userException != null) {
  2906. throw result.userException;
  2907. }
  2908. if (result.notFoundException != null) {
  2909. throw result.notFoundException;
  2910. }
  2911. if (result.systemException != null) {
  2912. throw result.systemException;
  2913. }
  2914. throw new TApplicationException(TApplicationException.MISSING_RESULT, "listLinkedNotebooks failed: unknown result");
  2915. }
  2916. public int expungeLinkedNotebook(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  2917. {
  2918. send_expungeLinkedNotebook(authenticationToken, guid);
  2919. return recv_expungeLinkedNotebook();
  2920. }
  2921. public void send_expungeLinkedNotebook(String authenticationToken, String guid) throws TException
  2922. {
  2923. oprot_.writeMessageBegin(new TMessage("expungeLinkedNotebook", TMessageType.CALL, ++seqid_));
  2924. expungeLinkedNotebook_args args = new expungeLinkedNotebook_args();
  2925. args.setAuthenticationToken(authenticationToken);
  2926. args.setGuid(guid);
  2927. args.write(oprot_);
  2928. oprot_.writeMessageEnd();
  2929. oprot_.getTransport().flush();
  2930. }
  2931. public int recv_expungeLinkedNotebook() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  2932. {
  2933. TMessage msg = iprot_.readMessageBegin();
  2934. if (msg.type == TMessageType.EXCEPTION) {
  2935. TApplicationException x = TApplicationException.read(iprot_);
  2936. iprot_.readMessageEnd();
  2937. throw x;
  2938. }
  2939. if (msg.seqid != seqid_) {
  2940. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "expungeLinkedNotebook failed: out of sequence response");
  2941. }
  2942. expungeLinkedNotebook_result result = new expungeLinkedNotebook_result();
  2943. result.read(iprot_);
  2944. iprot_.readMessageEnd();
  2945. if (result.isSetSuccess()) {
  2946. return result.success;
  2947. }
  2948. if (result.userException != null) {
  2949. throw result.userException;
  2950. }
  2951. if (result.notFoundException != null) {
  2952. throw result.notFoundException;
  2953. }
  2954. if (result.systemException != null) {
  2955. throw result.systemException;
  2956. }
  2957. throw new TApplicationException(TApplicationException.MISSING_RESULT, "expungeLinkedNotebook failed: unknown result");
  2958. }
  2959. public com.evernote.edam.userstore.AuthenticationResult authenticateToSharedNotebook(String shareKey, String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  2960. {
  2961. send_authenticateToSharedNotebook(shareKey, authenticationToken);
  2962. return recv_authenticateToSharedNotebook();
  2963. }
  2964. public void send_authenticateToSharedNotebook(String shareKey, String authenticationToken) throws TException
  2965. {
  2966. oprot_.writeMessageBegin(new TMessage("authenticateToSharedNotebook", TMessageType.CALL, ++seqid_));
  2967. authenticateToSharedNotebook_args args = new authenticateToSharedNotebook_args();
  2968. args.setShareKey(shareKey);
  2969. args.setAuthenticationToken(authenticationToken);
  2970. args.write(oprot_);
  2971. oprot_.writeMessageEnd();
  2972. oprot_.getTransport().flush();
  2973. }
  2974. public com.evernote.edam.userstore.AuthenticationResult recv_authenticateToSharedNotebook() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  2975. {
  2976. TMessage msg = iprot_.readMessageBegin();
  2977. if (msg.type == TMessageType.EXCEPTION) {
  2978. TApplicationException x = TApplicationException.read(iprot_);
  2979. iprot_.readMessageEnd();
  2980. throw x;
  2981. }
  2982. if (msg.seqid != seqid_) {
  2983. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "authenticateToSharedNotebook failed: out of sequence response");
  2984. }
  2985. authenticateToSharedNotebook_result result = new authenticateToSharedNotebook_result();
  2986. result.read(iprot_);
  2987. iprot_.readMessageEnd();
  2988. if (result.isSetSuccess()) {
  2989. return result.success;
  2990. }
  2991. if (result.userException != null) {
  2992. throw result.userException;
  2993. }
  2994. if (result.notFoundException != null) {
  2995. throw result.notFoundException;
  2996. }
  2997. if (result.systemException != null) {
  2998. throw result.systemException;
  2999. }
  3000. throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateToSharedNotebook failed: unknown result");
  3001. }
  3002. public com.evernote.edam.type.SharedNotebook getSharedNotebookByAuth(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  3003. {
  3004. send_getSharedNotebookByAuth(authenticationToken);
  3005. return recv_getSharedNotebookByAuth();
  3006. }
  3007. public void send_getSharedNotebookByAuth(String authenticationToken) throws TException
  3008. {
  3009. oprot_.writeMessageBegin(new TMessage("getSharedNotebookByAuth", TMessageType.CALL, ++seqid_));
  3010. getSharedNotebookByAuth_args args = new getSharedNotebookByAuth_args();
  3011. args.setAuthenticationToken(authenticationToken);
  3012. args.write(oprot_);
  3013. oprot_.writeMessageEnd();
  3014. oprot_.getTransport().flush();
  3015. }
  3016. public com.evernote.edam.type.SharedNotebook recv_getSharedNotebookByAuth() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  3017. {
  3018. TMessage msg = iprot_.readMessageBegin();
  3019. if (msg.type == TMessageType.EXCEPTION) {
  3020. TApplicationException x = TApplicationException.read(iprot_);
  3021. iprot_.readMessageEnd();
  3022. throw x;
  3023. }
  3024. if (msg.seqid != seqid_) {
  3025. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getSharedNotebookByAuth failed: out of sequence response");
  3026. }
  3027. getSharedNotebookByAuth_result result = new getSharedNotebookByAuth_result();
  3028. result.read(iprot_);
  3029. iprot_.readMessageEnd();
  3030. if (result.isSetSuccess()) {
  3031. return result.success;
  3032. }
  3033. if (result.userException != null) {
  3034. throw result.userException;
  3035. }
  3036. if (result.notFoundException != null) {
  3037. throw result.notFoundException;
  3038. }
  3039. if (result.systemException != null) {
  3040. throw result.systemException;
  3041. }
  3042. throw new TApplicationException(TApplicationException.MISSING_RESULT, "getSharedNotebookByAuth failed: unknown result");
  3043. }
  3044. public void emailNote(String authenticationToken, NoteEmailParameters parameters) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  3045. {
  3046. send_emailNote(authenticationToken, parameters);
  3047. recv_emailNote();
  3048. }
  3049. public void send_emailNote(String authenticationToken, NoteEmailParameters parameters) throws TException
  3050. {
  3051. oprot_.writeMessageBegin(new TMessage("emailNote", TMessageType.CALL, ++seqid_));
  3052. emailNote_args args = new emailNote_args();
  3053. args.setAuthenticationToken(authenticationToken);
  3054. args.setParameters(parameters);
  3055. args.write(oprot_);
  3056. oprot_.writeMessageEnd();
  3057. oprot_.getTransport().flush();
  3058. }
  3059. public void recv_emailNote() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  3060. {
  3061. TMessage msg = iprot_.readMessageBegin();
  3062. if (msg.type == TMessageType.EXCEPTION) {
  3063. TApplicationException x = TApplicationException.read(iprot_);
  3064. iprot_.readMessageEnd();
  3065. throw x;
  3066. }
  3067. if (msg.seqid != seqid_) {
  3068. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "emailNote failed: out of sequence response");
  3069. }
  3070. emailNote_result result = new emailNote_result();
  3071. result.read(iprot_);
  3072. iprot_.readMessageEnd();
  3073. if (result.userException != null) {
  3074. throw result.userException;
  3075. }
  3076. if (result.notFoundException != null) {
  3077. throw result.notFoundException;
  3078. }
  3079. if (result.systemException != null) {
  3080. throw result.systemException;
  3081. }
  3082. return;
  3083. }
  3084. public String shareNote(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  3085. {
  3086. send_shareNote(authenticationToken, guid);
  3087. return recv_shareNote();
  3088. }
  3089. public void send_shareNote(String authenticationToken, String guid) throws TException
  3090. {
  3091. oprot_.writeMessageBegin(new TMessage("shareNote", TMessageType.CALL, ++seqid_));
  3092. shareNote_args args = new shareNote_args();
  3093. args.setAuthenticationToken(authenticationToken);
  3094. args.setGuid(guid);
  3095. args.write(oprot_);
  3096. oprot_.writeMessageEnd();
  3097. oprot_.getTransport().flush();
  3098. }
  3099. public String recv_shareNote() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  3100. {
  3101. TMessage msg = iprot_.readMessageBegin();
  3102. if (msg.type == TMessageType.EXCEPTION) {
  3103. TApplicationException x = TApplicationException.read(iprot_);
  3104. iprot_.readMessageEnd();
  3105. throw x;
  3106. }
  3107. if (msg.seqid != seqid_) {
  3108. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "shareNote failed: out of sequence response");
  3109. }
  3110. shareNote_result result = new shareNote_result();
  3111. result.read(iprot_);
  3112. iprot_.readMessageEnd();
  3113. if (result.isSetSuccess()) {
  3114. return result.success;
  3115. }
  3116. if (result.userException != null) {
  3117. throw result.userException;
  3118. }
  3119. if (result.notFoundException != null) {
  3120. throw result.notFoundException;
  3121. }
  3122. if (result.systemException != null) {
  3123. throw result.systemException;
  3124. }
  3125. throw new TApplicationException(TApplicationException.MISSING_RESULT, "shareNote failed: unknown result");
  3126. }
  3127. public void stopSharingNote(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  3128. {
  3129. send_stopSharingNote(authenticationToken, guid);
  3130. recv_stopSharingNote();
  3131. }
  3132. public void send_stopSharingNote(String authenticationToken, String guid) throws TException
  3133. {
  3134. oprot_.writeMessageBegin(new TMessage("stopSharingNote", TMessageType.CALL, ++seqid_));
  3135. stopSharingNote_args args = new stopSharingNote_args();
  3136. args.setAuthenticationToken(authenticationToken);
  3137. args.setGuid(guid);
  3138. args.write(oprot_);
  3139. oprot_.writeMessageEnd();
  3140. oprot_.getTransport().flush();
  3141. }
  3142. public void recv_stopSharingNote() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  3143. {
  3144. TMessage msg = iprot_.readMessageBegin();
  3145. if (msg.type == TMessageType.EXCEPTION) {
  3146. TApplicationException x = TApplicationException.read(iprot_);
  3147. iprot_.readMessageEnd();
  3148. throw x;
  3149. }
  3150. if (msg.seqid != seqid_) {
  3151. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "stopSharingNote failed: out of sequence response");
  3152. }
  3153. stopSharingNote_result result = new stopSharingNote_result();
  3154. result.read(iprot_);
  3155. iprot_.readMessageEnd();
  3156. if (result.userException != null) {
  3157. throw result.userException;
  3158. }
  3159. if (result.notFoundException != null) {
  3160. throw result.notFoundException;
  3161. }
  3162. if (result.systemException != null) {
  3163. throw result.systemException;
  3164. }
  3165. return;
  3166. }
  3167. public com.evernote.edam.userstore.AuthenticationResult authenticateToSharedNote(String guid, String noteKey, String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  3168. {
  3169. send_authenticateToSharedNote(guid, noteKey, authenticationToken);
  3170. return recv_authenticateToSharedNote();
  3171. }
  3172. public void send_authenticateToSharedNote(String guid, String noteKey, String authenticationToken) throws TException
  3173. {
  3174. oprot_.writeMessageBegin(new TMessage("authenticateToSharedNote", TMessageType.CALL, ++seqid_));
  3175. authenticateToSharedNote_args args = new authenticateToSharedNote_args();
  3176. args.setGuid(guid);
  3177. args.setNoteKey(noteKey);
  3178. args.setAuthenticationToken(authenticationToken);
  3179. args.write(oprot_);
  3180. oprot_.writeMessageEnd();
  3181. oprot_.getTransport().flush();
  3182. }
  3183. public com.evernote.edam.userstore.AuthenticationResult recv_authenticateToSharedNote() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
  3184. {
  3185. TMessage msg = iprot_.readMessageBegin();
  3186. if (msg.type == TMessageType.EXCEPTION) {
  3187. TApplicationException x = TApplicationException.read(iprot_);
  3188. iprot_.readMessageEnd();
  3189. throw x;
  3190. }
  3191. if (msg.seqid != seqid_) {
  3192. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "authenticateToSharedNote failed: out of sequence response");
  3193. }
  3194. authenticateToSharedNote_result result = new authenticateToSharedNote_result();
  3195. result.read(iprot_);
  3196. iprot_.readMessageEnd();
  3197. if (result.isSetSuccess()) {
  3198. return result.success;
  3199. }
  3200. if (result.userException != null) {
  3201. throw result.userException;
  3202. }
  3203. if (result.notFoundException != null) {
  3204. throw result.notFoundException;
  3205. }
  3206. if (result.systemException != null) {
  3207. throw result.systemException;
  3208. }
  3209. throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateToSharedNote failed: unknown result");
  3210. }
  3211. public RelatedResult findRelated(String authenticationToken, RelatedQuery query, RelatedResultSpec resultSpec) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  3212. {
  3213. send_findRelated(authenticationToken, query, resultSpec);
  3214. return recv_findRelated();
  3215. }
  3216. public void send_findRelated(String authenticationToken, RelatedQuery query, RelatedResultSpec resultSpec) throws TException
  3217. {
  3218. oprot_.writeMessageBegin(new TMessage("findRelated", TMessageType.CALL, ++seqid_));
  3219. findRelated_args args = new findRelated_args();
  3220. args.setAuthenticationToken(authenticationToken);
  3221. args.setQuery(query);
  3222. args.setResultSpec(resultSpec);
  3223. args.write(oprot_);
  3224. oprot_.writeMessageEnd();
  3225. oprot_.getTransport().flush();
  3226. }
  3227. public RelatedResult recv_findRelated() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
  3228. {
  3229. TMessage msg = iprot_.readMessageBegin();
  3230. if (msg.type == TMessageType.EXCEPTION) {
  3231. TApplicationException x = TApplicationException.read(iprot_);
  3232. iprot_.readMessageEnd();
  3233. throw x;
  3234. }
  3235. if (msg.seqid != seqid_) {
  3236. throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "findRelated failed: out of sequence response");
  3237. }
  3238. findRelated_result result = new findRelated_result();
  3239. result.read(iprot_);
  3240. iprot_.readMessageEnd();
  3241. if (result.isSetSuccess()) {
  3242. return result.success;
  3243. }
  3244. if (result.userException != null) {
  3245. throw result.userException;
  3246. }
  3247. if (result.systemException != null) {
  3248. throw result.systemException;
  3249. }
  3250. if (result.notFoundException != null) {
  3251. throw result.notFoundException;
  3252. }
  3253. throw new TApplicationException(TApplicationException.MISSING_RESULT, "findRelated failed: unknown result");
  3254. }
  3255. }
  3256. private static class getSyncState_args implements TBase<getSyncState_args>, java.io.Serializable, Cloneable {
  3257. private static final TStruct STRUCT_DESC = new TStruct("getSyncState_args");
  3258. private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
  3259. private String authenticationToken;
  3260. // isset id assignments
  3261. public getSyncState_args() {
  3262. }
  3263. /**
  3264. * Performs a deep copy on <i>other</i>.
  3265. */
  3266. public getSyncState_args(getSyncState_args other) {
  3267. if (other.isSetAuthenticationToken()) {
  3268. this.authenticationToken = other.authenticationToken;
  3269. }
  3270. }
  3271. public getSyncState_args deepCopy() {
  3272. return new getSyncState_args(this);
  3273. }
  3274. public void clear() {
  3275. this.authenticationToken = null;
  3276. }
  3277. public void setAuthenticationToken(String authenticationToken) {
  3278. this.authenticationToken = authenticationToken;
  3279. }
  3280. /** Returns true if field authenticationToken is set (has been asigned a value) and false otherwise */
  3281. public boolean isSetAuthenticationToken() {
  3282. return this.authenticationToken != null;
  3283. }
  3284. public int compareTo(getSyncState_args other) {
  3285. if (!getClass().equals(other.getClass())) {
  3286. return getClass().getName().compareTo(other.getClass().getName());
  3287. }
  3288. int lastComparison = 0;
  3289. getSyncState_args typedOther = (getSyncState_args)other;
  3290. lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
  3291. if (lastComparison != 0) {
  3292. return lastComparison;
  3293. }
  3294. if (isSetAuthenticationToken()) { lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
  3295. if (lastComparison != 0) {
  3296. return lastComparison;
  3297. }
  3298. }
  3299. return 0;
  3300. }
  3301. public void read(TProtocol iprot) throws TException {
  3302. TField field;
  3303. iprot.readStructBegin();
  3304. while (true)
  3305. {
  3306. field = iprot.readFieldBegin();
  3307. if (field.type == TType.STOP) {
  3308. break;
  3309. }
  3310. switch (field.id) {
  3311. case 1: // AUTHENTICATION_TOKEN
  3312. if (field.type == TType.STRING) {
  3313. this.authenticationToken = iprot.readString();
  3314. } else {
  3315. TProtocolUtil.skip(iprot, field.type);
  3316. }
  3317. break;
  3318. default:
  3319. TProtocolUtil.skip(iprot, field.type);
  3320. }
  3321. iprot.readFieldEnd();
  3322. }
  3323. iprot.readStructEnd();
  3324. validate();
  3325. }
  3326. public void write(TProtocol oprot) throws TException {
  3327. validate();
  3328. oprot.writeStructBegin(STRUCT_DESC);
  3329. if (this.authenticationToken != null) {
  3330. oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
  3331. oprot.writeString(this.authenticationToken);
  3332. oprot.writeFieldEnd();
  3333. }
  3334. oprot.writeFieldStop();
  3335. oprot.writeStructEnd();
  3336. }
  3337. public void validate() throws TException {
  3338. // check for required fields
  3339. }
  3340. }
  3341. private static class getSyncState_result implements TBase<getSyncState_result>, java.io.Serializable, Cloneable {
  3342. private static final TStruct STRUCT_DESC = new TStruct("getSyncState_result");
  3343. private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
  3344. private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
  3345. private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
  3346. private SyncState success;
  3347. private com.evernote.edam.error.EDAMUserException userException;
  3348. private com.evernote.edam.error.EDAMSystemException systemException;
  3349. // isset id assignments
  3350. public getSyncState_result() {
  3351. }
  3352. /**
  3353. * Performs a deep copy on <i>other</i>.
  3354. */
  3355. public getSyncState_result(getSyncState_result other) {
  3356. if (other.isSetSuccess()) {
  3357. this.success = new SyncState(other.success);
  3358. }
  3359. if (other.isSetUserException()) {
  3360. this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
  3361. }
  3362. if (other.isSetSystemException()) {
  3363. this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
  3364. }
  3365. }
  3366. public getSyncState_result deepCopy() {
  3367. return new getSyncState_result(this);
  3368. }
  3369. public void clear() {
  3370. this.success = null;
  3371. this.userException = null;
  3372. this.systemException = null;
  3373. }
  3374. /** Returns true if field success is set (has been asigned a value) and false otherwise */
  3375. public boolean isSetSuccess() {
  3376. return this.success != null;
  3377. }
  3378. /** Returns true if field userException is set (has been asigned a value) and false otherwise */
  3379. public boolean isSetUserException() {
  3380. return this.userException != null;
  3381. }
  3382. /** Returns true if field systemException is set (has been asigned a value) and false otherwise */
  3383. public boolean isSetSystemException() {
  3384. return this.systemException != null;
  3385. }
  3386. public int compareTo(getSyncState_result other) {
  3387. if (!getClass().equals(other.getClass())) {
  3388. return getClass().getName().compareTo(other.getClass().getName());
  3389. }
  3390. int lastComparison = 0;
  3391. getSyncState_result typedOther = (getSyncState_result)other;
  3392. lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
  3393. if (lastComparison != 0) {
  3394. return lastComparison;
  3395. }
  3396. if (isSetSuccess()) { lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
  3397. if (lastComparison != 0) {
  3398. return lastComparison;
  3399. }
  3400. }
  3401. lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
  3402. if (lastComparison != 0) {
  3403. return lastComparison;
  3404. }
  3405. if (isSetUserException()) { lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
  3406. if (lastComparison != 0) {
  3407. return lastComparison;
  3408. }
  3409. }
  3410. lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
  3411. if (lastComparison != 0) {
  3412. return lastComparison;
  3413. }
  3414. if (isSetSystemException()) { lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
  3415. if (lastComparison != 0) {
  3416. return lastComparison;
  3417. }
  3418. }
  3419. return 0;
  3420. }
  3421. public void read(TProtocol iprot) throws TException {
  3422. TField field;
  3423. iprot.readStructBegin();
  3424. while (true)
  3425. {
  3426. field = iprot.readFieldBegin();
  3427. if (field.type == TType.STOP) {
  3428. break;
  3429. }
  3430. switch (field.id) {
  3431. case 0: // SUCCESS
  3432. if (field.type == TType.STRUCT) {
  3433. this.success = new SyncState();
  3434. this.success.read(iprot);
  3435. } else {
  3436. TProtocolUtil.skip(iprot, field.type);
  3437. }
  3438. break;
  3439. case 1: // USER_EXCEPTION
  3440. if (field.type == TType.STRUCT) {
  3441. this.userException = new com.evernote.edam.error.EDAMUserException();
  3442. this.userException.read(iprot);
  3443. } else {
  3444. TProtocolUtil.skip(iprot, field.type);
  3445. }
  3446. break;
  3447. case 2: // SYSTEM_EXCEPTION
  3448. if (field.type == TType.STRUCT) {
  3449. this.systemException = new com.evernote.edam.error.EDAMSystemException();
  3450. this.systemException.read(iprot);
  3451. } else {
  3452. TProtocolUtil.skip(iprot, field.type);
  3453. }
  3454. break;
  3455. default:
  3456. TProtocolUtil.skip(iprot, field.type);
  3457. }
  3458. iprot.readFieldEnd();
  3459. }
  3460. iprot.readStructEnd();
  3461. validate();
  3462. }
  3463. public void write(TProtocol oprot) throws TException {
  3464. oprot.writeStructBegin(STRUCT_DESC);
  3465. if (this.isSetSuccess()) {
  3466. oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
  3467. this.success.write(oprot);
  3468. oprot.writeFieldEnd();
  3469. } else if (this.isSetUserException()) {
  3470. oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
  3471. this.userException.write(oprot);
  3472. oprot.writeFieldEnd();
  3473. } else if (this.isSetSystemException()) {
  3474. oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
  3475. this.systemException.write(oprot);
  3476. oprot.writeFieldEnd();
  3477. }
  3478. oprot.writeFieldStop();
  3479. oprot.writeStructEnd();
  3480. }
  3481. public void validate() throws TException {
  3482. // check for required fields
  3483. }
  3484. }
  3485. private static class getSyncStateWithMetrics_args implements TBase<getSyncStateWithMetrics_args>, java.io.Serializable, Cloneable {
  3486. private static final TStruct STRUCT_DESC = new TStruct("getSyncStateWithMetrics_args");
  3487. private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
  3488. private static final TField CLIENT_METRICS_FIELD_DESC = new TField("clientMetrics", TType.STRUCT, (short)2);
  3489. private String authenticationToken;
  3490. private ClientUsageMetrics clientMetrics;
  3491. // isset id assignments
  3492. public getSyncStateWithMetrics_args() {
  3493. }
  3494. /**
  3495. * Performs a deep copy on <i>other</i>.
  3496. */
  3497. public getSyncStateWithMetrics_args(getSyncStateWithMetrics_args other) {
  3498. if (other.isSetAuthenticationToken()) {
  3499. this.authenticationToken = other.authenticationToken;
  3500. }
  3501. if (other.isSetClientMetrics()) {
  3502. this.clientMetrics = new ClientUsageMetrics(other.clientMetrics);
  3503. }
  3504. }
  3505. public getSyncStateWithMetrics_args deepCopy() {
  3506. return new getSyncStateWithMetrics_args(this);
  3507. }
  3508. public void clear() {
  3509. this.authenticationToken = null;
  3510. this.clientMetrics = null;
  3511. }
  3512. public void setAuthenticationToken(String authenticationToken) {
  3513. this.authenticationToken = authenticationToken;
  3514. }
  3515. /** Returns true if field authenticationToken is set (has been asigned a value) and false otherwise */
  3516. public boolean isSetAuthenticationToken() {
  3517. return this.authenticationToken != null;
  3518. }
  3519. public void setClientMetrics(ClientUsageMetrics clientMetrics) {
  3520. this.clientMetrics = clientMetrics;
  3521. }
  3522. /** Returns true if field clientMetrics is set (has been asigned a value) and false otherwise */
  3523. public boolean isSetClientMetrics() {
  3524. return this.clientMetrics != null;
  3525. }
  3526. public int compareTo(getSyncStateWithMetrics_args other) {
  3527. if (!getClass().equals(other.getClass())) {
  3528. return getClass().getName().compareTo(other.getClass().getName());
  3529. }
  3530. int lastComparison = 0;
  3531. getSyncStateWithMetrics_args typedOther = (getSyncStateWithMetrics_args)other;
  3532. lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
  3533. if (lastComparison != 0) {
  3534. return lastComparison;
  3535. }
  3536. if (isSetAuthenticationToken()) { lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
  3537. if (lastComparison != 0) {
  3538. return lastComparison;
  3539. }
  3540. }
  3541. lastComparison = Boolean.valueOf(isSetClientMetrics()).compareTo(typedOther.isSetClientMetrics());
  3542. if (lastComparison != 0) {
  3543. return lastComparison;
  3544. }
  3545. if (isSetClientMetrics()) { lastComparison = TBaseHelper.compareTo(this.clientMetrics, typedOther.clientMetrics);
  3546. if (lastComparison != 0) {
  3547. return lastComparison;
  3548. }
  3549. }
  3550. return 0;
  3551. }
  3552. public void read(TProtocol iprot) throws TException {
  3553. TField field;
  3554. iprot.readStructBegin();
  3555. while (true)
  3556. {
  3557. field = iprot.readFieldBegin();
  3558. if (field.type == TType.STOP) {
  3559. break;
  3560. }
  3561. switch (field.id) {
  3562. case 1: // AUTHENTICATION_TOKEN
  3563. if (field.type == TType.STRING) {
  3564. this.authenticationToken = iprot.readString();
  3565. } else {
  3566. TProtocolUtil.skip(iprot, field.type);
  3567. }
  3568. break;
  3569. case 2: // CLIENT_METRICS
  3570. if (field.type == TType.STRUCT) {
  3571. this.clientMetrics = new ClientUsageMetrics();
  3572. this.clientMetrics.read(iprot);
  3573. } else {
  3574. TProtocolUtil.skip(iprot, field.type);
  3575. }
  3576. break;
  3577. default:
  3578. TProtocolUtil.skip(iprot, field.type);
  3579. }
  3580. iprot.readFieldEnd();
  3581. }
  3582. iprot.readStructEnd();
  3583. validate();
  3584. }
  3585. public void write(TProtocol oprot) throws TException {
  3586. validate();
  3587. oprot.writeStructBegin(STRUCT_DESC);
  3588. if (this.authenticationToken != null) {
  3589. oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
  3590. oprot.writeString(this.authenticationToken);
  3591. oprot.writeFieldEnd();
  3592. }
  3593. if (this.clientMetrics != null) {
  3594. oprot.writeFieldBegin(CLIENT_METRICS_FIELD_DESC);
  3595. this.clientMetrics.write(oprot);
  3596. oprot.writeFieldEnd();
  3597. }
  3598. oprot.writeFieldStop();
  3599. oprot.writeStructEnd();
  3600. }
  3601. public void validate() throws TException {
  3602. // check for required fields
  3603. }
  3604. }
  3605. private static class getSyncStateWithMetrics_result implements TBase<getSyncStateWithMetrics_result>, java.io.Serializable, Cloneable {
  3606. private static final TStruct STRUCT_DESC = new TStruct("getSyncStateWithMetrics_result");
  3607. private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
  3608. private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
  3609. private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
  3610. private SyncState success;
  3611. private com.evernote.edam.error.EDAMUserException userException;
  3612. private com.evernote.edam.error.EDAMSystemException systemException;
  3613. // isset id assignments
  3614. public getSyncStateWithMetrics_result() {
  3615. }
  3616. /**
  3617. * Performs a deep copy on <i>other</i>.
  3618. */
  3619. public getSyncStateWithMetrics_result(getSyncStateWithMetrics_result other) {
  3620. if (other.isSetSuccess()) {
  3621. this.success = new SyncState(other.success);
  3622. }
  3623. if (other.isSetUserException()) {
  3624. this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
  3625. }
  3626. if (other.isSetSystemException()) {
  3627. this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
  3628. }
  3629. }
  3630. public getSyncStateWithMetrics_result deepCopy() {
  3631. return new getSyncStateWithMetrics_result(this);
  3632. }
  3633. public void clear() {
  3634. this.success = null;
  3635. this.userException = null;
  3636. this.systemException = null;
  3637. }
  3638. /** Returns true if field success is set (has been asigned a value) and false otherwise */
  3639. public boolean isSetSuccess() {
  3640. return this.success != null;
  3641. }
  3642. /** Returns true if field userException is set (has been asigned a value) and false otherwise */
  3643. public boolean isSetUserException() {
  3644. return this.userException != null;
  3645. }
  3646. /** Returns true if field systemException is set (has been asigned a value) and false otherwise */
  3647. public boolean isSetSystemException() {
  3648. return this.systemException != null;
  3649. }
  3650. public int compareTo(getSyncStateWithMetrics_result other) {
  3651. if (!getClass().equals(other.getClass())) {
  3652. return getClass().getName().compareTo(other.getClass().getName());
  3653. }
  3654. int lastComparison = 0;
  3655. getSyncStateWithMetrics_result typedOther = (getSyncStateWithMetrics_result)other;
  3656. lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
  3657. if (lastComparison != 0) {
  3658. return lastComparison;
  3659. }
  3660. if (isSetSuccess()) { lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
  3661. if (lastComparison != 0) {
  3662. return lastComparison;
  3663. }
  3664. }
  3665. lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
  3666. if (lastComparison != 0) {
  3667. return lastComparison;
  3668. }
  3669. if (isSetUserException()) { lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
  3670. if (lastComparison != 0) {
  3671. return lastComparison;
  3672. }
  3673. }
  3674. lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
  3675. if (lastComparison != 0) {
  3676. return lastComparison;
  3677. }
  3678. if (isSetSystemException()) { lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
  3679. if (lastComparison != 0) {
  3680. return lastComparison;
  3681. }
  3682. }
  3683. return 0;
  3684. }
  3685. public void read(TProtocol iprot) throws TException {
  3686. TField field;
  3687. iprot.readStructBegin();
  3688. while (true)
  3689. {
  3690. field = iprot.readFieldBegin();
  3691. if (field.type == TType.STOP) {
  3692. break;
  3693. }
  3694. switch (field.id) {
  3695. case 0: // SUCCESS
  3696. if (field.type == TType.STRUCT) {
  3697. this.success = new SyncState();
  3698. this.success.read(iprot);
  3699. } else {
  3700. TProtocolUtil.skip(iprot, field.type);
  3701. }
  3702. break;
  3703. case 1: // USER_EXCEPTION
  3704. if (field.type == TType.STRUCT) {
  3705. this.userException = new com.evernote.edam.error.EDAMUserException();
  3706. this.userException.read(iprot);
  3707. } else {
  3708. TProtocolUtil.skip(iprot, field.type);
  3709. }
  3710. break;
  3711. case 2: // SYSTEM_EXCEPTION
  3712. if (field.type == TType.STRUCT) {
  3713. this.systemException = new com.evernote.edam.error.EDAMSystemException();
  3714. this.systemException.read(iprot);
  3715. } else {
  3716. TProtocolUtil.skip(iprot, field.type);
  3717. }
  3718. break;
  3719. default:
  3720. TProtocolUtil.skip(iprot, field.type);
  3721. }
  3722. iprot.readFieldEnd();
  3723. }
  3724. iprot.readStructEnd();
  3725. validate();
  3726. }
  3727. public void write(TProtocol oprot) throws TException {
  3728. oprot.writeStructBegin(STRUCT_DESC);
  3729. if (this.isSetSuccess()) {
  3730. oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
  3731. this.success.write(oprot);
  3732. oprot.writeFieldEnd();
  3733. } else if (this.isSetUserException()) {
  3734. oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
  3735. this.userException.write(oprot);
  3736. oprot.writeFieldEnd();
  3737. } else if (this.isSetSystemException()) {
  3738. oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
  3739. this.systemException.write(oprot);
  3740. oprot.writeFieldEnd();
  3741. }
  3742. oprot.writeFieldStop();
  3743. oprot.writeStructEnd();
  3744. }
  3745. public void validate() throws TException {
  3746. // check for required fields
  3747. }
  3748. }
  3749. private static class getSyncChunk_args implements TBase<getSyncChunk_args>, java.io.Serializable, Cloneable {
  3750. private static final TStruct STRUCT_DESC = new TStruct("getSyncChunk_args");
  3751. private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
  3752. private static final TField AFTER_USN_FIELD_DESC = new TField("afterUSN", TType.I32, (short)2);
  3753. private static final TField MAX_ENTRIES_FIELD_DESC = new TField("maxEntries", TType.I32, (short)3);
  3754. private static final TField FULL_SYNC_ONLY_FIELD_DESC = new TField("fullSyncOnly", TType.BOOL, (short)4);
  3755. private String authenticationToken;
  3756. private int afterUSN;
  3757. private int maxEntries;
  3758. private boolean fullSyncOnly;
  3759. // isset id assignments
  3760. private static final int __AFTERUSN_ISSET_ID = 0;
  3761. private static final int __MAXENTRIES_ISSET_ID = 1;
  3762. private static final int __FULLSYNCONLY_ISSET_ID = 2;
  3763. private boolean[] __isset_vector = new boolean[3];
  3764. public getSyncChunk_args() {
  3765. }
  3766. /**
  3767. * Performs a deep copy on <i>other</i>.
  3768. */
  3769. public getSyncChunk_args(getSyncChunk_args other) {
  3770. System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
  3771. if (other.isSetAuthenticationToken()) {
  3772. this.authenticationToken = other.authenticationToken;
  3773. }
  3774. this.afterUSN = other.afterUSN;
  3775. this.maxEntries = other.maxEntries;
  3776. this.fullSyncOnly = other.fullSyncOnly;
  3777. }
  3778. public getSyncChunk_args deepCopy() {
  3779. return new getSyncChunk_args(this);
  3780. }
  3781. public void clear() {
  3782. this.authenticationToken = null;
  3783. setAfterUSNIsSet(false);
  3784. this.afterUSN = 0;
  3785. setMaxEntriesIsSet(false);
  3786. this.maxEntries = 0;
  3787. setFullSyncOnlyIsSet(false);
  3788. this.fullSyncOnly = false;
  3789. }
  3790. public void setAuthenticationToken(String authenticationToken) {
  3791. this.authenticationToken = authenticationToken;
  3792. }
  3793. /** Returns true if field authenticationToken is set (has been asigned a value) and false otherwise */
  3794. public boolean isSetAuthenticationToken() {
  3795. return this.authenticationToken != null;
  3796. }
  3797. public void setAfterUSN(int afterUSN) {
  3798. this.afterUSN = afterUSN;
  3799. setAfterUSNIsSet(true);
  3800. }
  3801. /** Returns true if field afterUSN is set (has been asigned a value) and false otherwise */
  3802. public boolean isSetAfterUSN() {
  3803. return __isset_vector[__AFTERUSN_ISSET_ID];
  3804. }
  3805. public void setAfterUSNIsSet(boolean value) {
  3806. __isset_vector[__AFTERUSN_ISSET_ID] = value;
  3807. }
  3808. public void setMaxEntries(int maxEntries) {
  3809. this.maxEntries = maxEntries;
  3810. setMaxEntriesIsSet(true);
  3811. }
  3812. /** Returns true if field maxEntries is set (has been asigned a value) and false otherwise */
  3813. public boolean isSetMaxEntries() {
  3814. return __isset_vector[__MAXENTRIES_ISSET_ID];
  3815. }
  3816. public void setMaxEntriesIsSet(boolean value) {
  3817. __isset_vector[__MAXENTRIES_ISSET_ID] = value;
  3818. }
  3819. public void setFullSyncOnly(boolean fullSyncOnly) {
  3820. this.fullSyncOnly = fullSyncOnly;
  3821. setFullSyncOnlyIsSet(true);
  3822. }
  3823. /** Returns true if field fullSyncOnly is set (has been asigned a value) and false otherwise */
  3824. public boolean isSetFullSyncOnly() {
  3825. return __isset_vector[__FULLSYNCONLY_ISSET_ID];
  3826. }
  3827. public void setFullSyncOnlyIsSet(boolean value) {
  3828. __isset_vector[__FULLSYNCONLY_ISSET_ID] = value;
  3829. }
  3830. public int compareTo(getSyncChunk_args other) {
  3831. if (!getClass().equals(other.getClass())) {
  3832. return getClass().getName().compareTo(other.getClass().getName());
  3833. }
  3834. int lastComparison = 0;
  3835. getSyncChunk_args typedOther = (getSyncChunk_args)other;
  3836. lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
  3837. if (lastComparison != 0) {
  3838. return lastComparison;
  3839. }
  3840. if (isSetAuthenticationToken()) { lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
  3841. if (lastComparison != 0) {
  3842. return lastComparison;
  3843. }
  3844. }
  3845. lastComparison = Boolean.valueOf(isSetAfterUSN()).compareTo(typedOther.isSetAfterUSN());
  3846. if (lastComparison != 0) {
  3847. return lastComparison;
  3848. }
  3849. if (isSetAfterUSN()) { lastComparison = TBaseHelper.compareTo(this.afterUSN, typedOther.afterUSN);
  3850. if (lastComparison != 0) {
  3851. return lastComparison;
  3852. }
  3853. }
  3854. lastComparison = Boolean.valueOf(isSetMaxEntries()).compareTo(typedOther.isSetMaxEntries());
  3855. if (lastComparison != 0) {
  3856. return lastComparison;
  3857. }
  3858. if (isSetMaxEntries()) { lastComparison = TBaseHelper.compareTo(this.maxEntries, typedOther.maxEntries);
  3859. if (lastComparison != 0) {
  3860. return lastComparison;
  3861. }
  3862. }
  3863. lastComparison = Boolean.valueOf(isSetFullSyncOnly()).compareTo(typedOther.isSetFullSyncOnly());
  3864. if (lastComparison != 0) {
  3865. return lastComparison;
  3866. }
  3867. if (isSetFullSyncOnly()) { lastComparison = TBaseHelper.compareTo(this.fullSyncOnly, typedOther.fullSyncOnly);
  3868. if (lastComparison != 0) {
  3869. return lastComparison;
  3870. }
  3871. }
  3872. return 0;
  3873. }
  3874. public void read(TProtocol iprot) throws TException {
  3875. TField field;
  3876. iprot.readStructBegin();
  3877. while (true)
  3878. {
  3879. field = iprot.readFieldBegin();
  3880. if (field.type == TType.STOP) {
  3881. break;
  3882. }
  3883. switch (field.id) {
  3884. case 1: // AUTHENTICATION_TOKEN
  3885. if (field.type == TType.STRING) {
  3886. this.authenticationToken = iprot.readString();
  3887. } else {
  3888. TProtocolUtil.skip(iprot, field.type);
  3889. }
  3890. break;
  3891. case 2: // AFTER_USN
  3892. if (field.type == TType.I32) {
  3893. this.afterUSN = iprot.readI32();
  3894. setAfterUSNIsSet(true);
  3895. } else {
  3896. TProtocolUtil.skip(iprot, field.type);
  3897. }
  3898. break;
  3899. case 3: // MAX_ENTRIES
  3900. if (field.type == TType.I32) {
  3901. this.maxEntries = iprot.readI32();
  3902. setMaxEntriesIsSet(true);
  3903. } else {
  3904. TProtocolUtil.skip(iprot, field.type);
  3905. }
  3906. break;
  3907. case 4: // FULL_SYNC_ONLY
  3908. if (field.type == TType.BOOL) {
  3909. this.fullSyncOnly = iprot.readBool();
  3910. setFullSyncOnlyIsSet(true);
  3911. } else {
  3912. TProtocolUtil.skip(iprot, field.type);
  3913. }
  3914. break;
  3915. default:
  3916. TProtocolUtil.skip(iprot, field.type);
  3917. }
  3918. iprot.readFieldEnd();
  3919. }
  3920. iprot.readStructEnd();
  3921. validate();
  3922. }
  3923. public void write(TProtocol oprot) throws TException {
  3924. validate();
  3925. oprot.writeStructBegin(STRUCT_DESC);
  3926. if (this.authenticationToken != null) {
  3927. oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
  3928. oprot.writeString(this.authenticationToken);
  3929. oprot.writeFieldEnd();
  3930. }
  3931. oprot.writeFieldBegin(AFTER_USN_FIELD_DESC);
  3932. oprot.writeI32(this.afterUSN);
  3933. oprot.writeFieldEnd();
  3934. oprot.writeFieldBegin(MAX_ENTRIES_FIELD_DESC);
  3935. oprot.writeI32(this.maxEntries);
  3936. oprot.writeFieldEnd();
  3937. oprot.writeFieldBegin(FULL_SYNC_ONLY_FIELD_DESC);
  3938. oprot.writeBool(this.fullSyncOnly);
  3939. oprot.writeFieldEnd();
  3940. oprot.writeFieldStop();
  3941. oprot.writeStructEnd();
  3942. }
  3943. public void validate() throws TException {
  3944. // check for required fields
  3945. }
  3946. }
  3947. private static class getSyncChunk_result implements TBase<getSyncChunk_result>, java.io.Serializable, Cloneable {
  3948. private static final TStruct STRUCT_DESC = new TStruct("getSyncChunk_result");
  3949. private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
  3950. private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
  3951. private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
  3952. private SyncChunk success;
  3953. private com.evernote.edam.error.EDAMUserException userException;
  3954. private com.evernote.edam.error.EDAMSystemException systemException;
  3955. // isset id assignments
  3956. public getSyncChunk_result() {
  3957. }
  3958. /**
  3959. * Performs a deep copy on <i>other</i>.
  3960. */
  3961. public getSyncChunk_result(getSyncChunk_result other) {
  3962. if (other.isSetSuccess()) {
  3963. this.success = new SyncChunk(other.success);
  3964. }
  3965. if (other.isSetUserException()) {
  3966. this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
  3967. }
  3968. if (other.isSetSystemException()) {
  3969. this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
  3970. }
  3971. }
  3972. public getSyncChunk_result deepCopy() {
  3973. return new getSyncChunk_result(this);
  3974. }
  3975. public void clear() {
  3976. this.success = null;
  3977. this.userException = null;
  3978. this.systemException = null;
  3979. }
  3980. /** Returns true if field success is set (has been asigned a value) and false otherwise */
  3981. public boolean isSetSuccess() {
  3982. return this.success != null;
  3983. }
  3984. /** Returns true if field userException is set (has been asigned a value) and false otherwise */
  3985. public boolean isSetUserException() {
  3986. return this.userException != null;
  3987. }
  3988. /** Returns true if field systemException is set (has been asigned a value) and false otherwise */
  3989. public boolean isSetSystemException() {
  3990. return this.systemException != null;
  3991. }
  3992. public int compareTo(getSyncChunk_result other) {
  3993. if (!getClass().equals(other.getClass())) {
  3994. return getClass().getName().compareTo(other.getClass().getName());
  3995. }
  3996. int lastComparison = 0;
  3997. getSyncChunk_result typedOther = (getSyncChunk_result)other;
  3998. lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
  3999. if (lastComparison != 0) {
  4000. return lastComparison;
  4001. }
  4002. if (isSetSuccess()) { lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
  4003. if (lastComparison != 0) {
  4004. return lastComparison;
  4005. }
  4006. }
  4007. lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
  4008. if (lastComparison != 0) {
  4009. return lastComparison;
  4010. }
  4011. if (isSetUserException()) { lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
  4012. if (lastComparison != 0) {
  4013. return lastComparison</