PageRenderTime 85ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 1ms

/thrift/packages/cassandra/Cassandra.php

https://github.com/furqanrydhan/Cassandra-PHP-Client-Library
PHP | 8743 lines | 8170 code | 566 blank | 7 comment | 1436 complexity | b313a9d986306c769a8231721fdab03b MD5 | raw file
  1. <?php
  2. /**
  3. * Autogenerated by Thrift Compiler (0.8.0)
  4. *
  5. * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  6. * @generated
  7. */
  8. include_once $GLOBALS['THRIFT_ROOT'].'/Thrift.php';
  9. include_once $GLOBALS['THRIFT_ROOT'].'/packages/cassandra/cassandra_types.php';
  10. interface cassandra_CassandraIf {
  11. public function login($auth_request);
  12. public function set_keyspace($keyspace);
  13. public function get($key, $column_path, $consistency_level);
  14. public function get_slice($key, $column_parent, $predicate, $consistency_level);
  15. public function get_count($key, $column_parent, $predicate, $consistency_level);
  16. public function multiget_slice($keys, $column_parent, $predicate, $consistency_level);
  17. public function multiget_count($keys, $column_parent, $predicate, $consistency_level);
  18. public function get_range_slices($column_parent, $predicate, $range, $consistency_level);
  19. public function get_indexed_slices($column_parent, $index_clause, $column_predicate, $consistency_level);
  20. public function insert($key, $column_parent, $column, $consistency_level);
  21. public function add($key, $column_parent, $column, $consistency_level);
  22. public function remove($key, $column_path, $timestamp, $consistency_level);
  23. public function remove_counter($key, $path, $consistency_level);
  24. public function batch_mutate($mutation_map, $consistency_level);
  25. public function truncate($cfname);
  26. public function describe_schema_versions();
  27. public function describe_keyspaces();
  28. public function describe_cluster_name();
  29. public function describe_version();
  30. public function describe_ring($keyspace);
  31. public function describe_partitioner();
  32. public function describe_snitch();
  33. public function describe_keyspace($keyspace);
  34. public function describe_splits($cfName, $start_token, $end_token, $keys_per_split);
  35. public function system_add_column_family($cf_def);
  36. public function system_drop_column_family($column_family);
  37. public function system_add_keyspace($ks_def);
  38. public function system_drop_keyspace($keyspace);
  39. public function system_update_keyspace($ks_def);
  40. public function system_update_column_family($cf_def);
  41. public function execute_cql_query($query, $compression);
  42. }
  43. class cassandra_CassandraClient implements cassandra_CassandraIf {
  44. protected $input_ = null;
  45. protected $output_ = null;
  46. protected $seqid_ = 0;
  47. public function __construct($input, $output=null) {
  48. $this->input_ = $input;
  49. $this->output_ = $output ? $output : $input;
  50. }
  51. public function login($auth_request)
  52. {
  53. $this->send_login($auth_request);
  54. $this->recv_login();
  55. }
  56. public function send_login($auth_request)
  57. {
  58. $args = new cassandra_Cassandra_login_args();
  59. $args->auth_request = $auth_request;
  60. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  61. if ($bin_accel)
  62. {
  63. thrift_protocol_write_binary($this->output_, 'login', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  64. }
  65. else
  66. {
  67. $this->output_->writeMessageBegin('login', TMessageType::CALL, $this->seqid_);
  68. $args->write($this->output_);
  69. $this->output_->writeMessageEnd();
  70. $this->output_->getTransport()->flush();
  71. }
  72. }
  73. public function recv_login()
  74. {
  75. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  76. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_login_result', $this->input_->isStrictRead());
  77. else
  78. {
  79. $rseqid = 0;
  80. $fname = null;
  81. $mtype = 0;
  82. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  83. if ($mtype == TMessageType::EXCEPTION) {
  84. $x = new TApplicationException();
  85. $x->read($this->input_);
  86. $this->input_->readMessageEnd();
  87. throw $x;
  88. }
  89. $result = new cassandra_Cassandra_login_result();
  90. $result->read($this->input_);
  91. $this->input_->readMessageEnd();
  92. }
  93. if ($result->authnx !== null) {
  94. throw $result->authnx;
  95. }
  96. if ($result->authzx !== null) {
  97. throw $result->authzx;
  98. }
  99. return;
  100. }
  101. public function set_keyspace($keyspace)
  102. {
  103. $this->send_set_keyspace($keyspace);
  104. $this->recv_set_keyspace();
  105. }
  106. public function send_set_keyspace($keyspace)
  107. {
  108. $args = new cassandra_Cassandra_set_keyspace_args();
  109. $args->keyspace = $keyspace;
  110. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  111. if ($bin_accel)
  112. {
  113. thrift_protocol_write_binary($this->output_, 'set_keyspace', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  114. }
  115. else
  116. {
  117. $this->output_->writeMessageBegin('set_keyspace', TMessageType::CALL, $this->seqid_);
  118. $args->write($this->output_);
  119. $this->output_->writeMessageEnd();
  120. $this->output_->getTransport()->flush();
  121. }
  122. }
  123. public function recv_set_keyspace()
  124. {
  125. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  126. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_set_keyspace_result', $this->input_->isStrictRead());
  127. else
  128. {
  129. $rseqid = 0;
  130. $fname = null;
  131. $mtype = 0;
  132. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  133. if ($mtype == TMessageType::EXCEPTION) {
  134. $x = new TApplicationException();
  135. $x->read($this->input_);
  136. $this->input_->readMessageEnd();
  137. throw $x;
  138. }
  139. $result = new cassandra_Cassandra_set_keyspace_result();
  140. $result->read($this->input_);
  141. $this->input_->readMessageEnd();
  142. }
  143. if ($result->ire !== null) {
  144. throw $result->ire;
  145. }
  146. return;
  147. }
  148. public function get($key, $column_path, $consistency_level)
  149. {
  150. $this->send_get($key, $column_path, $consistency_level);
  151. return $this->recv_get();
  152. }
  153. public function send_get($key, $column_path, $consistency_level)
  154. {
  155. $args = new cassandra_Cassandra_get_args();
  156. $args->key = $key;
  157. $args->column_path = $column_path;
  158. $args->consistency_level = $consistency_level;
  159. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  160. if ($bin_accel)
  161. {
  162. thrift_protocol_write_binary($this->output_, 'get', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  163. }
  164. else
  165. {
  166. $this->output_->writeMessageBegin('get', TMessageType::CALL, $this->seqid_);
  167. $args->write($this->output_);
  168. $this->output_->writeMessageEnd();
  169. $this->output_->getTransport()->flush();
  170. }
  171. }
  172. public function recv_get()
  173. {
  174. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  175. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_get_result', $this->input_->isStrictRead());
  176. else
  177. {
  178. $rseqid = 0;
  179. $fname = null;
  180. $mtype = 0;
  181. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  182. if ($mtype == TMessageType::EXCEPTION) {
  183. $x = new TApplicationException();
  184. $x->read($this->input_);
  185. $this->input_->readMessageEnd();
  186. throw $x;
  187. }
  188. $result = new cassandra_Cassandra_get_result();
  189. $result->read($this->input_);
  190. $this->input_->readMessageEnd();
  191. }
  192. if ($result->success !== null) {
  193. return $result->success;
  194. }
  195. if ($result->ire !== null) {
  196. throw $result->ire;
  197. }
  198. if ($result->nfe !== null) {
  199. throw $result->nfe;
  200. }
  201. if ($result->ue !== null) {
  202. throw $result->ue;
  203. }
  204. if ($result->te !== null) {
  205. throw $result->te;
  206. }
  207. throw new Exception("get failed: unknown result");
  208. }
  209. public function get_slice($key, $column_parent, $predicate, $consistency_level)
  210. {
  211. $this->send_get_slice($key, $column_parent, $predicate, $consistency_level);
  212. return $this->recv_get_slice();
  213. }
  214. public function send_get_slice($key, $column_parent, $predicate, $consistency_level)
  215. {
  216. $args = new cassandra_Cassandra_get_slice_args();
  217. $args->key = $key;
  218. $args->column_parent = $column_parent;
  219. $args->predicate = $predicate;
  220. $args->consistency_level = $consistency_level;
  221. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  222. if ($bin_accel)
  223. {
  224. thrift_protocol_write_binary($this->output_, 'get_slice', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  225. }
  226. else
  227. {
  228. $this->output_->writeMessageBegin('get_slice', TMessageType::CALL, $this->seqid_);
  229. $args->write($this->output_);
  230. $this->output_->writeMessageEnd();
  231. $this->output_->getTransport()->flush();
  232. }
  233. }
  234. public function recv_get_slice()
  235. {
  236. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  237. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_get_slice_result', $this->input_->isStrictRead());
  238. else
  239. {
  240. $rseqid = 0;
  241. $fname = null;
  242. $mtype = 0;
  243. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  244. if ($mtype == TMessageType::EXCEPTION) {
  245. $x = new TApplicationException();
  246. $x->read($this->input_);
  247. $this->input_->readMessageEnd();
  248. throw $x;
  249. }
  250. $result = new cassandra_Cassandra_get_slice_result();
  251. $result->read($this->input_);
  252. $this->input_->readMessageEnd();
  253. }
  254. if ($result->success !== null) {
  255. return $result->success;
  256. }
  257. if ($result->ire !== null) {
  258. throw $result->ire;
  259. }
  260. if ($result->ue !== null) {
  261. throw $result->ue;
  262. }
  263. if ($result->te !== null) {
  264. throw $result->te;
  265. }
  266. throw new Exception("get_slice failed: unknown result");
  267. }
  268. public function get_count($key, $column_parent, $predicate, $consistency_level)
  269. {
  270. $this->send_get_count($key, $column_parent, $predicate, $consistency_level);
  271. return $this->recv_get_count();
  272. }
  273. public function send_get_count($key, $column_parent, $predicate, $consistency_level)
  274. {
  275. $args = new cassandra_Cassandra_get_count_args();
  276. $args->key = $key;
  277. $args->column_parent = $column_parent;
  278. $args->predicate = $predicate;
  279. $args->consistency_level = $consistency_level;
  280. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  281. if ($bin_accel)
  282. {
  283. thrift_protocol_write_binary($this->output_, 'get_count', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  284. }
  285. else
  286. {
  287. $this->output_->writeMessageBegin('get_count', TMessageType::CALL, $this->seqid_);
  288. $args->write($this->output_);
  289. $this->output_->writeMessageEnd();
  290. $this->output_->getTransport()->flush();
  291. }
  292. }
  293. public function recv_get_count()
  294. {
  295. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  296. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_get_count_result', $this->input_->isStrictRead());
  297. else
  298. {
  299. $rseqid = 0;
  300. $fname = null;
  301. $mtype = 0;
  302. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  303. if ($mtype == TMessageType::EXCEPTION) {
  304. $x = new TApplicationException();
  305. $x->read($this->input_);
  306. $this->input_->readMessageEnd();
  307. throw $x;
  308. }
  309. $result = new cassandra_Cassandra_get_count_result();
  310. $result->read($this->input_);
  311. $this->input_->readMessageEnd();
  312. }
  313. if ($result->success !== null) {
  314. return $result->success;
  315. }
  316. if ($result->ire !== null) {
  317. throw $result->ire;
  318. }
  319. if ($result->ue !== null) {
  320. throw $result->ue;
  321. }
  322. if ($result->te !== null) {
  323. throw $result->te;
  324. }
  325. throw new Exception("get_count failed: unknown result");
  326. }
  327. public function multiget_slice($keys, $column_parent, $predicate, $consistency_level)
  328. {
  329. $this->send_multiget_slice($keys, $column_parent, $predicate, $consistency_level);
  330. return $this->recv_multiget_slice();
  331. }
  332. public function send_multiget_slice($keys, $column_parent, $predicate, $consistency_level)
  333. {
  334. $args = new cassandra_Cassandra_multiget_slice_args();
  335. $args->keys = $keys;
  336. $args->column_parent = $column_parent;
  337. $args->predicate = $predicate;
  338. $args->consistency_level = $consistency_level;
  339. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  340. if ($bin_accel)
  341. {
  342. thrift_protocol_write_binary($this->output_, 'multiget_slice', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  343. }
  344. else
  345. {
  346. $this->output_->writeMessageBegin('multiget_slice', TMessageType::CALL, $this->seqid_);
  347. $args->write($this->output_);
  348. $this->output_->writeMessageEnd();
  349. $this->output_->getTransport()->flush();
  350. }
  351. }
  352. public function recv_multiget_slice()
  353. {
  354. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  355. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_multiget_slice_result', $this->input_->isStrictRead());
  356. else
  357. {
  358. $rseqid = 0;
  359. $fname = null;
  360. $mtype = 0;
  361. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  362. if ($mtype == TMessageType::EXCEPTION) {
  363. $x = new TApplicationException();
  364. $x->read($this->input_);
  365. $this->input_->readMessageEnd();
  366. throw $x;
  367. }
  368. $result = new cassandra_Cassandra_multiget_slice_result();
  369. $result->read($this->input_);
  370. $this->input_->readMessageEnd();
  371. }
  372. if ($result->success !== null) {
  373. return $result->success;
  374. }
  375. if ($result->ire !== null) {
  376. throw $result->ire;
  377. }
  378. if ($result->ue !== null) {
  379. throw $result->ue;
  380. }
  381. if ($result->te !== null) {
  382. throw $result->te;
  383. }
  384. throw new Exception("multiget_slice failed: unknown result");
  385. }
  386. public function multiget_count($keys, $column_parent, $predicate, $consistency_level)
  387. {
  388. $this->send_multiget_count($keys, $column_parent, $predicate, $consistency_level);
  389. return $this->recv_multiget_count();
  390. }
  391. public function send_multiget_count($keys, $column_parent, $predicate, $consistency_level)
  392. {
  393. $args = new cassandra_Cassandra_multiget_count_args();
  394. $args->keys = $keys;
  395. $args->column_parent = $column_parent;
  396. $args->predicate = $predicate;
  397. $args->consistency_level = $consistency_level;
  398. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  399. if ($bin_accel)
  400. {
  401. thrift_protocol_write_binary($this->output_, 'multiget_count', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  402. }
  403. else
  404. {
  405. $this->output_->writeMessageBegin('multiget_count', TMessageType::CALL, $this->seqid_);
  406. $args->write($this->output_);
  407. $this->output_->writeMessageEnd();
  408. $this->output_->getTransport()->flush();
  409. }
  410. }
  411. public function recv_multiget_count()
  412. {
  413. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  414. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_multiget_count_result', $this->input_->isStrictRead());
  415. else
  416. {
  417. $rseqid = 0;
  418. $fname = null;
  419. $mtype = 0;
  420. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  421. if ($mtype == TMessageType::EXCEPTION) {
  422. $x = new TApplicationException();
  423. $x->read($this->input_);
  424. $this->input_->readMessageEnd();
  425. throw $x;
  426. }
  427. $result = new cassandra_Cassandra_multiget_count_result();
  428. $result->read($this->input_);
  429. $this->input_->readMessageEnd();
  430. }
  431. if ($result->success !== null) {
  432. return $result->success;
  433. }
  434. if ($result->ire !== null) {
  435. throw $result->ire;
  436. }
  437. if ($result->ue !== null) {
  438. throw $result->ue;
  439. }
  440. if ($result->te !== null) {
  441. throw $result->te;
  442. }
  443. throw new Exception("multiget_count failed: unknown result");
  444. }
  445. public function get_range_slices($column_parent, $predicate, $range, $consistency_level)
  446. {
  447. $this->send_get_range_slices($column_parent, $predicate, $range, $consistency_level);
  448. return $this->recv_get_range_slices();
  449. }
  450. public function send_get_range_slices($column_parent, $predicate, $range, $consistency_level)
  451. {
  452. $args = new cassandra_Cassandra_get_range_slices_args();
  453. $args->column_parent = $column_parent;
  454. $args->predicate = $predicate;
  455. $args->range = $range;
  456. $args->consistency_level = $consistency_level;
  457. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  458. if ($bin_accel)
  459. {
  460. thrift_protocol_write_binary($this->output_, 'get_range_slices', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  461. }
  462. else
  463. {
  464. $this->output_->writeMessageBegin('get_range_slices', TMessageType::CALL, $this->seqid_);
  465. $args->write($this->output_);
  466. $this->output_->writeMessageEnd();
  467. $this->output_->getTransport()->flush();
  468. }
  469. }
  470. public function recv_get_range_slices()
  471. {
  472. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  473. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_get_range_slices_result', $this->input_->isStrictRead());
  474. else
  475. {
  476. $rseqid = 0;
  477. $fname = null;
  478. $mtype = 0;
  479. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  480. if ($mtype == TMessageType::EXCEPTION) {
  481. $x = new TApplicationException();
  482. $x->read($this->input_);
  483. $this->input_->readMessageEnd();
  484. throw $x;
  485. }
  486. $result = new cassandra_Cassandra_get_range_slices_result();
  487. $result->read($this->input_);
  488. $this->input_->readMessageEnd();
  489. }
  490. if ($result->success !== null) {
  491. return $result->success;
  492. }
  493. if ($result->ire !== null) {
  494. throw $result->ire;
  495. }
  496. if ($result->ue !== null) {
  497. throw $result->ue;
  498. }
  499. if ($result->te !== null) {
  500. throw $result->te;
  501. }
  502. throw new Exception("get_range_slices failed: unknown result");
  503. }
  504. public function get_indexed_slices($column_parent, $index_clause, $column_predicate, $consistency_level)
  505. {
  506. $this->send_get_indexed_slices($column_parent, $index_clause, $column_predicate, $consistency_level);
  507. return $this->recv_get_indexed_slices();
  508. }
  509. public function send_get_indexed_slices($column_parent, $index_clause, $column_predicate, $consistency_level)
  510. {
  511. $args = new cassandra_Cassandra_get_indexed_slices_args();
  512. $args->column_parent = $column_parent;
  513. $args->index_clause = $index_clause;
  514. $args->column_predicate = $column_predicate;
  515. $args->consistency_level = $consistency_level;
  516. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  517. if ($bin_accel)
  518. {
  519. thrift_protocol_write_binary($this->output_, 'get_indexed_slices', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  520. }
  521. else
  522. {
  523. $this->output_->writeMessageBegin('get_indexed_slices', TMessageType::CALL, $this->seqid_);
  524. $args->write($this->output_);
  525. $this->output_->writeMessageEnd();
  526. $this->output_->getTransport()->flush();
  527. }
  528. }
  529. public function recv_get_indexed_slices()
  530. {
  531. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  532. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_get_indexed_slices_result', $this->input_->isStrictRead());
  533. else
  534. {
  535. $rseqid = 0;
  536. $fname = null;
  537. $mtype = 0;
  538. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  539. if ($mtype == TMessageType::EXCEPTION) {
  540. $x = new TApplicationException();
  541. $x->read($this->input_);
  542. $this->input_->readMessageEnd();
  543. throw $x;
  544. }
  545. $result = new cassandra_Cassandra_get_indexed_slices_result();
  546. $result->read($this->input_);
  547. $this->input_->readMessageEnd();
  548. }
  549. if ($result->success !== null) {
  550. return $result->success;
  551. }
  552. if ($result->ire !== null) {
  553. throw $result->ire;
  554. }
  555. if ($result->ue !== null) {
  556. throw $result->ue;
  557. }
  558. if ($result->te !== null) {
  559. throw $result->te;
  560. }
  561. throw new Exception("get_indexed_slices failed: unknown result");
  562. }
  563. public function insert($key, $column_parent, $column, $consistency_level)
  564. {
  565. $this->send_insert($key, $column_parent, $column, $consistency_level);
  566. $this->recv_insert();
  567. }
  568. public function send_insert($key, $column_parent, $column, $consistency_level)
  569. {
  570. $args = new cassandra_Cassandra_insert_args();
  571. $args->key = $key;
  572. $args->column_parent = $column_parent;
  573. $args->column = $column;
  574. $args->consistency_level = $consistency_level;
  575. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  576. if ($bin_accel)
  577. {
  578. thrift_protocol_write_binary($this->output_, 'insert', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  579. }
  580. else
  581. {
  582. $this->output_->writeMessageBegin('insert', TMessageType::CALL, $this->seqid_);
  583. $args->write($this->output_);
  584. $this->output_->writeMessageEnd();
  585. $this->output_->getTransport()->flush();
  586. }
  587. }
  588. public function recv_insert()
  589. {
  590. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  591. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_insert_result', $this->input_->isStrictRead());
  592. else
  593. {
  594. $rseqid = 0;
  595. $fname = null;
  596. $mtype = 0;
  597. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  598. if ($mtype == TMessageType::EXCEPTION) {
  599. $x = new TApplicationException();
  600. $x->read($this->input_);
  601. $this->input_->readMessageEnd();
  602. throw $x;
  603. }
  604. $result = new cassandra_Cassandra_insert_result();
  605. $result->read($this->input_);
  606. $this->input_->readMessageEnd();
  607. }
  608. if ($result->ire !== null) {
  609. throw $result->ire;
  610. }
  611. if ($result->ue !== null) {
  612. throw $result->ue;
  613. }
  614. if ($result->te !== null) {
  615. throw $result->te;
  616. }
  617. return;
  618. }
  619. public function add($key, $column_parent, $column, $consistency_level)
  620. {
  621. $this->send_add($key, $column_parent, $column, $consistency_level);
  622. $this->recv_add();
  623. }
  624. public function send_add($key, $column_parent, $column, $consistency_level)
  625. {
  626. $args = new cassandra_Cassandra_add_args();
  627. $args->key = $key;
  628. $args->column_parent = $column_parent;
  629. $args->column = $column;
  630. $args->consistency_level = $consistency_level;
  631. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  632. if ($bin_accel)
  633. {
  634. thrift_protocol_write_binary($this->output_, 'add', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  635. }
  636. else
  637. {
  638. $this->output_->writeMessageBegin('add', TMessageType::CALL, $this->seqid_);
  639. $args->write($this->output_);
  640. $this->output_->writeMessageEnd();
  641. $this->output_->getTransport()->flush();
  642. }
  643. }
  644. public function recv_add()
  645. {
  646. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  647. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_add_result', $this->input_->isStrictRead());
  648. else
  649. {
  650. $rseqid = 0;
  651. $fname = null;
  652. $mtype = 0;
  653. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  654. if ($mtype == TMessageType::EXCEPTION) {
  655. $x = new TApplicationException();
  656. $x->read($this->input_);
  657. $this->input_->readMessageEnd();
  658. throw $x;
  659. }
  660. $result = new cassandra_Cassandra_add_result();
  661. $result->read($this->input_);
  662. $this->input_->readMessageEnd();
  663. }
  664. if ($result->ire !== null) {
  665. throw $result->ire;
  666. }
  667. if ($result->ue !== null) {
  668. throw $result->ue;
  669. }
  670. if ($result->te !== null) {
  671. throw $result->te;
  672. }
  673. return;
  674. }
  675. public function remove($key, $column_path, $timestamp, $consistency_level)
  676. {
  677. $this->send_remove($key, $column_path, $timestamp, $consistency_level);
  678. $this->recv_remove();
  679. }
  680. public function send_remove($key, $column_path, $timestamp, $consistency_level)
  681. {
  682. $args = new cassandra_Cassandra_remove_args();
  683. $args->key = $key;
  684. $args->column_path = $column_path;
  685. $args->timestamp = $timestamp;
  686. $args->consistency_level = $consistency_level;
  687. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  688. if ($bin_accel)
  689. {
  690. thrift_protocol_write_binary($this->output_, 'remove', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  691. }
  692. else
  693. {
  694. $this->output_->writeMessageBegin('remove', TMessageType::CALL, $this->seqid_);
  695. $args->write($this->output_);
  696. $this->output_->writeMessageEnd();
  697. $this->output_->getTransport()->flush();
  698. }
  699. }
  700. public function recv_remove()
  701. {
  702. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  703. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_remove_result', $this->input_->isStrictRead());
  704. else
  705. {
  706. $rseqid = 0;
  707. $fname = null;
  708. $mtype = 0;
  709. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  710. if ($mtype == TMessageType::EXCEPTION) {
  711. $x = new TApplicationException();
  712. $x->read($this->input_);
  713. $this->input_->readMessageEnd();
  714. throw $x;
  715. }
  716. $result = new cassandra_Cassandra_remove_result();
  717. $result->read($this->input_);
  718. $this->input_->readMessageEnd();
  719. }
  720. if ($result->ire !== null) {
  721. throw $result->ire;
  722. }
  723. if ($result->ue !== null) {
  724. throw $result->ue;
  725. }
  726. if ($result->te !== null) {
  727. throw $result->te;
  728. }
  729. return;
  730. }
  731. public function remove_counter($key, $path, $consistency_level)
  732. {
  733. $this->send_remove_counter($key, $path, $consistency_level);
  734. $this->recv_remove_counter();
  735. }
  736. public function send_remove_counter($key, $path, $consistency_level)
  737. {
  738. $args = new cassandra_Cassandra_remove_counter_args();
  739. $args->key = $key;
  740. $args->path = $path;
  741. $args->consistency_level = $consistency_level;
  742. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  743. if ($bin_accel)
  744. {
  745. thrift_protocol_write_binary($this->output_, 'remove_counter', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  746. }
  747. else
  748. {
  749. $this->output_->writeMessageBegin('remove_counter', TMessageType::CALL, $this->seqid_);
  750. $args->write($this->output_);
  751. $this->output_->writeMessageEnd();
  752. $this->output_->getTransport()->flush();
  753. }
  754. }
  755. public function recv_remove_counter()
  756. {
  757. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  758. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_remove_counter_result', $this->input_->isStrictRead());
  759. else
  760. {
  761. $rseqid = 0;
  762. $fname = null;
  763. $mtype = 0;
  764. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  765. if ($mtype == TMessageType::EXCEPTION) {
  766. $x = new TApplicationException();
  767. $x->read($this->input_);
  768. $this->input_->readMessageEnd();
  769. throw $x;
  770. }
  771. $result = new cassandra_Cassandra_remove_counter_result();
  772. $result->read($this->input_);
  773. $this->input_->readMessageEnd();
  774. }
  775. if ($result->ire !== null) {
  776. throw $result->ire;
  777. }
  778. if ($result->ue !== null) {
  779. throw $result->ue;
  780. }
  781. if ($result->te !== null) {
  782. throw $result->te;
  783. }
  784. return;
  785. }
  786. public function batch_mutate($mutation_map, $consistency_level)
  787. {
  788. $this->send_batch_mutate($mutation_map, $consistency_level);
  789. $this->recv_batch_mutate();
  790. }
  791. public function send_batch_mutate($mutation_map, $consistency_level)
  792. {
  793. $args = new cassandra_Cassandra_batch_mutate_args();
  794. $args->mutation_map = $mutation_map;
  795. $args->consistency_level = $consistency_level;
  796. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  797. if ($bin_accel)
  798. {
  799. thrift_protocol_write_binary($this->output_, 'batch_mutate', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  800. }
  801. else
  802. {
  803. $this->output_->writeMessageBegin('batch_mutate', TMessageType::CALL, $this->seqid_);
  804. $args->write($this->output_);
  805. $this->output_->writeMessageEnd();
  806. $this->output_->getTransport()->flush();
  807. }
  808. }
  809. public function recv_batch_mutate()
  810. {
  811. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  812. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_batch_mutate_result', $this->input_->isStrictRead());
  813. else
  814. {
  815. $rseqid = 0;
  816. $fname = null;
  817. $mtype = 0;
  818. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  819. if ($mtype == TMessageType::EXCEPTION) {
  820. $x = new TApplicationException();
  821. $x->read($this->input_);
  822. $this->input_->readMessageEnd();
  823. throw $x;
  824. }
  825. $result = new cassandra_Cassandra_batch_mutate_result();
  826. $result->read($this->input_);
  827. $this->input_->readMessageEnd();
  828. }
  829. if ($result->ire !== null) {
  830. throw $result->ire;
  831. }
  832. if ($result->ue !== null) {
  833. throw $result->ue;
  834. }
  835. if ($result->te !== null) {
  836. throw $result->te;
  837. }
  838. return;
  839. }
  840. public function truncate($cfname)
  841. {
  842. $this->send_truncate($cfname);
  843. $this->recv_truncate();
  844. }
  845. public function send_truncate($cfname)
  846. {
  847. $args = new cassandra_Cassandra_truncate_args();
  848. $args->cfname = $cfname;
  849. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  850. if ($bin_accel)
  851. {
  852. thrift_protocol_write_binary($this->output_, 'truncate', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  853. }
  854. else
  855. {
  856. $this->output_->writeMessageBegin('truncate', TMessageType::CALL, $this->seqid_);
  857. $args->write($this->output_);
  858. $this->output_->writeMessageEnd();
  859. $this->output_->getTransport()->flush();
  860. }
  861. }
  862. public function recv_truncate()
  863. {
  864. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  865. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_truncate_result', $this->input_->isStrictRead());
  866. else
  867. {
  868. $rseqid = 0;
  869. $fname = null;
  870. $mtype = 0;
  871. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  872. if ($mtype == TMessageType::EXCEPTION) {
  873. $x = new TApplicationException();
  874. $x->read($this->input_);
  875. $this->input_->readMessageEnd();
  876. throw $x;
  877. }
  878. $result = new cassandra_Cassandra_truncate_result();
  879. $result->read($this->input_);
  880. $this->input_->readMessageEnd();
  881. }
  882. if ($result->ire !== null) {
  883. throw $result->ire;
  884. }
  885. if ($result->ue !== null) {
  886. throw $result->ue;
  887. }
  888. return;
  889. }
  890. public function describe_schema_versions()
  891. {
  892. $this->send_describe_schema_versions();
  893. return $this->recv_describe_schema_versions();
  894. }
  895. public function send_describe_schema_versions()
  896. {
  897. $args = new cassandra_Cassandra_describe_schema_versions_args();
  898. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  899. if ($bin_accel)
  900. {
  901. thrift_protocol_write_binary($this->output_, 'describe_schema_versions', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  902. }
  903. else
  904. {
  905. $this->output_->writeMessageBegin('describe_schema_versions', TMessageType::CALL, $this->seqid_);
  906. $args->write($this->output_);
  907. $this->output_->writeMessageEnd();
  908. $this->output_->getTransport()->flush();
  909. }
  910. }
  911. public function recv_describe_schema_versions()
  912. {
  913. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  914. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_describe_schema_versions_result', $this->input_->isStrictRead());
  915. else
  916. {
  917. $rseqid = 0;
  918. $fname = null;
  919. $mtype = 0;
  920. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  921. if ($mtype == TMessageType::EXCEPTION) {
  922. $x = new TApplicationException();
  923. $x->read($this->input_);
  924. $this->input_->readMessageEnd();
  925. throw $x;
  926. }
  927. $result = new cassandra_Cassandra_describe_schema_versions_result();
  928. $result->read($this->input_);
  929. $this->input_->readMessageEnd();
  930. }
  931. if ($result->success !== null) {
  932. return $result->success;
  933. }
  934. if ($result->ire !== null) {
  935. throw $result->ire;
  936. }
  937. throw new Exception("describe_schema_versions failed: unknown result");
  938. }
  939. public function describe_keyspaces()
  940. {
  941. $this->send_describe_keyspaces();
  942. return $this->recv_describe_keyspaces();
  943. }
  944. public function send_describe_keyspaces()
  945. {
  946. $args = new cassandra_Cassandra_describe_keyspaces_args();
  947. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  948. if ($bin_accel)
  949. {
  950. thrift_protocol_write_binary($this->output_, 'describe_keyspaces', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  951. }
  952. else
  953. {
  954. $this->output_->writeMessageBegin('describe_keyspaces', TMessageType::CALL, $this->seqid_);
  955. $args->write($this->output_);
  956. $this->output_->writeMessageEnd();
  957. $this->output_->getTransport()->flush();
  958. }
  959. }
  960. public function recv_describe_keyspaces()
  961. {
  962. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  963. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_describe_keyspaces_result', $this->input_->isStrictRead());
  964. else
  965. {
  966. $rseqid = 0;
  967. $fname = null;
  968. $mtype = 0;
  969. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  970. if ($mtype == TMessageType::EXCEPTION) {
  971. $x = new TApplicationException();
  972. $x->read($this->input_);
  973. $this->input_->readMessageEnd();
  974. throw $x;
  975. }
  976. $result = new cassandra_Cassandra_describe_keyspaces_result();
  977. $result->read($this->input_);
  978. $this->input_->readMessageEnd();
  979. }
  980. if ($result->success !== null) {
  981. return $result->success;
  982. }
  983. if ($result->ire !== null) {
  984. throw $result->ire;
  985. }
  986. throw new Exception("describe_keyspaces failed: unknown result");
  987. }
  988. public function describe_cluster_name()
  989. {
  990. $this->send_describe_cluster_name();
  991. return $this->recv_describe_cluster_name();
  992. }
  993. public function send_describe_cluster_name()
  994. {
  995. $args = new cassandra_Cassandra_describe_cluster_name_args();
  996. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  997. if ($bin_accel)
  998. {
  999. thrift_protocol_write_binary($this->output_, 'describe_cluster_name', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  1000. }
  1001. else
  1002. {
  1003. $this->output_->writeMessageBegin('describe_cluster_name', TMessageType::CALL, $this->seqid_);
  1004. $args->write($this->output_);
  1005. $this->output_->writeMessageEnd();
  1006. $this->output_->getTransport()->flush();
  1007. }
  1008. }
  1009. public function recv_describe_cluster_name()
  1010. {
  1011. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  1012. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_describe_cluster_name_result', $this->input_->isStrictRead());
  1013. else
  1014. {
  1015. $rseqid = 0;
  1016. $fname = null;
  1017. $mtype = 0;
  1018. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  1019. if ($mtype == TMessageType::EXCEPTION) {
  1020. $x = new TApplicationException();
  1021. $x->read($this->input_);
  1022. $this->input_->readMessageEnd();
  1023. throw $x;
  1024. }
  1025. $result = new cassandra_Cassandra_describe_cluster_name_result();
  1026. $result->read($this->input_);
  1027. $this->input_->readMessageEnd();
  1028. }
  1029. if ($result->success !== null) {
  1030. return $result->success;
  1031. }
  1032. throw new Exception("describe_cluster_name failed: unknown result");
  1033. }
  1034. public function describe_version()
  1035. {
  1036. $this->send_describe_version();
  1037. return $this->recv_describe_version();
  1038. }
  1039. public function send_describe_version()
  1040. {
  1041. $args = new cassandra_Cassandra_describe_version_args();
  1042. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  1043. if ($bin_accel)
  1044. {
  1045. thrift_protocol_write_binary($this->output_, 'describe_version', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  1046. }
  1047. else
  1048. {
  1049. $this->output_->writeMessageBegin('describe_version', TMessageType::CALL, $this->seqid_);
  1050. $args->write($this->output_);
  1051. $this->output_->writeMessageEnd();
  1052. $this->output_->getTransport()->flush();
  1053. }
  1054. }
  1055. public function recv_describe_version()
  1056. {
  1057. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  1058. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_describe_version_result', $this->input_->isStrictRead());
  1059. else
  1060. {
  1061. $rseqid = 0;
  1062. $fname = null;
  1063. $mtype = 0;
  1064. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  1065. if ($mtype == TMessageType::EXCEPTION) {
  1066. $x = new TApplicationException();
  1067. $x->read($this->input_);
  1068. $this->input_->readMessageEnd();
  1069. throw $x;
  1070. }
  1071. $result = new cassandra_Cassandra_describe_version_result();
  1072. $result->read($this->input_);
  1073. $this->input_->readMessageEnd();
  1074. }
  1075. if ($result->success !== null) {
  1076. return $result->success;
  1077. }
  1078. throw new Exception("describe_version failed: unknown result");
  1079. }
  1080. public function describe_ring($keyspace)
  1081. {
  1082. $this->send_describe_ring($keyspace);
  1083. return $this->recv_describe_ring();
  1084. }
  1085. public function send_describe_ring($keyspace)
  1086. {
  1087. $args = new cassandra_Cassandra_describe_ring_args();
  1088. $args->keyspace = $keyspace;
  1089. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  1090. if ($bin_accel)
  1091. {
  1092. thrift_protocol_write_binary($this->output_, 'describe_ring', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  1093. }
  1094. else
  1095. {
  1096. $this->output_->writeMessageBegin('describe_ring', TMessageType::CALL, $this->seqid_);
  1097. $args->write($this->output_);
  1098. $this->output_->writeMessageEnd();
  1099. $this->output_->getTransport()->flush();
  1100. }
  1101. }
  1102. public function recv_describe_ring()
  1103. {
  1104. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  1105. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_describe_ring_result', $this->input_->isStrictRead());
  1106. else
  1107. {
  1108. $rseqid = 0;
  1109. $fname = null;
  1110. $mtype = 0;
  1111. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  1112. if ($mtype == TMessageType::EXCEPTION) {
  1113. $x = new TApplicationException();
  1114. $x->read($this->input_);
  1115. $this->input_->readMessageEnd();
  1116. throw $x;
  1117. }
  1118. $result = new cassandra_Cassandra_describe_ring_result();
  1119. $result->read($this->input_);
  1120. $this->input_->readMessageEnd();
  1121. }
  1122. if ($result->success !== null) {
  1123. return $result->success;
  1124. }
  1125. if ($result->ire !== null) {
  1126. throw $result->ire;
  1127. }
  1128. throw new Exception("describe_ring failed: unknown result");
  1129. }
  1130. public function describe_partitioner()
  1131. {
  1132. $this->send_describe_partitioner();
  1133. return $this->recv_describe_partitioner();
  1134. }
  1135. public function send_describe_partitioner()
  1136. {
  1137. $args = new cassandra_Cassandra_describe_partitioner_args();
  1138. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  1139. if ($bin_accel)
  1140. {
  1141. thrift_protocol_write_binary($this->output_, 'describe_partitioner', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  1142. }
  1143. else
  1144. {
  1145. $this->output_->writeMessageBegin('describe_partitioner', TMessageType::CALL, $this->seqid_);
  1146. $args->write($this->output_);
  1147. $this->output_->writeMessageEnd();
  1148. $this->output_->getTransport()->flush();
  1149. }
  1150. }
  1151. public function recv_describe_partitioner()
  1152. {
  1153. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  1154. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_describe_partitioner_result', $this->input_->isStrictRead());
  1155. else
  1156. {
  1157. $rseqid = 0;
  1158. $fname = null;
  1159. $mtype = 0;
  1160. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  1161. if ($mtype == TMessageType::EXCEPTION) {
  1162. $x = new TApplicationException();
  1163. $x->read($this->input_);
  1164. $this->input_->readMessageEnd();
  1165. throw $x;
  1166. }
  1167. $result = new cassandra_Cassandra_describe_partitioner_result();
  1168. $result->read($this->input_);
  1169. $this->input_->readMessageEnd();
  1170. }
  1171. if ($result->success !== null) {
  1172. return $result->success;
  1173. }
  1174. throw new Exception("describe_partitioner failed: unknown result");
  1175. }
  1176. public function describe_snitch()
  1177. {
  1178. $this->send_describe_snitch();
  1179. return $this->recv_describe_snitch();
  1180. }
  1181. public function send_describe_snitch()
  1182. {
  1183. $args = new cassandra_Cassandra_describe_snitch_args();
  1184. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  1185. if ($bin_accel)
  1186. {
  1187. thrift_protocol_write_binary($this->output_, 'describe_snitch', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  1188. }
  1189. else
  1190. {
  1191. $this->output_->writeMessageBegin('describe_snitch', TMessageType::CALL, $this->seqid_);
  1192. $args->write($this->output_);
  1193. $this->output_->writeMessageEnd();
  1194. $this->output_->getTransport()->flush();
  1195. }
  1196. }
  1197. public function recv_describe_snitch()
  1198. {
  1199. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  1200. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_describe_snitch_result', $this->input_->isStrictRead());
  1201. else
  1202. {
  1203. $rseqid = 0;
  1204. $fname = null;
  1205. $mtype = 0;
  1206. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  1207. if ($mtype == TMessageType::EXCEPTION) {
  1208. $x = new TApplicationException();
  1209. $x->read($this->input_);
  1210. $this->input_->readMessageEnd();
  1211. throw $x;
  1212. }
  1213. $result = new cassandra_Cassandra_describe_snitch_result();
  1214. $result->read($this->input_);
  1215. $this->input_->readMessageEnd();
  1216. }
  1217. if ($result->success !== null) {
  1218. return $result->success;
  1219. }
  1220. throw new Exception("describe_snitch failed: unknown result");
  1221. }
  1222. public function describe_keyspace($keyspace)
  1223. {
  1224. $this->send_describe_keyspace($keyspace);
  1225. return $this->recv_describe_keyspace();
  1226. }
  1227. public function send_describe_keyspace($keyspace)
  1228. {
  1229. $args = new cassandra_Cassandra_describe_keyspace_args();
  1230. $args->keyspace = $keyspace;
  1231. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  1232. if ($bin_accel)
  1233. {
  1234. thrift_protocol_write_binary($this->output_, 'describe_keyspace', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  1235. }
  1236. else
  1237. {
  1238. $this->output_->writeMessageBegin('describe_keyspace', TMessageType::CALL, $this->seqid_);
  1239. $args->write($this->output_);
  1240. $this->output_->writeMessageEnd();
  1241. $this->output_->getTransport()->flush();
  1242. }
  1243. }
  1244. public function recv_describe_keyspace()
  1245. {
  1246. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  1247. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_describe_keyspace_result', $this->input_->isStrictRead());
  1248. else
  1249. {
  1250. $rseqid = 0;
  1251. $fname = null;
  1252. $mtype = 0;
  1253. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  1254. if ($mtype == TMessageType::EXCEPTION) {
  1255. $x = new TApplicationException();
  1256. $x->read($this->input_);
  1257. $this->input_->readMessageEnd();
  1258. throw $x;
  1259. }
  1260. $result = new cassandra_Cassandra_describe_keyspace_result();
  1261. $result->read($this->input_);
  1262. $this->input_->readMessageEnd();
  1263. }
  1264. if ($result->success !== null) {
  1265. return $result->success;
  1266. }
  1267. if ($result->nfe !== null) {
  1268. throw $result->nfe;
  1269. }
  1270. if ($result->ire !== null) {
  1271. throw $result->ire;
  1272. }
  1273. throw new Exception("describe_keyspace failed: unknown result");
  1274. }
  1275. public function describe_splits($cfName, $start_token, $end_token, $keys_per_split)
  1276. {
  1277. $this->send_describe_splits($cfName, $start_token, $end_token, $keys_per_split);
  1278. return $this->recv_describe_splits();
  1279. }
  1280. public function send_describe_splits($cfName, $start_token, $end_token, $keys_per_split)
  1281. {
  1282. $args = new cassandra_Cassandra_describe_splits_args();
  1283. $args->cfName = $cfName;
  1284. $args->start_token = $start_token;
  1285. $args->end_token = $end_token;
  1286. $args->keys_per_split = $keys_per_split;
  1287. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  1288. if ($bin_accel)
  1289. {
  1290. thrift_protocol_write_binary($this->output_, 'describe_splits', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  1291. }
  1292. else
  1293. {
  1294. $this->output_->writeMessageBegin('describe_splits', TMessageType::CALL, $this->seqid_);
  1295. $args->write($this->output_);
  1296. $this->output_->writeMessageEnd();
  1297. $this->output_->getTransport()->flush();
  1298. }
  1299. }
  1300. public function recv_describe_splits()
  1301. {
  1302. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  1303. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_describe_splits_result', $this->input_->isStrictRead());
  1304. else
  1305. {
  1306. $rseqid = 0;
  1307. $fname = null;
  1308. $mtype = 0;
  1309. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  1310. if ($mtype == TMessageType::EXCEPTION) {
  1311. $x = new TApplicationException();
  1312. $x->read($this->input_);
  1313. $this->input_->readMessageEnd();
  1314. throw $x;
  1315. }
  1316. $result = new cassandra_Cassandra_describe_splits_result();
  1317. $result->read($this->input_);
  1318. $this->input_->readMessageEnd();
  1319. }
  1320. if ($result->success !== null) {
  1321. return $result->success;
  1322. }
  1323. if ($result->ire !== null) {
  1324. throw $result->ire;
  1325. }
  1326. throw new Exception("describe_splits failed: unknown result");
  1327. }
  1328. public function system_add_column_family($cf_def)
  1329. {
  1330. $this->send_system_add_column_family($cf_def);
  1331. return $this->recv_system_add_column_family();
  1332. }
  1333. public function send_system_add_column_family($cf_def)
  1334. {
  1335. $args = new cassandra_Cassandra_system_add_column_family_args();
  1336. $args->cf_def = $cf_def;
  1337. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  1338. if ($bin_accel)
  1339. {
  1340. thrift_protocol_write_binary($this->output_, 'system_add_column_family', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  1341. }
  1342. else
  1343. {
  1344. $this->output_->writeMessageBegin('system_add_column_family', TMessageType::CALL, $this->seqid_);
  1345. $args->write($this->output_);
  1346. $this->output_->writeMessageEnd();
  1347. $this->output_->getTransport()->flush();
  1348. }
  1349. }
  1350. public function recv_system_add_column_family()
  1351. {
  1352. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  1353. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_system_add_column_family_result', $this->input_->isStrictRead());
  1354. else
  1355. {
  1356. $rseqid = 0;
  1357. $fname = null;
  1358. $mtype = 0;
  1359. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  1360. if ($mtype == TMessageType::EXCEPTION) {
  1361. $x = new TApplicationException();
  1362. $x->read($this->input_);
  1363. $this->input_->readMessageEnd();
  1364. throw $x;
  1365. }
  1366. $result = new cassandra_Cassandra_system_add_column_family_result();
  1367. $result->read($this->input_);
  1368. $this->input_->readMessageEnd();
  1369. }
  1370. if ($result->success !== null) {
  1371. return $result->success;
  1372. }
  1373. if ($result->ire !== null) {
  1374. throw $result->ire;
  1375. }
  1376. if ($result->sde !== null) {
  1377. throw $result->sde;
  1378. }
  1379. throw new Exception("system_add_column_family failed: unknown result");
  1380. }
  1381. public function system_drop_column_family($column_family)
  1382. {
  1383. $this->send_system_drop_column_family($column_family);
  1384. return $this->recv_system_drop_column_family();
  1385. }
  1386. public function send_system_drop_column_family($column_family)
  1387. {
  1388. $args = new cassandra_Cassandra_system_drop_column_family_args();
  1389. $args->column_family = $column_family;
  1390. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  1391. if ($bin_accel)
  1392. {
  1393. thrift_protocol_write_binary($this->output_, 'system_drop_column_family', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  1394. }
  1395. else
  1396. {
  1397. $this->output_->writeMessageBegin('system_drop_column_family', TMessageType::CALL, $this->seqid_);
  1398. $args->write($this->output_);
  1399. $this->output_->writeMessageEnd();
  1400. $this->output_->getTransport()->flush();
  1401. }
  1402. }
  1403. public function recv_system_drop_column_family()
  1404. {
  1405. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  1406. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_system_drop_column_family_result', $this->input_->isStrictRead());
  1407. else
  1408. {
  1409. $rseqid = 0;
  1410. $fname = null;
  1411. $mtype = 0;
  1412. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  1413. if ($mtype == TMessageType::EXCEPTION) {
  1414. $x = new TApplicationException();
  1415. $x->read($this->input_);
  1416. $this->input_->readMessageEnd();
  1417. throw $x;
  1418. }
  1419. $result = new cassandra_Cassandra_system_drop_column_family_result();
  1420. $result->read($this->input_);
  1421. $this->input_->readMessageEnd();
  1422. }
  1423. if ($result->success !== null) {
  1424. return $result->success;
  1425. }
  1426. if ($result->ire !== null) {
  1427. throw $result->ire;
  1428. }
  1429. if ($result->sde !== null) {
  1430. throw $result->sde;
  1431. }
  1432. throw new Exception("system_drop_column_family failed: unknown result");
  1433. }
  1434. public function system_add_keyspace($ks_def)
  1435. {
  1436. $this->send_system_add_keyspace($ks_def);
  1437. return $this->recv_system_add_keyspace();
  1438. }
  1439. public function send_system_add_keyspace($ks_def)
  1440. {
  1441. $args = new cassandra_Cassandra_system_add_keyspace_args();
  1442. $args->ks_def = $ks_def;
  1443. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  1444. if ($bin_accel)
  1445. {
  1446. thrift_protocol_write_binary($this->output_, 'system_add_keyspace', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  1447. }
  1448. else
  1449. {
  1450. $this->output_->writeMessageBegin('system_add_keyspace', TMessageType::CALL, $this->seqid_);
  1451. $args->write($this->output_);
  1452. $this->output_->writeMessageEnd();
  1453. $this->output_->getTransport()->flush();
  1454. }
  1455. }
  1456. public function recv_system_add_keyspace()
  1457. {
  1458. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  1459. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_system_add_keyspace_result', $this->input_->isStrictRead());
  1460. else
  1461. {
  1462. $rseqid = 0;
  1463. $fname = null;
  1464. $mtype = 0;
  1465. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  1466. if ($mtype == TMessageType::EXCEPTION) {
  1467. $x = new TApplicationException();
  1468. $x->read($this->input_);
  1469. $this->input_->readMessageEnd();
  1470. throw $x;
  1471. }
  1472. $result = new cassandra_Cassandra_system_add_keyspace_result();
  1473. $result->read($this->input_);
  1474. $this->input_->readMessageEnd();
  1475. }
  1476. if ($result->success !== null) {
  1477. return $result->success;
  1478. }
  1479. if ($result->ire !== null) {
  1480. throw $result->ire;
  1481. }
  1482. if ($result->sde !== null) {
  1483. throw $result->sde;
  1484. }
  1485. throw new Exception("system_add_keyspace failed: unknown result");
  1486. }
  1487. public function system_drop_keyspace($keyspace)
  1488. {
  1489. $this->send_system_drop_keyspace($keyspace);
  1490. return $this->recv_system_drop_keyspace();
  1491. }
  1492. public function send_system_drop_keyspace($keyspace)
  1493. {
  1494. $args = new cassandra_Cassandra_system_drop_keyspace_args();
  1495. $args->keyspace = $keyspace;
  1496. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  1497. if ($bin_accel)
  1498. {
  1499. thrift_protocol_write_binary($this->output_, 'system_drop_keyspace', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  1500. }
  1501. else
  1502. {
  1503. $this->output_->writeMessageBegin('system_drop_keyspace', TMessageType::CALL, $this->seqid_);
  1504. $args->write($this->output_);
  1505. $this->output_->writeMessageEnd();
  1506. $this->output_->getTransport()->flush();
  1507. }
  1508. }
  1509. public function recv_system_drop_keyspace()
  1510. {
  1511. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  1512. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_system_drop_keyspace_result', $this->input_->isStrictRead());
  1513. else
  1514. {
  1515. $rseqid = 0;
  1516. $fname = null;
  1517. $mtype = 0;
  1518. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  1519. if ($mtype == TMessageType::EXCEPTION) {
  1520. $x = new TApplicationException();
  1521. $x->read($this->input_);
  1522. $this->input_->readMessageEnd();
  1523. throw $x;
  1524. }
  1525. $result = new cassandra_Cassandra_system_drop_keyspace_result();
  1526. $result->read($this->input_);
  1527. $this->input_->readMessageEnd();
  1528. }
  1529. if ($result->success !== null) {
  1530. return $result->success;
  1531. }
  1532. if ($result->ire !== null) {
  1533. throw $result->ire;
  1534. }
  1535. if ($result->sde !== null) {
  1536. throw $result->sde;
  1537. }
  1538. throw new Exception("system_drop_keyspace failed: unknown result");
  1539. }
  1540. public function system_update_keyspace($ks_def)
  1541. {
  1542. $this->send_system_update_keyspace($ks_def);
  1543. return $this->recv_system_update_keyspace();
  1544. }
  1545. public function send_system_update_keyspace($ks_def)
  1546. {
  1547. $args = new cassandra_Cassandra_system_update_keyspace_args();
  1548. $args->ks_def = $ks_def;
  1549. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  1550. if ($bin_accel)
  1551. {
  1552. thrift_protocol_write_binary($this->output_, 'system_update_keyspace', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  1553. }
  1554. else
  1555. {
  1556. $this->output_->writeMessageBegin('system_update_keyspace', TMessageType::CALL, $this->seqid_);
  1557. $args->write($this->output_);
  1558. $this->output_->writeMessageEnd();
  1559. $this->output_->getTransport()->flush();
  1560. }
  1561. }
  1562. public function recv_system_update_keyspace()
  1563. {
  1564. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  1565. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_system_update_keyspace_result', $this->input_->isStrictRead());
  1566. else
  1567. {
  1568. $rseqid = 0;
  1569. $fname = null;
  1570. $mtype = 0;
  1571. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  1572. if ($mtype == TMessageType::EXCEPTION) {
  1573. $x = new TApplicationException();
  1574. $x->read($this->input_);
  1575. $this->input_->readMessageEnd();
  1576. throw $x;
  1577. }
  1578. $result = new cassandra_Cassandra_system_update_keyspace_result();
  1579. $result->read($this->input_);
  1580. $this->input_->readMessageEnd();
  1581. }
  1582. if ($result->success !== null) {
  1583. return $result->success;
  1584. }
  1585. if ($result->ire !== null) {
  1586. throw $result->ire;
  1587. }
  1588. if ($result->sde !== null) {
  1589. throw $result->sde;
  1590. }
  1591. throw new Exception("system_update_keyspace failed: unknown result");
  1592. }
  1593. public function system_update_column_family($cf_def)
  1594. {
  1595. $this->send_system_update_column_family($cf_def);
  1596. return $this->recv_system_update_column_family();
  1597. }
  1598. public function send_system_update_column_family($cf_def)
  1599. {
  1600. $args = new cassandra_Cassandra_system_update_column_family_args();
  1601. $args->cf_def = $cf_def;
  1602. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  1603. if ($bin_accel)
  1604. {
  1605. thrift_protocol_write_binary($this->output_, 'system_update_column_family', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  1606. }
  1607. else
  1608. {
  1609. $this->output_->writeMessageBegin('system_update_column_family', TMessageType::CALL, $this->seqid_);
  1610. $args->write($this->output_);
  1611. $this->output_->writeMessageEnd();
  1612. $this->output_->getTransport()->flush();
  1613. }
  1614. }
  1615. public function recv_system_update_column_family()
  1616. {
  1617. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  1618. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_system_update_column_family_result', $this->input_->isStrictRead());
  1619. else
  1620. {
  1621. $rseqid = 0;
  1622. $fname = null;
  1623. $mtype = 0;
  1624. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  1625. if ($mtype == TMessageType::EXCEPTION) {
  1626. $x = new TApplicationException();
  1627. $x->read($this->input_);
  1628. $this->input_->readMessageEnd();
  1629. throw $x;
  1630. }
  1631. $result = new cassandra_Cassandra_system_update_column_family_result();
  1632. $result->read($this->input_);
  1633. $this->input_->readMessageEnd();
  1634. }
  1635. if ($result->success !== null) {
  1636. return $result->success;
  1637. }
  1638. if ($result->ire !== null) {
  1639. throw $result->ire;
  1640. }
  1641. if ($result->sde !== null) {
  1642. throw $result->sde;
  1643. }
  1644. throw new Exception("system_update_column_family failed: unknown result");
  1645. }
  1646. public function execute_cql_query($query, $compression)
  1647. {
  1648. $this->send_execute_cql_query($query, $compression);
  1649. return $this->recv_execute_cql_query();
  1650. }
  1651. public function send_execute_cql_query($query, $compression)
  1652. {
  1653. $args = new cassandra_Cassandra_execute_cql_query_args();
  1654. $args->query = $query;
  1655. $args->compression = $compression;
  1656. $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  1657. if ($bin_accel)
  1658. {
  1659. thrift_protocol_write_binary($this->output_, 'execute_cql_query', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  1660. }
  1661. else
  1662. {
  1663. $this->output_->writeMessageBegin('execute_cql_query', TMessageType::CALL, $this->seqid_);
  1664. $args->write($this->output_);
  1665. $this->output_->writeMessageEnd();
  1666. $this->output_->getTransport()->flush();
  1667. }
  1668. }
  1669. public function recv_execute_cql_query()
  1670. {
  1671. $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  1672. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_execute_cql_query_result', $this->input_->isStrictRead());
  1673. else
  1674. {
  1675. $rseqid = 0;
  1676. $fname = null;
  1677. $mtype = 0;
  1678. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  1679. if ($mtype == TMessageType::EXCEPTION) {
  1680. $x = new TApplicationException();
  1681. $x->read($this->input_);
  1682. $this->input_->readMessageEnd();
  1683. throw $x;
  1684. }
  1685. $result = new cassandra_Cassandra_execute_cql_query_result();
  1686. $result->read($this->input_);
  1687. $this->input_->readMessageEnd();
  1688. }
  1689. if ($result->success !== null) {
  1690. return $result->success;
  1691. }
  1692. if ($result->ire !== null) {
  1693. throw $result->ire;
  1694. }
  1695. if ($result->ue !== null) {
  1696. throw $result->ue;
  1697. }
  1698. if ($result->te !== null) {
  1699. throw $result->te;
  1700. }
  1701. if ($result->sde !== null) {
  1702. throw $result->sde;
  1703. }
  1704. throw new Exception("execute_cql_query failed: unknown result");
  1705. }
  1706. }
  1707. // HELPER FUNCTIONS AND STRUCTURES
  1708. class cassandra_Cassandra_login_args {
  1709. static $_TSPEC;
  1710. public $auth_request = null;
  1711. public function __construct($vals=null) {
  1712. if (!isset(self::$_TSPEC)) {
  1713. self::$_TSPEC = array(
  1714. 1 => array(
  1715. 'var' => 'auth_request',
  1716. 'type' => TType::STRUCT,
  1717. 'class' => 'cassandra_AuthenticationRequest',
  1718. ),
  1719. );
  1720. }
  1721. if (is_array($vals)) {
  1722. if (isset($vals['auth_request'])) {
  1723. $this->auth_request = $vals['auth_request'];
  1724. }
  1725. }
  1726. }
  1727. public function getName() {
  1728. return 'Cassandra_login_args';
  1729. }
  1730. public function read($input)
  1731. {
  1732. $xfer = 0;
  1733. $fname = null;
  1734. $ftype = 0;
  1735. $fid = 0;
  1736. $xfer += $input->readStructBegin($fname);
  1737. while (true)
  1738. {
  1739. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  1740. if ($ftype == TType::STOP) {
  1741. break;
  1742. }
  1743. switch ($fid)
  1744. {
  1745. case 1:
  1746. if ($ftype == TType::STRUCT) {
  1747. $this->auth_request = new cassandra_AuthenticationRequest();
  1748. $xfer += $this->auth_request->read($input);
  1749. } else {
  1750. $xfer += $input->skip($ftype);
  1751. }
  1752. break;
  1753. default:
  1754. $xfer += $input->skip($ftype);
  1755. break;
  1756. }
  1757. $xfer += $input->readFieldEnd();
  1758. }
  1759. $xfer += $input->readStructEnd();
  1760. return $xfer;
  1761. }
  1762. public function write($output) {
  1763. $xfer = 0;
  1764. $xfer += $output->writeStructBegin('Cassandra_login_args');
  1765. if ($this->auth_request !== null) {
  1766. if (!is_object($this->auth_request)) {
  1767. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  1768. }
  1769. $xfer += $output->writeFieldBegin('auth_request', TType::STRUCT, 1);
  1770. $xfer += $this->auth_request->write($output);
  1771. $xfer += $output->writeFieldEnd();
  1772. }
  1773. $xfer += $output->writeFieldStop();
  1774. $xfer += $output->writeStructEnd();
  1775. return $xfer;
  1776. }
  1777. }
  1778. class cassandra_Cassandra_login_result {
  1779. static $_TSPEC;
  1780. public $authnx = null;
  1781. public $authzx = null;
  1782. public function __construct($vals=null) {
  1783. if (!isset(self::$_TSPEC)) {
  1784. self::$_TSPEC = array(
  1785. 1 => array(
  1786. 'var' => 'authnx',
  1787. 'type' => TType::STRUCT,
  1788. 'class' => 'cassandra_AuthenticationException',
  1789. ),
  1790. 2 => array(
  1791. 'var' => 'authzx',
  1792. 'type' => TType::STRUCT,
  1793. 'class' => 'cassandra_AuthorizationException',
  1794. ),
  1795. );
  1796. }
  1797. if (is_array($vals)) {
  1798. if (isset($vals['authnx'])) {
  1799. $this->authnx = $vals['authnx'];
  1800. }
  1801. if (isset($vals['authzx'])) {
  1802. $this->authzx = $vals['authzx'];
  1803. }
  1804. }
  1805. }
  1806. public function getName() {
  1807. return 'Cassandra_login_result';
  1808. }
  1809. public function read($input)
  1810. {
  1811. $xfer = 0;
  1812. $fname = null;
  1813. $ftype = 0;
  1814. $fid = 0;
  1815. $xfer += $input->readStructBegin($fname);
  1816. while (true)
  1817. {
  1818. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  1819. if ($ftype == TType::STOP) {
  1820. break;
  1821. }
  1822. switch ($fid)
  1823. {
  1824. case 1:
  1825. if ($ftype == TType::STRUCT) {
  1826. $this->authnx = new cassandra_AuthenticationException();
  1827. $xfer += $this->authnx->read($input);
  1828. } else {
  1829. $xfer += $input->skip($ftype);
  1830. }
  1831. break;
  1832. case 2:
  1833. if ($ftype == TType::STRUCT) {
  1834. $this->authzx = new cassandra_AuthorizationException();
  1835. $xfer += $this->authzx->read($input);
  1836. } else {
  1837. $xfer += $input->skip($ftype);
  1838. }
  1839. break;
  1840. default:
  1841. $xfer += $input->skip($ftype);
  1842. break;
  1843. }
  1844. $xfer += $input->readFieldEnd();
  1845. }
  1846. $xfer += $input->readStructEnd();
  1847. return $xfer;
  1848. }
  1849. public function write($output) {
  1850. $xfer = 0;
  1851. $xfer += $output->writeStructBegin('Cassandra_login_result');
  1852. if ($this->authnx !== null) {
  1853. $xfer += $output->writeFieldBegin('authnx', TType::STRUCT, 1);
  1854. $xfer += $this->authnx->write($output);
  1855. $xfer += $output->writeFieldEnd();
  1856. }
  1857. if ($this->authzx !== null) {
  1858. $xfer += $output->writeFieldBegin('authzx', TType::STRUCT, 2);
  1859. $xfer += $this->authzx->write($output);
  1860. $xfer += $output->writeFieldEnd();
  1861. }
  1862. $xfer += $output->writeFieldStop();
  1863. $xfer += $output->writeStructEnd();
  1864. return $xfer;
  1865. }
  1866. }
  1867. class cassandra_Cassandra_set_keyspace_args {
  1868. static $_TSPEC;
  1869. public $keyspace = null;
  1870. public function __construct($vals=null) {
  1871. if (!isset(self::$_TSPEC)) {
  1872. self::$_TSPEC = array(
  1873. 1 => array(
  1874. 'var' => 'keyspace',
  1875. 'type' => TType::STRING,
  1876. ),
  1877. );
  1878. }
  1879. if (is_array($vals)) {
  1880. if (isset($vals['keyspace'])) {
  1881. $this->keyspace = $vals['keyspace'];
  1882. }
  1883. }
  1884. }
  1885. public function getName() {
  1886. return 'Cassandra_set_keyspace_args';
  1887. }
  1888. public function read($input)
  1889. {
  1890. $xfer = 0;
  1891. $fname = null;
  1892. $ftype = 0;
  1893. $fid = 0;
  1894. $xfer += $input->readStructBegin($fname);
  1895. while (true)
  1896. {
  1897. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  1898. if ($ftype == TType::STOP) {
  1899. break;
  1900. }
  1901. switch ($fid)
  1902. {
  1903. case 1:
  1904. if ($ftype == TType::STRING) {
  1905. $xfer += $input->readString($this->keyspace);
  1906. } else {
  1907. $xfer += $input->skip($ftype);
  1908. }
  1909. break;
  1910. default:
  1911. $xfer += $input->skip($ftype);
  1912. break;
  1913. }
  1914. $xfer += $input->readFieldEnd();
  1915. }
  1916. $xfer += $input->readStructEnd();
  1917. return $xfer;
  1918. }
  1919. public function write($output) {
  1920. $xfer = 0;
  1921. $xfer += $output->writeStructBegin('Cassandra_set_keyspace_args');
  1922. if ($this->keyspace !== null) {
  1923. $xfer += $output->writeFieldBegin('keyspace', TType::STRING, 1);
  1924. $xfer += $output->writeString($this->keyspace);
  1925. $xfer += $output->writeFieldEnd();
  1926. }
  1927. $xfer += $output->writeFieldStop();
  1928. $xfer += $output->writeStructEnd();
  1929. return $xfer;
  1930. }
  1931. }
  1932. class cassandra_Cassandra_set_keyspace_result {
  1933. static $_TSPEC;
  1934. public $ire = null;
  1935. public function __construct($vals=null) {
  1936. if (!isset(self::$_TSPEC)) {
  1937. self::$_TSPEC = array(
  1938. 1 => array(
  1939. 'var' => 'ire',
  1940. 'type' => TType::STRUCT,
  1941. 'class' => 'cassandra_InvalidRequestException',
  1942. ),
  1943. );
  1944. }
  1945. if (is_array($vals)) {
  1946. if (isset($vals['ire'])) {
  1947. $this->ire = $vals['ire'];
  1948. }
  1949. }
  1950. }
  1951. public function getName() {
  1952. return 'Cassandra_set_keyspace_result';
  1953. }
  1954. public function read($input)
  1955. {
  1956. $xfer = 0;
  1957. $fname = null;
  1958. $ftype = 0;
  1959. $fid = 0;
  1960. $xfer += $input->readStructBegin($fname);
  1961. while (true)
  1962. {
  1963. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  1964. if ($ftype == TType::STOP) {
  1965. break;
  1966. }
  1967. switch ($fid)
  1968. {
  1969. case 1:
  1970. if ($ftype == TType::STRUCT) {
  1971. $this->ire = new cassandra_InvalidRequestException();
  1972. $xfer += $this->ire->read($input);
  1973. } else {
  1974. $xfer += $input->skip($ftype);
  1975. }
  1976. break;
  1977. default:
  1978. $xfer += $input->skip($ftype);
  1979. break;
  1980. }
  1981. $xfer += $input->readFieldEnd();
  1982. }
  1983. $xfer += $input->readStructEnd();
  1984. return $xfer;
  1985. }
  1986. public function write($output) {
  1987. $xfer = 0;
  1988. $xfer += $output->writeStructBegin('Cassandra_set_keyspace_result');
  1989. if ($this->ire !== null) {
  1990. $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
  1991. $xfer += $this->ire->write($output);
  1992. $xfer += $output->writeFieldEnd();
  1993. }
  1994. $xfer += $output->writeFieldStop();
  1995. $xfer += $output->writeStructEnd();
  1996. return $xfer;
  1997. }
  1998. }
  1999. class cassandra_Cassandra_get_args {
  2000. static $_TSPEC;
  2001. public $key = null;
  2002. public $column_path = null;
  2003. public $consistency_level = 1;
  2004. public function __construct($vals=null) {
  2005. if (!isset(self::$_TSPEC)) {
  2006. self::$_TSPEC = array(
  2007. 1 => array(
  2008. 'var' => 'key',
  2009. 'type' => TType::STRING,
  2010. ),
  2011. 2 => array(
  2012. 'var' => 'column_path',
  2013. 'type' => TType::STRUCT,
  2014. 'class' => 'cassandra_ColumnPath',
  2015. ),
  2016. 3 => array(
  2017. 'var' => 'consistency_level',
  2018. 'type' => TType::I32,
  2019. ),
  2020. );
  2021. }
  2022. if (is_array($vals)) {
  2023. if (isset($vals['key'])) {
  2024. $this->key = $vals['key'];
  2025. }
  2026. if (isset($vals['column_path'])) {
  2027. $this->column_path = $vals['column_path'];
  2028. }
  2029. if (isset($vals['consistency_level'])) {
  2030. $this->consistency_level = $vals['consistency_level'];
  2031. }
  2032. }
  2033. }
  2034. public function getName() {
  2035. return 'Cassandra_get_args';
  2036. }
  2037. public function read($input)
  2038. {
  2039. $xfer = 0;
  2040. $fname = null;
  2041. $ftype = 0;
  2042. $fid = 0;
  2043. $xfer += $input->readStructBegin($fname);
  2044. while (true)
  2045. {
  2046. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  2047. if ($ftype == TType::STOP) {
  2048. break;
  2049. }
  2050. switch ($fid)
  2051. {
  2052. case 1:
  2053. if ($ftype == TType::STRING) {
  2054. $xfer += $input->readString($this->key);
  2055. } else {
  2056. $xfer += $input->skip($ftype);
  2057. }
  2058. break;
  2059. case 2:
  2060. if ($ftype == TType::STRUCT) {
  2061. $this->column_path = new cassandra_ColumnPath();
  2062. $xfer += $this->column_path->read($input);
  2063. } else {
  2064. $xfer += $input->skip($ftype);
  2065. }
  2066. break;
  2067. case 3:
  2068. if ($ftype == TType::I32) {
  2069. $xfer += $input->readI32($this->consistency_level);
  2070. } else {
  2071. $xfer += $input->skip($ftype);
  2072. }
  2073. break;
  2074. default:
  2075. $xfer += $input->skip($ftype);
  2076. break;
  2077. }
  2078. $xfer += $input->readFieldEnd();
  2079. }
  2080. $xfer += $input->readStructEnd();
  2081. return $xfer;
  2082. }
  2083. public function write($output) {
  2084. $xfer = 0;
  2085. $xfer += $output->writeStructBegin('Cassandra_get_args');
  2086. if ($this->key !== null) {
  2087. $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
  2088. $xfer += $output->writeString($this->key);
  2089. $xfer += $output->writeFieldEnd();
  2090. }
  2091. if ($this->column_path !== null) {
  2092. if (!is_object($this->column_path)) {
  2093. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  2094. }
  2095. $xfer += $output->writeFieldBegin('column_path', TType::STRUCT, 2);
  2096. $xfer += $this->column_path->write($output);
  2097. $xfer += $output->writeFieldEnd();
  2098. }
  2099. if ($this->consistency_level !== null) {
  2100. $xfer += $output->writeFieldBegin('consistency_level', TType::I32, 3);
  2101. $xfer += $output->writeI32($this->consistency_level);
  2102. $xfer += $output->writeFieldEnd();
  2103. }
  2104. $xfer += $output->writeFieldStop();
  2105. $xfer += $output->writeStructEnd();
  2106. return $xfer;
  2107. }
  2108. }
  2109. class cassandra_Cassandra_get_result {
  2110. static $_TSPEC;
  2111. public $success = null;
  2112. public $ire = null;
  2113. public $nfe = null;
  2114. public $ue = null;
  2115. public $te = null;
  2116. public function __construct($vals=null) {
  2117. if (!isset(self::$_TSPEC)) {
  2118. self::$_TSPEC = array(
  2119. 0 => array(
  2120. 'var' => 'success',
  2121. 'type' => TType::STRUCT,
  2122. 'class' => 'cassandra_ColumnOrSuperColumn',
  2123. ),
  2124. 1 => array(
  2125. 'var' => 'ire',
  2126. 'type' => TType::STRUCT,
  2127. 'class' => 'cassandra_InvalidRequestException',
  2128. ),
  2129. 2 => array(
  2130. 'var' => 'nfe',
  2131. 'type' => TType::STRUCT,
  2132. 'class' => 'cassandra_NotFoundException',
  2133. ),
  2134. 3 => array(
  2135. 'var' => 'ue',
  2136. 'type' => TType::STRUCT,
  2137. 'class' => 'cassandra_UnavailableException',
  2138. ),
  2139. 4 => array(
  2140. 'var' => 'te',
  2141. 'type' => TType::STRUCT,
  2142. 'class' => 'cassandra_TimedOutException',
  2143. ),
  2144. );
  2145. }
  2146. if (is_array($vals)) {
  2147. if (isset($vals['success'])) {
  2148. $this->success = $vals['success'];
  2149. }
  2150. if (isset($vals['ire'])) {
  2151. $this->ire = $vals['ire'];
  2152. }
  2153. if (isset($vals['nfe'])) {
  2154. $this->nfe = $vals['nfe'];
  2155. }
  2156. if (isset($vals['ue'])) {
  2157. $this->ue = $vals['ue'];
  2158. }
  2159. if (isset($vals['te'])) {
  2160. $this->te = $vals['te'];
  2161. }
  2162. }
  2163. }
  2164. public function getName() {
  2165. return 'Cassandra_get_result';
  2166. }
  2167. public function read($input)
  2168. {
  2169. $xfer = 0;
  2170. $fname = null;
  2171. $ftype = 0;
  2172. $fid = 0;
  2173. $xfer += $input->readStructBegin($fname);
  2174. while (true)
  2175. {
  2176. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  2177. if ($ftype == TType::STOP) {
  2178. break;
  2179. }
  2180. switch ($fid)
  2181. {
  2182. case 0:
  2183. if ($ftype == TType::STRUCT) {
  2184. $this->success = new cassandra_ColumnOrSuperColumn();
  2185. $xfer += $this->success->read($input);
  2186. } else {
  2187. $xfer += $input->skip($ftype);
  2188. }
  2189. break;
  2190. case 1:
  2191. if ($ftype == TType::STRUCT) {
  2192. $this->ire = new cassandra_InvalidRequestException();
  2193. $xfer += $this->ire->read($input);
  2194. } else {
  2195. $xfer += $input->skip($ftype);
  2196. }
  2197. break;
  2198. case 2:
  2199. if ($ftype == TType::STRUCT) {
  2200. $this->nfe = new cassandra_NotFoundException();
  2201. $xfer += $this->nfe->read($input);
  2202. } else {
  2203. $xfer += $input->skip($ftype);
  2204. }
  2205. break;
  2206. case 3:
  2207. if ($ftype == TType::STRUCT) {
  2208. $this->ue = new cassandra_UnavailableException();
  2209. $xfer += $this->ue->read($input);
  2210. } else {
  2211. $xfer += $input->skip($ftype);
  2212. }
  2213. break;
  2214. case 4:
  2215. if ($ftype == TType::STRUCT) {
  2216. $this->te = new cassandra_TimedOutException();
  2217. $xfer += $this->te->read($input);
  2218. } else {
  2219. $xfer += $input->skip($ftype);
  2220. }
  2221. break;
  2222. default:
  2223. $xfer += $input->skip($ftype);
  2224. break;
  2225. }
  2226. $xfer += $input->readFieldEnd();
  2227. }
  2228. $xfer += $input->readStructEnd();
  2229. return $xfer;
  2230. }
  2231. public function write($output) {
  2232. $xfer = 0;
  2233. $xfer += $output->writeStructBegin('Cassandra_get_result');
  2234. if ($this->success !== null) {
  2235. if (!is_object($this->success)) {
  2236. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  2237. }
  2238. $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
  2239. $xfer += $this->success->write($output);
  2240. $xfer += $output->writeFieldEnd();
  2241. }
  2242. if ($this->ire !== null) {
  2243. $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
  2244. $xfer += $this->ire->write($output);
  2245. $xfer += $output->writeFieldEnd();
  2246. }
  2247. if ($this->nfe !== null) {
  2248. $xfer += $output->writeFieldBegin('nfe', TType::STRUCT, 2);
  2249. $xfer += $this->nfe->write($output);
  2250. $xfer += $output->writeFieldEnd();
  2251. }
  2252. if ($this->ue !== null) {
  2253. $xfer += $output->writeFieldBegin('ue', TType::STRUCT, 3);
  2254. $xfer += $this->ue->write($output);
  2255. $xfer += $output->writeFieldEnd();
  2256. }
  2257. if ($this->te !== null) {
  2258. $xfer += $output->writeFieldBegin('te', TType::STRUCT, 4);
  2259. $xfer += $this->te->write($output);
  2260. $xfer += $output->writeFieldEnd();
  2261. }
  2262. $xfer += $output->writeFieldStop();
  2263. $xfer += $output->writeStructEnd();
  2264. return $xfer;
  2265. }
  2266. }
  2267. class cassandra_Cassandra_get_slice_args {
  2268. static $_TSPEC;
  2269. public $key = null;
  2270. public $column_parent = null;
  2271. public $predicate = null;
  2272. public $consistency_level = 1;
  2273. public function __construct($vals=null) {
  2274. if (!isset(self::$_TSPEC)) {
  2275. self::$_TSPEC = array(
  2276. 1 => array(
  2277. 'var' => 'key',
  2278. 'type' => TType::STRING,
  2279. ),
  2280. 2 => array(
  2281. 'var' => 'column_parent',
  2282. 'type' => TType::STRUCT,
  2283. 'class' => 'cassandra_ColumnParent',
  2284. ),
  2285. 3 => array(
  2286. 'var' => 'predicate',
  2287. 'type' => TType::STRUCT,
  2288. 'class' => 'cassandra_SlicePredicate',
  2289. ),
  2290. 4 => array(
  2291. 'var' => 'consistency_level',
  2292. 'type' => TType::I32,
  2293. ),
  2294. );
  2295. }
  2296. if (is_array($vals)) {
  2297. if (isset($vals['key'])) {
  2298. $this->key = $vals['key'];
  2299. }
  2300. if (isset($vals['column_parent'])) {
  2301. $this->column_parent = $vals['column_parent'];
  2302. }
  2303. if (isset($vals['predicate'])) {
  2304. $this->predicate = $vals['predicate'];
  2305. }
  2306. if (isset($vals['consistency_level'])) {
  2307. $this->consistency_level = $vals['consistency_level'];
  2308. }
  2309. }
  2310. }
  2311. public function getName() {
  2312. return 'Cassandra_get_slice_args';
  2313. }
  2314. public function read($input)
  2315. {
  2316. $xfer = 0;
  2317. $fname = null;
  2318. $ftype = 0;
  2319. $fid = 0;
  2320. $xfer += $input->readStructBegin($fname);
  2321. while (true)
  2322. {
  2323. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  2324. if ($ftype == TType::STOP) {
  2325. break;
  2326. }
  2327. switch ($fid)
  2328. {
  2329. case 1:
  2330. if ($ftype == TType::STRING) {
  2331. $xfer += $input->readString($this->key);
  2332. } else {
  2333. $xfer += $input->skip($ftype);
  2334. }
  2335. break;
  2336. case 2:
  2337. if ($ftype == TType::STRUCT) {
  2338. $this->column_parent = new cassandra_ColumnParent();
  2339. $xfer += $this->column_parent->read($input);
  2340. } else {
  2341. $xfer += $input->skip($ftype);
  2342. }
  2343. break;
  2344. case 3:
  2345. if ($ftype == TType::STRUCT) {
  2346. $this->predicate = new cassandra_SlicePredicate();
  2347. $xfer += $this->predicate->read($input);
  2348. } else {
  2349. $xfer += $input->skip($ftype);
  2350. }
  2351. break;
  2352. case 4:
  2353. if ($ftype == TType::I32) {
  2354. $xfer += $input->readI32($this->consistency_level);
  2355. } else {
  2356. $xfer += $input->skip($ftype);
  2357. }
  2358. break;
  2359. default:
  2360. $xfer += $input->skip($ftype);
  2361. break;
  2362. }
  2363. $xfer += $input->readFieldEnd();
  2364. }
  2365. $xfer += $input->readStructEnd();
  2366. return $xfer;
  2367. }
  2368. public function write($output) {
  2369. $xfer = 0;
  2370. $xfer += $output->writeStructBegin('Cassandra_get_slice_args');
  2371. if ($this->key !== null) {
  2372. $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
  2373. $xfer += $output->writeString($this->key);
  2374. $xfer += $output->writeFieldEnd();
  2375. }
  2376. if ($this->column_parent !== null) {
  2377. if (!is_object($this->column_parent)) {
  2378. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  2379. }
  2380. $xfer += $output->writeFieldBegin('column_parent', TType::STRUCT, 2);
  2381. $xfer += $this->column_parent->write($output);
  2382. $xfer += $output->writeFieldEnd();
  2383. }
  2384. if ($this->predicate !== null) {
  2385. if (!is_object($this->predicate)) {
  2386. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  2387. }
  2388. $xfer += $output->writeFieldBegin('predicate', TType::STRUCT, 3);
  2389. $xfer += $this->predicate->write($output);
  2390. $xfer += $output->writeFieldEnd();
  2391. }
  2392. if ($this->consistency_level !== null) {
  2393. $xfer += $output->writeFieldBegin('consistency_level', TType::I32, 4);
  2394. $xfer += $output->writeI32($this->consistency_level);
  2395. $xfer += $output->writeFieldEnd();
  2396. }
  2397. $xfer += $output->writeFieldStop();
  2398. $xfer += $output->writeStructEnd();
  2399. return $xfer;
  2400. }
  2401. }
  2402. class cassandra_Cassandra_get_slice_result {
  2403. static $_TSPEC;
  2404. public $success = null;
  2405. public $ire = null;
  2406. public $ue = null;
  2407. public $te = null;
  2408. public function __construct($vals=null) {
  2409. if (!isset(self::$_TSPEC)) {
  2410. self::$_TSPEC = array(
  2411. 0 => array(
  2412. 'var' => 'success',
  2413. 'type' => TType::LST,
  2414. 'etype' => TType::STRUCT,
  2415. 'elem' => array(
  2416. 'type' => TType::STRUCT,
  2417. 'class' => 'cassandra_ColumnOrSuperColumn',
  2418. ),
  2419. ),
  2420. 1 => array(
  2421. 'var' => 'ire',
  2422. 'type' => TType::STRUCT,
  2423. 'class' => 'cassandra_InvalidRequestException',
  2424. ),
  2425. 2 => array(
  2426. 'var' => 'ue',
  2427. 'type' => TType::STRUCT,
  2428. 'class' => 'cassandra_UnavailableException',
  2429. ),
  2430. 3 => array(
  2431. 'var' => 'te',
  2432. 'type' => TType::STRUCT,
  2433. 'class' => 'cassandra_TimedOutException',
  2434. ),
  2435. );
  2436. }
  2437. if (is_array($vals)) {
  2438. if (isset($vals['success'])) {
  2439. $this->success = $vals['success'];
  2440. }
  2441. if (isset($vals['ire'])) {
  2442. $this->ire = $vals['ire'];
  2443. }
  2444. if (isset($vals['ue'])) {
  2445. $this->ue = $vals['ue'];
  2446. }
  2447. if (isset($vals['te'])) {
  2448. $this->te = $vals['te'];
  2449. }
  2450. }
  2451. }
  2452. public function getName() {
  2453. return 'Cassandra_get_slice_result';
  2454. }
  2455. public function read($input)
  2456. {
  2457. $xfer = 0;
  2458. $fname = null;
  2459. $ftype = 0;
  2460. $fid = 0;
  2461. $xfer += $input->readStructBegin($fname);
  2462. while (true)
  2463. {
  2464. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  2465. if ($ftype == TType::STOP) {
  2466. break;
  2467. }
  2468. switch ($fid)
  2469. {
  2470. case 0:
  2471. if ($ftype == TType::LST) {
  2472. $this->success = array();
  2473. $_size147 = 0;
  2474. $_etype150 = 0;
  2475. $xfer += $input->readListBegin($_etype150, $_size147);
  2476. for ($_i151 = 0; $_i151 < $_size147; ++$_i151)
  2477. {
  2478. $elem152 = null;
  2479. $elem152 = new cassandra_ColumnOrSuperColumn();
  2480. $xfer += $elem152->read($input);
  2481. $this->success []= $elem152;
  2482. }
  2483. $xfer += $input->readListEnd();
  2484. } else {
  2485. $xfer += $input->skip($ftype);
  2486. }
  2487. break;
  2488. case 1:
  2489. if ($ftype == TType::STRUCT) {
  2490. $this->ire = new cassandra_InvalidRequestException();
  2491. $xfer += $this->ire->read($input);
  2492. } else {
  2493. $xfer += $input->skip($ftype);
  2494. }
  2495. break;
  2496. case 2:
  2497. if ($ftype == TType::STRUCT) {
  2498. $this->ue = new cassandra_UnavailableException();
  2499. $xfer += $this->ue->read($input);
  2500. } else {
  2501. $xfer += $input->skip($ftype);
  2502. }
  2503. break;
  2504. case 3:
  2505. if ($ftype == TType::STRUCT) {
  2506. $this->te = new cassandra_TimedOutException();
  2507. $xfer += $this->te->read($input);
  2508. } else {
  2509. $xfer += $input->skip($ftype);
  2510. }
  2511. break;
  2512. default:
  2513. $xfer += $input->skip($ftype);
  2514. break;
  2515. }
  2516. $xfer += $input->readFieldEnd();
  2517. }
  2518. $xfer += $input->readStructEnd();
  2519. return $xfer;
  2520. }
  2521. public function write($output) {
  2522. $xfer = 0;
  2523. $xfer += $output->writeStructBegin('Cassandra_get_slice_result');
  2524. if ($this->success !== null) {
  2525. if (!is_array($this->success)) {
  2526. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  2527. }
  2528. $xfer += $output->writeFieldBegin('success', TType::LST, 0);
  2529. {
  2530. $output->writeListBegin(TType::STRUCT, count($this->success));
  2531. {
  2532. foreach ($this->success as $iter153)
  2533. {
  2534. $xfer += $iter153->write($output);
  2535. }
  2536. }
  2537. $output->writeListEnd();
  2538. }
  2539. $xfer += $output->writeFieldEnd();
  2540. }
  2541. if ($this->ire !== null) {
  2542. $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
  2543. $xfer += $this->ire->write($output);
  2544. $xfer += $output->writeFieldEnd();
  2545. }
  2546. if ($this->ue !== null) {
  2547. $xfer += $output->writeFieldBegin('ue', TType::STRUCT, 2);
  2548. $xfer += $this->ue->write($output);
  2549. $xfer += $output->writeFieldEnd();
  2550. }
  2551. if ($this->te !== null) {
  2552. $xfer += $output->writeFieldBegin('te', TType::STRUCT, 3);
  2553. $xfer += $this->te->write($output);
  2554. $xfer += $output->writeFieldEnd();
  2555. }
  2556. $xfer += $output->writeFieldStop();
  2557. $xfer += $output->writeStructEnd();
  2558. return $xfer;
  2559. }
  2560. }
  2561. class cassandra_Cassandra_get_count_args {
  2562. static $_TSPEC;
  2563. public $key = null;
  2564. public $column_parent = null;
  2565. public $predicate = null;
  2566. public $consistency_level = 1;
  2567. public function __construct($vals=null) {
  2568. if (!isset(self::$_TSPEC)) {
  2569. self::$_TSPEC = array(
  2570. 1 => array(
  2571. 'var' => 'key',
  2572. 'type' => TType::STRING,
  2573. ),
  2574. 2 => array(
  2575. 'var' => 'column_parent',
  2576. 'type' => TType::STRUCT,
  2577. 'class' => 'cassandra_ColumnParent',
  2578. ),
  2579. 3 => array(
  2580. 'var' => 'predicate',
  2581. 'type' => TType::STRUCT,
  2582. 'class' => 'cassandra_SlicePredicate',
  2583. ),
  2584. 4 => array(
  2585. 'var' => 'consistency_level',
  2586. 'type' => TType::I32,
  2587. ),
  2588. );
  2589. }
  2590. if (is_array($vals)) {
  2591. if (isset($vals['key'])) {
  2592. $this->key = $vals['key'];
  2593. }
  2594. if (isset($vals['column_parent'])) {
  2595. $this->column_parent = $vals['column_parent'];
  2596. }
  2597. if (isset($vals['predicate'])) {
  2598. $this->predicate = $vals['predicate'];
  2599. }
  2600. if (isset($vals['consistency_level'])) {
  2601. $this->consistency_level = $vals['consistency_level'];
  2602. }
  2603. }
  2604. }
  2605. public function getName() {
  2606. return 'Cassandra_get_count_args';
  2607. }
  2608. public function read($input)
  2609. {
  2610. $xfer = 0;
  2611. $fname = null;
  2612. $ftype = 0;
  2613. $fid = 0;
  2614. $xfer += $input->readStructBegin($fname);
  2615. while (true)
  2616. {
  2617. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  2618. if ($ftype == TType::STOP) {
  2619. break;
  2620. }
  2621. switch ($fid)
  2622. {
  2623. case 1:
  2624. if ($ftype == TType::STRING) {
  2625. $xfer += $input->readString($this->key);
  2626. } else {
  2627. $xfer += $input->skip($ftype);
  2628. }
  2629. break;
  2630. case 2:
  2631. if ($ftype == TType::STRUCT) {
  2632. $this->column_parent = new cassandra_ColumnParent();
  2633. $xfer += $this->column_parent->read($input);
  2634. } else {
  2635. $xfer += $input->skip($ftype);
  2636. }
  2637. break;
  2638. case 3:
  2639. if ($ftype == TType::STRUCT) {
  2640. $this->predicate = new cassandra_SlicePredicate();
  2641. $xfer += $this->predicate->read($input);
  2642. } else {
  2643. $xfer += $input->skip($ftype);
  2644. }
  2645. break;
  2646. case 4:
  2647. if ($ftype == TType::I32) {
  2648. $xfer += $input->readI32($this->consistency_level);
  2649. } else {
  2650. $xfer += $input->skip($ftype);
  2651. }
  2652. break;
  2653. default:
  2654. $xfer += $input->skip($ftype);
  2655. break;
  2656. }
  2657. $xfer += $input->readFieldEnd();
  2658. }
  2659. $xfer += $input->readStructEnd();
  2660. return $xfer;
  2661. }
  2662. public function write($output) {
  2663. $xfer = 0;
  2664. $xfer += $output->writeStructBegin('Cassandra_get_count_args');
  2665. if ($this->key !== null) {
  2666. $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
  2667. $xfer += $output->writeString($this->key);
  2668. $xfer += $output->writeFieldEnd();
  2669. }
  2670. if ($this->column_parent !== null) {
  2671. if (!is_object($this->column_parent)) {
  2672. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  2673. }
  2674. $xfer += $output->writeFieldBegin('column_parent', TType::STRUCT, 2);
  2675. $xfer += $this->column_parent->write($output);
  2676. $xfer += $output->writeFieldEnd();
  2677. }
  2678. if ($this->predicate !== null) {
  2679. if (!is_object($this->predicate)) {
  2680. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  2681. }
  2682. $xfer += $output->writeFieldBegin('predicate', TType::STRUCT, 3);
  2683. $xfer += $this->predicate->write($output);
  2684. $xfer += $output->writeFieldEnd();
  2685. }
  2686. if ($this->consistency_level !== null) {
  2687. $xfer += $output->writeFieldBegin('consistency_level', TType::I32, 4);
  2688. $xfer += $output->writeI32($this->consistency_level);
  2689. $xfer += $output->writeFieldEnd();
  2690. }
  2691. $xfer += $output->writeFieldStop();
  2692. $xfer += $output->writeStructEnd();
  2693. return $xfer;
  2694. }
  2695. }
  2696. class cassandra_Cassandra_get_count_result {
  2697. static $_TSPEC;
  2698. public $success = null;
  2699. public $ire = null;
  2700. public $ue = null;
  2701. public $te = null;
  2702. public function __construct($vals=null) {
  2703. if (!isset(self::$_TSPEC)) {
  2704. self::$_TSPEC = array(
  2705. 0 => array(
  2706. 'var' => 'success',
  2707. 'type' => TType::I32,
  2708. ),
  2709. 1 => array(
  2710. 'var' => 'ire',
  2711. 'type' => TType::STRUCT,
  2712. 'class' => 'cassandra_InvalidRequestException',
  2713. ),
  2714. 2 => array(
  2715. 'var' => 'ue',
  2716. 'type' => TType::STRUCT,
  2717. 'class' => 'cassandra_UnavailableException',
  2718. ),
  2719. 3 => array(
  2720. 'var' => 'te',
  2721. 'type' => TType::STRUCT,
  2722. 'class' => 'cassandra_TimedOutException',
  2723. ),
  2724. );
  2725. }
  2726. if (is_array($vals)) {
  2727. if (isset($vals['success'])) {
  2728. $this->success = $vals['success'];
  2729. }
  2730. if (isset($vals['ire'])) {
  2731. $this->ire = $vals['ire'];
  2732. }
  2733. if (isset($vals['ue'])) {
  2734. $this->ue = $vals['ue'];
  2735. }
  2736. if (isset($vals['te'])) {
  2737. $this->te = $vals['te'];
  2738. }
  2739. }
  2740. }
  2741. public function getName() {
  2742. return 'Cassandra_get_count_result';
  2743. }
  2744. public function read($input)
  2745. {
  2746. $xfer = 0;
  2747. $fname = null;
  2748. $ftype = 0;
  2749. $fid = 0;
  2750. $xfer += $input->readStructBegin($fname);
  2751. while (true)
  2752. {
  2753. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  2754. if ($ftype == TType::STOP) {
  2755. break;
  2756. }
  2757. switch ($fid)
  2758. {
  2759. case 0:
  2760. if ($ftype == TType::I32) {
  2761. $xfer += $input->readI32($this->success);
  2762. } else {
  2763. $xfer += $input->skip($ftype);
  2764. }
  2765. break;
  2766. case 1:
  2767. if ($ftype == TType::STRUCT) {
  2768. $this->ire = new cassandra_InvalidRequestException();
  2769. $xfer += $this->ire->read($input);
  2770. } else {
  2771. $xfer += $input->skip($ftype);
  2772. }
  2773. break;
  2774. case 2:
  2775. if ($ftype == TType::STRUCT) {
  2776. $this->ue = new cassandra_UnavailableException();
  2777. $xfer += $this->ue->read($input);
  2778. } else {
  2779. $xfer += $input->skip($ftype);
  2780. }
  2781. break;
  2782. case 3:
  2783. if ($ftype == TType::STRUCT) {
  2784. $this->te = new cassandra_TimedOutException();
  2785. $xfer += $this->te->read($input);
  2786. } else {
  2787. $xfer += $input->skip($ftype);
  2788. }
  2789. break;
  2790. default:
  2791. $xfer += $input->skip($ftype);
  2792. break;
  2793. }
  2794. $xfer += $input->readFieldEnd();
  2795. }
  2796. $xfer += $input->readStructEnd();
  2797. return $xfer;
  2798. }
  2799. public function write($output) {
  2800. $xfer = 0;
  2801. $xfer += $output->writeStructBegin('Cassandra_get_count_result');
  2802. if ($this->success !== null) {
  2803. $xfer += $output->writeFieldBegin('success', TType::I32, 0);
  2804. $xfer += $output->writeI32($this->success);
  2805. $xfer += $output->writeFieldEnd();
  2806. }
  2807. if ($this->ire !== null) {
  2808. $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
  2809. $xfer += $this->ire->write($output);
  2810. $xfer += $output->writeFieldEnd();
  2811. }
  2812. if ($this->ue !== null) {
  2813. $xfer += $output->writeFieldBegin('ue', TType::STRUCT, 2);
  2814. $xfer += $this->ue->write($output);
  2815. $xfer += $output->writeFieldEnd();
  2816. }
  2817. if ($this->te !== null) {
  2818. $xfer += $output->writeFieldBegin('te', TType::STRUCT, 3);
  2819. $xfer += $this->te->write($output);
  2820. $xfer += $output->writeFieldEnd();
  2821. }
  2822. $xfer += $output->writeFieldStop();
  2823. $xfer += $output->writeStructEnd();
  2824. return $xfer;
  2825. }
  2826. }
  2827. class cassandra_Cassandra_multiget_slice_args {
  2828. static $_TSPEC;
  2829. public $keys = null;
  2830. public $column_parent = null;
  2831. public $predicate = null;
  2832. public $consistency_level = 1;
  2833. public function __construct($vals=null) {
  2834. if (!isset(self::$_TSPEC)) {
  2835. self::$_TSPEC = array(
  2836. 1 => array(
  2837. 'var' => 'keys',
  2838. 'type' => TType::LST,
  2839. 'etype' => TType::STRING,
  2840. 'elem' => array(
  2841. 'type' => TType::STRING,
  2842. ),
  2843. ),
  2844. 2 => array(
  2845. 'var' => 'column_parent',
  2846. 'type' => TType::STRUCT,
  2847. 'class' => 'cassandra_ColumnParent',
  2848. ),
  2849. 3 => array(
  2850. 'var' => 'predicate',
  2851. 'type' => TType::STRUCT,
  2852. 'class' => 'cassandra_SlicePredicate',
  2853. ),
  2854. 4 => array(
  2855. 'var' => 'consistency_level',
  2856. 'type' => TType::I32,
  2857. ),
  2858. );
  2859. }
  2860. if (is_array($vals)) {
  2861. if (isset($vals['keys'])) {
  2862. $this->keys = $vals['keys'];
  2863. }
  2864. if (isset($vals['column_parent'])) {
  2865. $this->column_parent = $vals['column_parent'];
  2866. }
  2867. if (isset($vals['predicate'])) {
  2868. $this->predicate = $vals['predicate'];
  2869. }
  2870. if (isset($vals['consistency_level'])) {
  2871. $this->consistency_level = $vals['consistency_level'];
  2872. }
  2873. }
  2874. }
  2875. public function getName() {
  2876. return 'Cassandra_multiget_slice_args';
  2877. }
  2878. public function read($input)
  2879. {
  2880. $xfer = 0;
  2881. $fname = null;
  2882. $ftype = 0;
  2883. $fid = 0;
  2884. $xfer += $input->readStructBegin($fname);
  2885. while (true)
  2886. {
  2887. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  2888. if ($ftype == TType::STOP) {
  2889. break;
  2890. }
  2891. switch ($fid)
  2892. {
  2893. case 1:
  2894. if ($ftype == TType::LST) {
  2895. $this->keys = array();
  2896. $_size154 = 0;
  2897. $_etype157 = 0;
  2898. $xfer += $input->readListBegin($_etype157, $_size154);
  2899. for ($_i158 = 0; $_i158 < $_size154; ++$_i158)
  2900. {
  2901. $elem159 = null;
  2902. $xfer += $input->readString($elem159);
  2903. $this->keys []= $elem159;
  2904. }
  2905. $xfer += $input->readListEnd();
  2906. } else {
  2907. $xfer += $input->skip($ftype);
  2908. }
  2909. break;
  2910. case 2:
  2911. if ($ftype == TType::STRUCT) {
  2912. $this->column_parent = new cassandra_ColumnParent();
  2913. $xfer += $this->column_parent->read($input);
  2914. } else {
  2915. $xfer += $input->skip($ftype);
  2916. }
  2917. break;
  2918. case 3:
  2919. if ($ftype == TType::STRUCT) {
  2920. $this->predicate = new cassandra_SlicePredicate();
  2921. $xfer += $this->predicate->read($input);
  2922. } else {
  2923. $xfer += $input->skip($ftype);
  2924. }
  2925. break;
  2926. case 4:
  2927. if ($ftype == TType::I32) {
  2928. $xfer += $input->readI32($this->consistency_level);
  2929. } else {
  2930. $xfer += $input->skip($ftype);
  2931. }
  2932. break;
  2933. default:
  2934. $xfer += $input->skip($ftype);
  2935. break;
  2936. }
  2937. $xfer += $input->readFieldEnd();
  2938. }
  2939. $xfer += $input->readStructEnd();
  2940. return $xfer;
  2941. }
  2942. public function write($output) {
  2943. $xfer = 0;
  2944. $xfer += $output->writeStructBegin('Cassandra_multiget_slice_args');
  2945. if ($this->keys !== null) {
  2946. if (!is_array($this->keys)) {
  2947. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  2948. }
  2949. $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
  2950. {
  2951. $output->writeListBegin(TType::STRING, count($this->keys));
  2952. {
  2953. foreach ($this->keys as $iter160)
  2954. {
  2955. $xfer += $output->writeString($iter160);
  2956. }
  2957. }
  2958. $output->writeListEnd();
  2959. }
  2960. $xfer += $output->writeFieldEnd();
  2961. }
  2962. if ($this->column_parent !== null) {
  2963. if (!is_object($this->column_parent)) {
  2964. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  2965. }
  2966. $xfer += $output->writeFieldBegin('column_parent', TType::STRUCT, 2);
  2967. $xfer += $this->column_parent->write($output);
  2968. $xfer += $output->writeFieldEnd();
  2969. }
  2970. if ($this->predicate !== null) {
  2971. if (!is_object($this->predicate)) {
  2972. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  2973. }
  2974. $xfer += $output->writeFieldBegin('predicate', TType::STRUCT, 3);
  2975. $xfer += $this->predicate->write($output);
  2976. $xfer += $output->writeFieldEnd();
  2977. }
  2978. if ($this->consistency_level !== null) {
  2979. $xfer += $output->writeFieldBegin('consistency_level', TType::I32, 4);
  2980. $xfer += $output->writeI32($this->consistency_level);
  2981. $xfer += $output->writeFieldEnd();
  2982. }
  2983. $xfer += $output->writeFieldStop();
  2984. $xfer += $output->writeStructEnd();
  2985. return $xfer;
  2986. }
  2987. }
  2988. class cassandra_Cassandra_multiget_slice_result {
  2989. static $_TSPEC;
  2990. public $success = null;
  2991. public $ire = null;
  2992. public $ue = null;
  2993. public $te = null;
  2994. public function __construct($vals=null) {
  2995. if (!isset(self::$_TSPEC)) {
  2996. self::$_TSPEC = array(
  2997. 0 => array(
  2998. 'var' => 'success',
  2999. 'type' => TType::MAP,
  3000. 'ktype' => TType::STRING,
  3001. 'vtype' => TType::LST,
  3002. 'key' => array(
  3003. 'type' => TType::STRING,
  3004. ),
  3005. 'val' => array(
  3006. 'type' => TType::LST,
  3007. 'etype' => TType::STRUCT,
  3008. 'elem' => array(
  3009. 'type' => TType::STRUCT,
  3010. 'class' => 'cassandra_ColumnOrSuperColumn',
  3011. ),
  3012. ),
  3013. ),
  3014. 1 => array(
  3015. 'var' => 'ire',
  3016. 'type' => TType::STRUCT,
  3017. 'class' => 'cassandra_InvalidRequestException',
  3018. ),
  3019. 2 => array(
  3020. 'var' => 'ue',
  3021. 'type' => TType::STRUCT,
  3022. 'class' => 'cassandra_UnavailableException',
  3023. ),
  3024. 3 => array(
  3025. 'var' => 'te',
  3026. 'type' => TType::STRUCT,
  3027. 'class' => 'cassandra_TimedOutException',
  3028. ),
  3029. );
  3030. }
  3031. if (is_array($vals)) {
  3032. if (isset($vals['success'])) {
  3033. $this->success = $vals['success'];
  3034. }
  3035. if (isset($vals['ire'])) {
  3036. $this->ire = $vals['ire'];
  3037. }
  3038. if (isset($vals['ue'])) {
  3039. $this->ue = $vals['ue'];
  3040. }
  3041. if (isset($vals['te'])) {
  3042. $this->te = $vals['te'];
  3043. }
  3044. }
  3045. }
  3046. public function getName() {
  3047. return 'Cassandra_multiget_slice_result';
  3048. }
  3049. public function read($input)
  3050. {
  3051. $xfer = 0;
  3052. $fname = null;
  3053. $ftype = 0;
  3054. $fid = 0;
  3055. $xfer += $input->readStructBegin($fname);
  3056. while (true)
  3057. {
  3058. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  3059. if ($ftype == TType::STOP) {
  3060. break;
  3061. }
  3062. switch ($fid)
  3063. {
  3064. case 0:
  3065. if ($ftype == TType::MAP) {
  3066. $this->success = array();
  3067. $_size161 = 0;
  3068. $_ktype162 = 0;
  3069. $_vtype163 = 0;
  3070. $xfer += $input->readMapBegin($_ktype162, $_vtype163, $_size161);
  3071. for ($_i165 = 0; $_i165 < $_size161; ++$_i165)
  3072. {
  3073. $key166 = '';
  3074. $val167 = array();
  3075. $xfer += $input->readString($key166);
  3076. $val167 = array();
  3077. $_size168 = 0;
  3078. $_etype171 = 0;
  3079. $xfer += $input->readListBegin($_etype171, $_size168);
  3080. for ($_i172 = 0; $_i172 < $_size168; ++$_i172)
  3081. {
  3082. $elem173 = null;
  3083. $elem173 = new cassandra_ColumnOrSuperColumn();
  3084. $xfer += $elem173->read($input);
  3085. $val167 []= $elem173;
  3086. }
  3087. $xfer += $input->readListEnd();
  3088. $this->success[$key166] = $val167;
  3089. }
  3090. $xfer += $input->readMapEnd();
  3091. } else {
  3092. $xfer += $input->skip($ftype);
  3093. }
  3094. break;
  3095. case 1:
  3096. if ($ftype == TType::STRUCT) {
  3097. $this->ire = new cassandra_InvalidRequestException();
  3098. $xfer += $this->ire->read($input);
  3099. } else {
  3100. $xfer += $input->skip($ftype);
  3101. }
  3102. break;
  3103. case 2:
  3104. if ($ftype == TType::STRUCT) {
  3105. $this->ue = new cassandra_UnavailableException();
  3106. $xfer += $this->ue->read($input);
  3107. } else {
  3108. $xfer += $input->skip($ftype);
  3109. }
  3110. break;
  3111. case 3:
  3112. if ($ftype == TType::STRUCT) {
  3113. $this->te = new cassandra_TimedOutException();
  3114. $xfer += $this->te->read($input);
  3115. } else {
  3116. $xfer += $input->skip($ftype);
  3117. }
  3118. break;
  3119. default:
  3120. $xfer += $input->skip($ftype);
  3121. break;
  3122. }
  3123. $xfer += $input->readFieldEnd();
  3124. }
  3125. $xfer += $input->readStructEnd();
  3126. return $xfer;
  3127. }
  3128. public function write($output) {
  3129. $xfer = 0;
  3130. $xfer += $output->writeStructBegin('Cassandra_multiget_slice_result');
  3131. if ($this->success !== null) {
  3132. if (!is_array($this->success)) {
  3133. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  3134. }
  3135. $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
  3136. {
  3137. $output->writeMapBegin(TType::STRING, TType::LST, count($this->success));
  3138. {
  3139. foreach ($this->success as $kiter174 => $viter175)
  3140. {
  3141. $xfer += $output->writeString($kiter174);
  3142. {
  3143. $output->writeListBegin(TType::STRUCT, count($viter175));
  3144. {
  3145. foreach ($viter175 as $iter176)
  3146. {
  3147. $xfer += $iter176->write($output);
  3148. }
  3149. }
  3150. $output->writeListEnd();
  3151. }
  3152. }
  3153. }
  3154. $output->writeMapEnd();
  3155. }
  3156. $xfer += $output->writeFieldEnd();
  3157. }
  3158. if ($this->ire !== null) {
  3159. $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
  3160. $xfer += $this->ire->write($output);
  3161. $xfer += $output->writeFieldEnd();
  3162. }
  3163. if ($this->ue !== null) {
  3164. $xfer += $output->writeFieldBegin('ue', TType::STRUCT, 2);
  3165. $xfer += $this->ue->write($output);
  3166. $xfer += $output->writeFieldEnd();
  3167. }
  3168. if ($this->te !== null) {
  3169. $xfer += $output->writeFieldBegin('te', TType::STRUCT, 3);
  3170. $xfer += $this->te->write($output);
  3171. $xfer += $output->writeFieldEnd();
  3172. }
  3173. $xfer += $output->writeFieldStop();
  3174. $xfer += $output->writeStructEnd();
  3175. return $xfer;
  3176. }
  3177. }
  3178. class cassandra_Cassandra_multiget_count_args {
  3179. static $_TSPEC;
  3180. public $keys = null;
  3181. public $column_parent = null;
  3182. public $predicate = null;
  3183. public $consistency_level = 1;
  3184. public function __construct($vals=null) {
  3185. if (!isset(self::$_TSPEC)) {
  3186. self::$_TSPEC = array(
  3187. 1 => array(
  3188. 'var' => 'keys',
  3189. 'type' => TType::LST,
  3190. 'etype' => TType::STRING,
  3191. 'elem' => array(
  3192. 'type' => TType::STRING,
  3193. ),
  3194. ),
  3195. 2 => array(
  3196. 'var' => 'column_parent',
  3197. 'type' => TType::STRUCT,
  3198. 'class' => 'cassandra_ColumnParent',
  3199. ),
  3200. 3 => array(
  3201. 'var' => 'predicate',
  3202. 'type' => TType::STRUCT,
  3203. 'class' => 'cassandra_SlicePredicate',
  3204. ),
  3205. 4 => array(
  3206. 'var' => 'consistency_level',
  3207. 'type' => TType::I32,
  3208. ),
  3209. );
  3210. }
  3211. if (is_array($vals)) {
  3212. if (isset($vals['keys'])) {
  3213. $this->keys = $vals['keys'];
  3214. }
  3215. if (isset($vals['column_parent'])) {
  3216. $this->column_parent = $vals['column_parent'];
  3217. }
  3218. if (isset($vals['predicate'])) {
  3219. $this->predicate = $vals['predicate'];
  3220. }
  3221. if (isset($vals['consistency_level'])) {
  3222. $this->consistency_level = $vals['consistency_level'];
  3223. }
  3224. }
  3225. }
  3226. public function getName() {
  3227. return 'Cassandra_multiget_count_args';
  3228. }
  3229. public function read($input)
  3230. {
  3231. $xfer = 0;
  3232. $fname = null;
  3233. $ftype = 0;
  3234. $fid = 0;
  3235. $xfer += $input->readStructBegin($fname);
  3236. while (true)
  3237. {
  3238. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  3239. if ($ftype == TType::STOP) {
  3240. break;
  3241. }
  3242. switch ($fid)
  3243. {
  3244. case 1:
  3245. if ($ftype == TType::LST) {
  3246. $this->keys = array();
  3247. $_size177 = 0;
  3248. $_etype180 = 0;
  3249. $xfer += $input->readListBegin($_etype180, $_size177);
  3250. for ($_i181 = 0; $_i181 < $_size177; ++$_i181)
  3251. {
  3252. $elem182 = null;
  3253. $xfer += $input->readString($elem182);
  3254. $this->keys []= $elem182;
  3255. }
  3256. $xfer += $input->readListEnd();
  3257. } else {
  3258. $xfer += $input->skip($ftype);
  3259. }
  3260. break;
  3261. case 2:
  3262. if ($ftype == TType::STRUCT) {
  3263. $this->column_parent = new cassandra_ColumnParent();
  3264. $xfer += $this->column_parent->read($input);
  3265. } else {
  3266. $xfer += $input->skip($ftype);
  3267. }
  3268. break;
  3269. case 3:
  3270. if ($ftype == TType::STRUCT) {
  3271. $this->predicate = new cassandra_SlicePredicate();
  3272. $xfer += $this->predicate->read($input);
  3273. } else {
  3274. $xfer += $input->skip($ftype);
  3275. }
  3276. break;
  3277. case 4:
  3278. if ($ftype == TType::I32) {
  3279. $xfer += $input->readI32($this->consistency_level);
  3280. } else {
  3281. $xfer += $input->skip($ftype);
  3282. }
  3283. break;
  3284. default:
  3285. $xfer += $input->skip($ftype);
  3286. break;
  3287. }
  3288. $xfer += $input->readFieldEnd();
  3289. }
  3290. $xfer += $input->readStructEnd();
  3291. return $xfer;
  3292. }
  3293. public function write($output) {
  3294. $xfer = 0;
  3295. $xfer += $output->writeStructBegin('Cassandra_multiget_count_args');
  3296. if ($this->keys !== null) {
  3297. if (!is_array($this->keys)) {
  3298. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  3299. }
  3300. $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
  3301. {
  3302. $output->writeListBegin(TType::STRING, count($this->keys));
  3303. {
  3304. foreach ($this->keys as $iter183)
  3305. {
  3306. $xfer += $output->writeString($iter183);
  3307. }
  3308. }
  3309. $output->writeListEnd();
  3310. }
  3311. $xfer += $output->writeFieldEnd();
  3312. }
  3313. if ($this->column_parent !== null) {
  3314. if (!is_object($this->column_parent)) {
  3315. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  3316. }
  3317. $xfer += $output->writeFieldBegin('column_parent', TType::STRUCT, 2);
  3318. $xfer += $this->column_parent->write($output);
  3319. $xfer += $output->writeFieldEnd();
  3320. }
  3321. if ($this->predicate !== null) {
  3322. if (!is_object($this->predicate)) {
  3323. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  3324. }
  3325. $xfer += $output->writeFieldBegin('predicate', TType::STRUCT, 3);
  3326. $xfer += $this->predicate->write($output);
  3327. $xfer += $output->writeFieldEnd();
  3328. }
  3329. if ($this->consistency_level !== null) {
  3330. $xfer += $output->writeFieldBegin('consistency_level', TType::I32, 4);
  3331. $xfer += $output->writeI32($this->consistency_level);
  3332. $xfer += $output->writeFieldEnd();
  3333. }
  3334. $xfer += $output->writeFieldStop();
  3335. $xfer += $output->writeStructEnd();
  3336. return $xfer;
  3337. }
  3338. }
  3339. class cassandra_Cassandra_multiget_count_result {
  3340. static $_TSPEC;
  3341. public $success = null;
  3342. public $ire = null;
  3343. public $ue = null;
  3344. public $te = null;
  3345. public function __construct($vals=null) {
  3346. if (!isset(self::$_TSPEC)) {
  3347. self::$_TSPEC = array(
  3348. 0 => array(
  3349. 'var' => 'success',
  3350. 'type' => TType::MAP,
  3351. 'ktype' => TType::STRING,
  3352. 'vtype' => TType::I32,
  3353. 'key' => array(
  3354. 'type' => TType::STRING,
  3355. ),
  3356. 'val' => array(
  3357. 'type' => TType::I32,
  3358. ),
  3359. ),
  3360. 1 => array(
  3361. 'var' => 'ire',
  3362. 'type' => TType::STRUCT,
  3363. 'class' => 'cassandra_InvalidRequestException',
  3364. ),
  3365. 2 => array(
  3366. 'var' => 'ue',
  3367. 'type' => TType::STRUCT,
  3368. 'class' => 'cassandra_UnavailableException',
  3369. ),
  3370. 3 => array(
  3371. 'var' => 'te',
  3372. 'type' => TType::STRUCT,
  3373. 'class' => 'cassandra_TimedOutException',
  3374. ),
  3375. );
  3376. }
  3377. if (is_array($vals)) {
  3378. if (isset($vals['success'])) {
  3379. $this->success = $vals['success'];
  3380. }
  3381. if (isset($vals['ire'])) {
  3382. $this->ire = $vals['ire'];
  3383. }
  3384. if (isset($vals['ue'])) {
  3385. $this->ue = $vals['ue'];
  3386. }
  3387. if (isset($vals['te'])) {
  3388. $this->te = $vals['te'];
  3389. }
  3390. }
  3391. }
  3392. public function getName() {
  3393. return 'Cassandra_multiget_count_result';
  3394. }
  3395. public function read($input)
  3396. {
  3397. $xfer = 0;
  3398. $fname = null;
  3399. $ftype = 0;
  3400. $fid = 0;
  3401. $xfer += $input->readStructBegin($fname);
  3402. while (true)
  3403. {
  3404. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  3405. if ($ftype == TType::STOP) {
  3406. break;
  3407. }
  3408. switch ($fid)
  3409. {
  3410. case 0:
  3411. if ($ftype == TType::MAP) {
  3412. $this->success = array();
  3413. $_size184 = 0;
  3414. $_ktype185 = 0;
  3415. $_vtype186 = 0;
  3416. $xfer += $input->readMapBegin($_ktype185, $_vtype186, $_size184);
  3417. for ($_i188 = 0; $_i188 < $_size184; ++$_i188)
  3418. {
  3419. $key189 = '';
  3420. $val190 = 0;
  3421. $xfer += $input->readString($key189);
  3422. $xfer += $input->readI32($val190);
  3423. $this->success[$key189] = $val190;
  3424. }
  3425. $xfer += $input->readMapEnd();
  3426. } else {
  3427. $xfer += $input->skip($ftype);
  3428. }
  3429. break;
  3430. case 1:
  3431. if ($ftype == TType::STRUCT) {
  3432. $this->ire = new cassandra_InvalidRequestException();
  3433. $xfer += $this->ire->read($input);
  3434. } else {
  3435. $xfer += $input->skip($ftype);
  3436. }
  3437. break;
  3438. case 2:
  3439. if ($ftype == TType::STRUCT) {
  3440. $this->ue = new cassandra_UnavailableException();
  3441. $xfer += $this->ue->read($input);
  3442. } else {
  3443. $xfer += $input->skip($ftype);
  3444. }
  3445. break;
  3446. case 3:
  3447. if ($ftype == TType::STRUCT) {
  3448. $this->te = new cassandra_TimedOutException();
  3449. $xfer += $this->te->read($input);
  3450. } else {
  3451. $xfer += $input->skip($ftype);
  3452. }
  3453. break;
  3454. default:
  3455. $xfer += $input->skip($ftype);
  3456. break;
  3457. }
  3458. $xfer += $input->readFieldEnd();
  3459. }
  3460. $xfer += $input->readStructEnd();
  3461. return $xfer;
  3462. }
  3463. public function write($output) {
  3464. $xfer = 0;
  3465. $xfer += $output->writeStructBegin('Cassandra_multiget_count_result');
  3466. if ($this->success !== null) {
  3467. if (!is_array($this->success)) {
  3468. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  3469. }
  3470. $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
  3471. {
  3472. $output->writeMapBegin(TType::STRING, TType::I32, count($this->success));
  3473. {
  3474. foreach ($this->success as $kiter191 => $viter192)
  3475. {
  3476. $xfer += $output->writeString($kiter191);
  3477. $xfer += $output->writeI32($viter192);
  3478. }
  3479. }
  3480. $output->writeMapEnd();
  3481. }
  3482. $xfer += $output->writeFieldEnd();
  3483. }
  3484. if ($this->ire !== null) {
  3485. $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
  3486. $xfer += $this->ire->write($output);
  3487. $xfer += $output->writeFieldEnd();
  3488. }
  3489. if ($this->ue !== null) {
  3490. $xfer += $output->writeFieldBegin('ue', TType::STRUCT, 2);
  3491. $xfer += $this->ue->write($output);
  3492. $xfer += $output->writeFieldEnd();
  3493. }
  3494. if ($this->te !== null) {
  3495. $xfer += $output->writeFieldBegin('te', TType::STRUCT, 3);
  3496. $xfer += $this->te->write($output);
  3497. $xfer += $output->writeFieldEnd();
  3498. }
  3499. $xfer += $output->writeFieldStop();
  3500. $xfer += $output->writeStructEnd();
  3501. return $xfer;
  3502. }
  3503. }
  3504. class cassandra_Cassandra_get_range_slices_args {
  3505. static $_TSPEC;
  3506. public $column_parent = null;
  3507. public $predicate = null;
  3508. public $range = null;
  3509. public $consistency_level = 1;
  3510. public function __construct($vals=null) {
  3511. if (!isset(self::$_TSPEC)) {
  3512. self::$_TSPEC = array(
  3513. 1 => array(
  3514. 'var' => 'column_parent',
  3515. 'type' => TType::STRUCT,
  3516. 'class' => 'cassandra_ColumnParent',
  3517. ),
  3518. 2 => array(
  3519. 'var' => 'predicate',
  3520. 'type' => TType::STRUCT,
  3521. 'class' => 'cassandra_SlicePredicate',
  3522. ),
  3523. 3 => array(
  3524. 'var' => 'range',
  3525. 'type' => TType::STRUCT,
  3526. 'class' => 'cassandra_KeyRange',
  3527. ),
  3528. 4 => array(
  3529. 'var' => 'consistency_level',
  3530. 'type' => TType::I32,
  3531. ),
  3532. );
  3533. }
  3534. if (is_array($vals)) {
  3535. if (isset($vals['column_parent'])) {
  3536. $this->column_parent = $vals['column_parent'];
  3537. }
  3538. if (isset($vals['predicate'])) {
  3539. $this->predicate = $vals['predicate'];
  3540. }
  3541. if (isset($vals['range'])) {
  3542. $this->range = $vals['range'];
  3543. }
  3544. if (isset($vals['consistency_level'])) {
  3545. $this->consistency_level = $vals['consistency_level'];
  3546. }
  3547. }
  3548. }
  3549. public function getName() {
  3550. return 'Cassandra_get_range_slices_args';
  3551. }
  3552. public function read($input)
  3553. {
  3554. $xfer = 0;
  3555. $fname = null;
  3556. $ftype = 0;
  3557. $fid = 0;
  3558. $xfer += $input->readStructBegin($fname);
  3559. while (true)
  3560. {
  3561. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  3562. if ($ftype == TType::STOP) {
  3563. break;
  3564. }
  3565. switch ($fid)
  3566. {
  3567. case 1:
  3568. if ($ftype == TType::STRUCT) {
  3569. $this->column_parent = new cassandra_ColumnParent();
  3570. $xfer += $this->column_parent->read($input);
  3571. } else {
  3572. $xfer += $input->skip($ftype);
  3573. }
  3574. break;
  3575. case 2:
  3576. if ($ftype == TType::STRUCT) {
  3577. $this->predicate = new cassandra_SlicePredicate();
  3578. $xfer += $this->predicate->read($input);
  3579. } else {
  3580. $xfer += $input->skip($ftype);
  3581. }
  3582. break;
  3583. case 3:
  3584. if ($ftype == TType::STRUCT) {
  3585. $this->range = new cassandra_KeyRange();
  3586. $xfer += $this->range->read($input);
  3587. } else {
  3588. $xfer += $input->skip($ftype);
  3589. }
  3590. break;
  3591. case 4:
  3592. if ($ftype == TType::I32) {
  3593. $xfer += $input->readI32($this->consistency_level);
  3594. } else {
  3595. $xfer += $input->skip($ftype);
  3596. }
  3597. break;
  3598. default:
  3599. $xfer += $input->skip($ftype);
  3600. break;
  3601. }
  3602. $xfer += $input->readFieldEnd();
  3603. }
  3604. $xfer += $input->readStructEnd();
  3605. return $xfer;
  3606. }
  3607. public function write($output) {
  3608. $xfer = 0;
  3609. $xfer += $output->writeStructBegin('Cassandra_get_range_slices_args');
  3610. if ($this->column_parent !== null) {
  3611. if (!is_object($this->column_parent)) {
  3612. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  3613. }
  3614. $xfer += $output->writeFieldBegin('column_parent', TType::STRUCT, 1);
  3615. $xfer += $this->column_parent->write($output);
  3616. $xfer += $output->writeFieldEnd();
  3617. }
  3618. if ($this->predicate !== null) {
  3619. if (!is_object($this->predicate)) {
  3620. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  3621. }
  3622. $xfer += $output->writeFieldBegin('predicate', TType::STRUCT, 2);
  3623. $xfer += $this->predicate->write($output);
  3624. $xfer += $output->writeFieldEnd();
  3625. }
  3626. if ($this->range !== null) {
  3627. if (!is_object($this->range)) {
  3628. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  3629. }
  3630. $xfer += $output->writeFieldBegin('range', TType::STRUCT, 3);
  3631. $xfer += $this->range->write($output);
  3632. $xfer += $output->writeFieldEnd();
  3633. }
  3634. if ($this->consistency_level !== null) {
  3635. $xfer += $output->writeFieldBegin('consistency_level', TType::I32, 4);
  3636. $xfer += $output->writeI32($this->consistency_level);
  3637. $xfer += $output->writeFieldEnd();
  3638. }
  3639. $xfer += $output->writeFieldStop();
  3640. $xfer += $output->writeStructEnd();
  3641. return $xfer;
  3642. }
  3643. }
  3644. class cassandra_Cassandra_get_range_slices_result {
  3645. static $_TSPEC;
  3646. public $success = null;
  3647. public $ire = null;
  3648. public $ue = null;
  3649. public $te = null;
  3650. public function __construct($vals=null) {
  3651. if (!isset(self::$_TSPEC)) {
  3652. self::$_TSPEC = array(
  3653. 0 => array(
  3654. 'var' => 'success',
  3655. 'type' => TType::LST,
  3656. 'etype' => TType::STRUCT,
  3657. 'elem' => array(
  3658. 'type' => TType::STRUCT,
  3659. 'class' => 'cassandra_KeySlice',
  3660. ),
  3661. ),
  3662. 1 => array(
  3663. 'var' => 'ire',
  3664. 'type' => TType::STRUCT,
  3665. 'class' => 'cassandra_InvalidRequestException',
  3666. ),
  3667. 2 => array(
  3668. 'var' => 'ue',
  3669. 'type' => TType::STRUCT,
  3670. 'class' => 'cassandra_UnavailableException',
  3671. ),
  3672. 3 => array(
  3673. 'var' => 'te',
  3674. 'type' => TType::STRUCT,
  3675. 'class' => 'cassandra_TimedOutException',
  3676. ),
  3677. );
  3678. }
  3679. if (is_array($vals)) {
  3680. if (isset($vals['success'])) {
  3681. $this->success = $vals['success'];
  3682. }
  3683. if (isset($vals['ire'])) {
  3684. $this->ire = $vals['ire'];
  3685. }
  3686. if (isset($vals['ue'])) {
  3687. $this->ue = $vals['ue'];
  3688. }
  3689. if (isset($vals['te'])) {
  3690. $this->te = $vals['te'];
  3691. }
  3692. }
  3693. }
  3694. public function getName() {
  3695. return 'Cassandra_get_range_slices_result';
  3696. }
  3697. public function read($input)
  3698. {
  3699. $xfer = 0;
  3700. $fname = null;
  3701. $ftype = 0;
  3702. $fid = 0;
  3703. $xfer += $input->readStructBegin($fname);
  3704. while (true)
  3705. {
  3706. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  3707. if ($ftype == TType::STOP) {
  3708. break;
  3709. }
  3710. switch ($fid)
  3711. {
  3712. case 0:
  3713. if ($ftype == TType::LST) {
  3714. $this->success = array();
  3715. $_size193 = 0;
  3716. $_etype196 = 0;
  3717. $xfer += $input->readListBegin($_etype196, $_size193);
  3718. for ($_i197 = 0; $_i197 < $_size193; ++$_i197)
  3719. {
  3720. $elem198 = null;
  3721. $elem198 = new cassandra_KeySlice();
  3722. $xfer += $elem198->read($input);
  3723. $this->success []= $elem198;
  3724. }
  3725. $xfer += $input->readListEnd();
  3726. } else {
  3727. $xfer += $input->skip($ftype);
  3728. }
  3729. break;
  3730. case 1:
  3731. if ($ftype == TType::STRUCT) {
  3732. $this->ire = new cassandra_InvalidRequestException();
  3733. $xfer += $this->ire->read($input);
  3734. } else {
  3735. $xfer += $input->skip($ftype);
  3736. }
  3737. break;
  3738. case 2:
  3739. if ($ftype == TType::STRUCT) {
  3740. $this->ue = new cassandra_UnavailableException();
  3741. $xfer += $this->ue->read($input);
  3742. } else {
  3743. $xfer += $input->skip($ftype);
  3744. }
  3745. break;
  3746. case 3:
  3747. if ($ftype == TType::STRUCT) {
  3748. $this->te = new cassandra_TimedOutException();
  3749. $xfer += $this->te->read($input);
  3750. } else {
  3751. $xfer += $input->skip($ftype);
  3752. }
  3753. break;
  3754. default:
  3755. $xfer += $input->skip($ftype);
  3756. break;
  3757. }
  3758. $xfer += $input->readFieldEnd();
  3759. }
  3760. $xfer += $input->readStructEnd();
  3761. return $xfer;
  3762. }
  3763. public function write($output) {
  3764. $xfer = 0;
  3765. $xfer += $output->writeStructBegin('Cassandra_get_range_slices_result');
  3766. if ($this->success !== null) {
  3767. if (!is_array($this->success)) {
  3768. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  3769. }
  3770. $xfer += $output->writeFieldBegin('success', TType::LST, 0);
  3771. {
  3772. $output->writeListBegin(TType::STRUCT, count($this->success));
  3773. {
  3774. foreach ($this->success as $iter199)
  3775. {
  3776. $xfer += $iter199->write($output);
  3777. }
  3778. }
  3779. $output->writeListEnd();
  3780. }
  3781. $xfer += $output->writeFieldEnd();
  3782. }
  3783. if ($this->ire !== null) {
  3784. $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
  3785. $xfer += $this->ire->write($output);
  3786. $xfer += $output->writeFieldEnd();
  3787. }
  3788. if ($this->ue !== null) {
  3789. $xfer += $output->writeFieldBegin('ue', TType::STRUCT, 2);
  3790. $xfer += $this->ue->write($output);
  3791. $xfer += $output->writeFieldEnd();
  3792. }
  3793. if ($this->te !== null) {
  3794. $xfer += $output->writeFieldBegin('te', TType::STRUCT, 3);
  3795. $xfer += $this->te->write($output);
  3796. $xfer += $output->writeFieldEnd();
  3797. }
  3798. $xfer += $output->writeFieldStop();
  3799. $xfer += $output->writeStructEnd();
  3800. return $xfer;
  3801. }
  3802. }
  3803. class cassandra_Cassandra_get_indexed_slices_args {
  3804. static $_TSPEC;
  3805. public $column_parent = null;
  3806. public $index_clause = null;
  3807. public $column_predicate = null;
  3808. public $consistency_level = 1;
  3809. public function __construct($vals=null) {
  3810. if (!isset(self::$_TSPEC)) {
  3811. self::$_TSPEC = array(
  3812. 1 => array(
  3813. 'var' => 'column_parent',
  3814. 'type' => TType::STRUCT,
  3815. 'class' => 'cassandra_ColumnParent',
  3816. ),
  3817. 2 => array(
  3818. 'var' => 'index_clause',
  3819. 'type' => TType::STRUCT,
  3820. 'class' => 'cassandra_IndexClause',
  3821. ),
  3822. 3 => array(
  3823. 'var' => 'column_predicate',
  3824. 'type' => TType::STRUCT,
  3825. 'class' => 'cassandra_SlicePredicate',
  3826. ),
  3827. 4 => array(
  3828. 'var' => 'consistency_level',
  3829. 'type' => TType::I32,
  3830. ),
  3831. );
  3832. }
  3833. if (is_array($vals)) {
  3834. if (isset($vals['column_parent'])) {
  3835. $this->column_parent = $vals['column_parent'];
  3836. }
  3837. if (isset($vals['index_clause'])) {
  3838. $this->index_clause = $vals['index_clause'];
  3839. }
  3840. if (isset($vals['column_predicate'])) {
  3841. $this->column_predicate = $vals['column_predicate'];
  3842. }
  3843. if (isset($vals['consistency_level'])) {
  3844. $this->consistency_level = $vals['consistency_level'];
  3845. }
  3846. }
  3847. }
  3848. public function getName() {
  3849. return 'Cassandra_get_indexed_slices_args';
  3850. }
  3851. public function read($input)
  3852. {
  3853. $xfer = 0;
  3854. $fname = null;
  3855. $ftype = 0;
  3856. $fid = 0;
  3857. $xfer += $input->readStructBegin($fname);
  3858. while (true)
  3859. {
  3860. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  3861. if ($ftype == TType::STOP) {
  3862. break;
  3863. }
  3864. switch ($fid)
  3865. {
  3866. case 1:
  3867. if ($ftype == TType::STRUCT) {
  3868. $this->column_parent = new cassandra_ColumnParent();
  3869. $xfer += $this->column_parent->read($input);
  3870. } else {
  3871. $xfer += $input->skip($ftype);
  3872. }
  3873. break;
  3874. case 2:
  3875. if ($ftype == TType::STRUCT) {
  3876. $this->index_clause = new cassandra_IndexClause();
  3877. $xfer += $this->index_clause->read($input);
  3878. } else {
  3879. $xfer += $input->skip($ftype);
  3880. }
  3881. break;
  3882. case 3:
  3883. if ($ftype == TType::STRUCT) {
  3884. $this->column_predicate = new cassandra_SlicePredicate();
  3885. $xfer += $this->column_predicate->read($input);
  3886. } else {
  3887. $xfer += $input->skip($ftype);
  3888. }
  3889. break;
  3890. case 4:
  3891. if ($ftype == TType::I32) {
  3892. $xfer += $input->readI32($this->consistency_level);
  3893. } else {
  3894. $xfer += $input->skip($ftype);
  3895. }
  3896. break;
  3897. default:
  3898. $xfer += $input->skip($ftype);
  3899. break;
  3900. }
  3901. $xfer += $input->readFieldEnd();
  3902. }
  3903. $xfer += $input->readStructEnd();
  3904. return $xfer;
  3905. }
  3906. public function write($output) {
  3907. $xfer = 0;
  3908. $xfer += $output->writeStructBegin('Cassandra_get_indexed_slices_args');
  3909. if ($this->column_parent !== null) {
  3910. if (!is_object($this->column_parent)) {
  3911. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  3912. }
  3913. $xfer += $output->writeFieldBegin('column_parent', TType::STRUCT, 1);
  3914. $xfer += $this->column_parent->write($output);
  3915. $xfer += $output->writeFieldEnd();
  3916. }
  3917. if ($this->index_clause !== null) {
  3918. if (!is_object($this->index_clause)) {
  3919. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  3920. }
  3921. $xfer += $output->writeFieldBegin('index_clause', TType::STRUCT, 2);
  3922. $xfer += $this->index_clause->write($output);
  3923. $xfer += $output->writeFieldEnd();
  3924. }
  3925. if ($this->column_predicate !== null) {
  3926. if (!is_object($this->column_predicate)) {
  3927. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  3928. }
  3929. $xfer += $output->writeFieldBegin('column_predicate', TType::STRUCT, 3);
  3930. $xfer += $this->column_predicate->write($output);
  3931. $xfer += $output->writeFieldEnd();
  3932. }
  3933. if ($this->consistency_level !== null) {
  3934. $xfer += $output->writeFieldBegin('consistency_level', TType::I32, 4);
  3935. $xfer += $output->writeI32($this->consistency_level);
  3936. $xfer += $output->writeFieldEnd();
  3937. }
  3938. $xfer += $output->writeFieldStop();
  3939. $xfer += $output->writeStructEnd();
  3940. return $xfer;
  3941. }
  3942. }
  3943. class cassandra_Cassandra_get_indexed_slices_result {
  3944. static $_TSPEC;
  3945. public $success = null;
  3946. public $ire = null;
  3947. public $ue = null;
  3948. public $te = null;
  3949. public function __construct($vals=null) {
  3950. if (!isset(self::$_TSPEC)) {
  3951. self::$_TSPEC = array(
  3952. 0 => array(
  3953. 'var' => 'success',
  3954. 'type' => TType::LST,
  3955. 'etype' => TType::STRUCT,
  3956. 'elem' => array(
  3957. 'type' => TType::STRUCT,
  3958. 'class' => 'cassandra_KeySlice',
  3959. ),
  3960. ),
  3961. 1 => array(
  3962. 'var' => 'ire',
  3963. 'type' => TType::STRUCT,
  3964. 'class' => 'cassandra_InvalidRequestException',
  3965. ),
  3966. 2 => array(
  3967. 'var' => 'ue',
  3968. 'type' => TType::STRUCT,
  3969. 'class' => 'cassandra_UnavailableException',
  3970. ),
  3971. 3 => array(
  3972. 'var' => 'te',
  3973. 'type' => TType::STRUCT,
  3974. 'class' => 'cassandra_TimedOutException',
  3975. ),
  3976. );
  3977. }
  3978. if (is_array($vals)) {
  3979. if (isset($vals['success'])) {
  3980. $this->success = $vals['success'];
  3981. }
  3982. if (isset($vals['ire'])) {
  3983. $this->ire = $vals['ire'];
  3984. }
  3985. if (isset($vals['ue'])) {
  3986. $this->ue = $vals['ue'];
  3987. }
  3988. if (isset($vals['te'])) {
  3989. $this->te = $vals['te'];
  3990. }
  3991. }
  3992. }
  3993. public function getName() {
  3994. return 'Cassandra_get_indexed_slices_result';
  3995. }
  3996. public function read($input)
  3997. {
  3998. $xfer = 0;
  3999. $fname = null;
  4000. $ftype = 0;
  4001. $fid = 0;
  4002. $xfer += $input->readStructBegin($fname);
  4003. while (true)
  4004. {
  4005. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  4006. if ($ftype == TType::STOP) {
  4007. break;
  4008. }
  4009. switch ($fid)
  4010. {
  4011. case 0:
  4012. if ($ftype == TType::LST) {
  4013. $this->success = array();
  4014. $_size200 = 0;
  4015. $_etype203 = 0;
  4016. $xfer += $input->readListBegin($_etype203, $_size200);
  4017. for ($_i204 = 0; $_i204 < $_size200; ++$_i204)
  4018. {
  4019. $elem205 = null;
  4020. $elem205 = new cassandra_KeySlice();
  4021. $xfer += $elem205->read($input);
  4022. $this->success []= $elem205;
  4023. }
  4024. $xfer += $input->readListEnd();
  4025. } else {
  4026. $xfer += $input->skip($ftype);
  4027. }
  4028. break;
  4029. case 1:
  4030. if ($ftype == TType::STRUCT) {
  4031. $this->ire = new cassandra_InvalidRequestException();
  4032. $xfer += $this->ire->read($input);
  4033. } else {
  4034. $xfer += $input->skip($ftype);
  4035. }
  4036. break;
  4037. case 2:
  4038. if ($ftype == TType::STRUCT) {
  4039. $this->ue = new cassandra_UnavailableException();
  4040. $xfer += $this->ue->read($input);
  4041. } else {
  4042. $xfer += $input->skip($ftype);
  4043. }
  4044. break;
  4045. case 3:
  4046. if ($ftype == TType::STRUCT) {
  4047. $this->te = new cassandra_TimedOutException();
  4048. $xfer += $this->te->read($input);
  4049. } else {
  4050. $xfer += $input->skip($ftype);
  4051. }
  4052. break;
  4053. default:
  4054. $xfer += $input->skip($ftype);
  4055. break;
  4056. }
  4057. $xfer += $input->readFieldEnd();
  4058. }
  4059. $xfer += $input->readStructEnd();
  4060. return $xfer;
  4061. }
  4062. public function write($output) {
  4063. $xfer = 0;
  4064. $xfer += $output->writeStructBegin('Cassandra_get_indexed_slices_result');
  4065. if ($this->success !== null) {
  4066. if (!is_array($this->success)) {
  4067. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  4068. }
  4069. $xfer += $output->writeFieldBegin('success', TType::LST, 0);
  4070. {
  4071. $output->writeListBegin(TType::STRUCT, count($this->success));
  4072. {
  4073. foreach ($this->success as $iter206)
  4074. {
  4075. $xfer += $iter206->write($output);
  4076. }
  4077. }
  4078. $output->writeListEnd();
  4079. }
  4080. $xfer += $output->writeFieldEnd();
  4081. }
  4082. if ($this->ire !== null) {
  4083. $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
  4084. $xfer += $this->ire->write($output);
  4085. $xfer += $output->writeFieldEnd();
  4086. }
  4087. if ($this->ue !== null) {
  4088. $xfer += $output->writeFieldBegin('ue', TType::STRUCT, 2);
  4089. $xfer += $this->ue->write($output);
  4090. $xfer += $output->writeFieldEnd();
  4091. }
  4092. if ($this->te !== null) {
  4093. $xfer += $output->writeFieldBegin('te', TType::STRUCT, 3);
  4094. $xfer += $this->te->write($output);
  4095. $xfer += $output->writeFieldEnd();
  4096. }
  4097. $xfer += $output->writeFieldStop();
  4098. $xfer += $output->writeStructEnd();
  4099. return $xfer;
  4100. }
  4101. }
  4102. class cassandra_Cassandra_insert_args {
  4103. static $_TSPEC;
  4104. public $key = null;
  4105. public $column_parent = null;
  4106. public $column = null;
  4107. public $consistency_level = 1;
  4108. public function __construct($vals=null) {
  4109. if (!isset(self::$_TSPEC)) {
  4110. self::$_TSPEC = array(
  4111. 1 => array(
  4112. 'var' => 'key',
  4113. 'type' => TType::STRING,
  4114. ),
  4115. 2 => array(
  4116. 'var' => 'column_parent',
  4117. 'type' => TType::STRUCT,
  4118. 'class' => 'cassandra_ColumnParent',
  4119. ),
  4120. 3 => array(
  4121. 'var' => 'column',
  4122. 'type' => TType::STRUCT,
  4123. 'class' => 'cassandra_Column',
  4124. ),
  4125. 4 => array(
  4126. 'var' => 'consistency_level',
  4127. 'type' => TType::I32,
  4128. ),
  4129. );
  4130. }
  4131. if (is_array($vals)) {
  4132. if (isset($vals['key'])) {
  4133. $this->key = $vals['key'];
  4134. }
  4135. if (isset($vals['column_parent'])) {
  4136. $this->column_parent = $vals['column_parent'];
  4137. }
  4138. if (isset($vals['column'])) {
  4139. $this->column = $vals['column'];
  4140. }
  4141. if (isset($vals['consistency_level'])) {
  4142. $this->consistency_level = $vals['consistency_level'];
  4143. }
  4144. }
  4145. }
  4146. public function getName() {
  4147. return 'Cassandra_insert_args';
  4148. }
  4149. public function read($input)
  4150. {
  4151. $xfer = 0;
  4152. $fname = null;
  4153. $ftype = 0;
  4154. $fid = 0;
  4155. $xfer += $input->readStructBegin($fname);
  4156. while (true)
  4157. {
  4158. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  4159. if ($ftype == TType::STOP) {
  4160. break;
  4161. }
  4162. switch ($fid)
  4163. {
  4164. case 1:
  4165. if ($ftype == TType::STRING) {
  4166. $xfer += $input->readString($this->key);
  4167. } else {
  4168. $xfer += $input->skip($ftype);
  4169. }
  4170. break;
  4171. case 2:
  4172. if ($ftype == TType::STRUCT) {
  4173. $this->column_parent = new cassandra_ColumnParent();
  4174. $xfer += $this->column_parent->read($input);
  4175. } else {
  4176. $xfer += $input->skip($ftype);
  4177. }
  4178. break;
  4179. case 3:
  4180. if ($ftype == TType::STRUCT) {
  4181. $this->column = new cassandra_Column();
  4182. $xfer += $this->column->read($input);
  4183. } else {
  4184. $xfer += $input->skip($ftype);
  4185. }
  4186. break;
  4187. case 4:
  4188. if ($ftype == TType::I32) {
  4189. $xfer += $input->readI32($this->consistency_level);
  4190. } else {
  4191. $xfer += $input->skip($ftype);
  4192. }
  4193. break;
  4194. default:
  4195. $xfer += $input->skip($ftype);
  4196. break;
  4197. }
  4198. $xfer += $input->readFieldEnd();
  4199. }
  4200. $xfer += $input->readStructEnd();
  4201. return $xfer;
  4202. }
  4203. public function write($output) {
  4204. $xfer = 0;
  4205. $xfer += $output->writeStructBegin('Cassandra_insert_args');
  4206. if ($this->key !== null) {
  4207. $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
  4208. $xfer += $output->writeString($this->key);
  4209. $xfer += $output->writeFieldEnd();
  4210. }
  4211. if ($this->column_parent !== null) {
  4212. if (!is_object($this->column_parent)) {
  4213. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  4214. }
  4215. $xfer += $output->writeFieldBegin('column_parent', TType::STRUCT, 2);
  4216. $xfer += $this->column_parent->write($output);
  4217. $xfer += $output->writeFieldEnd();
  4218. }
  4219. if ($this->column !== null) {
  4220. if (!is_object($this->column)) {
  4221. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  4222. }
  4223. $xfer += $output->writeFieldBegin('column', TType::STRUCT, 3);
  4224. $xfer += $this->column->write($output);
  4225. $xfer += $output->writeFieldEnd();
  4226. }
  4227. if ($this->consistency_level !== null) {
  4228. $xfer += $output->writeFieldBegin('consistency_level', TType::I32, 4);
  4229. $xfer += $output->writeI32($this->consistency_level);
  4230. $xfer += $output->writeFieldEnd();
  4231. }
  4232. $xfer += $output->writeFieldStop();
  4233. $xfer += $output->writeStructEnd();
  4234. return $xfer;
  4235. }
  4236. }
  4237. class cassandra_Cassandra_insert_result {
  4238. static $_TSPEC;
  4239. public $ire = null;
  4240. public $ue = null;
  4241. public $te = null;
  4242. public function __construct($vals=null) {
  4243. if (!isset(self::$_TSPEC)) {
  4244. self::$_TSPEC = array(
  4245. 1 => array(
  4246. 'var' => 'ire',
  4247. 'type' => TType::STRUCT,
  4248. 'class' => 'cassandra_InvalidRequestException',
  4249. ),
  4250. 2 => array(
  4251. 'var' => 'ue',
  4252. 'type' => TType::STRUCT,
  4253. 'class' => 'cassandra_UnavailableException',
  4254. ),
  4255. 3 => array(
  4256. 'var' => 'te',
  4257. 'type' => TType::STRUCT,
  4258. 'class' => 'cassandra_TimedOutException',
  4259. ),
  4260. );
  4261. }
  4262. if (is_array($vals)) {
  4263. if (isset($vals['ire'])) {
  4264. $this->ire = $vals['ire'];
  4265. }
  4266. if (isset($vals['ue'])) {
  4267. $this->ue = $vals['ue'];
  4268. }
  4269. if (isset($vals['te'])) {
  4270. $this->te = $vals['te'];
  4271. }
  4272. }
  4273. }
  4274. public function getName() {
  4275. return 'Cassandra_insert_result';
  4276. }
  4277. public function read($input)
  4278. {
  4279. $xfer = 0;
  4280. $fname = null;
  4281. $ftype = 0;
  4282. $fid = 0;
  4283. $xfer += $input->readStructBegin($fname);
  4284. while (true)
  4285. {
  4286. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  4287. if ($ftype == TType::STOP) {
  4288. break;
  4289. }
  4290. switch ($fid)
  4291. {
  4292. case 1:
  4293. if ($ftype == TType::STRUCT) {
  4294. $this->ire = new cassandra_InvalidRequestException();
  4295. $xfer += $this->ire->read($input);
  4296. } else {
  4297. $xfer += $input->skip($ftype);
  4298. }
  4299. break;
  4300. case 2:
  4301. if ($ftype == TType::STRUCT) {
  4302. $this->ue = new cassandra_UnavailableException();
  4303. $xfer += $this->ue->read($input);
  4304. } else {
  4305. $xfer += $input->skip($ftype);
  4306. }
  4307. break;
  4308. case 3:
  4309. if ($ftype == TType::STRUCT) {
  4310. $this->te = new cassandra_TimedOutException();
  4311. $xfer += $this->te->read($input);
  4312. } else {
  4313. $xfer += $input->skip($ftype);
  4314. }
  4315. break;
  4316. default:
  4317. $xfer += $input->skip($ftype);
  4318. break;
  4319. }
  4320. $xfer += $input->readFieldEnd();
  4321. }
  4322. $xfer += $input->readStructEnd();
  4323. return $xfer;
  4324. }
  4325. public function write($output) {
  4326. $xfer = 0;
  4327. $xfer += $output->writeStructBegin('Cassandra_insert_result');
  4328. if ($this->ire !== null) {
  4329. $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
  4330. $xfer += $this->ire->write($output);
  4331. $xfer += $output->writeFieldEnd();
  4332. }
  4333. if ($this->ue !== null) {
  4334. $xfer += $output->writeFieldBegin('ue', TType::STRUCT, 2);
  4335. $xfer += $this->ue->write($output);
  4336. $xfer += $output->writeFieldEnd();
  4337. }
  4338. if ($this->te !== null) {
  4339. $xfer += $output->writeFieldBegin('te', TType::STRUCT, 3);
  4340. $xfer += $this->te->write($output);
  4341. $xfer += $output->writeFieldEnd();
  4342. }
  4343. $xfer += $output->writeFieldStop();
  4344. $xfer += $output->writeStructEnd();
  4345. return $xfer;
  4346. }
  4347. }
  4348. class cassandra_Cassandra_add_args {
  4349. static $_TSPEC;
  4350. public $key = null;
  4351. public $column_parent = null;
  4352. public $column = null;
  4353. public $consistency_level = 1;
  4354. public function __construct($vals=null) {
  4355. if (!isset(self::$_TSPEC)) {
  4356. self::$_TSPEC = array(
  4357. 1 => array(
  4358. 'var' => 'key',
  4359. 'type' => TType::STRING,
  4360. ),
  4361. 2 => array(
  4362. 'var' => 'column_parent',
  4363. 'type' => TType::STRUCT,
  4364. 'class' => 'cassandra_ColumnParent',
  4365. ),
  4366. 3 => array(
  4367. 'var' => 'column',
  4368. 'type' => TType::STRUCT,
  4369. 'class' => 'cassandra_CounterColumn',
  4370. ),
  4371. 4 => array(
  4372. 'var' => 'consistency_level',
  4373. 'type' => TType::I32,
  4374. ),
  4375. );
  4376. }
  4377. if (is_array($vals)) {
  4378. if (isset($vals['key'])) {
  4379. $this->key = $vals['key'];
  4380. }
  4381. if (isset($vals['column_parent'])) {
  4382. $this->column_parent = $vals['column_parent'];
  4383. }
  4384. if (isset($vals['column'])) {
  4385. $this->column = $vals['column'];
  4386. }
  4387. if (isset($vals['consistency_level'])) {
  4388. $this->consistency_level = $vals['consistency_level'];
  4389. }
  4390. }
  4391. }
  4392. public function getName() {
  4393. return 'Cassandra_add_args';
  4394. }
  4395. public function read($input)
  4396. {
  4397. $xfer = 0;
  4398. $fname = null;
  4399. $ftype = 0;
  4400. $fid = 0;
  4401. $xfer += $input->readStructBegin($fname);
  4402. while (true)
  4403. {
  4404. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  4405. if ($ftype == TType::STOP) {
  4406. break;
  4407. }
  4408. switch ($fid)
  4409. {
  4410. case 1:
  4411. if ($ftype == TType::STRING) {
  4412. $xfer += $input->readString($this->key);
  4413. } else {
  4414. $xfer += $input->skip($ftype);
  4415. }
  4416. break;
  4417. case 2:
  4418. if ($ftype == TType::STRUCT) {
  4419. $this->column_parent = new cassandra_ColumnParent();
  4420. $xfer += $this->column_parent->read($input);
  4421. } else {
  4422. $xfer += $input->skip($ftype);
  4423. }
  4424. break;
  4425. case 3:
  4426. if ($ftype == TType::STRUCT) {
  4427. $this->column = new cassandra_CounterColumn();
  4428. $xfer += $this->column->read($input);
  4429. } else {
  4430. $xfer += $input->skip($ftype);
  4431. }
  4432. break;
  4433. case 4:
  4434. if ($ftype == TType::I32) {
  4435. $xfer += $input->readI32($this->consistency_level);
  4436. } else {
  4437. $xfer += $input->skip($ftype);
  4438. }
  4439. break;
  4440. default:
  4441. $xfer += $input->skip($ftype);
  4442. break;
  4443. }
  4444. $xfer += $input->readFieldEnd();
  4445. }
  4446. $xfer += $input->readStructEnd();
  4447. return $xfer;
  4448. }
  4449. public function write($output) {
  4450. $xfer = 0;
  4451. $xfer += $output->writeStructBegin('Cassandra_add_args');
  4452. if ($this->key !== null) {
  4453. $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
  4454. $xfer += $output->writeString($this->key);
  4455. $xfer += $output->writeFieldEnd();
  4456. }
  4457. if ($this->column_parent !== null) {
  4458. if (!is_object($this->column_parent)) {
  4459. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  4460. }
  4461. $xfer += $output->writeFieldBegin('column_parent', TType::STRUCT, 2);
  4462. $xfer += $this->column_parent->write($output);
  4463. $xfer += $output->writeFieldEnd();
  4464. }
  4465. if ($this->column !== null) {
  4466. if (!is_object($this->column)) {
  4467. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  4468. }
  4469. $xfer += $output->writeFieldBegin('column', TType::STRUCT, 3);
  4470. $xfer += $this->column->write($output);
  4471. $xfer += $output->writeFieldEnd();
  4472. }
  4473. if ($this->consistency_level !== null) {
  4474. $xfer += $output->writeFieldBegin('consistency_level', TType::I32, 4);
  4475. $xfer += $output->writeI32($this->consistency_level);
  4476. $xfer += $output->writeFieldEnd();
  4477. }
  4478. $xfer += $output->writeFieldStop();
  4479. $xfer += $output->writeStructEnd();
  4480. return $xfer;
  4481. }
  4482. }
  4483. class cassandra_Cassandra_add_result {
  4484. static $_TSPEC;
  4485. public $ire = null;
  4486. public $ue = null;
  4487. public $te = null;
  4488. public function __construct($vals=null) {
  4489. if (!isset(self::$_TSPEC)) {
  4490. self::$_TSPEC = array(
  4491. 1 => array(
  4492. 'var' => 'ire',
  4493. 'type' => TType::STRUCT,
  4494. 'class' => 'cassandra_InvalidRequestException',
  4495. ),
  4496. 2 => array(
  4497. 'var' => 'ue',
  4498. 'type' => TType::STRUCT,
  4499. 'class' => 'cassandra_UnavailableException',
  4500. ),
  4501. 3 => array(
  4502. 'var' => 'te',
  4503. 'type' => TType::STRUCT,
  4504. 'class' => 'cassandra_TimedOutException',
  4505. ),
  4506. );
  4507. }
  4508. if (is_array($vals)) {
  4509. if (isset($vals['ire'])) {
  4510. $this->ire = $vals['ire'];
  4511. }
  4512. if (isset($vals['ue'])) {
  4513. $this->ue = $vals['ue'];
  4514. }
  4515. if (isset($vals['te'])) {
  4516. $this->te = $vals['te'];
  4517. }
  4518. }
  4519. }
  4520. public function getName() {
  4521. return 'Cassandra_add_result';
  4522. }
  4523. public function read($input)
  4524. {
  4525. $xfer = 0;
  4526. $fname = null;
  4527. $ftype = 0;
  4528. $fid = 0;
  4529. $xfer += $input->readStructBegin($fname);
  4530. while (true)
  4531. {
  4532. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  4533. if ($ftype == TType::STOP) {
  4534. break;
  4535. }
  4536. switch ($fid)
  4537. {
  4538. case 1:
  4539. if ($ftype == TType::STRUCT) {
  4540. $this->ire = new cassandra_InvalidRequestException();
  4541. $xfer += $this->ire->read($input);
  4542. } else {
  4543. $xfer += $input->skip($ftype);
  4544. }
  4545. break;
  4546. case 2:
  4547. if ($ftype == TType::STRUCT) {
  4548. $this->ue = new cassandra_UnavailableException();
  4549. $xfer += $this->ue->read($input);
  4550. } else {
  4551. $xfer += $input->skip($ftype);
  4552. }
  4553. break;
  4554. case 3:
  4555. if ($ftype == TType::STRUCT) {
  4556. $this->te = new cassandra_TimedOutException();
  4557. $xfer += $this->te->read($input);
  4558. } else {
  4559. $xfer += $input->skip($ftype);
  4560. }
  4561. break;
  4562. default:
  4563. $xfer += $input->skip($ftype);
  4564. break;
  4565. }
  4566. $xfer += $input->readFieldEnd();
  4567. }
  4568. $xfer += $input->readStructEnd();
  4569. return $xfer;
  4570. }
  4571. public function write($output) {
  4572. $xfer = 0;
  4573. $xfer += $output->writeStructBegin('Cassandra_add_result');
  4574. if ($this->ire !== null) {
  4575. $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
  4576. $xfer += $this->ire->write($output);
  4577. $xfer += $output->writeFieldEnd();
  4578. }
  4579. if ($this->ue !== null) {
  4580. $xfer += $output->writeFieldBegin('ue', TType::STRUCT, 2);
  4581. $xfer += $this->ue->write($output);
  4582. $xfer += $output->writeFieldEnd();
  4583. }
  4584. if ($this->te !== null) {
  4585. $xfer += $output->writeFieldBegin('te', TType::STRUCT, 3);
  4586. $xfer += $this->te->write($output);
  4587. $xfer += $output->writeFieldEnd();
  4588. }
  4589. $xfer += $output->writeFieldStop();
  4590. $xfer += $output->writeStructEnd();
  4591. return $xfer;
  4592. }
  4593. }
  4594. class cassandra_Cassandra_remove_args {
  4595. static $_TSPEC;
  4596. public $key = null;
  4597. public $column_path = null;
  4598. public $timestamp = null;
  4599. public $consistency_level = 1;
  4600. public function __construct($vals=null) {
  4601. if (!isset(self::$_TSPEC)) {
  4602. self::$_TSPEC = array(
  4603. 1 => array(
  4604. 'var' => 'key',
  4605. 'type' => TType::STRING,
  4606. ),
  4607. 2 => array(
  4608. 'var' => 'column_path',
  4609. 'type' => TType::STRUCT,
  4610. 'class' => 'cassandra_ColumnPath',
  4611. ),
  4612. 3 => array(
  4613. 'var' => 'timestamp',
  4614. 'type' => TType::I64,
  4615. ),
  4616. 4 => array(
  4617. 'var' => 'consistency_level',
  4618. 'type' => TType::I32,
  4619. ),
  4620. );
  4621. }
  4622. if (is_array($vals)) {
  4623. if (isset($vals['key'])) {
  4624. $this->key = $vals['key'];
  4625. }
  4626. if (isset($vals['column_path'])) {
  4627. $this->column_path = $vals['column_path'];
  4628. }
  4629. if (isset($vals['timestamp'])) {
  4630. $this->timestamp = $vals['timestamp'];
  4631. }
  4632. if (isset($vals['consistency_level'])) {
  4633. $this->consistency_level = $vals['consistency_level'];
  4634. }
  4635. }
  4636. }
  4637. public function getName() {
  4638. return 'Cassandra_remove_args';
  4639. }
  4640. public function read($input)
  4641. {
  4642. $xfer = 0;
  4643. $fname = null;
  4644. $ftype = 0;
  4645. $fid = 0;
  4646. $xfer += $input->readStructBegin($fname);
  4647. while (true)
  4648. {
  4649. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  4650. if ($ftype == TType::STOP) {
  4651. break;
  4652. }
  4653. switch ($fid)
  4654. {
  4655. case 1:
  4656. if ($ftype == TType::STRING) {
  4657. $xfer += $input->readString($this->key);
  4658. } else {
  4659. $xfer += $input->skip($ftype);
  4660. }
  4661. break;
  4662. case 2:
  4663. if ($ftype == TType::STRUCT) {
  4664. $this->column_path = new cassandra_ColumnPath();
  4665. $xfer += $this->column_path->read($input);
  4666. } else {
  4667. $xfer += $input->skip($ftype);
  4668. }
  4669. break;
  4670. case 3:
  4671. if ($ftype == TType::I64) {
  4672. $xfer += $input->readI64($this->timestamp);
  4673. } else {
  4674. $xfer += $input->skip($ftype);
  4675. }
  4676. break;
  4677. case 4:
  4678. if ($ftype == TType::I32) {
  4679. $xfer += $input->readI32($this->consistency_level);
  4680. } else {
  4681. $xfer += $input->skip($ftype);
  4682. }
  4683. break;
  4684. default:
  4685. $xfer += $input->skip($ftype);
  4686. break;
  4687. }
  4688. $xfer += $input->readFieldEnd();
  4689. }
  4690. $xfer += $input->readStructEnd();
  4691. return $xfer;
  4692. }
  4693. public function write($output) {
  4694. $xfer = 0;
  4695. $xfer += $output->writeStructBegin('Cassandra_remove_args');
  4696. if ($this->key !== null) {
  4697. $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
  4698. $xfer += $output->writeString($this->key);
  4699. $xfer += $output->writeFieldEnd();
  4700. }
  4701. if ($this->column_path !== null) {
  4702. if (!is_object($this->column_path)) {
  4703. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  4704. }
  4705. $xfer += $output->writeFieldBegin('column_path', TType::STRUCT, 2);
  4706. $xfer += $this->column_path->write($output);
  4707. $xfer += $output->writeFieldEnd();
  4708. }
  4709. if ($this->timestamp !== null) {
  4710. $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
  4711. $xfer += $output->writeI64($this->timestamp);
  4712. $xfer += $output->writeFieldEnd();
  4713. }
  4714. if ($this->consistency_level !== null) {
  4715. $xfer += $output->writeFieldBegin('consistency_level', TType::I32, 4);
  4716. $xfer += $output->writeI32($this->consistency_level);
  4717. $xfer += $output->writeFieldEnd();
  4718. }
  4719. $xfer += $output->writeFieldStop();
  4720. $xfer += $output->writeStructEnd();
  4721. return $xfer;
  4722. }
  4723. }
  4724. class cassandra_Cassandra_remove_result {
  4725. static $_TSPEC;
  4726. public $ire = null;
  4727. public $ue = null;
  4728. public $te = null;
  4729. public function __construct($vals=null) {
  4730. if (!isset(self::$_TSPEC)) {
  4731. self::$_TSPEC = array(
  4732. 1 => array(
  4733. 'var' => 'ire',
  4734. 'type' => TType::STRUCT,
  4735. 'class' => 'cassandra_InvalidRequestException',
  4736. ),
  4737. 2 => array(
  4738. 'var' => 'ue',
  4739. 'type' => TType::STRUCT,
  4740. 'class' => 'cassandra_UnavailableException',
  4741. ),
  4742. 3 => array(
  4743. 'var' => 'te',
  4744. 'type' => TType::STRUCT,
  4745. 'class' => 'cassandra_TimedOutException',
  4746. ),
  4747. );
  4748. }
  4749. if (is_array($vals)) {
  4750. if (isset($vals['ire'])) {
  4751. $this->ire = $vals['ire'];
  4752. }
  4753. if (isset($vals['ue'])) {
  4754. $this->ue = $vals['ue'];
  4755. }
  4756. if (isset($vals['te'])) {
  4757. $this->te = $vals['te'];
  4758. }
  4759. }
  4760. }
  4761. public function getName() {
  4762. return 'Cassandra_remove_result';
  4763. }
  4764. public function read($input)
  4765. {
  4766. $xfer = 0;
  4767. $fname = null;
  4768. $ftype = 0;
  4769. $fid = 0;
  4770. $xfer += $input->readStructBegin($fname);
  4771. while (true)
  4772. {
  4773. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  4774. if ($ftype == TType::STOP) {
  4775. break;
  4776. }
  4777. switch ($fid)
  4778. {
  4779. case 1:
  4780. if ($ftype == TType::STRUCT) {
  4781. $this->ire = new cassandra_InvalidRequestException();
  4782. $xfer += $this->ire->read($input);
  4783. } else {
  4784. $xfer += $input->skip($ftype);
  4785. }
  4786. break;
  4787. case 2:
  4788. if ($ftype == TType::STRUCT) {
  4789. $this->ue = new cassandra_UnavailableException();
  4790. $xfer += $this->ue->read($input);
  4791. } else {
  4792. $xfer += $input->skip($ftype);
  4793. }
  4794. break;
  4795. case 3:
  4796. if ($ftype == TType::STRUCT) {
  4797. $this->te = new cassandra_TimedOutException();
  4798. $xfer += $this->te->read($input);
  4799. } else {
  4800. $xfer += $input->skip($ftype);
  4801. }
  4802. break;
  4803. default:
  4804. $xfer += $input->skip($ftype);
  4805. break;
  4806. }
  4807. $xfer += $input->readFieldEnd();
  4808. }
  4809. $xfer += $input->readStructEnd();
  4810. return $xfer;
  4811. }
  4812. public function write($output) {
  4813. $xfer = 0;
  4814. $xfer += $output->writeStructBegin('Cassandra_remove_result');
  4815. if ($this->ire !== null) {
  4816. $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
  4817. $xfer += $this->ire->write($output);
  4818. $xfer += $output->writeFieldEnd();
  4819. }
  4820. if ($this->ue !== null) {
  4821. $xfer += $output->writeFieldBegin('ue', TType::STRUCT, 2);
  4822. $xfer += $this->ue->write($output);
  4823. $xfer += $output->writeFieldEnd();
  4824. }
  4825. if ($this->te !== null) {
  4826. $xfer += $output->writeFieldBegin('te', TType::STRUCT, 3);
  4827. $xfer += $this->te->write($output);
  4828. $xfer += $output->writeFieldEnd();
  4829. }
  4830. $xfer += $output->writeFieldStop();
  4831. $xfer += $output->writeStructEnd();
  4832. return $xfer;
  4833. }
  4834. }
  4835. class cassandra_Cassandra_remove_counter_args {
  4836. static $_TSPEC;
  4837. public $key = null;
  4838. public $path = null;
  4839. public $consistency_level = 1;
  4840. public function __construct($vals=null) {
  4841. if (!isset(self::$_TSPEC)) {
  4842. self::$_TSPEC = array(
  4843. 1 => array(
  4844. 'var' => 'key',
  4845. 'type' => TType::STRING,
  4846. ),
  4847. 2 => array(
  4848. 'var' => 'path',
  4849. 'type' => TType::STRUCT,
  4850. 'class' => 'cassandra_ColumnPath',
  4851. ),
  4852. 3 => array(
  4853. 'var' => 'consistency_level',
  4854. 'type' => TType::I32,
  4855. ),
  4856. );
  4857. }
  4858. if (is_array($vals)) {
  4859. if (isset($vals['key'])) {
  4860. $this->key = $vals['key'];
  4861. }
  4862. if (isset($vals['path'])) {
  4863. $this->path = $vals['path'];
  4864. }
  4865. if (isset($vals['consistency_level'])) {
  4866. $this->consistency_level = $vals['consistency_level'];
  4867. }
  4868. }
  4869. }
  4870. public function getName() {
  4871. return 'Cassandra_remove_counter_args';
  4872. }
  4873. public function read($input)
  4874. {
  4875. $xfer = 0;
  4876. $fname = null;
  4877. $ftype = 0;
  4878. $fid = 0;
  4879. $xfer += $input->readStructBegin($fname);
  4880. while (true)
  4881. {
  4882. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  4883. if ($ftype == TType::STOP) {
  4884. break;
  4885. }
  4886. switch ($fid)
  4887. {
  4888. case 1:
  4889. if ($ftype == TType::STRING) {
  4890. $xfer += $input->readString($this->key);
  4891. } else {
  4892. $xfer += $input->skip($ftype);
  4893. }
  4894. break;
  4895. case 2:
  4896. if ($ftype == TType::STRUCT) {
  4897. $this->path = new cassandra_ColumnPath();
  4898. $xfer += $this->path->read($input);
  4899. } else {
  4900. $xfer += $input->skip($ftype);
  4901. }
  4902. break;
  4903. case 3:
  4904. if ($ftype == TType::I32) {
  4905. $xfer += $input->readI32($this->consistency_level);
  4906. } else {
  4907. $xfer += $input->skip($ftype);
  4908. }
  4909. break;
  4910. default:
  4911. $xfer += $input->skip($ftype);
  4912. break;
  4913. }
  4914. $xfer += $input->readFieldEnd();
  4915. }
  4916. $xfer += $input->readStructEnd();
  4917. return $xfer;
  4918. }
  4919. public function write($output) {
  4920. $xfer = 0;
  4921. $xfer += $output->writeStructBegin('Cassandra_remove_counter_args');
  4922. if ($this->key !== null) {
  4923. $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
  4924. $xfer += $output->writeString($this->key);
  4925. $xfer += $output->writeFieldEnd();
  4926. }
  4927. if ($this->path !== null) {
  4928. if (!is_object($this->path)) {
  4929. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  4930. }
  4931. $xfer += $output->writeFieldBegin('path', TType::STRUCT, 2);
  4932. $xfer += $this->path->write($output);
  4933. $xfer += $output->writeFieldEnd();
  4934. }
  4935. if ($this->consistency_level !== null) {
  4936. $xfer += $output->writeFieldBegin('consistency_level', TType::I32, 3);
  4937. $xfer += $output->writeI32($this->consistency_level);
  4938. $xfer += $output->writeFieldEnd();
  4939. }
  4940. $xfer += $output->writeFieldStop();
  4941. $xfer += $output->writeStructEnd();
  4942. return $xfer;
  4943. }
  4944. }
  4945. class cassandra_Cassandra_remove_counter_result {
  4946. static $_TSPEC;
  4947. public $ire = null;
  4948. public $ue = null;
  4949. public $te = null;
  4950. public function __construct($vals=null) {
  4951. if (!isset(self::$_TSPEC)) {
  4952. self::$_TSPEC = array(
  4953. 1 => array(
  4954. 'var' => 'ire',
  4955. 'type' => TType::STRUCT,
  4956. 'class' => 'cassandra_InvalidRequestException',
  4957. ),
  4958. 2 => array(
  4959. 'var' => 'ue',
  4960. 'type' => TType::STRUCT,
  4961. 'class' => 'cassandra_UnavailableException',
  4962. ),
  4963. 3 => array(
  4964. 'var' => 'te',
  4965. 'type' => TType::STRUCT,
  4966. 'class' => 'cassandra_TimedOutException',
  4967. ),
  4968. );
  4969. }
  4970. if (is_array($vals)) {
  4971. if (isset($vals['ire'])) {
  4972. $this->ire = $vals['ire'];
  4973. }
  4974. if (isset($vals['ue'])) {
  4975. $this->ue = $vals['ue'];
  4976. }
  4977. if (isset($vals['te'])) {
  4978. $this->te = $vals['te'];
  4979. }
  4980. }
  4981. }
  4982. public function getName() {
  4983. return 'Cassandra_remove_counter_result';
  4984. }
  4985. public function read($input)
  4986. {
  4987. $xfer = 0;
  4988. $fname = null;
  4989. $ftype = 0;
  4990. $fid = 0;
  4991. $xfer += $input->readStructBegin($fname);
  4992. while (true)
  4993. {
  4994. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  4995. if ($ftype == TType::STOP) {
  4996. break;
  4997. }
  4998. switch ($fid)
  4999. {
  5000. case 1:
  5001. if ($ftype == TType::STRUCT) {
  5002. $this->ire = new cassandra_InvalidRequestException();
  5003. $xfer += $this->ire->read($input);
  5004. } else {
  5005. $xfer += $input->skip($ftype);
  5006. }
  5007. break;
  5008. case 2:
  5009. if ($ftype == TType::STRUCT) {
  5010. $this->ue = new cassandra_UnavailableException();
  5011. $xfer += $this->ue->read($input);
  5012. } else {
  5013. $xfer += $input->skip($ftype);
  5014. }
  5015. break;
  5016. case 3:
  5017. if ($ftype == TType::STRUCT) {
  5018. $this->te = new cassandra_TimedOutException();
  5019. $xfer += $this->te->read($input);
  5020. } else {
  5021. $xfer += $input->skip($ftype);
  5022. }
  5023. break;
  5024. default:
  5025. $xfer += $input->skip($ftype);
  5026. break;
  5027. }
  5028. $xfer += $input->readFieldEnd();
  5029. }
  5030. $xfer += $input->readStructEnd();
  5031. return $xfer;
  5032. }
  5033. public function write($output) {
  5034. $xfer = 0;
  5035. $xfer += $output->writeStructBegin('Cassandra_remove_counter_result');
  5036. if ($this->ire !== null) {
  5037. $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
  5038. $xfer += $this->ire->write($output);
  5039. $xfer += $output->writeFieldEnd();
  5040. }
  5041. if ($this->ue !== null) {
  5042. $xfer += $output->writeFieldBegin('ue', TType::STRUCT, 2);
  5043. $xfer += $this->ue->write($output);
  5044. $xfer += $output->writeFieldEnd();
  5045. }
  5046. if ($this->te !== null) {
  5047. $xfer += $output->writeFieldBegin('te', TType::STRUCT, 3);
  5048. $xfer += $this->te->write($output);
  5049. $xfer += $output->writeFieldEnd();
  5050. }
  5051. $xfer += $output->writeFieldStop();
  5052. $xfer += $output->writeStructEnd();
  5053. return $xfer;
  5054. }
  5055. }
  5056. class cassandra_Cassandra_batch_mutate_args {
  5057. static $_TSPEC;
  5058. public $mutation_map = null;
  5059. public $consistency_level = 1;
  5060. public function __construct($vals=null) {
  5061. if (!isset(self::$_TSPEC)) {
  5062. self::$_TSPEC = array(
  5063. 1 => array(
  5064. 'var' => 'mutation_map',
  5065. 'type' => TType::MAP,
  5066. 'ktype' => TType::STRING,
  5067. 'vtype' => TType::MAP,
  5068. 'key' => array(
  5069. 'type' => TType::STRING,
  5070. ),
  5071. 'val' => array(
  5072. 'type' => TType::MAP,
  5073. 'ktype' => TType::STRING,
  5074. 'vtype' => TType::LST,
  5075. 'key' => array(
  5076. 'type' => TType::STRING,
  5077. ),
  5078. 'val' => array(
  5079. 'type' => TType::LST,
  5080. 'etype' => TType::STRUCT,
  5081. 'elem' => array(
  5082. 'type' => TType::STRUCT,
  5083. 'class' => 'cassandra_Mutation',
  5084. ),
  5085. ),
  5086. ),
  5087. ),
  5088. 2 => array(
  5089. 'var' => 'consistency_level',
  5090. 'type' => TType::I32,
  5091. ),
  5092. );
  5093. }
  5094. if (is_array($vals)) {
  5095. if (isset($vals['mutation_map'])) {
  5096. $this->mutation_map = $vals['mutation_map'];
  5097. }
  5098. if (isset($vals['consistency_level'])) {
  5099. $this->consistency_level = $vals['consistency_level'];
  5100. }
  5101. }
  5102. }
  5103. public function getName() {
  5104. return 'Cassandra_batch_mutate_args';
  5105. }
  5106. public function read($input)
  5107. {
  5108. $xfer = 0;
  5109. $fname = null;
  5110. $ftype = 0;
  5111. $fid = 0;
  5112. $xfer += $input->readStructBegin($fname);
  5113. while (true)
  5114. {
  5115. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  5116. if ($ftype == TType::STOP) {
  5117. break;
  5118. }
  5119. switch ($fid)
  5120. {
  5121. case 1:
  5122. if ($ftype == TType::MAP) {
  5123. $this->mutation_map = array();
  5124. $_size207 = 0;
  5125. $_ktype208 = 0;
  5126. $_vtype209 = 0;
  5127. $xfer += $input->readMapBegin($_ktype208, $_vtype209, $_size207);
  5128. for ($_i211 = 0; $_i211 < $_size207; ++$_i211)
  5129. {
  5130. $key212 = '';
  5131. $val213 = array();
  5132. $xfer += $input->readString($key212);
  5133. $val213 = array();
  5134. $_size214 = 0;
  5135. $_ktype215 = 0;
  5136. $_vtype216 = 0;
  5137. $xfer += $input->readMapBegin($_ktype215, $_vtype216, $_size214);
  5138. for ($_i218 = 0; $_i218 < $_size214; ++$_i218)
  5139. {
  5140. $key219 = '';
  5141. $val220 = array();
  5142. $xfer += $input->readString($key219);
  5143. $val220 = array();
  5144. $_size221 = 0;
  5145. $_etype224 = 0;
  5146. $xfer += $input->readListBegin($_etype224, $_size221);
  5147. for ($_i225 = 0; $_i225 < $_size221; ++$_i225)
  5148. {
  5149. $elem226 = null;
  5150. $elem226 = new cassandra_Mutation();
  5151. $xfer += $elem226->read($input);
  5152. $val220 []= $elem226;
  5153. }
  5154. $xfer += $input->readListEnd();
  5155. $val213[$key219] = $val220;
  5156. }
  5157. $xfer += $input->readMapEnd();
  5158. $this->mutation_map[$key212] = $val213;
  5159. }
  5160. $xfer += $input->readMapEnd();
  5161. } else {
  5162. $xfer += $input->skip($ftype);
  5163. }
  5164. break;
  5165. case 2:
  5166. if ($ftype == TType::I32) {
  5167. $xfer += $input->readI32($this->consistency_level);
  5168. } else {
  5169. $xfer += $input->skip($ftype);
  5170. }
  5171. break;
  5172. default:
  5173. $xfer += $input->skip($ftype);
  5174. break;
  5175. }
  5176. $xfer += $input->readFieldEnd();
  5177. }
  5178. $xfer += $input->readStructEnd();
  5179. return $xfer;
  5180. }
  5181. public function write($output) {
  5182. $xfer = 0;
  5183. $xfer += $output->writeStructBegin('Cassandra_batch_mutate_args');
  5184. if ($this->mutation_map !== null) {
  5185. if (!is_array($this->mutation_map)) {
  5186. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  5187. }
  5188. $xfer += $output->writeFieldBegin('mutation_map', TType::MAP, 1);
  5189. {
  5190. $output->writeMapBegin(TType::STRING, TType::MAP, count($this->mutation_map));
  5191. {
  5192. foreach ($this->mutation_map as $kiter227 => $viter228)
  5193. {
  5194. $xfer += $output->writeString($kiter227);
  5195. {
  5196. $output->writeMapBegin(TType::STRING, TType::LST, count($viter228));
  5197. {
  5198. foreach ($viter228 as $kiter229 => $viter230)
  5199. {
  5200. $xfer += $output->writeString($kiter229);
  5201. {
  5202. $output->writeListBegin(TType::STRUCT, count($viter230));
  5203. {
  5204. foreach ($viter230 as $iter231)
  5205. {
  5206. $xfer += $iter231->write($output);
  5207. }
  5208. }
  5209. $output->writeListEnd();
  5210. }
  5211. }
  5212. }
  5213. $output->writeMapEnd();
  5214. }
  5215. }
  5216. }
  5217. $output->writeMapEnd();
  5218. }
  5219. $xfer += $output->writeFieldEnd();
  5220. }
  5221. if ($this->consistency_level !== null) {
  5222. $xfer += $output->writeFieldBegin('consistency_level', TType::I32, 2);
  5223. $xfer += $output->writeI32($this->consistency_level);
  5224. $xfer += $output->writeFieldEnd();
  5225. }
  5226. $xfer += $output->writeFieldStop();
  5227. $xfer += $output->writeStructEnd();
  5228. return $xfer;
  5229. }
  5230. }
  5231. class cassandra_Cassandra_batch_mutate_result {
  5232. static $_TSPEC;
  5233. public $ire = null;
  5234. public $ue = null;
  5235. public $te = null;
  5236. public function __construct($vals=null) {
  5237. if (!isset(self::$_TSPEC)) {
  5238. self::$_TSPEC = array(
  5239. 1 => array(
  5240. 'var' => 'ire',
  5241. 'type' => TType::STRUCT,
  5242. 'class' => 'cassandra_InvalidRequestException',
  5243. ),
  5244. 2 => array(
  5245. 'var' => 'ue',
  5246. 'type' => TType::STRUCT,
  5247. 'class' => 'cassandra_UnavailableException',
  5248. ),
  5249. 3 => array(
  5250. 'var' => 'te',
  5251. 'type' => TType::STRUCT,
  5252. 'class' => 'cassandra_TimedOutException',
  5253. ),
  5254. );
  5255. }
  5256. if (is_array($vals)) {
  5257. if (isset($vals['ire'])) {
  5258. $this->ire = $vals['ire'];
  5259. }
  5260. if (isset($vals['ue'])) {
  5261. $this->ue = $vals['ue'];
  5262. }
  5263. if (isset($vals['te'])) {
  5264. $this->te = $vals['te'];
  5265. }
  5266. }
  5267. }
  5268. public function getName() {
  5269. return 'Cassandra_batch_mutate_result';
  5270. }
  5271. public function read($input)
  5272. {
  5273. $xfer = 0;
  5274. $fname = null;
  5275. $ftype = 0;
  5276. $fid = 0;
  5277. $xfer += $input->readStructBegin($fname);
  5278. while (true)
  5279. {
  5280. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  5281. if ($ftype == TType::STOP) {
  5282. break;
  5283. }
  5284. switch ($fid)
  5285. {
  5286. case 1:
  5287. if ($ftype == TType::STRUCT) {
  5288. $this->ire = new cassandra_InvalidRequestException();
  5289. $xfer += $this->ire->read($input);
  5290. } else {
  5291. $xfer += $input->skip($ftype);
  5292. }
  5293. break;
  5294. case 2:
  5295. if ($ftype == TType::STRUCT) {
  5296. $this->ue = new cassandra_UnavailableException();
  5297. $xfer += $this->ue->read($input);
  5298. } else {
  5299. $xfer += $input->skip($ftype);
  5300. }
  5301. break;
  5302. case 3:
  5303. if ($ftype == TType::STRUCT) {
  5304. $this->te = new cassandra_TimedOutException();
  5305. $xfer += $this->te->read($input);
  5306. } else {
  5307. $xfer += $input->skip($ftype);
  5308. }
  5309. break;
  5310. default:
  5311. $xfer += $input->skip($ftype);
  5312. break;
  5313. }
  5314. $xfer += $input->readFieldEnd();
  5315. }
  5316. $xfer += $input->readStructEnd();
  5317. return $xfer;
  5318. }
  5319. public function write($output) {
  5320. $xfer = 0;
  5321. $xfer += $output->writeStructBegin('Cassandra_batch_mutate_result');
  5322. if ($this->ire !== null) {
  5323. $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
  5324. $xfer += $this->ire->write($output);
  5325. $xfer += $output->writeFieldEnd();
  5326. }
  5327. if ($this->ue !== null) {
  5328. $xfer += $output->writeFieldBegin('ue', TType::STRUCT, 2);
  5329. $xfer += $this->ue->write($output);
  5330. $xfer += $output->writeFieldEnd();
  5331. }
  5332. if ($this->te !== null) {
  5333. $xfer += $output->writeFieldBegin('te', TType::STRUCT, 3);
  5334. $xfer += $this->te->write($output);
  5335. $xfer += $output->writeFieldEnd();
  5336. }
  5337. $xfer += $output->writeFieldStop();
  5338. $xfer += $output->writeStructEnd();
  5339. return $xfer;
  5340. }
  5341. }
  5342. class cassandra_Cassandra_truncate_args {
  5343. static $_TSPEC;
  5344. public $cfname = null;
  5345. public function __construct($vals=null) {
  5346. if (!isset(self::$_TSPEC)) {
  5347. self::$_TSPEC = array(
  5348. 1 => array(
  5349. 'var' => 'cfname',
  5350. 'type' => TType::STRING,
  5351. ),
  5352. );
  5353. }
  5354. if (is_array($vals)) {
  5355. if (isset($vals['cfname'])) {
  5356. $this->cfname = $vals['cfname'];
  5357. }
  5358. }
  5359. }
  5360. public function getName() {
  5361. return 'Cassandra_truncate_args';
  5362. }
  5363. public function read($input)
  5364. {
  5365. $xfer = 0;
  5366. $fname = null;
  5367. $ftype = 0;
  5368. $fid = 0;
  5369. $xfer += $input->readStructBegin($fname);
  5370. while (true)
  5371. {
  5372. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  5373. if ($ftype == TType::STOP) {
  5374. break;
  5375. }
  5376. switch ($fid)
  5377. {
  5378. case 1:
  5379. if ($ftype == TType::STRING) {
  5380. $xfer += $input->readString($this->cfname);
  5381. } else {
  5382. $xfer += $input->skip($ftype);
  5383. }
  5384. break;
  5385. default:
  5386. $xfer += $input->skip($ftype);
  5387. break;
  5388. }
  5389. $xfer += $input->readFieldEnd();
  5390. }
  5391. $xfer += $input->readStructEnd();
  5392. return $xfer;
  5393. }
  5394. public function write($output) {
  5395. $xfer = 0;
  5396. $xfer += $output->writeStructBegin('Cassandra_truncate_args');
  5397. if ($this->cfname !== null) {
  5398. $xfer += $output->writeFieldBegin('cfname', TType::STRING, 1);
  5399. $xfer += $output->writeString($this->cfname);
  5400. $xfer += $output->writeFieldEnd();
  5401. }
  5402. $xfer += $output->writeFieldStop();
  5403. $xfer += $output->writeStructEnd();
  5404. return $xfer;
  5405. }
  5406. }
  5407. class cassandra_Cassandra_truncate_result {
  5408. static $_TSPEC;
  5409. public $ire = null;
  5410. public $ue = null;
  5411. public function __construct($vals=null) {
  5412. if (!isset(self::$_TSPEC)) {
  5413. self::$_TSPEC = array(
  5414. 1 => array(
  5415. 'var' => 'ire',
  5416. 'type' => TType::STRUCT,
  5417. 'class' => 'cassandra_InvalidRequestException',
  5418. ),
  5419. 2 => array(
  5420. 'var' => 'ue',
  5421. 'type' => TType::STRUCT,
  5422. 'class' => 'cassandra_UnavailableException',
  5423. ),
  5424. );
  5425. }
  5426. if (is_array($vals)) {
  5427. if (isset($vals['ire'])) {
  5428. $this->ire = $vals['ire'];
  5429. }
  5430. if (isset($vals['ue'])) {
  5431. $this->ue = $vals['ue'];
  5432. }
  5433. }
  5434. }
  5435. public function getName() {
  5436. return 'Cassandra_truncate_result';
  5437. }
  5438. public function read($input)
  5439. {
  5440. $xfer = 0;
  5441. $fname = null;
  5442. $ftype = 0;
  5443. $fid = 0;
  5444. $xfer += $input->readStructBegin($fname);
  5445. while (true)
  5446. {
  5447. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  5448. if ($ftype == TType::STOP) {
  5449. break;
  5450. }
  5451. switch ($fid)
  5452. {
  5453. case 1:
  5454. if ($ftype == TType::STRUCT) {
  5455. $this->ire = new cassandra_InvalidRequestException();
  5456. $xfer += $this->ire->read($input);
  5457. } else {
  5458. $xfer += $input->skip($ftype);
  5459. }
  5460. break;
  5461. case 2:
  5462. if ($ftype == TType::STRUCT) {
  5463. $this->ue = new cassandra_UnavailableException();
  5464. $xfer += $this->ue->read($input);
  5465. } else {
  5466. $xfer += $input->skip($ftype);
  5467. }
  5468. break;
  5469. default:
  5470. $xfer += $input->skip($ftype);
  5471. break;
  5472. }
  5473. $xfer += $input->readFieldEnd();
  5474. }
  5475. $xfer += $input->readStructEnd();
  5476. return $xfer;
  5477. }
  5478. public function write($output) {
  5479. $xfer = 0;
  5480. $xfer += $output->writeStructBegin('Cassandra_truncate_result');
  5481. if ($this->ire !== null) {
  5482. $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
  5483. $xfer += $this->ire->write($output);
  5484. $xfer += $output->writeFieldEnd();
  5485. }
  5486. if ($this->ue !== null) {
  5487. $xfer += $output->writeFieldBegin('ue', TType::STRUCT, 2);
  5488. $xfer += $this->ue->write($output);
  5489. $xfer += $output->writeFieldEnd();
  5490. }
  5491. $xfer += $output->writeFieldStop();
  5492. $xfer += $output->writeStructEnd();
  5493. return $xfer;
  5494. }
  5495. }
  5496. class cassandra_Cassandra_describe_schema_versions_args {
  5497. static $_TSPEC;
  5498. public function __construct() {
  5499. if (!isset(self::$_TSPEC)) {
  5500. self::$_TSPEC = array(
  5501. );
  5502. }
  5503. }
  5504. public function getName() {
  5505. return 'Cassandra_describe_schema_versions_args';
  5506. }
  5507. public function read($input)
  5508. {
  5509. $xfer = 0;
  5510. $fname = null;
  5511. $ftype = 0;
  5512. $fid = 0;
  5513. $xfer += $input->readStructBegin($fname);
  5514. while (true)
  5515. {
  5516. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  5517. if ($ftype == TType::STOP) {
  5518. break;
  5519. }
  5520. switch ($fid)
  5521. {
  5522. default:
  5523. $xfer += $input->skip($ftype);
  5524. break;
  5525. }
  5526. $xfer += $input->readFieldEnd();
  5527. }
  5528. $xfer += $input->readStructEnd();
  5529. return $xfer;
  5530. }
  5531. public function write($output) {
  5532. $xfer = 0;
  5533. $xfer += $output->writeStructBegin('Cassandra_describe_schema_versions_args');
  5534. $xfer += $output->writeFieldStop();
  5535. $xfer += $output->writeStructEnd();
  5536. return $xfer;
  5537. }
  5538. }
  5539. class cassandra_Cassandra_describe_schema_versions_result {
  5540. static $_TSPEC;
  5541. public $success = null;
  5542. public $ire = null;
  5543. public function __construct($vals=null) {
  5544. if (!isset(self::$_TSPEC)) {
  5545. self::$_TSPEC = array(
  5546. 0 => array(
  5547. 'var' => 'success',
  5548. 'type' => TType::MAP,
  5549. 'ktype' => TType::STRING,
  5550. 'vtype' => TType::LST,
  5551. 'key' => array(
  5552. 'type' => TType::STRING,
  5553. ),
  5554. 'val' => array(
  5555. 'type' => TType::LST,
  5556. 'etype' => TType::STRING,
  5557. 'elem' => array(
  5558. 'type' => TType::STRING,
  5559. ),
  5560. ),
  5561. ),
  5562. 1 => array(
  5563. 'var' => 'ire',
  5564. 'type' => TType::STRUCT,
  5565. 'class' => 'cassandra_InvalidRequestException',
  5566. ),
  5567. );
  5568. }
  5569. if (is_array($vals)) {
  5570. if (isset($vals['success'])) {
  5571. $this->success = $vals['success'];
  5572. }
  5573. if (isset($vals['ire'])) {
  5574. $this->ire = $vals['ire'];
  5575. }
  5576. }
  5577. }
  5578. public function getName() {
  5579. return 'Cassandra_describe_schema_versions_result';
  5580. }
  5581. public function read($input)
  5582. {
  5583. $xfer = 0;
  5584. $fname = null;
  5585. $ftype = 0;
  5586. $fid = 0;
  5587. $xfer += $input->readStructBegin($fname);
  5588. while (true)
  5589. {
  5590. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  5591. if ($ftype == TType::STOP) {
  5592. break;
  5593. }
  5594. switch ($fid)
  5595. {
  5596. case 0:
  5597. if ($ftype == TType::MAP) {
  5598. $this->success = array();
  5599. $_size232 = 0;
  5600. $_ktype233 = 0;
  5601. $_vtype234 = 0;
  5602. $xfer += $input->readMapBegin($_ktype233, $_vtype234, $_size232);
  5603. for ($_i236 = 0; $_i236 < $_size232; ++$_i236)
  5604. {
  5605. $key237 = '';
  5606. $val238 = array();
  5607. $xfer += $input->readString($key237);
  5608. $val238 = array();
  5609. $_size239 = 0;
  5610. $_etype242 = 0;
  5611. $xfer += $input->readListBegin($_etype242, $_size239);
  5612. for ($_i243 = 0; $_i243 < $_size239; ++$_i243)
  5613. {
  5614. $elem244 = null;
  5615. $xfer += $input->readString($elem244);
  5616. $val238 []= $elem244;
  5617. }
  5618. $xfer += $input->readListEnd();
  5619. $this->success[$key237] = $val238;
  5620. }
  5621. $xfer += $input->readMapEnd();
  5622. } else {
  5623. $xfer += $input->skip($ftype);
  5624. }
  5625. break;
  5626. case 1:
  5627. if ($ftype == TType::STRUCT) {
  5628. $this->ire = new cassandra_InvalidRequestException();
  5629. $xfer += $this->ire->read($input);
  5630. } else {
  5631. $xfer += $input->skip($ftype);
  5632. }
  5633. break;
  5634. default:
  5635. $xfer += $input->skip($ftype);
  5636. break;
  5637. }
  5638. $xfer += $input->readFieldEnd();
  5639. }
  5640. $xfer += $input->readStructEnd();
  5641. return $xfer;
  5642. }
  5643. public function write($output) {
  5644. $xfer = 0;
  5645. $xfer += $output->writeStructBegin('Cassandra_describe_schema_versions_result');
  5646. if ($this->success !== null) {
  5647. if (!is_array($this->success)) {
  5648. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  5649. }
  5650. $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
  5651. {
  5652. $output->writeMapBegin(TType::STRING, TType::LST, count($this->success));
  5653. {
  5654. foreach ($this->success as $kiter245 => $viter246)
  5655. {
  5656. $xfer += $output->writeString($kiter245);
  5657. {
  5658. $output->writeListBegin(TType::STRING, count($viter246));
  5659. {
  5660. foreach ($viter246 as $iter247)
  5661. {
  5662. $xfer += $output->writeString($iter247);
  5663. }
  5664. }
  5665. $output->writeListEnd();
  5666. }
  5667. }
  5668. }
  5669. $output->writeMapEnd();
  5670. }
  5671. $xfer += $output->writeFieldEnd();
  5672. }
  5673. if ($this->ire !== null) {
  5674. $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
  5675. $xfer += $this->ire->write($output);
  5676. $xfer += $output->writeFieldEnd();
  5677. }
  5678. $xfer += $output->writeFieldStop();
  5679. $xfer += $output->writeStructEnd();
  5680. return $xfer;
  5681. }
  5682. }
  5683. class cassandra_Cassandra_describe_keyspaces_args {
  5684. static $_TSPEC;
  5685. public function __construct() {
  5686. if (!isset(self::$_TSPEC)) {
  5687. self::$_TSPEC = array(
  5688. );
  5689. }
  5690. }
  5691. public function getName() {
  5692. return 'Cassandra_describe_keyspaces_args';
  5693. }
  5694. public function read($input)
  5695. {
  5696. $xfer = 0;
  5697. $fname = null;
  5698. $ftype = 0;
  5699. $fid = 0;
  5700. $xfer += $input->readStructBegin($fname);
  5701. while (true)
  5702. {
  5703. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  5704. if ($ftype == TType::STOP) {
  5705. break;
  5706. }
  5707. switch ($fid)
  5708. {
  5709. default:
  5710. $xfer += $input->skip($ftype);
  5711. break;
  5712. }
  5713. $xfer += $input->readFieldEnd();
  5714. }
  5715. $xfer += $input->readStructEnd();
  5716. return $xfer;
  5717. }
  5718. public function write($output) {
  5719. $xfer = 0;
  5720. $xfer += $output->writeStructBegin('Cassandra_describe_keyspaces_args');
  5721. $xfer += $output->writeFieldStop();
  5722. $xfer += $output->writeStructEnd();
  5723. return $xfer;
  5724. }
  5725. }
  5726. class cassandra_Cassandra_describe_keyspaces_result {
  5727. static $_TSPEC;
  5728. public $success = null;
  5729. public $ire = null;
  5730. public function __construct($vals=null) {
  5731. if (!isset(self::$_TSPEC)) {
  5732. self::$_TSPEC = array(
  5733. 0 => array(
  5734. 'var' => 'success',
  5735. 'type' => TType::LST,
  5736. 'etype' => TType::STRUCT,
  5737. 'elem' => array(
  5738. 'type' => TType::STRUCT,
  5739. 'class' => 'cassandra_KsDef',
  5740. ),
  5741. ),
  5742. 1 => array(
  5743. 'var' => 'ire',
  5744. 'type' => TType::STRUCT,
  5745. 'class' => 'cassandra_InvalidRequestException',
  5746. ),
  5747. );
  5748. }
  5749. if (is_array($vals)) {
  5750. if (isset($vals['success'])) {
  5751. $this->success = $vals['success'];
  5752. }
  5753. if (isset($vals['ire'])) {
  5754. $this->ire = $vals['ire'];
  5755. }
  5756. }
  5757. }
  5758. public function getName() {
  5759. return 'Cassandra_describe_keyspaces_result';
  5760. }
  5761. public function read($input)
  5762. {
  5763. $xfer = 0;
  5764. $fname = null;
  5765. $ftype = 0;
  5766. $fid = 0;
  5767. $xfer += $input->readStructBegin($fname);
  5768. while (true)
  5769. {
  5770. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  5771. if ($ftype == TType::STOP) {
  5772. break;
  5773. }
  5774. switch ($fid)
  5775. {
  5776. case 0:
  5777. if ($ftype == TType::LST) {
  5778. $this->success = array();
  5779. $_size248 = 0;
  5780. $_etype251 = 0;
  5781. $xfer += $input->readListBegin($_etype251, $_size248);
  5782. for ($_i252 = 0; $_i252 < $_size248; ++$_i252)
  5783. {
  5784. $elem253 = null;
  5785. $elem253 = new cassandra_KsDef();
  5786. $xfer += $elem253->read($input);
  5787. $this->success []= $elem253;
  5788. }
  5789. $xfer += $input->readListEnd();
  5790. } else {
  5791. $xfer += $input->skip($ftype);
  5792. }
  5793. break;
  5794. case 1:
  5795. if ($ftype == TType::STRUCT) {
  5796. $this->ire = new cassandra_InvalidRequestException();
  5797. $xfer += $this->ire->read($input);
  5798. } else {
  5799. $xfer += $input->skip($ftype);
  5800. }
  5801. break;
  5802. default:
  5803. $xfer += $input->skip($ftype);
  5804. break;
  5805. }
  5806. $xfer += $input->readFieldEnd();
  5807. }
  5808. $xfer += $input->readStructEnd();
  5809. return $xfer;
  5810. }
  5811. public function write($output) {
  5812. $xfer = 0;
  5813. $xfer += $output->writeStructBegin('Cassandra_describe_keyspaces_result');
  5814. if ($this->success !== null) {
  5815. if (!is_array($this->success)) {
  5816. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  5817. }
  5818. $xfer += $output->writeFieldBegin('success', TType::LST, 0);
  5819. {
  5820. $output->writeListBegin(TType::STRUCT, count($this->success));
  5821. {
  5822. foreach ($this->success as $iter254)
  5823. {
  5824. $xfer += $iter254->write($output);
  5825. }
  5826. }
  5827. $output->writeListEnd();
  5828. }
  5829. $xfer += $output->writeFieldEnd();
  5830. }
  5831. if ($this->ire !== null) {
  5832. $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
  5833. $xfer += $this->ire->write($output);
  5834. $xfer += $output->writeFieldEnd();
  5835. }
  5836. $xfer += $output->writeFieldStop();
  5837. $xfer += $output->writeStructEnd();
  5838. return $xfer;
  5839. }
  5840. }
  5841. class cassandra_Cassandra_describe_cluster_name_args {
  5842. static $_TSPEC;
  5843. public function __construct() {
  5844. if (!isset(self::$_TSPEC)) {
  5845. self::$_TSPEC = array(
  5846. );
  5847. }
  5848. }
  5849. public function getName() {
  5850. return 'Cassandra_describe_cluster_name_args';
  5851. }
  5852. public function read($input)
  5853. {
  5854. $xfer = 0;
  5855. $fname = null;
  5856. $ftype = 0;
  5857. $fid = 0;
  5858. $xfer += $input->readStructBegin($fname);
  5859. while (true)
  5860. {
  5861. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  5862. if ($ftype == TType::STOP) {
  5863. break;
  5864. }
  5865. switch ($fid)
  5866. {
  5867. default:
  5868. $xfer += $input->skip($ftype);
  5869. break;
  5870. }
  5871. $xfer += $input->readFieldEnd();
  5872. }
  5873. $xfer += $input->readStructEnd();
  5874. return $xfer;
  5875. }
  5876. public function write($output) {
  5877. $xfer = 0;
  5878. $xfer += $output->writeStructBegin('Cassandra_describe_cluster_name_args');
  5879. $xfer += $output->writeFieldStop();
  5880. $xfer += $output->writeStructEnd();
  5881. return $xfer;
  5882. }
  5883. }
  5884. class cassandra_Cassandra_describe_cluster_name_result {
  5885. static $_TSPEC;
  5886. public $success = null;
  5887. public function __construct($vals=null) {
  5888. if (!isset(self::$_TSPEC)) {
  5889. self::$_TSPEC = array(
  5890. 0 => array(
  5891. 'var' => 'success',
  5892. 'type' => TType::STRING,
  5893. ),
  5894. );
  5895. }
  5896. if (is_array($vals)) {
  5897. if (isset($vals['success'])) {
  5898. $this->success = $vals['success'];
  5899. }
  5900. }
  5901. }
  5902. public function getName() {
  5903. return 'Cassandra_describe_cluster_name_result';
  5904. }
  5905. public function read($input)
  5906. {
  5907. $xfer = 0;
  5908. $fname = null;
  5909. $ftype = 0;
  5910. $fid = 0;
  5911. $xfer += $input->readStructBegin($fname);
  5912. while (true)
  5913. {
  5914. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  5915. if ($ftype == TType::STOP) {
  5916. break;
  5917. }
  5918. switch ($fid)
  5919. {
  5920. case 0:
  5921. if ($ftype == TType::STRING) {
  5922. $xfer += $input->readString($this->success);
  5923. } else {
  5924. $xfer += $input->skip($ftype);
  5925. }
  5926. break;
  5927. default:
  5928. $xfer += $input->skip($ftype);
  5929. break;
  5930. }
  5931. $xfer += $input->readFieldEnd();
  5932. }
  5933. $xfer += $input->readStructEnd();
  5934. return $xfer;
  5935. }
  5936. public function write($output) {
  5937. $xfer = 0;
  5938. $xfer += $output->writeStructBegin('Cassandra_describe_cluster_name_result');
  5939. if ($this->success !== null) {
  5940. $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
  5941. $xfer += $output->writeString($this->success);
  5942. $xfer += $output->writeFieldEnd();
  5943. }
  5944. $xfer += $output->writeFieldStop();
  5945. $xfer += $output->writeStructEnd();
  5946. return $xfer;
  5947. }
  5948. }
  5949. class cassandra_Cassandra_describe_version_args {
  5950. static $_TSPEC;
  5951. public function __construct() {
  5952. if (!isset(self::$_TSPEC)) {
  5953. self::$_TSPEC = array(
  5954. );
  5955. }
  5956. }
  5957. public function getName() {
  5958. return 'Cassandra_describe_version_args';
  5959. }
  5960. public function read($input)
  5961. {
  5962. $xfer = 0;
  5963. $fname = null;
  5964. $ftype = 0;
  5965. $fid = 0;
  5966. $xfer += $input->readStructBegin($fname);
  5967. while (true)
  5968. {
  5969. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  5970. if ($ftype == TType::STOP) {
  5971. break;
  5972. }
  5973. switch ($fid)
  5974. {
  5975. default:
  5976. $xfer += $input->skip($ftype);
  5977. break;
  5978. }
  5979. $xfer += $input->readFieldEnd();
  5980. }
  5981. $xfer += $input->readStructEnd();
  5982. return $xfer;
  5983. }
  5984. public function write($output) {
  5985. $xfer = 0;
  5986. $xfer += $output->writeStructBegin('Cassandra_describe_version_args');
  5987. $xfer += $output->writeFieldStop();
  5988. $xfer += $output->writeStructEnd();
  5989. return $xfer;
  5990. }
  5991. }
  5992. class cassandra_Cassandra_describe_version_result {
  5993. static $_TSPEC;
  5994. public $success = null;
  5995. public function __construct($vals=null) {
  5996. if (!isset(self::$_TSPEC)) {
  5997. self::$_TSPEC = array(
  5998. 0 => array(
  5999. 'var' => 'success',
  6000. 'type' => TType::STRING,
  6001. ),
  6002. );
  6003. }
  6004. if (is_array($vals)) {
  6005. if (isset($vals['success'])) {
  6006. $this->success = $vals['success'];
  6007. }
  6008. }
  6009. }
  6010. public function getName() {
  6011. return 'Cassandra_describe_version_result';
  6012. }
  6013. public function read($input)
  6014. {
  6015. $xfer = 0;
  6016. $fname = null;
  6017. $ftype = 0;
  6018. $fid = 0;
  6019. $xfer += $input->readStructBegin($fname);
  6020. while (true)
  6021. {
  6022. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  6023. if ($ftype == TType::STOP) {
  6024. break;
  6025. }
  6026. switch ($fid)
  6027. {
  6028. case 0:
  6029. if ($ftype == TType::STRING) {
  6030. $xfer += $input->readString($this->success);
  6031. } else {
  6032. $xfer += $input->skip($ftype);
  6033. }
  6034. break;
  6035. default:
  6036. $xfer += $input->skip($ftype);
  6037. break;
  6038. }
  6039. $xfer += $input->readFieldEnd();
  6040. }
  6041. $xfer += $input->readStructEnd();
  6042. return $xfer;
  6043. }
  6044. public function write($output) {
  6045. $xfer = 0;
  6046. $xfer += $output->writeStructBegin('Cassandra_describe_version_result');
  6047. if ($this->success !== null) {
  6048. $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
  6049. $xfer += $output->writeString($this->success);
  6050. $xfer += $output->writeFieldEnd();
  6051. }
  6052. $xfer += $output->writeFieldStop();
  6053. $xfer += $output->writeStructEnd();
  6054. return $xfer;
  6055. }
  6056. }
  6057. class cassandra_Cassandra_describe_ring_args {
  6058. static $_TSPEC;
  6059. public $keyspace = null;
  6060. public function __construct($vals=null) {
  6061. if (!isset(self::$_TSPEC)) {
  6062. self::$_TSPEC = array(
  6063. 1 => array(
  6064. 'var' => 'keyspace',
  6065. 'type' => TType::STRING,
  6066. ),
  6067. );
  6068. }
  6069. if (is_array($vals)) {
  6070. if (isset($vals['keyspace'])) {
  6071. $this->keyspace = $vals['keyspace'];
  6072. }
  6073. }
  6074. }
  6075. public function getName() {
  6076. return 'Cassandra_describe_ring_args';
  6077. }
  6078. public function read($input)
  6079. {
  6080. $xfer = 0;
  6081. $fname = null;
  6082. $ftype = 0;
  6083. $fid = 0;
  6084. $xfer += $input->readStructBegin($fname);
  6085. while (true)
  6086. {
  6087. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  6088. if ($ftype == TType::STOP) {
  6089. break;
  6090. }
  6091. switch ($fid)
  6092. {
  6093. case 1:
  6094. if ($ftype == TType::STRING) {
  6095. $xfer += $input->readString($this->keyspace);
  6096. } else {
  6097. $xfer += $input->skip($ftype);
  6098. }
  6099. break;
  6100. default:
  6101. $xfer += $input->skip($ftype);
  6102. break;
  6103. }
  6104. $xfer += $input->readFieldEnd();
  6105. }
  6106. $xfer += $input->readStructEnd();
  6107. return $xfer;
  6108. }
  6109. public function write($output) {
  6110. $xfer = 0;
  6111. $xfer += $output->writeStructBegin('Cassandra_describe_ring_args');
  6112. if ($this->keyspace !== null) {
  6113. $xfer += $output->writeFieldBegin('keyspace', TType::STRING, 1);
  6114. $xfer += $output->writeString($this->keyspace);
  6115. $xfer += $output->writeFieldEnd();
  6116. }
  6117. $xfer += $output->writeFieldStop();
  6118. $xfer += $output->writeStructEnd();
  6119. return $xfer;
  6120. }
  6121. }
  6122. class cassandra_Cassandra_describe_ring_result {
  6123. static $_TSPEC;
  6124. public $success = null;
  6125. public $ire = null;
  6126. public function __construct($vals=null) {
  6127. if (!isset(self::$_TSPEC)) {
  6128. self::$_TSPEC = array(
  6129. 0 => array(
  6130. 'var' => 'success',
  6131. 'type' => TType::LST,
  6132. 'etype' => TType::STRUCT,
  6133. 'elem' => array(
  6134. 'type' => TType::STRUCT,
  6135. 'class' => 'cassandra_TokenRange',
  6136. ),
  6137. ),
  6138. 1 => array(
  6139. 'var' => 'ire',
  6140. 'type' => TType::STRUCT,
  6141. 'class' => 'cassandra_InvalidRequestException',
  6142. ),
  6143. );
  6144. }
  6145. if (is_array($vals)) {
  6146. if (isset($vals['success'])) {
  6147. $this->success = $vals['success'];
  6148. }
  6149. if (isset($vals['ire'])) {
  6150. $this->ire = $vals['ire'];
  6151. }
  6152. }
  6153. }
  6154. public function getName() {
  6155. return 'Cassandra_describe_ring_result';
  6156. }
  6157. public function read($input)
  6158. {
  6159. $xfer = 0;
  6160. $fname = null;
  6161. $ftype = 0;
  6162. $fid = 0;
  6163. $xfer += $input->readStructBegin($fname);
  6164. while (true)
  6165. {
  6166. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  6167. if ($ftype == TType::STOP) {
  6168. break;
  6169. }
  6170. switch ($fid)
  6171. {
  6172. case 0:
  6173. if ($ftype == TType::LST) {
  6174. $this->success = array();
  6175. $_size255 = 0;
  6176. $_etype258 = 0;
  6177. $xfer += $input->readListBegin($_etype258, $_size255);
  6178. for ($_i259 = 0; $_i259 < $_size255; ++$_i259)
  6179. {
  6180. $elem260 = null;
  6181. $elem260 = new cassandra_TokenRange();
  6182. $xfer += $elem260->read($input);
  6183. $this->success []= $elem260;
  6184. }
  6185. $xfer += $input->readListEnd();
  6186. } else {
  6187. $xfer += $input->skip($ftype);
  6188. }
  6189. break;
  6190. case 1:
  6191. if ($ftype == TType::STRUCT) {
  6192. $this->ire = new cassandra_InvalidRequestException();
  6193. $xfer += $this->ire->read($input);
  6194. } else {
  6195. $xfer += $input->skip($ftype);
  6196. }
  6197. break;
  6198. default:
  6199. $xfer += $input->skip($ftype);
  6200. break;
  6201. }
  6202. $xfer += $input->readFieldEnd();
  6203. }
  6204. $xfer += $input->readStructEnd();
  6205. return $xfer;
  6206. }
  6207. public function write($output) {
  6208. $xfer = 0;
  6209. $xfer += $output->writeStructBegin('Cassandra_describe_ring_result');
  6210. if ($this->success !== null) {
  6211. if (!is_array($this->success)) {
  6212. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  6213. }
  6214. $xfer += $output->writeFieldBegin('success', TType::LST, 0);
  6215. {
  6216. $output->writeListBegin(TType::STRUCT, count($this->success));
  6217. {
  6218. foreach ($this->success as $iter261)
  6219. {
  6220. $xfer += $iter261->write($output);
  6221. }
  6222. }
  6223. $output->writeListEnd();
  6224. }
  6225. $xfer += $output->writeFieldEnd();
  6226. }
  6227. if ($this->ire !== null) {
  6228. $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
  6229. $xfer += $this->ire->write($output);
  6230. $xfer += $output->writeFieldEnd();
  6231. }
  6232. $xfer += $output->writeFieldStop();
  6233. $xfer += $output->writeStructEnd();
  6234. return $xfer;
  6235. }
  6236. }
  6237. class cassandra_Cassandra_describe_partitioner_args {
  6238. static $_TSPEC;
  6239. public function __construct() {
  6240. if (!isset(self::$_TSPEC)) {
  6241. self::$_TSPEC = array(
  6242. );
  6243. }
  6244. }
  6245. public function getName() {
  6246. return 'Cassandra_describe_partitioner_args';
  6247. }
  6248. public function read($input)
  6249. {
  6250. $xfer = 0;
  6251. $fname = null;
  6252. $ftype = 0;
  6253. $fid = 0;
  6254. $xfer += $input->readStructBegin($fname);
  6255. while (true)
  6256. {
  6257. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  6258. if ($ftype == TType::STOP) {
  6259. break;
  6260. }
  6261. switch ($fid)
  6262. {
  6263. default:
  6264. $xfer += $input->skip($ftype);
  6265. break;
  6266. }
  6267. $xfer += $input->readFieldEnd();
  6268. }
  6269. $xfer += $input->readStructEnd();
  6270. return $xfer;
  6271. }
  6272. public function write($output) {
  6273. $xfer = 0;
  6274. $xfer += $output->writeStructBegin('Cassandra_describe_partitioner_args');
  6275. $xfer += $output->writeFieldStop();
  6276. $xfer += $output->writeStructEnd();
  6277. return $xfer;
  6278. }
  6279. }
  6280. class cassandra_Cassandra_describe_partitioner_result {
  6281. static $_TSPEC;
  6282. public $success = null;
  6283. public function __construct($vals=null) {
  6284. if (!isset(self::$_TSPEC)) {
  6285. self::$_TSPEC = array(
  6286. 0 => array(
  6287. 'var' => 'success',
  6288. 'type' => TType::STRING,
  6289. ),
  6290. );
  6291. }
  6292. if (is_array($vals)) {
  6293. if (isset($vals['success'])) {
  6294. $this->success = $vals['success'];
  6295. }
  6296. }
  6297. }
  6298. public function getName() {
  6299. return 'Cassandra_describe_partitioner_result';
  6300. }
  6301. public function read($input)
  6302. {
  6303. $xfer = 0;
  6304. $fname = null;
  6305. $ftype = 0;
  6306. $fid = 0;
  6307. $xfer += $input->readStructBegin($fname);
  6308. while (true)
  6309. {
  6310. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  6311. if ($ftype == TType::STOP) {
  6312. break;
  6313. }
  6314. switch ($fid)
  6315. {
  6316. case 0:
  6317. if ($ftype == TType::STRING) {
  6318. $xfer += $input->readString($this->success);
  6319. } else {
  6320. $xfer += $input->skip($ftype);
  6321. }
  6322. break;
  6323. default:
  6324. $xfer += $input->skip($ftype);
  6325. break;
  6326. }
  6327. $xfer += $input->readFieldEnd();
  6328. }
  6329. $xfer += $input->readStructEnd();
  6330. return $xfer;
  6331. }
  6332. public function write($output) {
  6333. $xfer = 0;
  6334. $xfer += $output->writeStructBegin('Cassandra_describe_partitioner_result');
  6335. if ($this->success !== null) {
  6336. $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
  6337. $xfer += $output->writeString($this->success);
  6338. $xfer += $output->writeFieldEnd();
  6339. }
  6340. $xfer += $output->writeFieldStop();
  6341. $xfer += $output->writeStructEnd();
  6342. return $xfer;
  6343. }
  6344. }
  6345. class cassandra_Cassandra_describe_snitch_args {
  6346. static $_TSPEC;
  6347. public function __construct() {
  6348. if (!isset(self::$_TSPEC)) {
  6349. self::$_TSPEC = array(
  6350. );
  6351. }
  6352. }
  6353. public function getName() {
  6354. return 'Cassandra_describe_snitch_args';
  6355. }
  6356. public function read($input)
  6357. {
  6358. $xfer = 0;
  6359. $fname = null;
  6360. $ftype = 0;
  6361. $fid = 0;
  6362. $xfer += $input->readStructBegin($fname);
  6363. while (true)
  6364. {
  6365. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  6366. if ($ftype == TType::STOP) {
  6367. break;
  6368. }
  6369. switch ($fid)
  6370. {
  6371. default:
  6372. $xfer += $input->skip($ftype);
  6373. break;
  6374. }
  6375. $xfer += $input->readFieldEnd();
  6376. }
  6377. $xfer += $input->readStructEnd();
  6378. return $xfer;
  6379. }
  6380. public function write($output) {
  6381. $xfer = 0;
  6382. $xfer += $output->writeStructBegin('Cassandra_describe_snitch_args');
  6383. $xfer += $output->writeFieldStop();
  6384. $xfer += $output->writeStructEnd();
  6385. return $xfer;
  6386. }
  6387. }
  6388. class cassandra_Cassandra_describe_snitch_result {
  6389. static $_TSPEC;
  6390. public $success = null;
  6391. public function __construct($vals=null) {
  6392. if (!isset(self::$_TSPEC)) {
  6393. self::$_TSPEC = array(
  6394. 0 => array(
  6395. 'var' => 'success',
  6396. 'type' => TType::STRING,
  6397. ),
  6398. );
  6399. }
  6400. if (is_array($vals)) {
  6401. if (isset($vals['success'])) {
  6402. $this->success = $vals['success'];
  6403. }
  6404. }
  6405. }
  6406. public function getName() {
  6407. return 'Cassandra_describe_snitch_result';
  6408. }
  6409. public function read($input)
  6410. {
  6411. $xfer = 0;
  6412. $fname = null;
  6413. $ftype = 0;
  6414. $fid = 0;
  6415. $xfer += $input->readStructBegin($fname);
  6416. while (true)
  6417. {
  6418. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  6419. if ($ftype == TType::STOP) {
  6420. break;
  6421. }
  6422. switch ($fid)
  6423. {
  6424. case 0:
  6425. if ($ftype == TType::STRING) {
  6426. $xfer += $input->readString($this->success);
  6427. } else {
  6428. $xfer += $input->skip($ftype);
  6429. }
  6430. break;
  6431. default:
  6432. $xfer += $input->skip($ftype);
  6433. break;
  6434. }
  6435. $xfer += $input->readFieldEnd();
  6436. }
  6437. $xfer += $input->readStructEnd();
  6438. return $xfer;
  6439. }
  6440. public function write($output) {
  6441. $xfer = 0;
  6442. $xfer += $output->writeStructBegin('Cassandra_describe_snitch_result');
  6443. if ($this->success !== null) {
  6444. $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
  6445. $xfer += $output->writeString($this->success);
  6446. $xfer += $output->writeFieldEnd();
  6447. }
  6448. $xfer += $output->writeFieldStop();
  6449. $xfer += $output->writeStructEnd();
  6450. return $xfer;
  6451. }
  6452. }
  6453. class cassandra_Cassandra_describe_keyspace_args {
  6454. static $_TSPEC;
  6455. public $keyspace = null;
  6456. public function __construct($vals=null) {
  6457. if (!isset(self::$_TSPEC)) {
  6458. self::$_TSPEC = array(
  6459. 1 => array(
  6460. 'var' => 'keyspace',
  6461. 'type' => TType::STRING,
  6462. ),
  6463. );
  6464. }
  6465. if (is_array($vals)) {
  6466. if (isset($vals['keyspace'])) {
  6467. $this->keyspace = $vals['keyspace'];
  6468. }
  6469. }
  6470. }
  6471. public function getName() {
  6472. return 'Cassandra_describe_keyspace_args';
  6473. }
  6474. public function read($input)
  6475. {
  6476. $xfer = 0;
  6477. $fname = null;
  6478. $ftype = 0;
  6479. $fid = 0;
  6480. $xfer += $input->readStructBegin($fname);
  6481. while (true)
  6482. {
  6483. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  6484. if ($ftype == TType::STOP) {
  6485. break;
  6486. }
  6487. switch ($fid)
  6488. {
  6489. case 1:
  6490. if ($ftype == TType::STRING) {
  6491. $xfer += $input->readString($this->keyspace);
  6492. } else {
  6493. $xfer += $input->skip($ftype);
  6494. }
  6495. break;
  6496. default:
  6497. $xfer += $input->skip($ftype);
  6498. break;
  6499. }
  6500. $xfer += $input->readFieldEnd();
  6501. }
  6502. $xfer += $input->readStructEnd();
  6503. return $xfer;
  6504. }
  6505. public function write($output) {
  6506. $xfer = 0;
  6507. $xfer += $output->writeStructBegin('Cassandra_describe_keyspace_args');
  6508. if ($this->keyspace !== null) {
  6509. $xfer += $output->writeFieldBegin('keyspace', TType::STRING, 1);
  6510. $xfer += $output->writeString($this->keyspace);
  6511. $xfer += $output->writeFieldEnd();
  6512. }
  6513. $xfer += $output->writeFieldStop();
  6514. $xfer += $output->writeStructEnd();
  6515. return $xfer;
  6516. }
  6517. }
  6518. class cassandra_Cassandra_describe_keyspace_result {
  6519. static $_TSPEC;
  6520. public $success = null;
  6521. public $nfe = null;
  6522. public $ire = null;
  6523. public function __construct($vals=null) {
  6524. if (!isset(self::$_TSPEC)) {
  6525. self::$_TSPEC = array(
  6526. 0 => array(
  6527. 'var' => 'success',
  6528. 'type' => TType::STRUCT,
  6529. 'class' => 'cassandra_KsDef',
  6530. ),
  6531. 1 => array(
  6532. 'var' => 'nfe',
  6533. 'type' => TType::STRUCT,
  6534. 'class' => 'cassandra_NotFoundException',
  6535. ),
  6536. 2 => array(
  6537. 'var' => 'ire',
  6538. 'type' => TType::STRUCT,
  6539. 'class' => 'cassandra_InvalidRequestException',
  6540. ),
  6541. );
  6542. }
  6543. if (is_array($vals)) {
  6544. if (isset($vals['success'])) {
  6545. $this->success = $vals['success'];
  6546. }
  6547. if (isset($vals['nfe'])) {
  6548. $this->nfe = $vals['nfe'];
  6549. }
  6550. if (isset($vals['ire'])) {
  6551. $this->ire = $vals['ire'];
  6552. }
  6553. }
  6554. }
  6555. public function getName() {
  6556. return 'Cassandra_describe_keyspace_result';
  6557. }
  6558. public function read($input)
  6559. {
  6560. $xfer = 0;
  6561. $fname = null;
  6562. $ftype = 0;
  6563. $fid = 0;
  6564. $xfer += $input->readStructBegin($fname);
  6565. while (true)
  6566. {
  6567. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  6568. if ($ftype == TType::STOP) {
  6569. break;
  6570. }
  6571. switch ($fid)
  6572. {
  6573. case 0:
  6574. if ($ftype == TType::STRUCT) {
  6575. $this->success = new cassandra_KsDef();
  6576. $xfer += $this->success->read($input);
  6577. } else {
  6578. $xfer += $input->skip($ftype);
  6579. }
  6580. break;
  6581. case 1:
  6582. if ($ftype == TType::STRUCT) {
  6583. $this->nfe = new cassandra_NotFoundException();
  6584. $xfer += $this->nfe->read($input);
  6585. } else {
  6586. $xfer += $input->skip($ftype);
  6587. }
  6588. break;
  6589. case 2:
  6590. if ($ftype == TType::STRUCT) {
  6591. $this->ire = new cassandra_InvalidRequestException();
  6592. $xfer += $this->ire->read($input);
  6593. } else {
  6594. $xfer += $input->skip($ftype);
  6595. }
  6596. break;
  6597. default:
  6598. $xfer += $input->skip($ftype);
  6599. break;
  6600. }
  6601. $xfer += $input->readFieldEnd();
  6602. }
  6603. $xfer += $input->readStructEnd();
  6604. return $xfer;
  6605. }
  6606. public function write($output) {
  6607. $xfer = 0;
  6608. $xfer += $output->writeStructBegin('Cassandra_describe_keyspace_result');
  6609. if ($this->success !== null) {
  6610. if (!is_object($this->success)) {
  6611. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  6612. }
  6613. $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
  6614. $xfer += $this->success->write($output);
  6615. $xfer += $output->writeFieldEnd();
  6616. }
  6617. if ($this->nfe !== null) {
  6618. $xfer += $output->writeFieldBegin('nfe', TType::STRUCT, 1);
  6619. $xfer += $this->nfe->write($output);
  6620. $xfer += $output->writeFieldEnd();
  6621. }
  6622. if ($this->ire !== null) {
  6623. $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 2);
  6624. $xfer += $this->ire->write($output);
  6625. $xfer += $output->writeFieldEnd();
  6626. }
  6627. $xfer += $output->writeFieldStop();
  6628. $xfer += $output->writeStructEnd();
  6629. return $xfer;
  6630. }
  6631. }
  6632. class cassandra_Cassandra_describe_splits_args {
  6633. static $_TSPEC;
  6634. public $cfName = null;
  6635. public $start_token = null;
  6636. public $end_token = null;
  6637. public $keys_per_split = null;
  6638. public function __construct($vals=null) {
  6639. if (!isset(self::$_TSPEC)) {
  6640. self::$_TSPEC = array(
  6641. 1 => array(
  6642. 'var' => 'cfName',
  6643. 'type' => TType::STRING,
  6644. ),
  6645. 2 => array(
  6646. 'var' => 'start_token',
  6647. 'type' => TType::STRING,
  6648. ),
  6649. 3 => array(
  6650. 'var' => 'end_token',
  6651. 'type' => TType::STRING,
  6652. ),
  6653. 4 => array(
  6654. 'var' => 'keys_per_split',
  6655. 'type' => TType::I32,
  6656. ),
  6657. );
  6658. }
  6659. if (is_array($vals)) {
  6660. if (isset($vals['cfName'])) {
  6661. $this->cfName = $vals['cfName'];
  6662. }
  6663. if (isset($vals['start_token'])) {
  6664. $this->start_token = $vals['start_token'];
  6665. }
  6666. if (isset($vals['end_token'])) {
  6667. $this->end_token = $vals['end_token'];
  6668. }
  6669. if (isset($vals['keys_per_split'])) {
  6670. $this->keys_per_split = $vals['keys_per_split'];
  6671. }
  6672. }
  6673. }
  6674. public function getName() {
  6675. return 'Cassandra_describe_splits_args';
  6676. }
  6677. public function read($input)
  6678. {
  6679. $xfer = 0;
  6680. $fname = null;
  6681. $ftype = 0;
  6682. $fid = 0;
  6683. $xfer += $input->readStructBegin($fname);
  6684. while (true)
  6685. {
  6686. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  6687. if ($ftype == TType::STOP) {
  6688. break;
  6689. }
  6690. switch ($fid)
  6691. {
  6692. case 1:
  6693. if ($ftype == TType::STRING) {
  6694. $xfer += $input->readString($this->cfName);
  6695. } else {
  6696. $xfer += $input->skip($ftype);
  6697. }
  6698. break;
  6699. case 2:
  6700. if ($ftype == TType::STRING) {
  6701. $xfer += $input->readString($this->start_token);
  6702. } else {
  6703. $xfer += $input->skip($ftype);
  6704. }
  6705. break;
  6706. case 3:
  6707. if ($ftype == TType::STRING) {
  6708. $xfer += $input->readString($this->end_token);
  6709. } else {
  6710. $xfer += $input->skip($ftype);
  6711. }
  6712. break;
  6713. case 4:
  6714. if ($ftype == TType::I32) {
  6715. $xfer += $input->readI32($this->keys_per_split);
  6716. } else {
  6717. $xfer += $input->skip($ftype);
  6718. }
  6719. break;
  6720. default:
  6721. $xfer += $input->skip($ftype);
  6722. break;
  6723. }
  6724. $xfer += $input->readFieldEnd();
  6725. }
  6726. $xfer += $input->readStructEnd();
  6727. return $xfer;
  6728. }
  6729. public function write($output) {
  6730. $xfer = 0;
  6731. $xfer += $output->writeStructBegin('Cassandra_describe_splits_args');
  6732. if ($this->cfName !== null) {
  6733. $xfer += $output->writeFieldBegin('cfName', TType::STRING, 1);
  6734. $xfer += $output->writeString($this->cfName);
  6735. $xfer += $output->writeFieldEnd();
  6736. }
  6737. if ($this->start_token !== null) {
  6738. $xfer += $output->writeFieldBegin('start_token', TType::STRING, 2);
  6739. $xfer += $output->writeString($this->start_token);
  6740. $xfer += $output->writeFieldEnd();
  6741. }
  6742. if ($this->end_token !== null) {
  6743. $xfer += $output->writeFieldBegin('end_token', TType::STRING, 3);
  6744. $xfer += $output->writeString($this->end_token);
  6745. $xfer += $output->writeFieldEnd();
  6746. }
  6747. if ($this->keys_per_split !== null) {
  6748. $xfer += $output->writeFieldBegin('keys_per_split', TType::I32, 4);
  6749. $xfer += $output->writeI32($this->keys_per_split);
  6750. $xfer += $output->writeFieldEnd();
  6751. }
  6752. $xfer += $output->writeFieldStop();
  6753. $xfer += $output->writeStructEnd();
  6754. return $xfer;
  6755. }
  6756. }
  6757. class cassandra_Cassandra_describe_splits_result {
  6758. static $_TSPEC;
  6759. public $success = null;
  6760. public $ire = null;
  6761. public function __construct($vals=null) {
  6762. if (!isset(self::$_TSPEC)) {
  6763. self::$_TSPEC = array(
  6764. 0 => array(
  6765. 'var' => 'success',
  6766. 'type' => TType::LST,
  6767. 'etype' => TType::STRING,
  6768. 'elem' => array(
  6769. 'type' => TType::STRING,
  6770. ),
  6771. ),
  6772. 1 => array(
  6773. 'var' => 'ire',
  6774. 'type' => TType::STRUCT,
  6775. 'class' => 'cassandra_InvalidRequestException',
  6776. ),
  6777. );
  6778. }
  6779. if (is_array($vals)) {
  6780. if (isset($vals['success'])) {
  6781. $this->success = $vals['success'];
  6782. }
  6783. if (isset($vals['ire'])) {
  6784. $this->ire = $vals['ire'];
  6785. }
  6786. }
  6787. }
  6788. public function getName() {
  6789. return 'Cassandra_describe_splits_result';
  6790. }
  6791. public function read($input)
  6792. {
  6793. $xfer = 0;
  6794. $fname = null;
  6795. $ftype = 0;
  6796. $fid = 0;
  6797. $xfer += $input->readStructBegin($fname);
  6798. while (true)
  6799. {
  6800. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  6801. if ($ftype == TType::STOP) {
  6802. break;
  6803. }
  6804. switch ($fid)
  6805. {
  6806. case 0:
  6807. if ($ftype == TType::LST) {
  6808. $this->success = array();
  6809. $_size262 = 0;
  6810. $_etype265 = 0;
  6811. $xfer += $input->readListBegin($_etype265, $_size262);
  6812. for ($_i266 = 0; $_i266 < $_size262; ++$_i266)
  6813. {
  6814. $elem267 = null;
  6815. $xfer += $input->readString($elem267);
  6816. $this->success []= $elem267;
  6817. }
  6818. $xfer += $input->readListEnd();
  6819. } else {
  6820. $xfer += $input->skip($ftype);
  6821. }
  6822. break;
  6823. case 1:
  6824. if ($ftype == TType::STRUCT) {
  6825. $this->ire = new cassandra_InvalidRequestException();
  6826. $xfer += $this->ire->read($input);
  6827. } else {
  6828. $xfer += $input->skip($ftype);
  6829. }
  6830. break;
  6831. default:
  6832. $xfer += $input->skip($ftype);
  6833. break;
  6834. }
  6835. $xfer += $input->readFieldEnd();
  6836. }
  6837. $xfer += $input->readStructEnd();
  6838. return $xfer;
  6839. }
  6840. public function write($output) {
  6841. $xfer = 0;
  6842. $xfer += $output->writeStructBegin('Cassandra_describe_splits_result');
  6843. if ($this->success !== null) {
  6844. if (!is_array($this->success)) {
  6845. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  6846. }
  6847. $xfer += $output->writeFieldBegin('success', TType::LST, 0);
  6848. {
  6849. $output->writeListBegin(TType::STRING, count($this->success));
  6850. {
  6851. foreach ($this->success as $iter268)
  6852. {
  6853. $xfer += $output->writeString($iter268);
  6854. }
  6855. }
  6856. $output->writeListEnd();
  6857. }
  6858. $xfer += $output->writeFieldEnd();
  6859. }
  6860. if ($this->ire !== null) {
  6861. $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
  6862. $xfer += $this->ire->write($output);
  6863. $xfer += $output->writeFieldEnd();
  6864. }
  6865. $xfer += $output->writeFieldStop();
  6866. $xfer += $output->writeStructEnd();
  6867. return $xfer;
  6868. }
  6869. }
  6870. class cassandra_Cassandra_system_add_column_family_args {
  6871. static $_TSPEC;
  6872. public $cf_def = null;
  6873. public function __construct($vals=null) {
  6874. if (!isset(self::$_TSPEC)) {
  6875. self::$_TSPEC = array(
  6876. 1 => array(
  6877. 'var' => 'cf_def',
  6878. 'type' => TType::STRUCT,
  6879. 'class' => 'cassandra_CfDef',
  6880. ),
  6881. );
  6882. }
  6883. if (is_array($vals)) {
  6884. if (isset($vals['cf_def'])) {
  6885. $this->cf_def = $vals['cf_def'];
  6886. }
  6887. }
  6888. }
  6889. public function getName() {
  6890. return 'Cassandra_system_add_column_family_args';
  6891. }
  6892. public function read($input)
  6893. {
  6894. $xfer = 0;
  6895. $fname = null;
  6896. $ftype = 0;
  6897. $fid = 0;
  6898. $xfer += $input->readStructBegin($fname);
  6899. while (true)
  6900. {
  6901. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  6902. if ($ftype == TType::STOP) {
  6903. break;
  6904. }
  6905. switch ($fid)
  6906. {
  6907. case 1:
  6908. if ($ftype == TType::STRUCT) {
  6909. $this->cf_def = new cassandra_CfDef();
  6910. $xfer += $this->cf_def->read($input);
  6911. } else {
  6912. $xfer += $input->skip($ftype);
  6913. }
  6914. break;
  6915. default:
  6916. $xfer += $input->skip($ftype);
  6917. break;
  6918. }
  6919. $xfer += $input->readFieldEnd();
  6920. }
  6921. $xfer += $input->readStructEnd();
  6922. return $xfer;
  6923. }
  6924. public function write($output) {
  6925. $xfer = 0;
  6926. $xfer += $output->writeStructBegin('Cassandra_system_add_column_family_args');
  6927. if ($this->cf_def !== null) {
  6928. if (!is_object($this->cf_def)) {
  6929. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  6930. }
  6931. $xfer += $output->writeFieldBegin('cf_def', TType::STRUCT, 1);
  6932. $xfer += $this->cf_def->write($output);
  6933. $xfer += $output->writeFieldEnd();
  6934. }
  6935. $xfer += $output->writeFieldStop();
  6936. $xfer += $output->writeStructEnd();
  6937. return $xfer;
  6938. }
  6939. }
  6940. class cassandra_Cassandra_system_add_column_family_result {
  6941. static $_TSPEC;
  6942. public $success = null;
  6943. public $ire = null;
  6944. public $sde = null;
  6945. public function __construct($vals=null) {
  6946. if (!isset(self::$_TSPEC)) {
  6947. self::$_TSPEC = array(
  6948. 0 => array(
  6949. 'var' => 'success',
  6950. 'type' => TType::STRING,
  6951. ),
  6952. 1 => array(
  6953. 'var' => 'ire',
  6954. 'type' => TType::STRUCT,
  6955. 'class' => 'cassandra_InvalidRequestException',
  6956. ),
  6957. 2 => array(
  6958. 'var' => 'sde',
  6959. 'type' => TType::STRUCT,
  6960. 'class' => 'cassandra_SchemaDisagreementException',
  6961. ),
  6962. );
  6963. }
  6964. if (is_array($vals)) {
  6965. if (isset($vals['success'])) {
  6966. $this->success = $vals['success'];
  6967. }
  6968. if (isset($vals['ire'])) {
  6969. $this->ire = $vals['ire'];
  6970. }
  6971. if (isset($vals['sde'])) {
  6972. $this->sde = $vals['sde'];
  6973. }
  6974. }
  6975. }
  6976. public function getName() {
  6977. return 'Cassandra_system_add_column_family_result';
  6978. }
  6979. public function read($input)
  6980. {
  6981. $xfer = 0;
  6982. $fname = null;
  6983. $ftype = 0;
  6984. $fid = 0;
  6985. $xfer += $input->readStructBegin($fname);
  6986. while (true)
  6987. {
  6988. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  6989. if ($ftype == TType::STOP) {
  6990. break;
  6991. }
  6992. switch ($fid)
  6993. {
  6994. case 0:
  6995. if ($ftype == TType::STRING) {
  6996. $xfer += $input->readString($this->success);
  6997. } else {
  6998. $xfer += $input->skip($ftype);
  6999. }
  7000. break;
  7001. case 1:
  7002. if ($ftype == TType::STRUCT) {
  7003. $this->ire = new cassandra_InvalidRequestException();
  7004. $xfer += $this->ire->read($input);
  7005. } else {
  7006. $xfer += $input->skip($ftype);
  7007. }
  7008. break;
  7009. case 2:
  7010. if ($ftype == TType::STRUCT) {
  7011. $this->sde = new cassandra_SchemaDisagreementException();
  7012. $xfer += $this->sde->read($input);
  7013. } else {
  7014. $xfer += $input->skip($ftype);
  7015. }
  7016. break;
  7017. default:
  7018. $xfer += $input->skip($ftype);
  7019. break;
  7020. }
  7021. $xfer += $input->readFieldEnd();
  7022. }
  7023. $xfer += $input->readStructEnd();
  7024. return $xfer;
  7025. }
  7026. public function write($output) {
  7027. $xfer = 0;
  7028. $xfer += $output->writeStructBegin('Cassandra_system_add_column_family_result');
  7029. if ($this->success !== null) {
  7030. $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
  7031. $xfer += $output->writeString($this->success);
  7032. $xfer += $output->writeFieldEnd();
  7033. }
  7034. if ($this->ire !== null) {
  7035. $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
  7036. $xfer += $this->ire->write($output);
  7037. $xfer += $output->writeFieldEnd();
  7038. }
  7039. if ($this->sde !== null) {
  7040. $xfer += $output->writeFieldBegin('sde', TType::STRUCT, 2);
  7041. $xfer += $this->sde->write($output);
  7042. $xfer += $output->writeFieldEnd();
  7043. }
  7044. $xfer += $output->writeFieldStop();
  7045. $xfer += $output->writeStructEnd();
  7046. return $xfer;
  7047. }
  7048. }
  7049. class cassandra_Cassandra_system_drop_column_family_args {
  7050. static $_TSPEC;
  7051. public $column_family = null;
  7052. public function __construct($vals=null) {
  7053. if (!isset(self::$_TSPEC)) {
  7054. self::$_TSPEC = array(
  7055. 1 => array(
  7056. 'var' => 'column_family',
  7057. 'type' => TType::STRING,
  7058. ),
  7059. );
  7060. }
  7061. if (is_array($vals)) {
  7062. if (isset($vals['column_family'])) {
  7063. $this->column_family = $vals['column_family'];
  7064. }
  7065. }
  7066. }
  7067. public function getName() {
  7068. return 'Cassandra_system_drop_column_family_args';
  7069. }
  7070. public function read($input)
  7071. {
  7072. $xfer = 0;
  7073. $fname = null;
  7074. $ftype = 0;
  7075. $fid = 0;
  7076. $xfer += $input->readStructBegin($fname);
  7077. while (true)
  7078. {
  7079. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  7080. if ($ftype == TType::STOP) {
  7081. break;
  7082. }
  7083. switch ($fid)
  7084. {
  7085. case 1:
  7086. if ($ftype == TType::STRING) {
  7087. $xfer += $input->readString($this->column_family);
  7088. } else {
  7089. $xfer += $input->skip($ftype);
  7090. }
  7091. break;
  7092. default:
  7093. $xfer += $input->skip($ftype);
  7094. break;
  7095. }
  7096. $xfer += $input->readFieldEnd();
  7097. }
  7098. $xfer += $input->readStructEnd();
  7099. return $xfer;
  7100. }
  7101. public function write($output) {
  7102. $xfer = 0;
  7103. $xfer += $output->writeStructBegin('Cassandra_system_drop_column_family_args');
  7104. if ($this->column_family !== null) {
  7105. $xfer += $output->writeFieldBegin('column_family', TType::STRING, 1);
  7106. $xfer += $output->writeString($this->column_family);
  7107. $xfer += $output->writeFieldEnd();
  7108. }
  7109. $xfer += $output->writeFieldStop();
  7110. $xfer += $output->writeStructEnd();
  7111. return $xfer;
  7112. }
  7113. }
  7114. class cassandra_Cassandra_system_drop_column_family_result {
  7115. static $_TSPEC;
  7116. public $success = null;
  7117. public $ire = null;
  7118. public $sde = null;
  7119. public function __construct($vals=null) {
  7120. if (!isset(self::$_TSPEC)) {
  7121. self::$_TSPEC = array(
  7122. 0 => array(
  7123. 'var' => 'success',
  7124. 'type' => TType::STRING,
  7125. ),
  7126. 1 => array(
  7127. 'var' => 'ire',
  7128. 'type' => TType::STRUCT,
  7129. 'class' => 'cassandra_InvalidRequestException',
  7130. ),
  7131. 2 => array(
  7132. 'var' => 'sde',
  7133. 'type' => TType::STRUCT,
  7134. 'class' => 'cassandra_SchemaDisagreementException',
  7135. ),
  7136. );
  7137. }
  7138. if (is_array($vals)) {
  7139. if (isset($vals['success'])) {
  7140. $this->success = $vals['success'];
  7141. }
  7142. if (isset($vals['ire'])) {
  7143. $this->ire = $vals['ire'];
  7144. }
  7145. if (isset($vals['sde'])) {
  7146. $this->sde = $vals['sde'];
  7147. }
  7148. }
  7149. }
  7150. public function getName() {
  7151. return 'Cassandra_system_drop_column_family_result';
  7152. }
  7153. public function read($input)
  7154. {
  7155. $xfer = 0;
  7156. $fname = null;
  7157. $ftype = 0;
  7158. $fid = 0;
  7159. $xfer += $input->readStructBegin($fname);
  7160. while (true)
  7161. {
  7162. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  7163. if ($ftype == TType::STOP) {
  7164. break;
  7165. }
  7166. switch ($fid)
  7167. {
  7168. case 0:
  7169. if ($ftype == TType::STRING) {
  7170. $xfer += $input->readString($this->success);
  7171. } else {
  7172. $xfer += $input->skip($ftype);
  7173. }
  7174. break;
  7175. case 1:
  7176. if ($ftype == TType::STRUCT) {
  7177. $this->ire = new cassandra_InvalidRequestException();
  7178. $xfer += $this->ire->read($input);
  7179. } else {
  7180. $xfer += $input->skip($ftype);
  7181. }
  7182. break;
  7183. case 2:
  7184. if ($ftype == TType::STRUCT) {
  7185. $this->sde = new cassandra_SchemaDisagreementException();
  7186. $xfer += $this->sde->read($input);
  7187. } else {
  7188. $xfer += $input->skip($ftype);
  7189. }
  7190. break;
  7191. default:
  7192. $xfer += $input->skip($ftype);
  7193. break;
  7194. }
  7195. $xfer += $input->readFieldEnd();
  7196. }
  7197. $xfer += $input->readStructEnd();
  7198. return $xfer;
  7199. }
  7200. public function write($output) {
  7201. $xfer = 0;
  7202. $xfer += $output->writeStructBegin('Cassandra_system_drop_column_family_result');
  7203. if ($this->success !== null) {
  7204. $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
  7205. $xfer += $output->writeString($this->success);
  7206. $xfer += $output->writeFieldEnd();
  7207. }
  7208. if ($this->ire !== null) {
  7209. $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
  7210. $xfer += $this->ire->write($output);
  7211. $xfer += $output->writeFieldEnd();
  7212. }
  7213. if ($this->sde !== null) {
  7214. $xfer += $output->writeFieldBegin('sde', TType::STRUCT, 2);
  7215. $xfer += $this->sde->write($output);
  7216. $xfer += $output->writeFieldEnd();
  7217. }
  7218. $xfer += $output->writeFieldStop();
  7219. $xfer += $output->writeStructEnd();
  7220. return $xfer;
  7221. }
  7222. }
  7223. class cassandra_Cassandra_system_add_keyspace_args {
  7224. static $_TSPEC;
  7225. public $ks_def = null;
  7226. public function __construct($vals=null) {
  7227. if (!isset(self::$_TSPEC)) {
  7228. self::$_TSPEC = array(
  7229. 1 => array(
  7230. 'var' => 'ks_def',
  7231. 'type' => TType::STRUCT,
  7232. 'class' => 'cassandra_KsDef',
  7233. ),
  7234. );
  7235. }
  7236. if (is_array($vals)) {
  7237. if (isset($vals['ks_def'])) {
  7238. $this->ks_def = $vals['ks_def'];
  7239. }
  7240. }
  7241. }
  7242. public function getName() {
  7243. return 'Cassandra_system_add_keyspace_args';
  7244. }
  7245. public function read($input)
  7246. {
  7247. $xfer = 0;
  7248. $fname = null;
  7249. $ftype = 0;
  7250. $fid = 0;
  7251. $xfer += $input->readStructBegin($fname);
  7252. while (true)
  7253. {
  7254. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  7255. if ($ftype == TType::STOP) {
  7256. break;
  7257. }
  7258. switch ($fid)
  7259. {
  7260. case 1:
  7261. if ($ftype == TType::STRUCT) {
  7262. $this->ks_def = new cassandra_KsDef();
  7263. $xfer += $this->ks_def->read($input);
  7264. } else {
  7265. $xfer += $input->skip($ftype);
  7266. }
  7267. break;
  7268. default:
  7269. $xfer += $input->skip($ftype);
  7270. break;
  7271. }
  7272. $xfer += $input->readFieldEnd();
  7273. }
  7274. $xfer += $input->readStructEnd();
  7275. return $xfer;
  7276. }
  7277. public function write($output) {
  7278. $xfer = 0;
  7279. $xfer += $output->writeStructBegin('Cassandra_system_add_keyspace_args');
  7280. if ($this->ks_def !== null) {
  7281. if (!is_object($this->ks_def)) {
  7282. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  7283. }
  7284. $xfer += $output->writeFieldBegin('ks_def', TType::STRUCT, 1);
  7285. $xfer += $this->ks_def->write($output);
  7286. $xfer += $output->writeFieldEnd();
  7287. }
  7288. $xfer += $output->writeFieldStop();
  7289. $xfer += $output->writeStructEnd();
  7290. return $xfer;
  7291. }
  7292. }
  7293. class cassandra_Cassandra_system_add_keyspace_result {
  7294. static $_TSPEC;
  7295. public $success = null;
  7296. public $ire = null;
  7297. public $sde = null;
  7298. public function __construct($vals=null) {
  7299. if (!isset(self::$_TSPEC)) {
  7300. self::$_TSPEC = array(
  7301. 0 => array(
  7302. 'var' => 'success',
  7303. 'type' => TType::STRING,
  7304. ),
  7305. 1 => array(
  7306. 'var' => 'ire',
  7307. 'type' => TType::STRUCT,
  7308. 'class' => 'cassandra_InvalidRequestException',
  7309. ),
  7310. 2 => array(
  7311. 'var' => 'sde',
  7312. 'type' => TType::STRUCT,
  7313. 'class' => 'cassandra_SchemaDisagreementException',
  7314. ),
  7315. );
  7316. }
  7317. if (is_array($vals)) {
  7318. if (isset($vals['success'])) {
  7319. $this->success = $vals['success'];
  7320. }
  7321. if (isset($vals['ire'])) {
  7322. $this->ire = $vals['ire'];
  7323. }
  7324. if (isset($vals['sde'])) {
  7325. $this->sde = $vals['sde'];
  7326. }
  7327. }
  7328. }
  7329. public function getName() {
  7330. return 'Cassandra_system_add_keyspace_result';
  7331. }
  7332. public function read($input)
  7333. {
  7334. $xfer = 0;
  7335. $fname = null;
  7336. $ftype = 0;
  7337. $fid = 0;
  7338. $xfer += $input->readStructBegin($fname);
  7339. while (true)
  7340. {
  7341. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  7342. if ($ftype == TType::STOP) {
  7343. break;
  7344. }
  7345. switch ($fid)
  7346. {
  7347. case 0:
  7348. if ($ftype == TType::STRING) {
  7349. $xfer += $input->readString($this->success);
  7350. } else {
  7351. $xfer += $input->skip($ftype);
  7352. }
  7353. break;
  7354. case 1:
  7355. if ($ftype == TType::STRUCT) {
  7356. $this->ire = new cassandra_InvalidRequestException();
  7357. $xfer += $this->ire->read($input);
  7358. } else {
  7359. $xfer += $input->skip($ftype);
  7360. }
  7361. break;
  7362. case 2:
  7363. if ($ftype == TType::STRUCT) {
  7364. $this->sde = new cassandra_SchemaDisagreementException();
  7365. $xfer += $this->sde->read($input);
  7366. } else {
  7367. $xfer += $input->skip($ftype);
  7368. }
  7369. break;
  7370. default:
  7371. $xfer += $input->skip($ftype);
  7372. break;
  7373. }
  7374. $xfer += $input->readFieldEnd();
  7375. }
  7376. $xfer += $input->readStructEnd();
  7377. return $xfer;
  7378. }
  7379. public function write($output) {
  7380. $xfer = 0;
  7381. $xfer += $output->writeStructBegin('Cassandra_system_add_keyspace_result');
  7382. if ($this->success !== null) {
  7383. $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
  7384. $xfer += $output->writeString($this->success);
  7385. $xfer += $output->writeFieldEnd();
  7386. }
  7387. if ($this->ire !== null) {
  7388. $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
  7389. $xfer += $this->ire->write($output);
  7390. $xfer += $output->writeFieldEnd();
  7391. }
  7392. if ($this->sde !== null) {
  7393. $xfer += $output->writeFieldBegin('sde', TType::STRUCT, 2);
  7394. $xfer += $this->sde->write($output);
  7395. $xfer += $output->writeFieldEnd();
  7396. }
  7397. $xfer += $output->writeFieldStop();
  7398. $xfer += $output->writeStructEnd();
  7399. return $xfer;
  7400. }
  7401. }
  7402. class cassandra_Cassandra_system_drop_keyspace_args {
  7403. static $_TSPEC;
  7404. public $keyspace = null;
  7405. public function __construct($vals=null) {
  7406. if (!isset(self::$_TSPEC)) {
  7407. self::$_TSPEC = array(
  7408. 1 => array(
  7409. 'var' => 'keyspace',
  7410. 'type' => TType::STRING,
  7411. ),
  7412. );
  7413. }
  7414. if (is_array($vals)) {
  7415. if (isset($vals['keyspace'])) {
  7416. $this->keyspace = $vals['keyspace'];
  7417. }
  7418. }
  7419. }
  7420. public function getName() {
  7421. return 'Cassandra_system_drop_keyspace_args';
  7422. }
  7423. public function read($input)
  7424. {
  7425. $xfer = 0;
  7426. $fname = null;
  7427. $ftype = 0;
  7428. $fid = 0;
  7429. $xfer += $input->readStructBegin($fname);
  7430. while (true)
  7431. {
  7432. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  7433. if ($ftype == TType::STOP) {
  7434. break;
  7435. }
  7436. switch ($fid)
  7437. {
  7438. case 1:
  7439. if ($ftype == TType::STRING) {
  7440. $xfer += $input->readString($this->keyspace);
  7441. } else {
  7442. $xfer += $input->skip($ftype);
  7443. }
  7444. break;
  7445. default:
  7446. $xfer += $input->skip($ftype);
  7447. break;
  7448. }
  7449. $xfer += $input->readFieldEnd();
  7450. }
  7451. $xfer += $input->readStructEnd();
  7452. return $xfer;
  7453. }
  7454. public function write($output) {
  7455. $xfer = 0;
  7456. $xfer += $output->writeStructBegin('Cassandra_system_drop_keyspace_args');
  7457. if ($this->keyspace !== null) {
  7458. $xfer += $output->writeFieldBegin('keyspace', TType::STRING, 1);
  7459. $xfer += $output->writeString($this->keyspace);
  7460. $xfer += $output->writeFieldEnd();
  7461. }
  7462. $xfer += $output->writeFieldStop();
  7463. $xfer += $output->writeStructEnd();
  7464. return $xfer;
  7465. }
  7466. }
  7467. class cassandra_Cassandra_system_drop_keyspace_result {
  7468. static $_TSPEC;
  7469. public $success = null;
  7470. public $ire = null;
  7471. public $sde = null;
  7472. public function __construct($vals=null) {
  7473. if (!isset(self::$_TSPEC)) {
  7474. self::$_TSPEC = array(
  7475. 0 => array(
  7476. 'var' => 'success',
  7477. 'type' => TType::STRING,
  7478. ),
  7479. 1 => array(
  7480. 'var' => 'ire',
  7481. 'type' => TType::STRUCT,
  7482. 'class' => 'cassandra_InvalidRequestException',
  7483. ),
  7484. 2 => array(
  7485. 'var' => 'sde',
  7486. 'type' => TType::STRUCT,
  7487. 'class' => 'cassandra_SchemaDisagreementException',
  7488. ),
  7489. );
  7490. }
  7491. if (is_array($vals)) {
  7492. if (isset($vals['success'])) {
  7493. $this->success = $vals['success'];
  7494. }
  7495. if (isset($vals['ire'])) {
  7496. $this->ire = $vals['ire'];
  7497. }
  7498. if (isset($vals['sde'])) {
  7499. $this->sde = $vals['sde'];
  7500. }
  7501. }
  7502. }
  7503. public function getName() {
  7504. return 'Cassandra_system_drop_keyspace_result';
  7505. }
  7506. public function read($input)
  7507. {
  7508. $xfer = 0;
  7509. $fname = null;
  7510. $ftype = 0;
  7511. $fid = 0;
  7512. $xfer += $input->readStructBegin($fname);
  7513. while (true)
  7514. {
  7515. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  7516. if ($ftype == TType::STOP) {
  7517. break;
  7518. }
  7519. switch ($fid)
  7520. {
  7521. case 0:
  7522. if ($ftype == TType::STRING) {
  7523. $xfer += $input->readString($this->success);
  7524. } else {
  7525. $xfer += $input->skip($ftype);
  7526. }
  7527. break;
  7528. case 1:
  7529. if ($ftype == TType::STRUCT) {
  7530. $this->ire = new cassandra_InvalidRequestException();
  7531. $xfer += $this->ire->read($input);
  7532. } else {
  7533. $xfer += $input->skip($ftype);
  7534. }
  7535. break;
  7536. case 2:
  7537. if ($ftype == TType::STRUCT) {
  7538. $this->sde = new cassandra_SchemaDisagreementException();
  7539. $xfer += $this->sde->read($input);
  7540. } else {
  7541. $xfer += $input->skip($ftype);
  7542. }
  7543. break;
  7544. default:
  7545. $xfer += $input->skip($ftype);
  7546. break;
  7547. }
  7548. $xfer += $input->readFieldEnd();
  7549. }
  7550. $xfer += $input->readStructEnd();
  7551. return $xfer;
  7552. }
  7553. public function write($output) {
  7554. $xfer = 0;
  7555. $xfer += $output->writeStructBegin('Cassandra_system_drop_keyspace_result');
  7556. if ($this->success !== null) {
  7557. $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
  7558. $xfer += $output->writeString($this->success);
  7559. $xfer += $output->writeFieldEnd();
  7560. }
  7561. if ($this->ire !== null) {
  7562. $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
  7563. $xfer += $this->ire->write($output);
  7564. $xfer += $output->writeFieldEnd();
  7565. }
  7566. if ($this->sde !== null) {
  7567. $xfer += $output->writeFieldBegin('sde', TType::STRUCT, 2);
  7568. $xfer += $this->sde->write($output);
  7569. $xfer += $output->writeFieldEnd();
  7570. }
  7571. $xfer += $output->writeFieldStop();
  7572. $xfer += $output->writeStructEnd();
  7573. return $xfer;
  7574. }
  7575. }
  7576. class cassandra_Cassandra_system_update_keyspace_args {
  7577. static $_TSPEC;
  7578. public $ks_def = null;
  7579. public function __construct($vals=null) {
  7580. if (!isset(self::$_TSPEC)) {
  7581. self::$_TSPEC = array(
  7582. 1 => array(
  7583. 'var' => 'ks_def',
  7584. 'type' => TType::STRUCT,
  7585. 'class' => 'cassandra_KsDef',
  7586. ),
  7587. );
  7588. }
  7589. if (is_array($vals)) {
  7590. if (isset($vals['ks_def'])) {
  7591. $this->ks_def = $vals['ks_def'];
  7592. }
  7593. }
  7594. }
  7595. public function getName() {
  7596. return 'Cassandra_system_update_keyspace_args';
  7597. }
  7598. public function read($input)
  7599. {
  7600. $xfer = 0;
  7601. $fname = null;
  7602. $ftype = 0;
  7603. $fid = 0;
  7604. $xfer += $input->readStructBegin($fname);
  7605. while (true)
  7606. {
  7607. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  7608. if ($ftype == TType::STOP) {
  7609. break;
  7610. }
  7611. switch ($fid)
  7612. {
  7613. case 1:
  7614. if ($ftype == TType::STRUCT) {
  7615. $this->ks_def = new cassandra_KsDef();
  7616. $xfer += $this->ks_def->read($input);
  7617. } else {
  7618. $xfer += $input->skip($ftype);
  7619. }
  7620. break;
  7621. default:
  7622. $xfer += $input->skip($ftype);
  7623. break;
  7624. }
  7625. $xfer += $input->readFieldEnd();
  7626. }
  7627. $xfer += $input->readStructEnd();
  7628. return $xfer;
  7629. }
  7630. public function write($output) {
  7631. $xfer = 0;
  7632. $xfer += $output->writeStructBegin('Cassandra_system_update_keyspace_args');
  7633. if ($this->ks_def !== null) {
  7634. if (!is_object($this->ks_def)) {
  7635. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  7636. }
  7637. $xfer += $output->writeFieldBegin('ks_def', TType::STRUCT, 1);
  7638. $xfer += $this->ks_def->write($output);
  7639. $xfer += $output->writeFieldEnd();
  7640. }
  7641. $xfer += $output->writeFieldStop();
  7642. $xfer += $output->writeStructEnd();
  7643. return $xfer;
  7644. }
  7645. }
  7646. class cassandra_Cassandra_system_update_keyspace_result {
  7647. static $_TSPEC;
  7648. public $success = null;
  7649. public $ire = null;
  7650. public $sde = null;
  7651. public function __construct($vals=null) {
  7652. if (!isset(self::$_TSPEC)) {
  7653. self::$_TSPEC = array(
  7654. 0 => array(
  7655. 'var' => 'success',
  7656. 'type' => TType::STRING,
  7657. ),
  7658. 1 => array(
  7659. 'var' => 'ire',
  7660. 'type' => TType::STRUCT,
  7661. 'class' => 'cassandra_InvalidRequestException',
  7662. ),
  7663. 2 => array(
  7664. 'var' => 'sde',
  7665. 'type' => TType::STRUCT,
  7666. 'class' => 'cassandra_SchemaDisagreementException',
  7667. ),
  7668. );
  7669. }
  7670. if (is_array($vals)) {
  7671. if (isset($vals['success'])) {
  7672. $this->success = $vals['success'];
  7673. }
  7674. if (isset($vals['ire'])) {
  7675. $this->ire = $vals['ire'];
  7676. }
  7677. if (isset($vals['sde'])) {
  7678. $this->sde = $vals['sde'];
  7679. }
  7680. }
  7681. }
  7682. public function getName() {
  7683. return 'Cassandra_system_update_keyspace_result';
  7684. }
  7685. public function read($input)
  7686. {
  7687. $xfer = 0;
  7688. $fname = null;
  7689. $ftype = 0;
  7690. $fid = 0;
  7691. $xfer += $input->readStructBegin($fname);
  7692. while (true)
  7693. {
  7694. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  7695. if ($ftype == TType::STOP) {
  7696. break;
  7697. }
  7698. switch ($fid)
  7699. {
  7700. case 0:
  7701. if ($ftype == TType::STRING) {
  7702. $xfer += $input->readString($this->success);
  7703. } else {
  7704. $xfer += $input->skip($ftype);
  7705. }
  7706. break;
  7707. case 1:
  7708. if ($ftype == TType::STRUCT) {
  7709. $this->ire = new cassandra_InvalidRequestException();
  7710. $xfer += $this->ire->read($input);
  7711. } else {
  7712. $xfer += $input->skip($ftype);
  7713. }
  7714. break;
  7715. case 2:
  7716. if ($ftype == TType::STRUCT) {
  7717. $this->sde = new cassandra_SchemaDisagreementException();
  7718. $xfer += $this->sde->read($input);
  7719. } else {
  7720. $xfer += $input->skip($ftype);
  7721. }
  7722. break;
  7723. default:
  7724. $xfer += $input->skip($ftype);
  7725. break;
  7726. }
  7727. $xfer += $input->readFieldEnd();
  7728. }
  7729. $xfer += $input->readStructEnd();
  7730. return $xfer;
  7731. }
  7732. public function write($output) {
  7733. $xfer = 0;
  7734. $xfer += $output->writeStructBegin('Cassandra_system_update_keyspace_result');
  7735. if ($this->success !== null) {
  7736. $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
  7737. $xfer += $output->writeString($this->success);
  7738. $xfer += $output->writeFieldEnd();
  7739. }
  7740. if ($this->ire !== null) {
  7741. $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
  7742. $xfer += $this->ire->write($output);
  7743. $xfer += $output->writeFieldEnd();
  7744. }
  7745. if ($this->sde !== null) {
  7746. $xfer += $output->writeFieldBegin('sde', TType::STRUCT, 2);
  7747. $xfer += $this->sde->write($output);
  7748. $xfer += $output->writeFieldEnd();
  7749. }
  7750. $xfer += $output->writeFieldStop();
  7751. $xfer += $output->writeStructEnd();
  7752. return $xfer;
  7753. }
  7754. }
  7755. class cassandra_Cassandra_system_update_column_family_args {
  7756. static $_TSPEC;
  7757. public $cf_def = null;
  7758. public function __construct($vals=null) {
  7759. if (!isset(self::$_TSPEC)) {
  7760. self::$_TSPEC = array(
  7761. 1 => array(
  7762. 'var' => 'cf_def',
  7763. 'type' => TType::STRUCT,
  7764. 'class' => 'cassandra_CfDef',
  7765. ),
  7766. );
  7767. }
  7768. if (is_array($vals)) {
  7769. if (isset($vals['cf_def'])) {
  7770. $this->cf_def = $vals['cf_def'];
  7771. }
  7772. }
  7773. }
  7774. public function getName() {
  7775. return 'Cassandra_system_update_column_family_args';
  7776. }
  7777. public function read($input)
  7778. {
  7779. $xfer = 0;
  7780. $fname = null;
  7781. $ftype = 0;
  7782. $fid = 0;
  7783. $xfer += $input->readStructBegin($fname);
  7784. while (true)
  7785. {
  7786. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  7787. if ($ftype == TType::STOP) {
  7788. break;
  7789. }
  7790. switch ($fid)
  7791. {
  7792. case 1:
  7793. if ($ftype == TType::STRUCT) {
  7794. $this->cf_def = new cassandra_CfDef();
  7795. $xfer += $this->cf_def->read($input);
  7796. } else {
  7797. $xfer += $input->skip($ftype);
  7798. }
  7799. break;
  7800. default:
  7801. $xfer += $input->skip($ftype);
  7802. break;
  7803. }
  7804. $xfer += $input->readFieldEnd();
  7805. }
  7806. $xfer += $input->readStructEnd();
  7807. return $xfer;
  7808. }
  7809. public function write($output) {
  7810. $xfer = 0;
  7811. $xfer += $output->writeStructBegin('Cassandra_system_update_column_family_args');
  7812. if ($this->cf_def !== null) {
  7813. if (!is_object($this->cf_def)) {
  7814. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  7815. }
  7816. $xfer += $output->writeFieldBegin('cf_def', TType::STRUCT, 1);
  7817. $xfer += $this->cf_def->write($output);
  7818. $xfer += $output->writeFieldEnd();
  7819. }
  7820. $xfer += $output->writeFieldStop();
  7821. $xfer += $output->writeStructEnd();
  7822. return $xfer;
  7823. }
  7824. }
  7825. class cassandra_Cassandra_system_update_column_family_result {
  7826. static $_TSPEC;
  7827. public $success = null;
  7828. public $ire = null;
  7829. public $sde = null;
  7830. public function __construct($vals=null) {
  7831. if (!isset(self::$_TSPEC)) {
  7832. self::$_TSPEC = array(
  7833. 0 => array(
  7834. 'var' => 'success',
  7835. 'type' => TType::STRING,
  7836. ),
  7837. 1 => array(
  7838. 'var' => 'ire',
  7839. 'type' => TType::STRUCT,
  7840. 'class' => 'cassandra_InvalidRequestException',
  7841. ),
  7842. 2 => array(
  7843. 'var' => 'sde',
  7844. 'type' => TType::STRUCT,
  7845. 'class' => 'cassandra_SchemaDisagreementException',
  7846. ),
  7847. );
  7848. }
  7849. if (is_array($vals)) {
  7850. if (isset($vals['success'])) {
  7851. $this->success = $vals['success'];
  7852. }
  7853. if (isset($vals['ire'])) {
  7854. $this->ire = $vals['ire'];
  7855. }
  7856. if (isset($vals['sde'])) {
  7857. $this->sde = $vals['sde'];
  7858. }
  7859. }
  7860. }
  7861. public function getName() {
  7862. return 'Cassandra_system_update_column_family_result';
  7863. }
  7864. public function read($input)
  7865. {
  7866. $xfer = 0;
  7867. $fname = null;
  7868. $ftype = 0;
  7869. $fid = 0;
  7870. $xfer += $input->readStructBegin($fname);
  7871. while (true)
  7872. {
  7873. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  7874. if ($ftype == TType::STOP) {
  7875. break;
  7876. }
  7877. switch ($fid)
  7878. {
  7879. case 0:
  7880. if ($ftype == TType::STRING) {
  7881. $xfer += $input->readString($this->success);
  7882. } else {
  7883. $xfer += $input->skip($ftype);
  7884. }
  7885. break;
  7886. case 1:
  7887. if ($ftype == TType::STRUCT) {
  7888. $this->ire = new cassandra_InvalidRequestException();
  7889. $xfer += $this->ire->read($input);
  7890. } else {
  7891. $xfer += $input->skip($ftype);
  7892. }
  7893. break;
  7894. case 2:
  7895. if ($ftype == TType::STRUCT) {
  7896. $this->sde = new cassandra_SchemaDisagreementException();
  7897. $xfer += $this->sde->read($input);
  7898. } else {
  7899. $xfer += $input->skip($ftype);
  7900. }
  7901. break;
  7902. default:
  7903. $xfer += $input->skip($ftype);
  7904. break;
  7905. }
  7906. $xfer += $input->readFieldEnd();
  7907. }
  7908. $xfer += $input->readStructEnd();
  7909. return $xfer;
  7910. }
  7911. public function write($output) {
  7912. $xfer = 0;
  7913. $xfer += $output->writeStructBegin('Cassandra_system_update_column_family_result');
  7914. if ($this->success !== null) {
  7915. $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
  7916. $xfer += $output->writeString($this->success);
  7917. $xfer += $output->writeFieldEnd();
  7918. }
  7919. if ($this->ire !== null) {
  7920. $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
  7921. $xfer += $this->ire->write($output);
  7922. $xfer += $output->writeFieldEnd();
  7923. }
  7924. if ($this->sde !== null) {
  7925. $xfer += $output->writeFieldBegin('sde', TType::STRUCT, 2);
  7926. $xfer += $this->sde->write($output);
  7927. $xfer += $output->writeFieldEnd();
  7928. }
  7929. $xfer += $output->writeFieldStop();
  7930. $xfer += $output->writeStructEnd();
  7931. return $xfer;
  7932. }
  7933. }
  7934. class cassandra_Cassandra_execute_cql_query_args {
  7935. static $_TSPEC;
  7936. public $query = null;
  7937. public $compression = null;
  7938. public function __construct($vals=null) {
  7939. if (!isset(self::$_TSPEC)) {
  7940. self::$_TSPEC = array(
  7941. 1 => array(
  7942. 'var' => 'query',
  7943. 'type' => TType::STRING,
  7944. ),
  7945. 2 => array(
  7946. 'var' => 'compression',
  7947. 'type' => TType::I32,
  7948. ),
  7949. );
  7950. }
  7951. if (is_array($vals)) {
  7952. if (isset($vals['query'])) {
  7953. $this->query = $vals['query'];
  7954. }
  7955. if (isset($vals['compression'])) {
  7956. $this->compression = $vals['compression'];
  7957. }
  7958. }
  7959. }
  7960. public function getName() {
  7961. return 'Cassandra_execute_cql_query_args';
  7962. }
  7963. public function read($input)
  7964. {
  7965. $xfer = 0;
  7966. $fname = null;
  7967. $ftype = 0;
  7968. $fid = 0;
  7969. $xfer += $input->readStructBegin($fname);
  7970. while (true)
  7971. {
  7972. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  7973. if ($ftype == TType::STOP) {
  7974. break;
  7975. }
  7976. switch ($fid)
  7977. {
  7978. case 1:
  7979. if ($ftype == TType::STRING) {
  7980. $xfer += $input->readString($this->query);
  7981. } else {
  7982. $xfer += $input->skip($ftype);
  7983. }
  7984. break;
  7985. case 2:
  7986. if ($ftype == TType::I32) {
  7987. $xfer += $input->readI32($this->compression);
  7988. } else {
  7989. $xfer += $input->skip($ftype);
  7990. }
  7991. break;
  7992. default:
  7993. $xfer += $input->skip($ftype);
  7994. break;
  7995. }
  7996. $xfer += $input->readFieldEnd();
  7997. }
  7998. $xfer += $input->readStructEnd();
  7999. return $xfer;
  8000. }
  8001. public function write($output) {
  8002. $xfer = 0;
  8003. $xfer += $output->writeStructBegin('Cassandra_execute_cql_query_args');
  8004. if ($this->query !== null) {
  8005. $xfer += $output->writeFieldBegin('query', TType::STRING, 1);
  8006. $xfer += $output->writeString($this->query);
  8007. $xfer += $output->writeFieldEnd();
  8008. }
  8009. if ($this->compression !== null) {
  8010. $xfer += $output->writeFieldBegin('compression', TType::I32, 2);
  8011. $xfer += $output->writeI32($this->compression);
  8012. $xfer += $output->writeFieldEnd();
  8013. }
  8014. $xfer += $output->writeFieldStop();
  8015. $xfer += $output->writeStructEnd();
  8016. return $xfer;
  8017. }
  8018. }
  8019. class cassandra_Cassandra_execute_cql_query_result {
  8020. static $_TSPEC;
  8021. public $success = null;
  8022. public $ire = null;
  8023. public $ue = null;
  8024. public $te = null;
  8025. public $sde = null;
  8026. public function __construct($vals=null) {
  8027. if (!isset(self::$_TSPEC)) {
  8028. self::$_TSPEC = array(
  8029. 0 => array(
  8030. 'var' => 'success',
  8031. 'type' => TType::STRUCT,
  8032. 'class' => 'cassandra_CqlResult',
  8033. ),
  8034. 1 => array(
  8035. 'var' => 'ire',
  8036. 'type' => TType::STRUCT,
  8037. 'class' => 'cassandra_InvalidRequestException',
  8038. ),
  8039. 2 => array(
  8040. 'var' => 'ue',
  8041. 'type' => TType::STRUCT,
  8042. 'class' => 'cassandra_UnavailableException',
  8043. ),
  8044. 3 => array(
  8045. 'var' => 'te',
  8046. 'type' => TType::STRUCT,
  8047. 'class' => 'cassandra_TimedOutException',
  8048. ),
  8049. 4 => array(
  8050. 'var' => 'sde',
  8051. 'type' => TType::STRUCT,
  8052. 'class' => 'cassandra_SchemaDisagreementException',
  8053. ),
  8054. );
  8055. }
  8056. if (is_array($vals)) {
  8057. if (isset($vals['success'])) {
  8058. $this->success = $vals['success'];
  8059. }
  8060. if (isset($vals['ire'])) {
  8061. $this->ire = $vals['ire'];
  8062. }
  8063. if (isset($vals['ue'])) {
  8064. $this->ue = $vals['ue'];
  8065. }
  8066. if (isset($vals['te'])) {
  8067. $this->te = $vals['te'];
  8068. }
  8069. if (isset($vals['sde'])) {
  8070. $this->sde = $vals['sde'];
  8071. }
  8072. }
  8073. }
  8074. public function getName() {
  8075. return 'Cassandra_execute_cql_query_result';
  8076. }
  8077. public function read($input)
  8078. {
  8079. $xfer = 0;
  8080. $fname = null;
  8081. $ftype = 0;
  8082. $fid = 0;
  8083. $xfer += $input->readStructBegin($fname);
  8084. while (true)
  8085. {
  8086. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  8087. if ($ftype == TType::STOP) {
  8088. break;
  8089. }
  8090. switch ($fid)
  8091. {
  8092. case 0:
  8093. if ($ftype == TType::STRUCT) {
  8094. $this->success = new cassandra_CqlResult();
  8095. $xfer += $this->success->read($input);
  8096. } else {
  8097. $xfer += $input->skip($ftype);
  8098. }
  8099. break;
  8100. case 1:
  8101. if ($ftype == TType::STRUCT) {
  8102. $this->ire = new cassandra_InvalidRequestException();
  8103. $xfer += $this->ire->read($input);
  8104. } else {
  8105. $xfer += $input->skip($ftype);
  8106. }
  8107. break;
  8108. case 2:
  8109. if ($ftype == TType::STRUCT) {
  8110. $this->ue = new cassandra_UnavailableException();
  8111. $xfer += $this->ue->read($input);
  8112. } else {
  8113. $xfer += $input->skip($ftype);
  8114. }
  8115. break;
  8116. case 3:
  8117. if ($ftype == TType::STRUCT) {
  8118. $this->te = new cassandra_TimedOutException();
  8119. $xfer += $this->te->read($input);
  8120. } else {
  8121. $xfer += $input->skip($ftype);
  8122. }
  8123. break;
  8124. case 4:
  8125. if ($ftype == TType::STRUCT) {
  8126. $this->sde = new cassandra_SchemaDisagreementException();
  8127. $xfer += $this->sde->read($input);
  8128. } else {
  8129. $xfer += $input->skip($ftype);
  8130. }
  8131. break;
  8132. default:
  8133. $xfer += $input->skip($ftype);
  8134. break;
  8135. }
  8136. $xfer += $input->readFieldEnd();
  8137. }
  8138. $xfer += $input->readStructEnd();
  8139. return $xfer;
  8140. }
  8141. public function write($output) {
  8142. $xfer = 0;
  8143. $xfer += $output->writeStructBegin('Cassandra_execute_cql_query_result');
  8144. if ($this->success !== null) {
  8145. if (!is_object($this->success)) {
  8146. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  8147. }
  8148. $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
  8149. $xfer += $this->success->write($output);
  8150. $xfer += $output->writeFieldEnd();
  8151. }
  8152. if ($this->ire !== null) {
  8153. $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
  8154. $xfer += $this->ire->write($output);
  8155. $xfer += $output->writeFieldEnd();
  8156. }
  8157. if ($this->ue !== null) {
  8158. $xfer += $output->writeFieldBegin('ue', TType::STRUCT, 2);
  8159. $xfer += $this->ue->write($output);
  8160. $xfer += $output->writeFieldEnd();
  8161. }
  8162. if ($this->te !== null) {
  8163. $xfer += $output->writeFieldBegin('te', TType::STRUCT, 3);
  8164. $xfer += $this->te->write($output);
  8165. $xfer += $output->writeFieldEnd();
  8166. }
  8167. if ($this->sde !== null) {
  8168. $xfer += $output->writeFieldBegin('sde', TType::STRUCT, 4);
  8169. $xfer += $this->sde->write($output);
  8170. $xfer += $output->writeFieldEnd();
  8171. }
  8172. $xfer += $output->writeFieldStop();
  8173. $xfer += $output->writeStructEnd();
  8174. return $xfer;
  8175. }
  8176. }
  8177. ?>