PageRenderTime 62ms CodeModel.GetById 24ms RepoModel.GetById 1ms app.codeStats 0ms

/thrift/packages/cassandra/cassandra_types.php

https://github.com/furqanrydhan/Cassandra-PHP-Client-Library
PHP | 4460 lines | 4218 code | 236 blank | 6 comment | 755 complexity | 471af85419337474af7d8af16817f599 MD5 | raw file

Large files files are truncated, but you can click here to view the full 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. $GLOBALS['cassandra_E_ConsistencyLevel'] = array(
  10. 'ONE' => 1,
  11. 'QUORUM' => 2,
  12. 'LOCAL_QUORUM' => 3,
  13. 'EACH_QUORUM' => 4,
  14. 'ALL' => 5,
  15. 'ANY' => 6,
  16. 'TWO' => 7,
  17. 'THREE' => 8,
  18. );
  19. final class ConsistencyLevel {
  20. const ONE = 1;
  21. const QUORUM = 2;
  22. const LOCAL_QUORUM = 3;
  23. const EACH_QUORUM = 4;
  24. const ALL = 5;
  25. const ANY = 6;
  26. const TWO = 7;
  27. const THREE = 8;
  28. static public $__names = array(
  29. 1 => 'ONE',
  30. 2 => 'QUORUM',
  31. 3 => 'LOCAL_QUORUM',
  32. 4 => 'EACH_QUORUM',
  33. 5 => 'ALL',
  34. 6 => 'ANY',
  35. 7 => 'TWO',
  36. 8 => 'THREE',
  37. );
  38. }
  39. $GLOBALS['cassandra_E_IndexOperator'] = array(
  40. 'EQ' => 0,
  41. 'GTE' => 1,
  42. 'GT' => 2,
  43. 'LTE' => 3,
  44. 'LT' => 4,
  45. );
  46. final class IndexOperator {
  47. const EQ = 0;
  48. const GTE = 1;
  49. const GT = 2;
  50. const LTE = 3;
  51. const LT = 4;
  52. static public $__names = array(
  53. 0 => 'EQ',
  54. 1 => 'GTE',
  55. 2 => 'GT',
  56. 3 => 'LTE',
  57. 4 => 'LT',
  58. );
  59. }
  60. $GLOBALS['cassandra_E_IndexType'] = array(
  61. 'KEYS' => 0,
  62. 'CUSTOM' => 1,
  63. );
  64. final class IndexType {
  65. const KEYS = 0;
  66. const CUSTOM = 1;
  67. static public $__names = array(
  68. 0 => 'KEYS',
  69. 1 => 'CUSTOM',
  70. );
  71. }
  72. $GLOBALS['cassandra_E_Compression'] = array(
  73. 'GZIP' => 1,
  74. 'NONE' => 2,
  75. );
  76. final class Compression {
  77. const GZIP = 1;
  78. const NONE = 2;
  79. static public $__names = array(
  80. 1 => 'GZIP',
  81. 2 => 'NONE',
  82. );
  83. }
  84. $GLOBALS['cassandra_E_CqlResultType'] = array(
  85. 'ROWS' => 1,
  86. 'VOID' => 2,
  87. 'INT' => 3,
  88. );
  89. final class CqlResultType {
  90. const ROWS = 1;
  91. const VOID = 2;
  92. const INT = 3;
  93. static public $__names = array(
  94. 1 => 'ROWS',
  95. 2 => 'VOID',
  96. 3 => 'INT',
  97. );
  98. }
  99. class cassandra_Column {
  100. static $_TSPEC;
  101. public $name = null;
  102. public $value = null;
  103. public $timestamp = null;
  104. public $ttl = null;
  105. public function __construct($vals=null) {
  106. if (!isset(self::$_TSPEC)) {
  107. self::$_TSPEC = array(
  108. 1 => array(
  109. 'var' => 'name',
  110. 'type' => TType::STRING,
  111. ),
  112. 2 => array(
  113. 'var' => 'value',
  114. 'type' => TType::STRING,
  115. ),
  116. 3 => array(
  117. 'var' => 'timestamp',
  118. 'type' => TType::I64,
  119. ),
  120. 4 => array(
  121. 'var' => 'ttl',
  122. 'type' => TType::I32,
  123. ),
  124. );
  125. }
  126. if (is_array($vals)) {
  127. if (isset($vals['name'])) {
  128. $this->name = $vals['name'];
  129. }
  130. if (isset($vals['value'])) {
  131. $this->value = $vals['value'];
  132. }
  133. if (isset($vals['timestamp'])) {
  134. $this->timestamp = $vals['timestamp'];
  135. }
  136. if (isset($vals['ttl'])) {
  137. $this->ttl = $vals['ttl'];
  138. }
  139. }
  140. }
  141. public function getName() {
  142. return 'Column';
  143. }
  144. public function read($input)
  145. {
  146. $xfer = 0;
  147. $fname = null;
  148. $ftype = 0;
  149. $fid = 0;
  150. $xfer += $input->readStructBegin($fname);
  151. while (true)
  152. {
  153. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  154. if ($ftype == TType::STOP) {
  155. break;
  156. }
  157. switch ($fid)
  158. {
  159. case 1:
  160. if ($ftype == TType::STRING) {
  161. $xfer += $input->readString($this->name);
  162. } else {
  163. $xfer += $input->skip($ftype);
  164. }
  165. break;
  166. case 2:
  167. if ($ftype == TType::STRING) {
  168. $xfer += $input->readString($this->value);
  169. } else {
  170. $xfer += $input->skip($ftype);
  171. }
  172. break;
  173. case 3:
  174. if ($ftype == TType::I64) {
  175. $xfer += $input->readI64($this->timestamp);
  176. } else {
  177. $xfer += $input->skip($ftype);
  178. }
  179. break;
  180. case 4:
  181. if ($ftype == TType::I32) {
  182. $xfer += $input->readI32($this->ttl);
  183. } else {
  184. $xfer += $input->skip($ftype);
  185. }
  186. break;
  187. default:
  188. $xfer += $input->skip($ftype);
  189. break;
  190. }
  191. $xfer += $input->readFieldEnd();
  192. }
  193. $xfer += $input->readStructEnd();
  194. return $xfer;
  195. }
  196. public function write($output) {
  197. $xfer = 0;
  198. $xfer += $output->writeStructBegin('Column');
  199. if ($this->name !== null) {
  200. $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
  201. $xfer += $output->writeString($this->name);
  202. $xfer += $output->writeFieldEnd();
  203. }
  204. if ($this->value !== null) {
  205. $xfer += $output->writeFieldBegin('value', TType::STRING, 2);
  206. $xfer += $output->writeString($this->value);
  207. $xfer += $output->writeFieldEnd();
  208. }
  209. if ($this->timestamp !== null) {
  210. $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
  211. $xfer += $output->writeI64($this->timestamp);
  212. $xfer += $output->writeFieldEnd();
  213. }
  214. if ($this->ttl !== null) {
  215. $xfer += $output->writeFieldBegin('ttl', TType::I32, 4);
  216. $xfer += $output->writeI32($this->ttl);
  217. $xfer += $output->writeFieldEnd();
  218. }
  219. $xfer += $output->writeFieldStop();
  220. $xfer += $output->writeStructEnd();
  221. return $xfer;
  222. }
  223. }
  224. class cassandra_SuperColumn {
  225. static $_TSPEC;
  226. public $name = null;
  227. public $columns = null;
  228. public function __construct($vals=null) {
  229. if (!isset(self::$_TSPEC)) {
  230. self::$_TSPEC = array(
  231. 1 => array(
  232. 'var' => 'name',
  233. 'type' => TType::STRING,
  234. ),
  235. 2 => array(
  236. 'var' => 'columns',
  237. 'type' => TType::LST,
  238. 'etype' => TType::STRUCT,
  239. 'elem' => array(
  240. 'type' => TType::STRUCT,
  241. 'class' => 'cassandra_Column',
  242. ),
  243. ),
  244. );
  245. }
  246. if (is_array($vals)) {
  247. if (isset($vals['name'])) {
  248. $this->name = $vals['name'];
  249. }
  250. if (isset($vals['columns'])) {
  251. $this->columns = $vals['columns'];
  252. }
  253. }
  254. }
  255. public function getName() {
  256. return 'SuperColumn';
  257. }
  258. public function read($input)
  259. {
  260. $xfer = 0;
  261. $fname = null;
  262. $ftype = 0;
  263. $fid = 0;
  264. $xfer += $input->readStructBegin($fname);
  265. while (true)
  266. {
  267. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  268. if ($ftype == TType::STOP) {
  269. break;
  270. }
  271. switch ($fid)
  272. {
  273. case 1:
  274. if ($ftype == TType::STRING) {
  275. $xfer += $input->readString($this->name);
  276. } else {
  277. $xfer += $input->skip($ftype);
  278. }
  279. break;
  280. case 2:
  281. if ($ftype == TType::LST) {
  282. $this->columns = array();
  283. $_size0 = 0;
  284. $_etype3 = 0;
  285. $xfer += $input->readListBegin($_etype3, $_size0);
  286. for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
  287. {
  288. $elem5 = null;
  289. $elem5 = new cassandra_Column();
  290. $xfer += $elem5->read($input);
  291. $this->columns []= $elem5;
  292. }
  293. $xfer += $input->readListEnd();
  294. } else {
  295. $xfer += $input->skip($ftype);
  296. }
  297. break;
  298. default:
  299. $xfer += $input->skip($ftype);
  300. break;
  301. }
  302. $xfer += $input->readFieldEnd();
  303. }
  304. $xfer += $input->readStructEnd();
  305. return $xfer;
  306. }
  307. public function write($output) {
  308. $xfer = 0;
  309. $xfer += $output->writeStructBegin('SuperColumn');
  310. if ($this->name !== null) {
  311. $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
  312. $xfer += $output->writeString($this->name);
  313. $xfer += $output->writeFieldEnd();
  314. }
  315. if ($this->columns !== null) {
  316. if (!is_array($this->columns)) {
  317. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  318. }
  319. $xfer += $output->writeFieldBegin('columns', TType::LST, 2);
  320. {
  321. $output->writeListBegin(TType::STRUCT, count($this->columns));
  322. {
  323. foreach ($this->columns as $iter6)
  324. {
  325. $xfer += $iter6->write($output);
  326. }
  327. }
  328. $output->writeListEnd();
  329. }
  330. $xfer += $output->writeFieldEnd();
  331. }
  332. $xfer += $output->writeFieldStop();
  333. $xfer += $output->writeStructEnd();
  334. return $xfer;
  335. }
  336. }
  337. class cassandra_CounterColumn {
  338. static $_TSPEC;
  339. public $name = null;
  340. public $value = null;
  341. public function __construct($vals=null) {
  342. if (!isset(self::$_TSPEC)) {
  343. self::$_TSPEC = array(
  344. 1 => array(
  345. 'var' => 'name',
  346. 'type' => TType::STRING,
  347. ),
  348. 2 => array(
  349. 'var' => 'value',
  350. 'type' => TType::I64,
  351. ),
  352. );
  353. }
  354. if (is_array($vals)) {
  355. if (isset($vals['name'])) {
  356. $this->name = $vals['name'];
  357. }
  358. if (isset($vals['value'])) {
  359. $this->value = $vals['value'];
  360. }
  361. }
  362. }
  363. public function getName() {
  364. return 'CounterColumn';
  365. }
  366. public function read($input)
  367. {
  368. $xfer = 0;
  369. $fname = null;
  370. $ftype = 0;
  371. $fid = 0;
  372. $xfer += $input->readStructBegin($fname);
  373. while (true)
  374. {
  375. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  376. if ($ftype == TType::STOP) {
  377. break;
  378. }
  379. switch ($fid)
  380. {
  381. case 1:
  382. if ($ftype == TType::STRING) {
  383. $xfer += $input->readString($this->name);
  384. } else {
  385. $xfer += $input->skip($ftype);
  386. }
  387. break;
  388. case 2:
  389. if ($ftype == TType::I64) {
  390. $xfer += $input->readI64($this->value);
  391. } else {
  392. $xfer += $input->skip($ftype);
  393. }
  394. break;
  395. default:
  396. $xfer += $input->skip($ftype);
  397. break;
  398. }
  399. $xfer += $input->readFieldEnd();
  400. }
  401. $xfer += $input->readStructEnd();
  402. return $xfer;
  403. }
  404. public function write($output) {
  405. $xfer = 0;
  406. $xfer += $output->writeStructBegin('CounterColumn');
  407. if ($this->name !== null) {
  408. $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
  409. $xfer += $output->writeString($this->name);
  410. $xfer += $output->writeFieldEnd();
  411. }
  412. if ($this->value !== null) {
  413. $xfer += $output->writeFieldBegin('value', TType::I64, 2);
  414. $xfer += $output->writeI64($this->value);
  415. $xfer += $output->writeFieldEnd();
  416. }
  417. $xfer += $output->writeFieldStop();
  418. $xfer += $output->writeStructEnd();
  419. return $xfer;
  420. }
  421. }
  422. class cassandra_CounterSuperColumn {
  423. static $_TSPEC;
  424. public $name = null;
  425. public $columns = null;
  426. public function __construct($vals=null) {
  427. if (!isset(self::$_TSPEC)) {
  428. self::$_TSPEC = array(
  429. 1 => array(
  430. 'var' => 'name',
  431. 'type' => TType::STRING,
  432. ),
  433. 2 => array(
  434. 'var' => 'columns',
  435. 'type' => TType::LST,
  436. 'etype' => TType::STRUCT,
  437. 'elem' => array(
  438. 'type' => TType::STRUCT,
  439. 'class' => 'cassandra_CounterColumn',
  440. ),
  441. ),
  442. );
  443. }
  444. if (is_array($vals)) {
  445. if (isset($vals['name'])) {
  446. $this->name = $vals['name'];
  447. }
  448. if (isset($vals['columns'])) {
  449. $this->columns = $vals['columns'];
  450. }
  451. }
  452. }
  453. public function getName() {
  454. return 'CounterSuperColumn';
  455. }
  456. public function read($input)
  457. {
  458. $xfer = 0;
  459. $fname = null;
  460. $ftype = 0;
  461. $fid = 0;
  462. $xfer += $input->readStructBegin($fname);
  463. while (true)
  464. {
  465. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  466. if ($ftype == TType::STOP) {
  467. break;
  468. }
  469. switch ($fid)
  470. {
  471. case 1:
  472. if ($ftype == TType::STRING) {
  473. $xfer += $input->readString($this->name);
  474. } else {
  475. $xfer += $input->skip($ftype);
  476. }
  477. break;
  478. case 2:
  479. if ($ftype == TType::LST) {
  480. $this->columns = array();
  481. $_size7 = 0;
  482. $_etype10 = 0;
  483. $xfer += $input->readListBegin($_etype10, $_size7);
  484. for ($_i11 = 0; $_i11 < $_size7; ++$_i11)
  485. {
  486. $elem12 = null;
  487. $elem12 = new cassandra_CounterColumn();
  488. $xfer += $elem12->read($input);
  489. $this->columns []= $elem12;
  490. }
  491. $xfer += $input->readListEnd();
  492. } else {
  493. $xfer += $input->skip($ftype);
  494. }
  495. break;
  496. default:
  497. $xfer += $input->skip($ftype);
  498. break;
  499. }
  500. $xfer += $input->readFieldEnd();
  501. }
  502. $xfer += $input->readStructEnd();
  503. return $xfer;
  504. }
  505. public function write($output) {
  506. $xfer = 0;
  507. $xfer += $output->writeStructBegin('CounterSuperColumn');
  508. if ($this->name !== null) {
  509. $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
  510. $xfer += $output->writeString($this->name);
  511. $xfer += $output->writeFieldEnd();
  512. }
  513. if ($this->columns !== null) {
  514. if (!is_array($this->columns)) {
  515. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  516. }
  517. $xfer += $output->writeFieldBegin('columns', TType::LST, 2);
  518. {
  519. $output->writeListBegin(TType::STRUCT, count($this->columns));
  520. {
  521. foreach ($this->columns as $iter13)
  522. {
  523. $xfer += $iter13->write($output);
  524. }
  525. }
  526. $output->writeListEnd();
  527. }
  528. $xfer += $output->writeFieldEnd();
  529. }
  530. $xfer += $output->writeFieldStop();
  531. $xfer += $output->writeStructEnd();
  532. return $xfer;
  533. }
  534. }
  535. class cassandra_ColumnOrSuperColumn {
  536. static $_TSPEC;
  537. public $column = null;
  538. public $super_column = null;
  539. public $counter_column = null;
  540. public $counter_super_column = null;
  541. public function __construct($vals=null) {
  542. if (!isset(self::$_TSPEC)) {
  543. self::$_TSPEC = array(
  544. 1 => array(
  545. 'var' => 'column',
  546. 'type' => TType::STRUCT,
  547. 'class' => 'cassandra_Column',
  548. ),
  549. 2 => array(
  550. 'var' => 'super_column',
  551. 'type' => TType::STRUCT,
  552. 'class' => 'cassandra_SuperColumn',
  553. ),
  554. 3 => array(
  555. 'var' => 'counter_column',
  556. 'type' => TType::STRUCT,
  557. 'class' => 'cassandra_CounterColumn',
  558. ),
  559. 4 => array(
  560. 'var' => 'counter_super_column',
  561. 'type' => TType::STRUCT,
  562. 'class' => 'cassandra_CounterSuperColumn',
  563. ),
  564. );
  565. }
  566. if (is_array($vals)) {
  567. if (isset($vals['column'])) {
  568. $this->column = $vals['column'];
  569. }
  570. if (isset($vals['super_column'])) {
  571. $this->super_column = $vals['super_column'];
  572. }
  573. if (isset($vals['counter_column'])) {
  574. $this->counter_column = $vals['counter_column'];
  575. }
  576. if (isset($vals['counter_super_column'])) {
  577. $this->counter_super_column = $vals['counter_super_column'];
  578. }
  579. }
  580. }
  581. public function getName() {
  582. return 'ColumnOrSuperColumn';
  583. }
  584. public function read($input)
  585. {
  586. $xfer = 0;
  587. $fname = null;
  588. $ftype = 0;
  589. $fid = 0;
  590. $xfer += $input->readStructBegin($fname);
  591. while (true)
  592. {
  593. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  594. if ($ftype == TType::STOP) {
  595. break;
  596. }
  597. switch ($fid)
  598. {
  599. case 1:
  600. if ($ftype == TType::STRUCT) {
  601. $this->column = new cassandra_Column();
  602. $xfer += $this->column->read($input);
  603. } else {
  604. $xfer += $input->skip($ftype);
  605. }
  606. break;
  607. case 2:
  608. if ($ftype == TType::STRUCT) {
  609. $this->super_column = new cassandra_SuperColumn();
  610. $xfer += $this->super_column->read($input);
  611. } else {
  612. $xfer += $input->skip($ftype);
  613. }
  614. break;
  615. case 3:
  616. if ($ftype == TType::STRUCT) {
  617. $this->counter_column = new cassandra_CounterColumn();
  618. $xfer += $this->counter_column->read($input);
  619. } else {
  620. $xfer += $input->skip($ftype);
  621. }
  622. break;
  623. case 4:
  624. if ($ftype == TType::STRUCT) {
  625. $this->counter_super_column = new cassandra_CounterSuperColumn();
  626. $xfer += $this->counter_super_column->read($input);
  627. } else {
  628. $xfer += $input->skip($ftype);
  629. }
  630. break;
  631. default:
  632. $xfer += $input->skip($ftype);
  633. break;
  634. }
  635. $xfer += $input->readFieldEnd();
  636. }
  637. $xfer += $input->readStructEnd();
  638. return $xfer;
  639. }
  640. public function write($output) {
  641. $xfer = 0;
  642. $xfer += $output->writeStructBegin('ColumnOrSuperColumn');
  643. if ($this->column !== null) {
  644. if (!is_object($this->column)) {
  645. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  646. }
  647. $xfer += $output->writeFieldBegin('column', TType::STRUCT, 1);
  648. $xfer += $this->column->write($output);
  649. $xfer += $output->writeFieldEnd();
  650. }
  651. if ($this->super_column !== null) {
  652. if (!is_object($this->super_column)) {
  653. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  654. }
  655. $xfer += $output->writeFieldBegin('super_column', TType::STRUCT, 2);
  656. $xfer += $this->super_column->write($output);
  657. $xfer += $output->writeFieldEnd();
  658. }
  659. if ($this->counter_column !== null) {
  660. if (!is_object($this->counter_column)) {
  661. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  662. }
  663. $xfer += $output->writeFieldBegin('counter_column', TType::STRUCT, 3);
  664. $xfer += $this->counter_column->write($output);
  665. $xfer += $output->writeFieldEnd();
  666. }
  667. if ($this->counter_super_column !== null) {
  668. if (!is_object($this->counter_super_column)) {
  669. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  670. }
  671. $xfer += $output->writeFieldBegin('counter_super_column', TType::STRUCT, 4);
  672. $xfer += $this->counter_super_column->write($output);
  673. $xfer += $output->writeFieldEnd();
  674. }
  675. $xfer += $output->writeFieldStop();
  676. $xfer += $output->writeStructEnd();
  677. return $xfer;
  678. }
  679. }
  680. class cassandra_NotFoundException extends TException {
  681. static $_TSPEC;
  682. public function __construct() {
  683. if (!isset(self::$_TSPEC)) {
  684. self::$_TSPEC = array(
  685. );
  686. }
  687. }
  688. public function getName() {
  689. return 'NotFoundException';
  690. }
  691. public function read($input)
  692. {
  693. $xfer = 0;
  694. $fname = null;
  695. $ftype = 0;
  696. $fid = 0;
  697. $xfer += $input->readStructBegin($fname);
  698. while (true)
  699. {
  700. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  701. if ($ftype == TType::STOP) {
  702. break;
  703. }
  704. switch ($fid)
  705. {
  706. default:
  707. $xfer += $input->skip($ftype);
  708. break;
  709. }
  710. $xfer += $input->readFieldEnd();
  711. }
  712. $xfer += $input->readStructEnd();
  713. return $xfer;
  714. }
  715. public function write($output) {
  716. $xfer = 0;
  717. $xfer += $output->writeStructBegin('NotFoundException');
  718. $xfer += $output->writeFieldStop();
  719. $xfer += $output->writeStructEnd();
  720. return $xfer;
  721. }
  722. }
  723. class cassandra_InvalidRequestException extends TException {
  724. static $_TSPEC;
  725. public $why = null;
  726. public function __construct($vals=null) {
  727. if (!isset(self::$_TSPEC)) {
  728. self::$_TSPEC = array(
  729. 1 => array(
  730. 'var' => 'why',
  731. 'type' => TType::STRING,
  732. ),
  733. );
  734. }
  735. if (is_array($vals)) {
  736. if (isset($vals['why'])) {
  737. $this->why = $vals['why'];
  738. }
  739. }
  740. }
  741. public function getName() {
  742. return 'InvalidRequestException';
  743. }
  744. public function read($input)
  745. {
  746. $xfer = 0;
  747. $fname = null;
  748. $ftype = 0;
  749. $fid = 0;
  750. $xfer += $input->readStructBegin($fname);
  751. while (true)
  752. {
  753. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  754. if ($ftype == TType::STOP) {
  755. break;
  756. }
  757. switch ($fid)
  758. {
  759. case 1:
  760. if ($ftype == TType::STRING) {
  761. $xfer += $input->readString($this->why);
  762. } else {
  763. $xfer += $input->skip($ftype);
  764. }
  765. break;
  766. default:
  767. $xfer += $input->skip($ftype);
  768. break;
  769. }
  770. $xfer += $input->readFieldEnd();
  771. }
  772. $xfer += $input->readStructEnd();
  773. return $xfer;
  774. }
  775. public function write($output) {
  776. $xfer = 0;
  777. $xfer += $output->writeStructBegin('InvalidRequestException');
  778. if ($this->why !== null) {
  779. $xfer += $output->writeFieldBegin('why', TType::STRING, 1);
  780. $xfer += $output->writeString($this->why);
  781. $xfer += $output->writeFieldEnd();
  782. }
  783. $xfer += $output->writeFieldStop();
  784. $xfer += $output->writeStructEnd();
  785. return $xfer;
  786. }
  787. }
  788. class cassandra_UnavailableException extends TException {
  789. static $_TSPEC;
  790. public function __construct() {
  791. if (!isset(self::$_TSPEC)) {
  792. self::$_TSPEC = array(
  793. );
  794. }
  795. }
  796. public function getName() {
  797. return 'UnavailableException';
  798. }
  799. public function read($input)
  800. {
  801. $xfer = 0;
  802. $fname = null;
  803. $ftype = 0;
  804. $fid = 0;
  805. $xfer += $input->readStructBegin($fname);
  806. while (true)
  807. {
  808. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  809. if ($ftype == TType::STOP) {
  810. break;
  811. }
  812. switch ($fid)
  813. {
  814. default:
  815. $xfer += $input->skip($ftype);
  816. break;
  817. }
  818. $xfer += $input->readFieldEnd();
  819. }
  820. $xfer += $input->readStructEnd();
  821. return $xfer;
  822. }
  823. public function write($output) {
  824. $xfer = 0;
  825. $xfer += $output->writeStructBegin('UnavailableException');
  826. $xfer += $output->writeFieldStop();
  827. $xfer += $output->writeStructEnd();
  828. return $xfer;
  829. }
  830. }
  831. class cassandra_TimedOutException extends TException {
  832. static $_TSPEC;
  833. public function __construct() {
  834. if (!isset(self::$_TSPEC)) {
  835. self::$_TSPEC = array(
  836. );
  837. }
  838. }
  839. public function getName() {
  840. return 'TimedOutException';
  841. }
  842. public function read($input)
  843. {
  844. $xfer = 0;
  845. $fname = null;
  846. $ftype = 0;
  847. $fid = 0;
  848. $xfer += $input->readStructBegin($fname);
  849. while (true)
  850. {
  851. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  852. if ($ftype == TType::STOP) {
  853. break;
  854. }
  855. switch ($fid)
  856. {
  857. default:
  858. $xfer += $input->skip($ftype);
  859. break;
  860. }
  861. $xfer += $input->readFieldEnd();
  862. }
  863. $xfer += $input->readStructEnd();
  864. return $xfer;
  865. }
  866. public function write($output) {
  867. $xfer = 0;
  868. $xfer += $output->writeStructBegin('TimedOutException');
  869. $xfer += $output->writeFieldStop();
  870. $xfer += $output->writeStructEnd();
  871. return $xfer;
  872. }
  873. }
  874. class cassandra_AuthenticationException extends TException {
  875. static $_TSPEC;
  876. public $why = null;
  877. public function __construct($vals=null) {
  878. if (!isset(self::$_TSPEC)) {
  879. self::$_TSPEC = array(
  880. 1 => array(
  881. 'var' => 'why',
  882. 'type' => TType::STRING,
  883. ),
  884. );
  885. }
  886. if (is_array($vals)) {
  887. if (isset($vals['why'])) {
  888. $this->why = $vals['why'];
  889. }
  890. }
  891. }
  892. public function getName() {
  893. return 'AuthenticationException';
  894. }
  895. public function read($input)
  896. {
  897. $xfer = 0;
  898. $fname = null;
  899. $ftype = 0;
  900. $fid = 0;
  901. $xfer += $input->readStructBegin($fname);
  902. while (true)
  903. {
  904. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  905. if ($ftype == TType::STOP) {
  906. break;
  907. }
  908. switch ($fid)
  909. {
  910. case 1:
  911. if ($ftype == TType::STRING) {
  912. $xfer += $input->readString($this->why);
  913. } else {
  914. $xfer += $input->skip($ftype);
  915. }
  916. break;
  917. default:
  918. $xfer += $input->skip($ftype);
  919. break;
  920. }
  921. $xfer += $input->readFieldEnd();
  922. }
  923. $xfer += $input->readStructEnd();
  924. return $xfer;
  925. }
  926. public function write($output) {
  927. $xfer = 0;
  928. $xfer += $output->writeStructBegin('AuthenticationException');
  929. if ($this->why !== null) {
  930. $xfer += $output->writeFieldBegin('why', TType::STRING, 1);
  931. $xfer += $output->writeString($this->why);
  932. $xfer += $output->writeFieldEnd();
  933. }
  934. $xfer += $output->writeFieldStop();
  935. $xfer += $output->writeStructEnd();
  936. return $xfer;
  937. }
  938. }
  939. class cassandra_AuthorizationException extends TException {
  940. static $_TSPEC;
  941. public $why = null;
  942. public function __construct($vals=null) {
  943. if (!isset(self::$_TSPEC)) {
  944. self::$_TSPEC = array(
  945. 1 => array(
  946. 'var' => 'why',
  947. 'type' => TType::STRING,
  948. ),
  949. );
  950. }
  951. if (is_array($vals)) {
  952. if (isset($vals['why'])) {
  953. $this->why = $vals['why'];
  954. }
  955. }
  956. }
  957. public function getName() {
  958. return 'AuthorizationException';
  959. }
  960. public function read($input)
  961. {
  962. $xfer = 0;
  963. $fname = null;
  964. $ftype = 0;
  965. $fid = 0;
  966. $xfer += $input->readStructBegin($fname);
  967. while (true)
  968. {
  969. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  970. if ($ftype == TType::STOP) {
  971. break;
  972. }
  973. switch ($fid)
  974. {
  975. case 1:
  976. if ($ftype == TType::STRING) {
  977. $xfer += $input->readString($this->why);
  978. } else {
  979. $xfer += $input->skip($ftype);
  980. }
  981. break;
  982. default:
  983. $xfer += $input->skip($ftype);
  984. break;
  985. }
  986. $xfer += $input->readFieldEnd();
  987. }
  988. $xfer += $input->readStructEnd();
  989. return $xfer;
  990. }
  991. public function write($output) {
  992. $xfer = 0;
  993. $xfer += $output->writeStructBegin('AuthorizationException');
  994. if ($this->why !== null) {
  995. $xfer += $output->writeFieldBegin('why', TType::STRING, 1);
  996. $xfer += $output->writeString($this->why);
  997. $xfer += $output->writeFieldEnd();
  998. }
  999. $xfer += $output->writeFieldStop();
  1000. $xfer += $output->writeStructEnd();
  1001. return $xfer;
  1002. }
  1003. }
  1004. class cassandra_SchemaDisagreementException extends TException {
  1005. static $_TSPEC;
  1006. public function __construct() {
  1007. if (!isset(self::$_TSPEC)) {
  1008. self::$_TSPEC = array(
  1009. );
  1010. }
  1011. }
  1012. public function getName() {
  1013. return 'SchemaDisagreementException';
  1014. }
  1015. public function read($input)
  1016. {
  1017. $xfer = 0;
  1018. $fname = null;
  1019. $ftype = 0;
  1020. $fid = 0;
  1021. $xfer += $input->readStructBegin($fname);
  1022. while (true)
  1023. {
  1024. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  1025. if ($ftype == TType::STOP) {
  1026. break;
  1027. }
  1028. switch ($fid)
  1029. {
  1030. default:
  1031. $xfer += $input->skip($ftype);
  1032. break;
  1033. }
  1034. $xfer += $input->readFieldEnd();
  1035. }
  1036. $xfer += $input->readStructEnd();
  1037. return $xfer;
  1038. }
  1039. public function write($output) {
  1040. $xfer = 0;
  1041. $xfer += $output->writeStructBegin('SchemaDisagreementException');
  1042. $xfer += $output->writeFieldStop();
  1043. $xfer += $output->writeStructEnd();
  1044. return $xfer;
  1045. }
  1046. }
  1047. class cassandra_ColumnParent {
  1048. static $_TSPEC;
  1049. public $column_family = null;
  1050. public $super_column = null;
  1051. public function __construct($vals=null) {
  1052. if (!isset(self::$_TSPEC)) {
  1053. self::$_TSPEC = array(
  1054. 3 => array(
  1055. 'var' => 'column_family',
  1056. 'type' => TType::STRING,
  1057. ),
  1058. 4 => array(
  1059. 'var' => 'super_column',
  1060. 'type' => TType::STRING,
  1061. ),
  1062. );
  1063. }
  1064. if (is_array($vals)) {
  1065. if (isset($vals['column_family'])) {
  1066. $this->column_family = $vals['column_family'];
  1067. }
  1068. if (isset($vals['super_column'])) {
  1069. $this->super_column = $vals['super_column'];
  1070. }
  1071. }
  1072. }
  1073. public function getName() {
  1074. return 'ColumnParent';
  1075. }
  1076. public function read($input)
  1077. {
  1078. $xfer = 0;
  1079. $fname = null;
  1080. $ftype = 0;
  1081. $fid = 0;
  1082. $xfer += $input->readStructBegin($fname);
  1083. while (true)
  1084. {
  1085. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  1086. if ($ftype == TType::STOP) {
  1087. break;
  1088. }
  1089. switch ($fid)
  1090. {
  1091. case 3:
  1092. if ($ftype == TType::STRING) {
  1093. $xfer += $input->readString($this->column_family);
  1094. } else {
  1095. $xfer += $input->skip($ftype);
  1096. }
  1097. break;
  1098. case 4:
  1099. if ($ftype == TType::STRING) {
  1100. $xfer += $input->readString($this->super_column);
  1101. } else {
  1102. $xfer += $input->skip($ftype);
  1103. }
  1104. break;
  1105. default:
  1106. $xfer += $input->skip($ftype);
  1107. break;
  1108. }
  1109. $xfer += $input->readFieldEnd();
  1110. }
  1111. $xfer += $input->readStructEnd();
  1112. return $xfer;
  1113. }
  1114. public function write($output) {
  1115. $xfer = 0;
  1116. $xfer += $output->writeStructBegin('ColumnParent');
  1117. if ($this->column_family !== null) {
  1118. $xfer += $output->writeFieldBegin('column_family', TType::STRING, 3);
  1119. $xfer += $output->writeString($this->column_family);
  1120. $xfer += $output->writeFieldEnd();
  1121. }
  1122. if ($this->super_column !== null) {
  1123. $xfer += $output->writeFieldBegin('super_column', TType::STRING, 4);
  1124. $xfer += $output->writeString($this->super_column);
  1125. $xfer += $output->writeFieldEnd();
  1126. }
  1127. $xfer += $output->writeFieldStop();
  1128. $xfer += $output->writeStructEnd();
  1129. return $xfer;
  1130. }
  1131. }
  1132. class cassandra_ColumnPath {
  1133. static $_TSPEC;
  1134. public $column_family = null;
  1135. public $super_column = null;
  1136. public $column = null;
  1137. public function __construct($vals=null) {
  1138. if (!isset(self::$_TSPEC)) {
  1139. self::$_TSPEC = array(
  1140. 3 => array(
  1141. 'var' => 'column_family',
  1142. 'type' => TType::STRING,
  1143. ),
  1144. 4 => array(
  1145. 'var' => 'super_column',
  1146. 'type' => TType::STRING,
  1147. ),
  1148. 5 => array(
  1149. 'var' => 'column',
  1150. 'type' => TType::STRING,
  1151. ),
  1152. );
  1153. }
  1154. if (is_array($vals)) {
  1155. if (isset($vals['column_family'])) {
  1156. $this->column_family = $vals['column_family'];
  1157. }
  1158. if (isset($vals['super_column'])) {
  1159. $this->super_column = $vals['super_column'];
  1160. }
  1161. if (isset($vals['column'])) {
  1162. $this->column = $vals['column'];
  1163. }
  1164. }
  1165. }
  1166. public function getName() {
  1167. return 'ColumnPath';
  1168. }
  1169. public function read($input)
  1170. {
  1171. $xfer = 0;
  1172. $fname = null;
  1173. $ftype = 0;
  1174. $fid = 0;
  1175. $xfer += $input->readStructBegin($fname);
  1176. while (true)
  1177. {
  1178. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  1179. if ($ftype == TType::STOP) {
  1180. break;
  1181. }
  1182. switch ($fid)
  1183. {
  1184. case 3:
  1185. if ($ftype == TType::STRING) {
  1186. $xfer += $input->readString($this->column_family);
  1187. } else {
  1188. $xfer += $input->skip($ftype);
  1189. }
  1190. break;
  1191. case 4:
  1192. if ($ftype == TType::STRING) {
  1193. $xfer += $input->readString($this->super_column);
  1194. } else {
  1195. $xfer += $input->skip($ftype);
  1196. }
  1197. break;
  1198. case 5:
  1199. if ($ftype == TType::STRING) {
  1200. $xfer += $input->readString($this->column);
  1201. } else {
  1202. $xfer += $input->skip($ftype);
  1203. }
  1204. break;
  1205. default:
  1206. $xfer += $input->skip($ftype);
  1207. break;
  1208. }
  1209. $xfer += $input->readFieldEnd();
  1210. }
  1211. $xfer += $input->readStructEnd();
  1212. return $xfer;
  1213. }
  1214. public function write($output) {
  1215. $xfer = 0;
  1216. $xfer += $output->writeStructBegin('ColumnPath');
  1217. if ($this->column_family !== null) {
  1218. $xfer += $output->writeFieldBegin('column_family', TType::STRING, 3);
  1219. $xfer += $output->writeString($this->column_family);
  1220. $xfer += $output->writeFieldEnd();
  1221. }
  1222. if ($this->super_column !== null) {
  1223. $xfer += $output->writeFieldBegin('super_column', TType::STRING, 4);
  1224. $xfer += $output->writeString($this->super_column);
  1225. $xfer += $output->writeFieldEnd();
  1226. }
  1227. if ($this->column !== null) {
  1228. $xfer += $output->writeFieldBegin('column', TType::STRING, 5);
  1229. $xfer += $output->writeString($this->column);
  1230. $xfer += $output->writeFieldEnd();
  1231. }
  1232. $xfer += $output->writeFieldStop();
  1233. $xfer += $output->writeStructEnd();
  1234. return $xfer;
  1235. }
  1236. }
  1237. class cassandra_SliceRange {
  1238. static $_TSPEC;
  1239. public $start = null;
  1240. public $finish = null;
  1241. public $reversed = false;
  1242. public $count = 100;
  1243. public function __construct($vals=null) {
  1244. if (!isset(self::$_TSPEC)) {
  1245. self::$_TSPEC = array(
  1246. 1 => array(
  1247. 'var' => 'start',
  1248. 'type' => TType::STRING,
  1249. ),
  1250. 2 => array(
  1251. 'var' => 'finish',
  1252. 'type' => TType::STRING,
  1253. ),
  1254. 3 => array(
  1255. 'var' => 'reversed',
  1256. 'type' => TType::BOOL,
  1257. ),
  1258. 4 => array(
  1259. 'var' => 'count',
  1260. 'type' => TType::I32,
  1261. ),
  1262. );
  1263. }
  1264. if (is_array($vals)) {
  1265. if (isset($vals['start'])) {
  1266. $this->start = $vals['start'];
  1267. }
  1268. if (isset($vals['finish'])) {
  1269. $this->finish = $vals['finish'];
  1270. }
  1271. if (isset($vals['reversed'])) {
  1272. $this->reversed = $vals['reversed'];
  1273. }
  1274. if (isset($vals['count'])) {
  1275. $this->count = $vals['count'];
  1276. }
  1277. }
  1278. }
  1279. public function getName() {
  1280. return 'SliceRange';
  1281. }
  1282. public function read($input)
  1283. {
  1284. $xfer = 0;
  1285. $fname = null;
  1286. $ftype = 0;
  1287. $fid = 0;
  1288. $xfer += $input->readStructBegin($fname);
  1289. while (true)
  1290. {
  1291. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  1292. if ($ftype == TType::STOP) {
  1293. break;
  1294. }
  1295. switch ($fid)
  1296. {
  1297. case 1:
  1298. if ($ftype == TType::STRING) {
  1299. $xfer += $input->readString($this->start);
  1300. } else {
  1301. $xfer += $input->skip($ftype);
  1302. }
  1303. break;
  1304. case 2:
  1305. if ($ftype == TType::STRING) {
  1306. $xfer += $input->readString($this->finish);
  1307. } else {
  1308. $xfer += $input->skip($ftype);
  1309. }
  1310. break;
  1311. case 3:
  1312. if ($ftype == TType::BOOL) {
  1313. $xfer += $input->readBool($this->reversed);
  1314. } else {
  1315. $xfer += $input->skip($ftype);
  1316. }
  1317. break;
  1318. case 4:
  1319. if ($ftype == TType::I32) {
  1320. $xfer += $input->readI32($this->count);
  1321. } else {
  1322. $xfer += $input->skip($ftype);
  1323. }
  1324. break;
  1325. default:
  1326. $xfer += $input->skip($ftype);
  1327. break;
  1328. }
  1329. $xfer += $input->readFieldEnd();
  1330. }
  1331. $xfer += $input->readStructEnd();
  1332. return $xfer;
  1333. }
  1334. public function write($output) {
  1335. $xfer = 0;
  1336. $xfer += $output->writeStructBegin('SliceRange');
  1337. if ($this->start !== null) {
  1338. $xfer += $output->writeFieldBegin('start', TType::STRING, 1);
  1339. $xfer += $output->writeString($this->start);
  1340. $xfer += $output->writeFieldEnd();
  1341. }
  1342. if ($this->finish !== null) {
  1343. $xfer += $output->writeFieldBegin('finish', TType::STRING, 2);
  1344. $xfer += $output->writeString($this->finish);
  1345. $xfer += $output->writeFieldEnd();
  1346. }
  1347. if ($this->reversed !== null) {
  1348. $xfer += $output->writeFieldBegin('reversed', TType::BOOL, 3);
  1349. $xfer += $output->writeBool($this->reversed);
  1350. $xfer += $output->writeFieldEnd();
  1351. }
  1352. if ($this->count !== null) {
  1353. $xfer += $output->writeFieldBegin('count', TType::I32, 4);
  1354. $xfer += $output->writeI32($this->count);
  1355. $xfer += $output->writeFieldEnd();
  1356. }
  1357. $xfer += $output->writeFieldStop();
  1358. $xfer += $output->writeStructEnd();
  1359. return $xfer;
  1360. }
  1361. }
  1362. class cassandra_SlicePredicate {
  1363. static $_TSPEC;
  1364. public $column_names = null;
  1365. public $slice_range = null;
  1366. public function __construct($vals=null) {
  1367. if (!isset(self::$_TSPEC)) {
  1368. self::$_TSPEC = array(
  1369. 1 => array(
  1370. 'var' => 'column_names',
  1371. 'type' => TType::LST,
  1372. 'etype' => TType::STRING,
  1373. 'elem' => array(
  1374. 'type' => TType::STRING,
  1375. ),
  1376. ),
  1377. 2 => array(
  1378. 'var' => 'slice_range',
  1379. 'type' => TType::STRUCT,
  1380. 'class' => 'cassandra_SliceRange',
  1381. ),
  1382. );
  1383. }
  1384. if (is_array($vals)) {
  1385. if (isset($vals['column_names'])) {
  1386. $this->column_names = $vals['column_names'];
  1387. }
  1388. if (isset($vals['slice_range'])) {
  1389. $this->slice_range = $vals['slice_range'];
  1390. }
  1391. }
  1392. }
  1393. public function getName() {
  1394. return 'SlicePredicate';
  1395. }
  1396. public function read($input)
  1397. {
  1398. $xfer = 0;
  1399. $fname = null;
  1400. $ftype = 0;
  1401. $fid = 0;
  1402. $xfer += $input->readStructBegin($fname);
  1403. while (true)
  1404. {
  1405. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  1406. if ($ftype == TType::STOP) {
  1407. break;
  1408. }
  1409. switch ($fid)
  1410. {
  1411. case 1:
  1412. if ($ftype == TType::LST) {
  1413. $this->column_names = array();
  1414. $_size14 = 0;
  1415. $_etype17 = 0;
  1416. $xfer += $input->readListBegin($_etype17, $_size14);
  1417. for ($_i18 = 0; $_i18 < $_size14; ++$_i18)
  1418. {
  1419. $elem19 = null;
  1420. $xfer += $input->readString($elem19);
  1421. $this->column_names []= $elem19;
  1422. }
  1423. $xfer += $input->readListEnd();
  1424. } else {
  1425. $xfer += $input->skip($ftype);
  1426. }
  1427. break;
  1428. case 2:
  1429. if ($ftype == TType::STRUCT) {
  1430. $this->slice_range = new cassandra_SliceRange();
  1431. $xfer += $this->slice_range->read($input);
  1432. } else {
  1433. $xfer += $input->skip($ftype);
  1434. }
  1435. break;
  1436. default:
  1437. $xfer += $input->skip($ftype);
  1438. break;
  1439. }
  1440. $xfer += $input->readFieldEnd();
  1441. }
  1442. $xfer += $input->readStructEnd();
  1443. return $xfer;
  1444. }
  1445. public function write($output) {
  1446. $xfer = 0;
  1447. $xfer += $output->writeStructBegin('SlicePredicate');
  1448. if ($this->column_names !== null) {
  1449. if (!is_array($this->column_names)) {
  1450. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  1451. }
  1452. $xfer += $output->writeFieldBegin('column_names', TType::LST, 1);
  1453. {
  1454. $output->writeListBegin(TType::STRING, count($this->column_names));
  1455. {
  1456. foreach ($this->column_names as $iter20)
  1457. {
  1458. $xfer += $output->writeString($iter20);
  1459. }
  1460. }
  1461. $output->writeListEnd();
  1462. }
  1463. $xfer += $output->writeFieldEnd();
  1464. }
  1465. if ($this->slice_range !== null) {
  1466. if (!is_object($this->slice_range)) {
  1467. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  1468. }
  1469. $xfer += $output->writeFieldBegin('slice_range', TType::STRUCT, 2);
  1470. $xfer += $this->slice_range->write($output);
  1471. $xfer += $output->writeFieldEnd();
  1472. }
  1473. $xfer += $output->writeFieldStop();
  1474. $xfer += $output->writeStructEnd();
  1475. return $xfer;
  1476. }
  1477. }
  1478. class cassandra_IndexExpression {
  1479. static $_TSPEC;
  1480. public $column_name = null;
  1481. public $op = null;
  1482. public $value = null;
  1483. public function __construct($vals=null) {
  1484. if (!isset(self::$_TSPEC)) {
  1485. self::$_TSPEC = array(
  1486. 1 => array(
  1487. 'var' => 'column_name',
  1488. 'type' => TType::STRING,
  1489. ),
  1490. 2 => array(
  1491. 'var' => 'op',
  1492. 'type' => TType::I32,
  1493. ),
  1494. 3 => array(
  1495. 'var' => 'value',
  1496. 'type' => TType::STRING,
  1497. ),
  1498. );
  1499. }
  1500. if (is_array($vals)) {
  1501. if (isset($vals['column_name'])) {
  1502. $this->column_name = $vals['column_name'];
  1503. }
  1504. if (isset($vals['op'])) {
  1505. $this->op = $vals['op'];
  1506. }
  1507. if (isset($vals['value'])) {
  1508. $this->value = $vals['value'];
  1509. }
  1510. }
  1511. }
  1512. public function getName() {
  1513. return 'IndexExpression';
  1514. }
  1515. public function read($input)
  1516. {
  1517. $xfer = 0;
  1518. $fname = null;
  1519. $ftype = 0;
  1520. $fid = 0;
  1521. $xfer += $input->readStructBegin($fname);
  1522. while (true)
  1523. {
  1524. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  1525. if ($ftype == TType::STOP) {
  1526. break;
  1527. }
  1528. switch ($fid)
  1529. {
  1530. case 1:
  1531. if ($ftype == TType::STRING) {
  1532. $xfer += $input->readString($this->column_name);
  1533. } else {
  1534. $xfer += $input->skip($ftype);
  1535. }
  1536. break;
  1537. case 2:
  1538. if ($ftype == TType::I32) {
  1539. $xfer += $input->readI32($this->op);
  1540. } else {
  1541. $xfer += $input->skip($ftype);
  1542. }
  1543. break;
  1544. case 3:
  1545. if ($ftype == TType::STRING) {
  1546. $xfer += $input->readString($this->value);
  1547. } else {
  1548. $xfer += $input->skip($ftype);
  1549. }
  1550. break;
  1551. default:
  1552. $xfer += $input->skip($ftype);
  1553. break;
  1554. }
  1555. $xfer += $input->readFieldEnd();
  1556. }
  1557. $xfer += $input->readStructEnd();
  1558. return $xfer;
  1559. }
  1560. public function write($output) {
  1561. $xfer = 0;
  1562. $xfer += $output->writeStructBegin('IndexExpression');
  1563. if ($this->column_name !== null) {
  1564. $xfer += $output->writeFieldBegin('column_name', TType::STRING, 1);
  1565. $xfer += $output->writeString($this->column_name);
  1566. $xfer += $output->writeFieldEnd();
  1567. }
  1568. if ($this->op !== null) {
  1569. $xfer += $output->writeFieldBegin('op', TType::I32, 2);
  1570. $xfer += $output->writeI32($this->op);
  1571. $xfer += $output->writeFieldEnd();
  1572. }
  1573. if ($this->value !== null) {
  1574. $xfer += $output->writeFieldBegin('value', TType::STRING, 3);
  1575. $xfer += $output->writeString($this->value);
  1576. $xfer += $output->writeFieldEnd();
  1577. }
  1578. $xfer += $output->writeFieldStop();
  1579. $xfer += $output->writeStructEnd();
  1580. return $xfer;
  1581. }
  1582. }
  1583. class cassandra_IndexClause {
  1584. static $_TSPEC;
  1585. public $expressions = null;
  1586. public $start_key = null;
  1587. public $count = 100;
  1588. public function __construct($vals=null) {
  1589. if (!isset(self::$_TSPEC)) {
  1590. self::$_TSPEC = array(
  1591. 1 => array(
  1592. 'var' => 'expressions',
  1593. 'type' => TType::LST,
  1594. 'etype' => TType::STRUCT,
  1595. 'elem' => array(
  1596. 'type' => TType::STRUCT,
  1597. 'class' => 'cassandra_IndexExpression',
  1598. ),
  1599. ),
  1600. 2 => array(
  1601. 'var' => 'start_key',
  1602. 'type' => TType::STRING,
  1603. ),
  1604. 3 => array(
  1605. 'var' => 'count',
  1606. 'type' => TType::I32,
  1607. ),
  1608. );
  1609. }
  1610. if (is_array($vals)) {
  1611. if (isset($vals['expressions'])) {
  1612. $this->expressions = $vals['expressions'];
  1613. }
  1614. if (isset($vals['start_key'])) {
  1615. $this->start_key = $vals['start_key'];
  1616. }
  1617. if (isset($vals['count'])) {
  1618. $this->count = $vals['count'];
  1619. }
  1620. }
  1621. }
  1622. public function getName() {
  1623. return 'IndexClause';
  1624. }
  1625. public function read($input)
  1626. {
  1627. $xfer = 0;
  1628. $fname = null;
  1629. $ftype = 0;
  1630. $fid = 0;
  1631. $xfer += $input->readStructBegin($fname);
  1632. while (true)
  1633. {
  1634. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  1635. if ($ftype == TType::STOP) {
  1636. break;
  1637. }
  1638. switch ($fid)
  1639. {
  1640. case 1:
  1641. if ($ftype == TType::LST) {
  1642. $this->expressions = array();
  1643. $_size21 = 0;
  1644. $_etype24 = 0;
  1645. $xfer += $input->readListBegin($_etype24, $_size21);
  1646. for ($_i25 = 0; $_i25 < $_size21; ++$_i25)
  1647. {
  1648. $elem26 = null;
  1649. $elem26 = new cassandra_IndexExpression();
  1650. $xfer += $elem26->read($input);
  1651. $this->expressions []= $elem26;
  1652. }
  1653. $xfer += $input->readListEnd();
  1654. } else {
  1655. $xfer += $input->skip($ftype);
  1656. }
  1657. break;
  1658. case 2:
  1659. if ($ftype == TType::STRING) {
  1660. $xfer += $input->readString($this->start_key);
  1661. } else {
  1662. $xfer += $input->skip($ftype);
  1663. }
  1664. break;
  1665. case 3:
  1666. if ($ftype == TType::I32) {
  1667. $xfer += $input->readI32($this->count);
  1668. } else {
  1669. $xfer += $input->skip($ftype);
  1670. }
  1671. break;
  1672. default:
  1673. $xfer += $input->skip($ftype);
  1674. break;
  1675. }
  1676. $xfer += $input->readFieldEnd();
  1677. }
  1678. $xfer += $input->readStructEnd();
  1679. return $xfer;
  1680. }
  1681. public function write($output) {
  1682. $xfer = 0;
  1683. $xfer += $output->writeStructBegin('IndexClause');
  1684. if ($this->expressions !== null) {
  1685. if (!is_array($this->expressions)) {
  1686. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  1687. }
  1688. $xfer += $output->writeFieldBegin('expressions', TType::LST, 1);
  1689. {
  1690. $output->writeListBegin(TType::STRUCT, count($this->expressions));
  1691. {
  1692. foreach ($this->expressions as $iter27)
  1693. {
  1694. $xfer += $iter27->write($output);
  1695. }
  1696. }
  1697. $output->writeListEnd();
  1698. }
  1699. $xfer += $output->writeFieldEnd();
  1700. }
  1701. if ($this->start_key !== null) {
  1702. $xfer += $output->writeFieldBegin('start_key', TType::STRING, 2);
  1703. $xfer += $output->writeString($this->start_key);
  1704. $xfer += $output->writeFieldEnd();
  1705. }
  1706. if ($this->count !== null) {
  1707. $xfer += $output->writeFieldBegin('count', TType::I32, 3);
  1708. $xfer += $output->writeI32($this->count);
  1709. $xfer += $output->writeFieldEnd();
  1710. }
  1711. $xfer += $output->writeFieldStop();
  1712. $xfer += $output->writeStructEnd();
  1713. return $xfer;
  1714. }
  1715. }
  1716. class cassandra_KeyRange {
  1717. static $_TSPEC;
  1718. public $start_key = null;
  1719. public $end_key = null;
  1720. public $start_token = null;
  1721. public $end_token = null;
  1722. public $count = 100;
  1723. public function __construct($vals=null) {
  1724. if (!isset(self::$_TSPEC)) {
  1725. self::$_TSPEC = array(
  1726. 1 => array(
  1727. 'var' => 'start_key',
  1728. 'type' => TType::STRING,
  1729. ),
  1730. 2 => array(
  1731. 'var' => 'end_key',
  1732. 'type' => TType::STRING,
  1733. ),
  1734. 3 => array(
  1735. 'var' => 'start_token',
  1736. 'type' => TType::STRING,
  1737. ),
  1738. 4 => array(
  1739. 'var' => 'end_token',
  1740. 'type' => TType::STRING,
  1741. ),
  1742. 5 => array(
  1743. 'var' => 'count',
  1744. 'type' => TType::I32,
  1745. ),
  1746. );
  1747. }
  1748. if (is_array($vals)) {
  1749. if (isset($vals['start_key'])) {
  1750. $this->start_key = $vals['start_key'];
  1751. }
  1752. if (isset($vals['end_key'])) {
  1753. $this->end_key = $vals['end_key'];
  1754. }
  1755. if (isset($vals['start_token'])) {
  1756. $this->start_token = $vals['start_token'];
  1757. }
  1758. if (isset($vals['end_token'])) {
  1759. $this->end_token = $vals['end_token'];
  1760. }
  1761. if (isset($vals['count'])) {
  1762. $this->count = $vals['count'];
  1763. }
  1764. }
  1765. }
  1766. public function getName() {
  1767. return 'KeyRange';
  1768. }
  1769. public function read($input)
  1770. {
  1771. $xfer = 0;
  1772. $fname = null;
  1773. $ftype = 0;
  1774. $fid = 0;
  1775. $xfer += $input->readStructBegin($fname);
  1776. while (true)
  1777. {
  1778. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  1779. if ($ftype == TType::STOP) {
  1780. break;
  1781. }
  1782. switch ($fid)
  1783. {
  1784. case 1:
  1785. if ($ftype == TType::STRING) {
  1786. $xfer += $input->readString($this->start_key);
  1787. } else {
  1788. $xfer += $input->skip($ftype);
  1789. }
  1790. break;
  1791. case 2:
  1792. if ($ftype == TType::STRING) {
  1793. $xfer += $input->readString($this->end_key);
  1794. } else {
  1795. $xfer += $input->skip($ftype);
  1796. }
  1797. break;
  1798. case 3:
  1799. if ($ftype == TType::STRING) {
  1800. $xfer += $input->readString($this->start_token);
  1801. } else {
  1802. $xfer += $input->skip($ftype);
  1803. }
  1804. break;
  1805. case 4:
  1806. if ($ftype == TType::STRING) {
  1807. $xfer += $input->readString($this->end_token);
  1808. } else {
  1809. $xfer += $input->skip($ftype);
  1810. }
  1811. break;
  1812. case 5:
  1813. if ($ftype == TType::I32) {
  1814. $xfer += $input->readI32($this->count);
  1815. } else {
  1816. $xfer += $input->skip($ftype);
  1817. }
  1818. break;
  1819. default:
  1820. $xfer += $input->skip($ftype);
  1821. break;
  1822. }
  1823. $xfer += $input->readFieldEnd();
  1824. }
  1825. $xfer += $input->readStructEnd();
  1826. return $xfer;
  1827. }
  1828. public function write($output) {
  1829. $xfer = 0;
  1830. $xfer += $output->writeStructBegin('KeyRange');
  1831. if ($this->start_key !== null) {
  1832. $xfer += $output->writeFieldBegin('start_key', TType::STRING, 1);
  1833. $xfer += $output->writeString($this->start_key);
  1834. $xfer += $output->writeFieldEnd();
  1835. }
  1836. if ($this->end_key !== null) {
  1837. $xfer += $output->writeFieldBegin('end_key', TType::STRING, 2);
  1838. $xfer += $output->writeString($this->end_key);
  1839. $xfer += $output->writeFieldEnd();
  1840. }
  1841. if ($this->start_token !== null) {
  1842. $xfer += $output->writeFieldBegin('start_token', TType::STRING, 3);
  1843. $xfer += $output->writeString($this->start_token);
  1844. $xfer += $output->writeFieldEnd();
  1845. }
  1846. if ($this->end_token !== null) {
  1847. $xfer += $output->writeFieldBegin('end_token', TType::STRING, 4);
  1848. $xfer += $output->writeString($this->end_token);
  1849. $xfer += $output->writeFieldEnd();
  1850. }
  1851. if ($this->count !== null) {
  1852. $xfer += $output->writeFieldBegin('count', TType::I32, 5);
  1853. $xfer += $output->writeI32($this->count);
  1854. $xfer += $output->writeFieldEnd();
  1855. }
  1856. $xfer += $output->writeFieldStop();
  1857. $xfer += $output->writeStructEnd();
  1858. return $xfer;
  1859. }
  1860. }
  1861. class cassandra_KeySlice {
  1862. static $_TSPEC;
  1863. publ

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