PageRenderTime 70ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 1ms

/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
  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. public $key = null;
  1864. public $columns = null;
  1865. public function __construct($vals=null) {
  1866. if (!isset(self::$_TSPEC)) {
  1867. self::$_TSPEC = array(
  1868. 1 => array(
  1869. 'var' => 'key',
  1870. 'type' => TType::STRING,
  1871. ),
  1872. 2 => array(
  1873. 'var' => 'columns',
  1874. 'type' => TType::LST,
  1875. 'etype' => TType::STRUCT,
  1876. 'elem' => array(
  1877. 'type' => TType::STRUCT,
  1878. 'class' => 'cassandra_ColumnOrSuperColumn',
  1879. ),
  1880. ),
  1881. );
  1882. }
  1883. if (is_array($vals)) {
  1884. if (isset($vals['key'])) {
  1885. $this->key = $vals['key'];
  1886. }
  1887. if (isset($vals['columns'])) {
  1888. $this->columns = $vals['columns'];
  1889. }
  1890. }
  1891. }
  1892. public function getName() {
  1893. return 'KeySlice';
  1894. }
  1895. public function read($input)
  1896. {
  1897. $xfer = 0;
  1898. $fname = null;
  1899. $ftype = 0;
  1900. $fid = 0;
  1901. $xfer += $input->readStructBegin($fname);
  1902. while (true)
  1903. {
  1904. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  1905. if ($ftype == TType::STOP) {
  1906. break;
  1907. }
  1908. switch ($fid)
  1909. {
  1910. case 1:
  1911. if ($ftype == TType::STRING) {
  1912. $xfer += $input->readString($this->key);
  1913. } else {
  1914. $xfer += $input->skip($ftype);
  1915. }
  1916. break;
  1917. case 2:
  1918. if ($ftype == TType::LST) {
  1919. $this->columns = array();
  1920. $_size28 = 0;
  1921. $_etype31 = 0;
  1922. $xfer += $input->readListBegin($_etype31, $_size28);
  1923. for ($_i32 = 0; $_i32 < $_size28; ++$_i32)
  1924. {
  1925. $elem33 = null;
  1926. $elem33 = new cassandra_ColumnOrSuperColumn();
  1927. $xfer += $elem33->read($input);
  1928. $this->columns []= $elem33;
  1929. }
  1930. $xfer += $input->readListEnd();
  1931. } else {
  1932. $xfer += $input->skip($ftype);
  1933. }
  1934. break;
  1935. default:
  1936. $xfer += $input->skip($ftype);
  1937. break;
  1938. }
  1939. $xfer += $input->readFieldEnd();
  1940. }
  1941. $xfer += $input->readStructEnd();
  1942. return $xfer;
  1943. }
  1944. public function write($output) {
  1945. $xfer = 0;
  1946. $xfer += $output->writeStructBegin('KeySlice');
  1947. if ($this->key !== null) {
  1948. $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
  1949. $xfer += $output->writeString($this->key);
  1950. $xfer += $output->writeFieldEnd();
  1951. }
  1952. if ($this->columns !== null) {
  1953. if (!is_array($this->columns)) {
  1954. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  1955. }
  1956. $xfer += $output->writeFieldBegin('columns', TType::LST, 2);
  1957. {
  1958. $output->writeListBegin(TType::STRUCT, count($this->columns));
  1959. {
  1960. foreach ($this->columns as $iter34)
  1961. {
  1962. $xfer += $iter34->write($output);
  1963. }
  1964. }
  1965. $output->writeListEnd();
  1966. }
  1967. $xfer += $output->writeFieldEnd();
  1968. }
  1969. $xfer += $output->writeFieldStop();
  1970. $xfer += $output->writeStructEnd();
  1971. return $xfer;
  1972. }
  1973. }
  1974. class cassandra_KeyCount {
  1975. static $_TSPEC;
  1976. public $key = null;
  1977. public $count = null;
  1978. public function __construct($vals=null) {
  1979. if (!isset(self::$_TSPEC)) {
  1980. self::$_TSPEC = array(
  1981. 1 => array(
  1982. 'var' => 'key',
  1983. 'type' => TType::STRING,
  1984. ),
  1985. 2 => array(
  1986. 'var' => 'count',
  1987. 'type' => TType::I32,
  1988. ),
  1989. );
  1990. }
  1991. if (is_array($vals)) {
  1992. if (isset($vals['key'])) {
  1993. $this->key = $vals['key'];
  1994. }
  1995. if (isset($vals['count'])) {
  1996. $this->count = $vals['count'];
  1997. }
  1998. }
  1999. }
  2000. public function getName() {
  2001. return 'KeyCount';
  2002. }
  2003. public function read($input)
  2004. {
  2005. $xfer = 0;
  2006. $fname = null;
  2007. $ftype = 0;
  2008. $fid = 0;
  2009. $xfer += $input->readStructBegin($fname);
  2010. while (true)
  2011. {
  2012. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  2013. if ($ftype == TType::STOP) {
  2014. break;
  2015. }
  2016. switch ($fid)
  2017. {
  2018. case 1:
  2019. if ($ftype == TType::STRING) {
  2020. $xfer += $input->readString($this->key);
  2021. } else {
  2022. $xfer += $input->skip($ftype);
  2023. }
  2024. break;
  2025. case 2:
  2026. if ($ftype == TType::I32) {
  2027. $xfer += $input->readI32($this->count);
  2028. } else {
  2029. $xfer += $input->skip($ftype);
  2030. }
  2031. break;
  2032. default:
  2033. $xfer += $input->skip($ftype);
  2034. break;
  2035. }
  2036. $xfer += $input->readFieldEnd();
  2037. }
  2038. $xfer += $input->readStructEnd();
  2039. return $xfer;
  2040. }
  2041. public function write($output) {
  2042. $xfer = 0;
  2043. $xfer += $output->writeStructBegin('KeyCount');
  2044. if ($this->key !== null) {
  2045. $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
  2046. $xfer += $output->writeString($this->key);
  2047. $xfer += $output->writeFieldEnd();
  2048. }
  2049. if ($this->count !== null) {
  2050. $xfer += $output->writeFieldBegin('count', TType::I32, 2);
  2051. $xfer += $output->writeI32($this->count);
  2052. $xfer += $output->writeFieldEnd();
  2053. }
  2054. $xfer += $output->writeFieldStop();
  2055. $xfer += $output->writeStructEnd();
  2056. return $xfer;
  2057. }
  2058. }
  2059. class cassandra_Deletion {
  2060. static $_TSPEC;
  2061. public $timestamp = null;
  2062. public $super_column = null;
  2063. public $predicate = null;
  2064. public function __construct($vals=null) {
  2065. if (!isset(self::$_TSPEC)) {
  2066. self::$_TSPEC = array(
  2067. 1 => array(
  2068. 'var' => 'timestamp',
  2069. 'type' => TType::I64,
  2070. ),
  2071. 2 => array(
  2072. 'var' => 'super_column',
  2073. 'type' => TType::STRING,
  2074. ),
  2075. 3 => array(
  2076. 'var' => 'predicate',
  2077. 'type' => TType::STRUCT,
  2078. 'class' => 'cassandra_SlicePredicate',
  2079. ),
  2080. );
  2081. }
  2082. if (is_array($vals)) {
  2083. if (isset($vals['timestamp'])) {
  2084. $this->timestamp = $vals['timestamp'];
  2085. }
  2086. if (isset($vals['super_column'])) {
  2087. $this->super_column = $vals['super_column'];
  2088. }
  2089. if (isset($vals['predicate'])) {
  2090. $this->predicate = $vals['predicate'];
  2091. }
  2092. }
  2093. }
  2094. public function getName() {
  2095. return 'Deletion';
  2096. }
  2097. public function read($input)
  2098. {
  2099. $xfer = 0;
  2100. $fname = null;
  2101. $ftype = 0;
  2102. $fid = 0;
  2103. $xfer += $input->readStructBegin($fname);
  2104. while (true)
  2105. {
  2106. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  2107. if ($ftype == TType::STOP) {
  2108. break;
  2109. }
  2110. switch ($fid)
  2111. {
  2112. case 1:
  2113. if ($ftype == TType::I64) {
  2114. $xfer += $input->readI64($this->timestamp);
  2115. } else {
  2116. $xfer += $input->skip($ftype);
  2117. }
  2118. break;
  2119. case 2:
  2120. if ($ftype == TType::STRING) {
  2121. $xfer += $input->readString($this->super_column);
  2122. } else {
  2123. $xfer += $input->skip($ftype);
  2124. }
  2125. break;
  2126. case 3:
  2127. if ($ftype == TType::STRUCT) {
  2128. $this->predicate = new cassandra_SlicePredicate();
  2129. $xfer += $this->predicate->read($input);
  2130. } else {
  2131. $xfer += $input->skip($ftype);
  2132. }
  2133. break;
  2134. default:
  2135. $xfer += $input->skip($ftype);
  2136. break;
  2137. }
  2138. $xfer += $input->readFieldEnd();
  2139. }
  2140. $xfer += $input->readStructEnd();
  2141. return $xfer;
  2142. }
  2143. public function write($output) {
  2144. $xfer = 0;
  2145. $xfer += $output->writeStructBegin('Deletion');
  2146. if ($this->timestamp !== null) {
  2147. $xfer += $output->writeFieldBegin('timestamp', TType::I64, 1);
  2148. $xfer += $output->writeI64($this->timestamp);
  2149. $xfer += $output->writeFieldEnd();
  2150. }
  2151. if ($this->super_column !== null) {
  2152. $xfer += $output->writeFieldBegin('super_column', TType::STRING, 2);
  2153. $xfer += $output->writeString($this->super_column);
  2154. $xfer += $output->writeFieldEnd();
  2155. }
  2156. if ($this->predicate !== null) {
  2157. if (!is_object($this->predicate)) {
  2158. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  2159. }
  2160. $xfer += $output->writeFieldBegin('predicate', TType::STRUCT, 3);
  2161. $xfer += $this->predicate->write($output);
  2162. $xfer += $output->writeFieldEnd();
  2163. }
  2164. $xfer += $output->writeFieldStop();
  2165. $xfer += $output->writeStructEnd();
  2166. return $xfer;
  2167. }
  2168. }
  2169. class cassandra_Mutation {
  2170. static $_TSPEC;
  2171. public $column_or_supercolumn = null;
  2172. public $deletion = null;
  2173. public function __construct($vals=null) {
  2174. if (!isset(self::$_TSPEC)) {
  2175. self::$_TSPEC = array(
  2176. 1 => array(
  2177. 'var' => 'column_or_supercolumn',
  2178. 'type' => TType::STRUCT,
  2179. 'class' => 'cassandra_ColumnOrSuperColumn',
  2180. ),
  2181. 2 => array(
  2182. 'var' => 'deletion',
  2183. 'type' => TType::STRUCT,
  2184. 'class' => 'cassandra_Deletion',
  2185. ),
  2186. );
  2187. }
  2188. if (is_array($vals)) {
  2189. if (isset($vals['column_or_supercolumn'])) {
  2190. $this->column_or_supercolumn = $vals['column_or_supercolumn'];
  2191. }
  2192. if (isset($vals['deletion'])) {
  2193. $this->deletion = $vals['deletion'];
  2194. }
  2195. }
  2196. }
  2197. public function getName() {
  2198. return 'Mutation';
  2199. }
  2200. public function read($input)
  2201. {
  2202. $xfer = 0;
  2203. $fname = null;
  2204. $ftype = 0;
  2205. $fid = 0;
  2206. $xfer += $input->readStructBegin($fname);
  2207. while (true)
  2208. {
  2209. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  2210. if ($ftype == TType::STOP) {
  2211. break;
  2212. }
  2213. switch ($fid)
  2214. {
  2215. case 1:
  2216. if ($ftype == TType::STRUCT) {
  2217. $this->column_or_supercolumn = new cassandra_ColumnOrSuperColumn();
  2218. $xfer += $this->column_or_supercolumn->read($input);
  2219. } else {
  2220. $xfer += $input->skip($ftype);
  2221. }
  2222. break;
  2223. case 2:
  2224. if ($ftype == TType::STRUCT) {
  2225. $this->deletion = new cassandra_Deletion();
  2226. $xfer += $this->deletion->read($input);
  2227. } else {
  2228. $xfer += $input->skip($ftype);
  2229. }
  2230. break;
  2231. default:
  2232. $xfer += $input->skip($ftype);
  2233. break;
  2234. }
  2235. $xfer += $input->readFieldEnd();
  2236. }
  2237. $xfer += $input->readStructEnd();
  2238. return $xfer;
  2239. }
  2240. public function write($output) {
  2241. $xfer = 0;
  2242. $xfer += $output->writeStructBegin('Mutation');
  2243. if ($this->column_or_supercolumn !== null) {
  2244. if (!is_object($this->column_or_supercolumn)) {
  2245. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  2246. }
  2247. $xfer += $output->writeFieldBegin('column_or_supercolumn', TType::STRUCT, 1);
  2248. $xfer += $this->column_or_supercolumn->write($output);
  2249. $xfer += $output->writeFieldEnd();
  2250. }
  2251. if ($this->deletion !== null) {
  2252. if (!is_object($this->deletion)) {
  2253. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  2254. }
  2255. $xfer += $output->writeFieldBegin('deletion', TType::STRUCT, 2);
  2256. $xfer += $this->deletion->write($output);
  2257. $xfer += $output->writeFieldEnd();
  2258. }
  2259. $xfer += $output->writeFieldStop();
  2260. $xfer += $output->writeStructEnd();
  2261. return $xfer;
  2262. }
  2263. }
  2264. class cassandra_EndpointDetails {
  2265. static $_TSPEC;
  2266. public $host = null;
  2267. public $datacenter = null;
  2268. public $rack = null;
  2269. public function __construct($vals=null) {
  2270. if (!isset(self::$_TSPEC)) {
  2271. self::$_TSPEC = array(
  2272. 1 => array(
  2273. 'var' => 'host',
  2274. 'type' => TType::STRING,
  2275. ),
  2276. 2 => array(
  2277. 'var' => 'datacenter',
  2278. 'type' => TType::STRING,
  2279. ),
  2280. 3 => array(
  2281. 'var' => 'rack',
  2282. 'type' => TType::STRING,
  2283. ),
  2284. );
  2285. }
  2286. if (is_array($vals)) {
  2287. if (isset($vals['host'])) {
  2288. $this->host = $vals['host'];
  2289. }
  2290. if (isset($vals['datacenter'])) {
  2291. $this->datacenter = $vals['datacenter'];
  2292. }
  2293. if (isset($vals['rack'])) {
  2294. $this->rack = $vals['rack'];
  2295. }
  2296. }
  2297. }
  2298. public function getName() {
  2299. return 'EndpointDetails';
  2300. }
  2301. public function read($input)
  2302. {
  2303. $xfer = 0;
  2304. $fname = null;
  2305. $ftype = 0;
  2306. $fid = 0;
  2307. $xfer += $input->readStructBegin($fname);
  2308. while (true)
  2309. {
  2310. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  2311. if ($ftype == TType::STOP) {
  2312. break;
  2313. }
  2314. switch ($fid)
  2315. {
  2316. case 1:
  2317. if ($ftype == TType::STRING) {
  2318. $xfer += $input->readString($this->host);
  2319. } else {
  2320. $xfer += $input->skip($ftype);
  2321. }
  2322. break;
  2323. case 2:
  2324. if ($ftype == TType::STRING) {
  2325. $xfer += $input->readString($this->datacenter);
  2326. } else {
  2327. $xfer += $input->skip($ftype);
  2328. }
  2329. break;
  2330. case 3:
  2331. if ($ftype == TType::STRING) {
  2332. $xfer += $input->readString($this->rack);
  2333. } else {
  2334. $xfer += $input->skip($ftype);
  2335. }
  2336. break;
  2337. default:
  2338. $xfer += $input->skip($ftype);
  2339. break;
  2340. }
  2341. $xfer += $input->readFieldEnd();
  2342. }
  2343. $xfer += $input->readStructEnd();
  2344. return $xfer;
  2345. }
  2346. public function write($output) {
  2347. $xfer = 0;
  2348. $xfer += $output->writeStructBegin('EndpointDetails');
  2349. if ($this->host !== null) {
  2350. $xfer += $output->writeFieldBegin('host', TType::STRING, 1);
  2351. $xfer += $output->writeString($this->host);
  2352. $xfer += $output->writeFieldEnd();
  2353. }
  2354. if ($this->datacenter !== null) {
  2355. $xfer += $output->writeFieldBegin('datacenter', TType::STRING, 2);
  2356. $xfer += $output->writeString($this->datacenter);
  2357. $xfer += $output->writeFieldEnd();
  2358. }
  2359. if ($this->rack !== null) {
  2360. $xfer += $output->writeFieldBegin('rack', TType::STRING, 3);
  2361. $xfer += $output->writeString($this->rack);
  2362. $xfer += $output->writeFieldEnd();
  2363. }
  2364. $xfer += $output->writeFieldStop();
  2365. $xfer += $output->writeStructEnd();
  2366. return $xfer;
  2367. }
  2368. }
  2369. class cassandra_TokenRange {
  2370. static $_TSPEC;
  2371. public $start_token = null;
  2372. public $end_token = null;
  2373. public $endpoints = null;
  2374. public $rpc_endpoints = null;
  2375. public $endpoint_details = null;
  2376. public function __construct($vals=null) {
  2377. if (!isset(self::$_TSPEC)) {
  2378. self::$_TSPEC = array(
  2379. 1 => array(
  2380. 'var' => 'start_token',
  2381. 'type' => TType::STRING,
  2382. ),
  2383. 2 => array(
  2384. 'var' => 'end_token',
  2385. 'type' => TType::STRING,
  2386. ),
  2387. 3 => array(
  2388. 'var' => 'endpoints',
  2389. 'type' => TType::LST,
  2390. 'etype' => TType::STRING,
  2391. 'elem' => array(
  2392. 'type' => TType::STRING,
  2393. ),
  2394. ),
  2395. 4 => array(
  2396. 'var' => 'rpc_endpoints',
  2397. 'type' => TType::LST,
  2398. 'etype' => TType::STRING,
  2399. 'elem' => array(
  2400. 'type' => TType::STRING,
  2401. ),
  2402. ),
  2403. 5 => array(
  2404. 'var' => 'endpoint_details',
  2405. 'type' => TType::LST,
  2406. 'etype' => TType::STRUCT,
  2407. 'elem' => array(
  2408. 'type' => TType::STRUCT,
  2409. 'class' => 'cassandra_EndpointDetails',
  2410. ),
  2411. ),
  2412. );
  2413. }
  2414. if (is_array($vals)) {
  2415. if (isset($vals['start_token'])) {
  2416. $this->start_token = $vals['start_token'];
  2417. }
  2418. if (isset($vals['end_token'])) {
  2419. $this->end_token = $vals['end_token'];
  2420. }
  2421. if (isset($vals['endpoints'])) {
  2422. $this->endpoints = $vals['endpoints'];
  2423. }
  2424. if (isset($vals['rpc_endpoints'])) {
  2425. $this->rpc_endpoints = $vals['rpc_endpoints'];
  2426. }
  2427. if (isset($vals['endpoint_details'])) {
  2428. $this->endpoint_details = $vals['endpoint_details'];
  2429. }
  2430. }
  2431. }
  2432. public function getName() {
  2433. return 'TokenRange';
  2434. }
  2435. public function read($input)
  2436. {
  2437. $xfer = 0;
  2438. $fname = null;
  2439. $ftype = 0;
  2440. $fid = 0;
  2441. $xfer += $input->readStructBegin($fname);
  2442. while (true)
  2443. {
  2444. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  2445. if ($ftype == TType::STOP) {
  2446. break;
  2447. }
  2448. switch ($fid)
  2449. {
  2450. case 1:
  2451. if ($ftype == TType::STRING) {
  2452. $xfer += $input->readString($this->start_token);
  2453. } else {
  2454. $xfer += $input->skip($ftype);
  2455. }
  2456. break;
  2457. case 2:
  2458. if ($ftype == TType::STRING) {
  2459. $xfer += $input->readString($this->end_token);
  2460. } else {
  2461. $xfer += $input->skip($ftype);
  2462. }
  2463. break;
  2464. case 3:
  2465. if ($ftype == TType::LST) {
  2466. $this->endpoints = array();
  2467. $_size35 = 0;
  2468. $_etype38 = 0;
  2469. $xfer += $input->readListBegin($_etype38, $_size35);
  2470. for ($_i39 = 0; $_i39 < $_size35; ++$_i39)
  2471. {
  2472. $elem40 = null;
  2473. $xfer += $input->readString($elem40);
  2474. $this->endpoints []= $elem40;
  2475. }
  2476. $xfer += $input->readListEnd();
  2477. } else {
  2478. $xfer += $input->skip($ftype);
  2479. }
  2480. break;
  2481. case 4:
  2482. if ($ftype == TType::LST) {
  2483. $this->rpc_endpoints = array();
  2484. $_size41 = 0;
  2485. $_etype44 = 0;
  2486. $xfer += $input->readListBegin($_etype44, $_size41);
  2487. for ($_i45 = 0; $_i45 < $_size41; ++$_i45)
  2488. {
  2489. $elem46 = null;
  2490. $xfer += $input->readString($elem46);
  2491. $this->rpc_endpoints []= $elem46;
  2492. }
  2493. $xfer += $input->readListEnd();
  2494. } else {
  2495. $xfer += $input->skip($ftype);
  2496. }
  2497. break;
  2498. case 5:
  2499. if ($ftype == TType::LST) {
  2500. $this->endpoint_details = array();
  2501. $_size47 = 0;
  2502. $_etype50 = 0;
  2503. $xfer += $input->readListBegin($_etype50, $_size47);
  2504. for ($_i51 = 0; $_i51 < $_size47; ++$_i51)
  2505. {
  2506. $elem52 = null;
  2507. $elem52 = new cassandra_EndpointDetails();
  2508. $xfer += $elem52->read($input);
  2509. $this->endpoint_details []= $elem52;
  2510. }
  2511. $xfer += $input->readListEnd();
  2512. } else {
  2513. $xfer += $input->skip($ftype);
  2514. }
  2515. break;
  2516. default:
  2517. $xfer += $input->skip($ftype);
  2518. break;
  2519. }
  2520. $xfer += $input->readFieldEnd();
  2521. }
  2522. $xfer += $input->readStructEnd();
  2523. return $xfer;
  2524. }
  2525. public function write($output) {
  2526. $xfer = 0;
  2527. $xfer += $output->writeStructBegin('TokenRange');
  2528. if ($this->start_token !== null) {
  2529. $xfer += $output->writeFieldBegin('start_token', TType::STRING, 1);
  2530. $xfer += $output->writeString($this->start_token);
  2531. $xfer += $output->writeFieldEnd();
  2532. }
  2533. if ($this->end_token !== null) {
  2534. $xfer += $output->writeFieldBegin('end_token', TType::STRING, 2);
  2535. $xfer += $output->writeString($this->end_token);
  2536. $xfer += $output->writeFieldEnd();
  2537. }
  2538. if ($this->endpoints !== null) {
  2539. if (!is_array($this->endpoints)) {
  2540. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  2541. }
  2542. $xfer += $output->writeFieldBegin('endpoints', TType::LST, 3);
  2543. {
  2544. $output->writeListBegin(TType::STRING, count($this->endpoints));
  2545. {
  2546. foreach ($this->endpoints as $iter53)
  2547. {
  2548. $xfer += $output->writeString($iter53);
  2549. }
  2550. }
  2551. $output->writeListEnd();
  2552. }
  2553. $xfer += $output->writeFieldEnd();
  2554. }
  2555. if ($this->rpc_endpoints !== null) {
  2556. if (!is_array($this->rpc_endpoints)) {
  2557. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  2558. }
  2559. $xfer += $output->writeFieldBegin('rpc_endpoints', TType::LST, 4);
  2560. {
  2561. $output->writeListBegin(TType::STRING, count($this->rpc_endpoints));
  2562. {
  2563. foreach ($this->rpc_endpoints as $iter54)
  2564. {
  2565. $xfer += $output->writeString($iter54);
  2566. }
  2567. }
  2568. $output->writeListEnd();
  2569. }
  2570. $xfer += $output->writeFieldEnd();
  2571. }
  2572. if ($this->endpoint_details !== null) {
  2573. if (!is_array($this->endpoint_details)) {
  2574. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  2575. }
  2576. $xfer += $output->writeFieldBegin('endpoint_details', TType::LST, 5);
  2577. {
  2578. $output->writeListBegin(TType::STRUCT, count($this->endpoint_details));
  2579. {
  2580. foreach ($this->endpoint_details as $iter55)
  2581. {
  2582. $xfer += $iter55->write($output);
  2583. }
  2584. }
  2585. $output->writeListEnd();
  2586. }
  2587. $xfer += $output->writeFieldEnd();
  2588. }
  2589. $xfer += $output->writeFieldStop();
  2590. $xfer += $output->writeStructEnd();
  2591. return $xfer;
  2592. }
  2593. }
  2594. class cassandra_AuthenticationRequest {
  2595. static $_TSPEC;
  2596. public $credentials = null;
  2597. public function __construct($vals=null) {
  2598. if (!isset(self::$_TSPEC)) {
  2599. self::$_TSPEC = array(
  2600. 1 => array(
  2601. 'var' => 'credentials',
  2602. 'type' => TType::MAP,
  2603. 'ktype' => TType::STRING,
  2604. 'vtype' => TType::STRING,
  2605. 'key' => array(
  2606. 'type' => TType::STRING,
  2607. ),
  2608. 'val' => array(
  2609. 'type' => TType::STRING,
  2610. ),
  2611. ),
  2612. );
  2613. }
  2614. if (is_array($vals)) {
  2615. if (isset($vals['credentials'])) {
  2616. $this->credentials = $vals['credentials'];
  2617. }
  2618. }
  2619. }
  2620. public function getName() {
  2621. return 'AuthenticationRequest';
  2622. }
  2623. public function read($input)
  2624. {
  2625. $xfer = 0;
  2626. $fname = null;
  2627. $ftype = 0;
  2628. $fid = 0;
  2629. $xfer += $input->readStructBegin($fname);
  2630. while (true)
  2631. {
  2632. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  2633. if ($ftype == TType::STOP) {
  2634. break;
  2635. }
  2636. switch ($fid)
  2637. {
  2638. case 1:
  2639. if ($ftype == TType::MAP) {
  2640. $this->credentials = array();
  2641. $_size56 = 0;
  2642. $_ktype57 = 0;
  2643. $_vtype58 = 0;
  2644. $xfer += $input->readMapBegin($_ktype57, $_vtype58, $_size56);
  2645. for ($_i60 = 0; $_i60 < $_size56; ++$_i60)
  2646. {
  2647. $key61 = '';
  2648. $val62 = '';
  2649. $xfer += $input->readString($key61);
  2650. $xfer += $input->readString($val62);
  2651. $this->credentials[$key61] = $val62;
  2652. }
  2653. $xfer += $input->readMapEnd();
  2654. } else {
  2655. $xfer += $input->skip($ftype);
  2656. }
  2657. break;
  2658. default:
  2659. $xfer += $input->skip($ftype);
  2660. break;
  2661. }
  2662. $xfer += $input->readFieldEnd();
  2663. }
  2664. $xfer += $input->readStructEnd();
  2665. return $xfer;
  2666. }
  2667. public function write($output) {
  2668. $xfer = 0;
  2669. $xfer += $output->writeStructBegin('AuthenticationRequest');
  2670. if ($this->credentials !== null) {
  2671. if (!is_array($this->credentials)) {
  2672. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  2673. }
  2674. $xfer += $output->writeFieldBegin('credentials', TType::MAP, 1);
  2675. {
  2676. $output->writeMapBegin(TType::STRING, TType::STRING, count($this->credentials));
  2677. {
  2678. foreach ($this->credentials as $kiter63 => $viter64)
  2679. {
  2680. $xfer += $output->writeString($kiter63);
  2681. $xfer += $output->writeString($viter64);
  2682. }
  2683. }
  2684. $output->writeMapEnd();
  2685. }
  2686. $xfer += $output->writeFieldEnd();
  2687. }
  2688. $xfer += $output->writeFieldStop();
  2689. $xfer += $output->writeStructEnd();
  2690. return $xfer;
  2691. }
  2692. }
  2693. class cassandra_ColumnDef {
  2694. static $_TSPEC;
  2695. public $name = null;
  2696. public $validation_class = null;
  2697. public $index_type = null;
  2698. public $index_name = null;
  2699. public $index_options = null;
  2700. public function __construct($vals=null) {
  2701. if (!isset(self::$_TSPEC)) {
  2702. self::$_TSPEC = array(
  2703. 1 => array(
  2704. 'var' => 'name',
  2705. 'type' => TType::STRING,
  2706. ),
  2707. 2 => array(
  2708. 'var' => 'validation_class',
  2709. 'type' => TType::STRING,
  2710. ),
  2711. 3 => array(
  2712. 'var' => 'index_type',
  2713. 'type' => TType::I32,
  2714. ),
  2715. 4 => array(
  2716. 'var' => 'index_name',
  2717. 'type' => TType::STRING,
  2718. ),
  2719. 5 => array(
  2720. 'var' => 'index_options',
  2721. 'type' => TType::MAP,
  2722. 'ktype' => TType::STRING,
  2723. 'vtype' => TType::STRING,
  2724. 'key' => array(
  2725. 'type' => TType::STRING,
  2726. ),
  2727. 'val' => array(
  2728. 'type' => TType::STRING,
  2729. ),
  2730. ),
  2731. );
  2732. }
  2733. if (is_array($vals)) {
  2734. if (isset($vals['name'])) {
  2735. $this->name = $vals['name'];
  2736. }
  2737. if (isset($vals['validation_class'])) {
  2738. $this->validation_class = $vals['validation_class'];
  2739. }
  2740. if (isset($vals['index_type'])) {
  2741. $this->index_type = $vals['index_type'];
  2742. }
  2743. if (isset($vals['index_name'])) {
  2744. $this->index_name = $vals['index_name'];
  2745. }
  2746. if (isset($vals['index_options'])) {
  2747. $this->index_options = $vals['index_options'];
  2748. }
  2749. }
  2750. }
  2751. public function getName() {
  2752. return 'ColumnDef';
  2753. }
  2754. public function read($input)
  2755. {
  2756. $xfer = 0;
  2757. $fname = null;
  2758. $ftype = 0;
  2759. $fid = 0;
  2760. $xfer += $input->readStructBegin($fname);
  2761. while (true)
  2762. {
  2763. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  2764. if ($ftype == TType::STOP) {
  2765. break;
  2766. }
  2767. switch ($fid)
  2768. {
  2769. case 1:
  2770. if ($ftype == TType::STRING) {
  2771. $xfer += $input->readString($this->name);
  2772. } else {
  2773. $xfer += $input->skip($ftype);
  2774. }
  2775. break;
  2776. case 2:
  2777. if ($ftype == TType::STRING) {
  2778. $xfer += $input->readString($this->validation_class);
  2779. } else {
  2780. $xfer += $input->skip($ftype);
  2781. }
  2782. break;
  2783. case 3:
  2784. if ($ftype == TType::I32) {
  2785. $xfer += $input->readI32($this->index_type);
  2786. } else {
  2787. $xfer += $input->skip($ftype);
  2788. }
  2789. break;
  2790. case 4:
  2791. if ($ftype == TType::STRING) {
  2792. $xfer += $input->readString($this->index_name);
  2793. } else {
  2794. $xfer += $input->skip($ftype);
  2795. }
  2796. break;
  2797. case 5:
  2798. if ($ftype == TType::MAP) {
  2799. $this->index_options = array();
  2800. $_size65 = 0;
  2801. $_ktype66 = 0;
  2802. $_vtype67 = 0;
  2803. $xfer += $input->readMapBegin($_ktype66, $_vtype67, $_size65);
  2804. for ($_i69 = 0; $_i69 < $_size65; ++$_i69)
  2805. {
  2806. $key70 = '';
  2807. $val71 = '';
  2808. $xfer += $input->readString($key70);
  2809. $xfer += $input->readString($val71);
  2810. $this->index_options[$key70] = $val71;
  2811. }
  2812. $xfer += $input->readMapEnd();
  2813. } else {
  2814. $xfer += $input->skip($ftype);
  2815. }
  2816. break;
  2817. default:
  2818. $xfer += $input->skip($ftype);
  2819. break;
  2820. }
  2821. $xfer += $input->readFieldEnd();
  2822. }
  2823. $xfer += $input->readStructEnd();
  2824. return $xfer;
  2825. }
  2826. public function write($output) {
  2827. $xfer = 0;
  2828. $xfer += $output->writeStructBegin('ColumnDef');
  2829. if ($this->name !== null) {
  2830. $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
  2831. $xfer += $output->writeString($this->name);
  2832. $xfer += $output->writeFieldEnd();
  2833. }
  2834. if ($this->validation_class !== null) {
  2835. $xfer += $output->writeFieldBegin('validation_class', TType::STRING, 2);
  2836. $xfer += $output->writeString($this->validation_class);
  2837. $xfer += $output->writeFieldEnd();
  2838. }
  2839. if ($this->index_type !== null) {
  2840. $xfer += $output->writeFieldBegin('index_type', TType::I32, 3);
  2841. $xfer += $output->writeI32($this->index_type);
  2842. $xfer += $output->writeFieldEnd();
  2843. }
  2844. if ($this->index_name !== null) {
  2845. $xfer += $output->writeFieldBegin('index_name', TType::STRING, 4);
  2846. $xfer += $output->writeString($this->index_name);
  2847. $xfer += $output->writeFieldEnd();
  2848. }
  2849. if ($this->index_options !== null) {
  2850. if (!is_array($this->index_options)) {
  2851. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  2852. }
  2853. $xfer += $output->writeFieldBegin('index_options', TType::MAP, 5);
  2854. {
  2855. $output->writeMapBegin(TType::STRING, TType::STRING, count($this->index_options));
  2856. {
  2857. foreach ($this->index_options as $kiter72 => $viter73)
  2858. {
  2859. $xfer += $output->writeString($kiter72);
  2860. $xfer += $output->writeString($viter73);
  2861. }
  2862. }
  2863. $output->writeMapEnd();
  2864. }
  2865. $xfer += $output->writeFieldEnd();
  2866. }
  2867. $xfer += $output->writeFieldStop();
  2868. $xfer += $output->writeStructEnd();
  2869. return $xfer;
  2870. }
  2871. }
  2872. class cassandra_CfDef {
  2873. static $_TSPEC;
  2874. public $keyspace = null;
  2875. public $name = null;
  2876. public $column_type = "Standard";
  2877. public $comparator_type = "BytesType";
  2878. public $subcomparator_type = null;
  2879. public $comment = null;
  2880. public $row_cache_size = 0;
  2881. public $key_cache_size = 200000;
  2882. public $read_repair_chance = 1;
  2883. public $column_metadata = null;
  2884. public $gc_grace_seconds = null;
  2885. public $default_validation_class = null;
  2886. public $id = null;
  2887. public $min_compaction_threshold = null;
  2888. public $max_compaction_threshold = null;
  2889. public $row_cache_save_period_in_seconds = null;
  2890. public $key_cache_save_period_in_seconds = null;
  2891. public $replicate_on_write = true;
  2892. public $merge_shards_chance = null;
  2893. public $key_validation_class = null;
  2894. public $row_cache_provider = null;
  2895. public $key_alias = null;
  2896. public $compaction_strategy = null;
  2897. public $compaction_strategy_options = null;
  2898. public $row_cache_keys_to_save = null;
  2899. public $compression_options = null;
  2900. public function __construct($vals=null) {
  2901. if (!isset(self::$_TSPEC)) {
  2902. self::$_TSPEC = array(
  2903. 1 => array(
  2904. 'var' => 'keyspace',
  2905. 'type' => TType::STRING,
  2906. ),
  2907. 2 => array(
  2908. 'var' => 'name',
  2909. 'type' => TType::STRING,
  2910. ),
  2911. 3 => array(
  2912. 'var' => 'column_type',
  2913. 'type' => TType::STRING,
  2914. ),
  2915. 5 => array(
  2916. 'var' => 'comparator_type',
  2917. 'type' => TType::STRING,
  2918. ),
  2919. 6 => array(
  2920. 'var' => 'subcomparator_type',
  2921. 'type' => TType::STRING,
  2922. ),
  2923. 8 => array(
  2924. 'var' => 'comment',
  2925. 'type' => TType::STRING,
  2926. ),
  2927. 9 => array(
  2928. 'var' => 'row_cache_size',
  2929. 'type' => TType::DOUBLE,
  2930. ),
  2931. 11 => array(
  2932. 'var' => 'key_cache_size',
  2933. 'type' => TType::DOUBLE,
  2934. ),
  2935. 12 => array(
  2936. 'var' => 'read_repair_chance',
  2937. 'type' => TType::DOUBLE,
  2938. ),
  2939. 13 => array(
  2940. 'var' => 'column_metadata',
  2941. 'type' => TType::LST,
  2942. 'etype' => TType::STRUCT,
  2943. 'elem' => array(
  2944. 'type' => TType::STRUCT,
  2945. 'class' => 'cassandra_ColumnDef',
  2946. ),
  2947. ),
  2948. 14 => array(
  2949. 'var' => 'gc_grace_seconds',
  2950. 'type' => TType::I32,
  2951. ),
  2952. 15 => array(
  2953. 'var' => 'default_validation_class',
  2954. 'type' => TType::STRING,
  2955. ),
  2956. 16 => array(
  2957. 'var' => 'id',
  2958. 'type' => TType::I32,
  2959. ),
  2960. 17 => array(
  2961. 'var' => 'min_compaction_threshold',
  2962. 'type' => TType::I32,
  2963. ),
  2964. 18 => array(
  2965. 'var' => 'max_compaction_threshold',
  2966. 'type' => TType::I32,
  2967. ),
  2968. 19 => array(
  2969. 'var' => 'row_cache_save_period_in_seconds',
  2970. 'type' => TType::I32,
  2971. ),
  2972. 20 => array(
  2973. 'var' => 'key_cache_save_period_in_seconds',
  2974. 'type' => TType::I32,
  2975. ),
  2976. 24 => array(
  2977. 'var' => 'replicate_on_write',
  2978. 'type' => TType::BOOL,
  2979. ),
  2980. 25 => array(
  2981. 'var' => 'merge_shards_chance',
  2982. 'type' => TType::DOUBLE,
  2983. ),
  2984. 26 => array(
  2985. 'var' => 'key_validation_class',
  2986. 'type' => TType::STRING,
  2987. ),
  2988. 27 => array(
  2989. 'var' => 'row_cache_provider',
  2990. 'type' => TType::STRING,
  2991. ),
  2992. 28 => array(
  2993. 'var' => 'key_alias',
  2994. 'type' => TType::STRING,
  2995. ),
  2996. 29 => array(
  2997. 'var' => 'compaction_strategy',
  2998. 'type' => TType::STRING,
  2999. ),
  3000. 30 => array(
  3001. 'var' => 'compaction_strategy_options',
  3002. 'type' => TType::MAP,
  3003. 'ktype' => TType::STRING,
  3004. 'vtype' => TType::STRING,
  3005. 'key' => array(
  3006. 'type' => TType::STRING,
  3007. ),
  3008. 'val' => array(
  3009. 'type' => TType::STRING,
  3010. ),
  3011. ),
  3012. 31 => array(
  3013. 'var' => 'row_cache_keys_to_save',
  3014. 'type' => TType::I32,
  3015. ),
  3016. 32 => array(
  3017. 'var' => 'compression_options',
  3018. 'type' => TType::MAP,
  3019. 'ktype' => TType::STRING,
  3020. 'vtype' => TType::STRING,
  3021. 'key' => array(
  3022. 'type' => TType::STRING,
  3023. ),
  3024. 'val' => array(
  3025. 'type' => TType::STRING,
  3026. ),
  3027. ),
  3028. );
  3029. }
  3030. if (is_array($vals)) {
  3031. if (isset($vals['keyspace'])) {
  3032. $this->keyspace = $vals['keyspace'];
  3033. }
  3034. if (isset($vals['name'])) {
  3035. $this->name = $vals['name'];
  3036. }
  3037. if (isset($vals['column_type'])) {
  3038. $this->column_type = $vals['column_type'];
  3039. }
  3040. if (isset($vals['comparator_type'])) {
  3041. $this->comparator_type = $vals['comparator_type'];
  3042. }
  3043. if (isset($vals['subcomparator_type'])) {
  3044. $this->subcomparator_type = $vals['subcomparator_type'];
  3045. }
  3046. if (isset($vals['comment'])) {
  3047. $this->comment = $vals['comment'];
  3048. }
  3049. if (isset($vals['row_cache_size'])) {
  3050. $this->row_cache_size = $vals['row_cache_size'];
  3051. }
  3052. if (isset($vals['key_cache_size'])) {
  3053. $this->key_cache_size = $vals['key_cache_size'];
  3054. }
  3055. if (isset($vals['read_repair_chance'])) {
  3056. $this->read_repair_chance = $vals['read_repair_chance'];
  3057. }
  3058. if (isset($vals['column_metadata'])) {
  3059. $this->column_metadata = $vals['column_metadata'];
  3060. }
  3061. if (isset($vals['gc_grace_seconds'])) {
  3062. $this->gc_grace_seconds = $vals['gc_grace_seconds'];
  3063. }
  3064. if (isset($vals['default_validation_class'])) {
  3065. $this->default_validation_class = $vals['default_validation_class'];
  3066. }
  3067. if (isset($vals['id'])) {
  3068. $this->id = $vals['id'];
  3069. }
  3070. if (isset($vals['min_compaction_threshold'])) {
  3071. $this->min_compaction_threshold = $vals['min_compaction_threshold'];
  3072. }
  3073. if (isset($vals['max_compaction_threshold'])) {
  3074. $this->max_compaction_threshold = $vals['max_compaction_threshold'];
  3075. }
  3076. if (isset($vals['row_cache_save_period_in_seconds'])) {
  3077. $this->row_cache_save_period_in_seconds = $vals['row_cache_save_period_in_seconds'];
  3078. }
  3079. if (isset($vals['key_cache_save_period_in_seconds'])) {
  3080. $this->key_cache_save_period_in_seconds = $vals['key_cache_save_period_in_seconds'];
  3081. }
  3082. if (isset($vals['replicate_on_write'])) {
  3083. $this->replicate_on_write = $vals['replicate_on_write'];
  3084. }
  3085. if (isset($vals['merge_shards_chance'])) {
  3086. $this->merge_shards_chance = $vals['merge_shards_chance'];
  3087. }
  3088. if (isset($vals['key_validation_class'])) {
  3089. $this->key_validation_class = $vals['key_validation_class'];
  3090. }
  3091. if (isset($vals['row_cache_provider'])) {
  3092. $this->row_cache_provider = $vals['row_cache_provider'];
  3093. }
  3094. if (isset($vals['key_alias'])) {
  3095. $this->key_alias = $vals['key_alias'];
  3096. }
  3097. if (isset($vals['compaction_strategy'])) {
  3098. $this->compaction_strategy = $vals['compaction_strategy'];
  3099. }
  3100. if (isset($vals['compaction_strategy_options'])) {
  3101. $this->compaction_strategy_options = $vals['compaction_strategy_options'];
  3102. }
  3103. if (isset($vals['row_cache_keys_to_save'])) {
  3104. $this->row_cache_keys_to_save = $vals['row_cache_keys_to_save'];
  3105. }
  3106. if (isset($vals['compression_options'])) {
  3107. $this->compression_options = $vals['compression_options'];
  3108. }
  3109. }
  3110. }
  3111. public function getName() {
  3112. return 'CfDef';
  3113. }
  3114. public function read($input)
  3115. {
  3116. $xfer = 0;
  3117. $fname = null;
  3118. $ftype = 0;
  3119. $fid = 0;
  3120. $xfer += $input->readStructBegin($fname);
  3121. while (true)
  3122. {
  3123. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  3124. if ($ftype == TType::STOP) {
  3125. break;
  3126. }
  3127. switch ($fid)
  3128. {
  3129. case 1:
  3130. if ($ftype == TType::STRING) {
  3131. $xfer += $input->readString($this->keyspace);
  3132. } else {
  3133. $xfer += $input->skip($ftype);
  3134. }
  3135. break;
  3136. case 2:
  3137. if ($ftype == TType::STRING) {
  3138. $xfer += $input->readString($this->name);
  3139. } else {
  3140. $xfer += $input->skip($ftype);
  3141. }
  3142. break;
  3143. case 3:
  3144. if ($ftype == TType::STRING) {
  3145. $xfer += $input->readString($this->column_type);
  3146. } else {
  3147. $xfer += $input->skip($ftype);
  3148. }
  3149. break;
  3150. case 5:
  3151. if ($ftype == TType::STRING) {
  3152. $xfer += $input->readString($this->comparator_type);
  3153. } else {
  3154. $xfer += $input->skip($ftype);
  3155. }
  3156. break;
  3157. case 6:
  3158. if ($ftype == TType::STRING) {
  3159. $xfer += $input->readString($this->subcomparator_type);
  3160. } else {
  3161. $xfer += $input->skip($ftype);
  3162. }
  3163. break;
  3164. case 8:
  3165. if ($ftype == TType::STRING) {
  3166. $xfer += $input->readString($this->comment);
  3167. } else {
  3168. $xfer += $input->skip($ftype);
  3169. }
  3170. break;
  3171. case 9:
  3172. if ($ftype == TType::DOUBLE) {
  3173. $xfer += $input->readDouble($this->row_cache_size);
  3174. } else {
  3175. $xfer += $input->skip($ftype);
  3176. }
  3177. break;
  3178. case 11:
  3179. if ($ftype == TType::DOUBLE) {
  3180. $xfer += $input->readDouble($this->key_cache_size);
  3181. } else {
  3182. $xfer += $input->skip($ftype);
  3183. }
  3184. break;
  3185. case 12:
  3186. if ($ftype == TType::DOUBLE) {
  3187. $xfer += $input->readDouble($this->read_repair_chance);
  3188. } else {
  3189. $xfer += $input->skip($ftype);
  3190. }
  3191. break;
  3192. case 13:
  3193. if ($ftype == TType::LST) {
  3194. $this->column_metadata = array();
  3195. $_size74 = 0;
  3196. $_etype77 = 0;
  3197. $xfer += $input->readListBegin($_etype77, $_size74);
  3198. for ($_i78 = 0; $_i78 < $_size74; ++$_i78)
  3199. {
  3200. $elem79 = null;
  3201. $elem79 = new cassandra_ColumnDef();
  3202. $xfer += $elem79->read($input);
  3203. $this->column_metadata []= $elem79;
  3204. }
  3205. $xfer += $input->readListEnd();
  3206. } else {
  3207. $xfer += $input->skip($ftype);
  3208. }
  3209. break;
  3210. case 14:
  3211. if ($ftype == TType::I32) {
  3212. $xfer += $input->readI32($this->gc_grace_seconds);
  3213. } else {
  3214. $xfer += $input->skip($ftype);
  3215. }
  3216. break;
  3217. case 15:
  3218. if ($ftype == TType::STRING) {
  3219. $xfer += $input->readString($this->default_validation_class);
  3220. } else {
  3221. $xfer += $input->skip($ftype);
  3222. }
  3223. break;
  3224. case 16:
  3225. if ($ftype == TType::I32) {
  3226. $xfer += $input->readI32($this->id);
  3227. } else {
  3228. $xfer += $input->skip($ftype);
  3229. }
  3230. break;
  3231. case 17:
  3232. if ($ftype == TType::I32) {
  3233. $xfer += $input->readI32($this->min_compaction_threshold);
  3234. } else {
  3235. $xfer += $input->skip($ftype);
  3236. }
  3237. break;
  3238. case 18:
  3239. if ($ftype == TType::I32) {
  3240. $xfer += $input->readI32($this->max_compaction_threshold);
  3241. } else {
  3242. $xfer += $input->skip($ftype);
  3243. }
  3244. break;
  3245. case 19:
  3246. if ($ftype == TType::I32) {
  3247. $xfer += $input->readI32($this->row_cache_save_period_in_seconds);
  3248. } else {
  3249. $xfer += $input->skip($ftype);
  3250. }
  3251. break;
  3252. case 20:
  3253. if ($ftype == TType::I32) {
  3254. $xfer += $input->readI32($this->key_cache_save_period_in_seconds);
  3255. } else {
  3256. $xfer += $input->skip($ftype);
  3257. }
  3258. break;
  3259. case 24:
  3260. if ($ftype == TType::BOOL) {
  3261. $xfer += $input->readBool($this->replicate_on_write);
  3262. } else {
  3263. $xfer += $input->skip($ftype);
  3264. }
  3265. break;
  3266. case 25:
  3267. if ($ftype == TType::DOUBLE) {
  3268. $xfer += $input->readDouble($this->merge_shards_chance);
  3269. } else {
  3270. $xfer += $input->skip($ftype);
  3271. }
  3272. break;
  3273. case 26:
  3274. if ($ftype == TType::STRING) {
  3275. $xfer += $input->readString($this->key_validation_class);
  3276. } else {
  3277. $xfer += $input->skip($ftype);
  3278. }
  3279. break;
  3280. case 27:
  3281. if ($ftype == TType::STRING) {
  3282. $xfer += $input->readString($this->row_cache_provider);
  3283. } else {
  3284. $xfer += $input->skip($ftype);
  3285. }
  3286. break;
  3287. case 28:
  3288. if ($ftype == TType::STRING) {
  3289. $xfer += $input->readString($this->key_alias);
  3290. } else {
  3291. $xfer += $input->skip($ftype);
  3292. }
  3293. break;
  3294. case 29:
  3295. if ($ftype == TType::STRING) {
  3296. $xfer += $input->readString($this->compaction_strategy);
  3297. } else {
  3298. $xfer += $input->skip($ftype);
  3299. }
  3300. break;
  3301. case 30:
  3302. if ($ftype == TType::MAP) {
  3303. $this->compaction_strategy_options = array();
  3304. $_size80 = 0;
  3305. $_ktype81 = 0;
  3306. $_vtype82 = 0;
  3307. $xfer += $input->readMapBegin($_ktype81, $_vtype82, $_size80);
  3308. for ($_i84 = 0; $_i84 < $_size80; ++$_i84)
  3309. {
  3310. $key85 = '';
  3311. $val86 = '';
  3312. $xfer += $input->readString($key85);
  3313. $xfer += $input->readString($val86);
  3314. $this->compaction_strategy_options[$key85] = $val86;
  3315. }
  3316. $xfer += $input->readMapEnd();
  3317. } else {
  3318. $xfer += $input->skip($ftype);
  3319. }
  3320. break;
  3321. case 31:
  3322. if ($ftype == TType::I32) {
  3323. $xfer += $input->readI32($this->row_cache_keys_to_save);
  3324. } else {
  3325. $xfer += $input->skip($ftype);
  3326. }
  3327. break;
  3328. case 32:
  3329. if ($ftype == TType::MAP) {
  3330. $this->compression_options = array();
  3331. $_size87 = 0;
  3332. $_ktype88 = 0;
  3333. $_vtype89 = 0;
  3334. $xfer += $input->readMapBegin($_ktype88, $_vtype89, $_size87);
  3335. for ($_i91 = 0; $_i91 < $_size87; ++$_i91)
  3336. {
  3337. $key92 = '';
  3338. $val93 = '';
  3339. $xfer += $input->readString($key92);
  3340. $xfer += $input->readString($val93);
  3341. $this->compression_options[$key92] = $val93;
  3342. }
  3343. $xfer += $input->readMapEnd();
  3344. } else {
  3345. $xfer += $input->skip($ftype);
  3346. }
  3347. break;
  3348. default:
  3349. $xfer += $input->skip($ftype);
  3350. break;
  3351. }
  3352. $xfer += $input->readFieldEnd();
  3353. }
  3354. $xfer += $input->readStructEnd();
  3355. return $xfer;
  3356. }
  3357. public function write($output) {
  3358. $xfer = 0;
  3359. $xfer += $output->writeStructBegin('CfDef');
  3360. if ($this->keyspace !== null) {
  3361. $xfer += $output->writeFieldBegin('keyspace', TType::STRING, 1);
  3362. $xfer += $output->writeString($this->keyspace);
  3363. $xfer += $output->writeFieldEnd();
  3364. }
  3365. if ($this->name !== null) {
  3366. $xfer += $output->writeFieldBegin('name', TType::STRING, 2);
  3367. $xfer += $output->writeString($this->name);
  3368. $xfer += $output->writeFieldEnd();
  3369. }
  3370. if ($this->column_type !== null) {
  3371. $xfer += $output->writeFieldBegin('column_type', TType::STRING, 3);
  3372. $xfer += $output->writeString($this->column_type);
  3373. $xfer += $output->writeFieldEnd();
  3374. }
  3375. if ($this->comparator_type !== null) {
  3376. $xfer += $output->writeFieldBegin('comparator_type', TType::STRING, 5);
  3377. $xfer += $output->writeString($this->comparator_type);
  3378. $xfer += $output->writeFieldEnd();
  3379. }
  3380. if ($this->subcomparator_type !== null) {
  3381. $xfer += $output->writeFieldBegin('subcomparator_type', TType::STRING, 6);
  3382. $xfer += $output->writeString($this->subcomparator_type);
  3383. $xfer += $output->writeFieldEnd();
  3384. }
  3385. if ($this->comment !== null) {
  3386. $xfer += $output->writeFieldBegin('comment', TType::STRING, 8);
  3387. $xfer += $output->writeString($this->comment);
  3388. $xfer += $output->writeFieldEnd();
  3389. }
  3390. if ($this->row_cache_size !== null) {
  3391. $xfer += $output->writeFieldBegin('row_cache_size', TType::DOUBLE, 9);
  3392. $xfer += $output->writeDouble($this->row_cache_size);
  3393. $xfer += $output->writeFieldEnd();
  3394. }
  3395. if ($this->key_cache_size !== null) {
  3396. $xfer += $output->writeFieldBegin('key_cache_size', TType::DOUBLE, 11);
  3397. $xfer += $output->writeDouble($this->key_cache_size);
  3398. $xfer += $output->writeFieldEnd();
  3399. }
  3400. if ($this->read_repair_chance !== null) {
  3401. $xfer += $output->writeFieldBegin('read_repair_chance', TType::DOUBLE, 12);
  3402. $xfer += $output->writeDouble($this->read_repair_chance);
  3403. $xfer += $output->writeFieldEnd();
  3404. }
  3405. if ($this->column_metadata !== null) {
  3406. if (!is_array($this->column_metadata)) {
  3407. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  3408. }
  3409. $xfer += $output->writeFieldBegin('column_metadata', TType::LST, 13);
  3410. {
  3411. $output->writeListBegin(TType::STRUCT, count($this->column_metadata));
  3412. {
  3413. foreach ($this->column_metadata as $iter94)
  3414. {
  3415. $xfer += $iter94->write($output);
  3416. }
  3417. }
  3418. $output->writeListEnd();
  3419. }
  3420. $xfer += $output->writeFieldEnd();
  3421. }
  3422. if ($this->gc_grace_seconds !== null) {
  3423. $xfer += $output->writeFieldBegin('gc_grace_seconds', TType::I32, 14);
  3424. $xfer += $output->writeI32($this->gc_grace_seconds);
  3425. $xfer += $output->writeFieldEnd();
  3426. }
  3427. if ($this->default_validation_class !== null) {
  3428. $xfer += $output->writeFieldBegin('default_validation_class', TType::STRING, 15);
  3429. $xfer += $output->writeString($this->default_validation_class);
  3430. $xfer += $output->writeFieldEnd();
  3431. }
  3432. if ($this->id !== null) {
  3433. $xfer += $output->writeFieldBegin('id', TType::I32, 16);
  3434. $xfer += $output->writeI32($this->id);
  3435. $xfer += $output->writeFieldEnd();
  3436. }
  3437. if ($this->min_compaction_threshold !== null) {
  3438. $xfer += $output->writeFieldBegin('min_compaction_threshold', TType::I32, 17);
  3439. $xfer += $output->writeI32($this->min_compaction_threshold);
  3440. $xfer += $output->writeFieldEnd();
  3441. }
  3442. if ($this->max_compaction_threshold !== null) {
  3443. $xfer += $output->writeFieldBegin('max_compaction_threshold', TType::I32, 18);
  3444. $xfer += $output->writeI32($this->max_compaction_threshold);
  3445. $xfer += $output->writeFieldEnd();
  3446. }
  3447. if ($this->row_cache_save_period_in_seconds !== null) {
  3448. $xfer += $output->writeFieldBegin('row_cache_save_period_in_seconds', TType::I32, 19);
  3449. $xfer += $output->writeI32($this->row_cache_save_period_in_seconds);
  3450. $xfer += $output->writeFieldEnd();
  3451. }
  3452. if ($this->key_cache_save_period_in_seconds !== null) {
  3453. $xfer += $output->writeFieldBegin('key_cache_save_period_in_seconds', TType::I32, 20);
  3454. $xfer += $output->writeI32($this->key_cache_save_period_in_seconds);
  3455. $xfer += $output->writeFieldEnd();
  3456. }
  3457. if ($this->replicate_on_write !== null) {
  3458. $xfer += $output->writeFieldBegin('replicate_on_write', TType::BOOL, 24);
  3459. $xfer += $output->writeBool($this->replicate_on_write);
  3460. $xfer += $output->writeFieldEnd();
  3461. }
  3462. if ($this->merge_shards_chance !== null) {
  3463. $xfer += $output->writeFieldBegin('merge_shards_chance', TType::DOUBLE, 25);
  3464. $xfer += $output->writeDouble($this->merge_shards_chance);
  3465. $xfer += $output->writeFieldEnd();
  3466. }
  3467. if ($this->key_validation_class !== null) {
  3468. $xfer += $output->writeFieldBegin('key_validation_class', TType::STRING, 26);
  3469. $xfer += $output->writeString($this->key_validation_class);
  3470. $xfer += $output->writeFieldEnd();
  3471. }
  3472. if ($this->row_cache_provider !== null) {
  3473. $xfer += $output->writeFieldBegin('row_cache_provider', TType::STRING, 27);
  3474. $xfer += $output->writeString($this->row_cache_provider);
  3475. $xfer += $output->writeFieldEnd();
  3476. }
  3477. if ($this->key_alias !== null) {
  3478. $xfer += $output->writeFieldBegin('key_alias', TType::STRING, 28);
  3479. $xfer += $output->writeString($this->key_alias);
  3480. $xfer += $output->writeFieldEnd();
  3481. }
  3482. if ($this->compaction_strategy !== null) {
  3483. $xfer += $output->writeFieldBegin('compaction_strategy', TType::STRING, 29);
  3484. $xfer += $output->writeString($this->compaction_strategy);
  3485. $xfer += $output->writeFieldEnd();
  3486. }
  3487. if ($this->compaction_strategy_options !== null) {
  3488. if (!is_array($this->compaction_strategy_options)) {
  3489. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  3490. }
  3491. $xfer += $output->writeFieldBegin('compaction_strategy_options', TType::MAP, 30);
  3492. {
  3493. $output->writeMapBegin(TType::STRING, TType::STRING, count($this->compaction_strategy_options));
  3494. {
  3495. foreach ($this->compaction_strategy_options as $kiter95 => $viter96)
  3496. {
  3497. $xfer += $output->writeString($kiter95);
  3498. $xfer += $output->writeString($viter96);
  3499. }
  3500. }
  3501. $output->writeMapEnd();
  3502. }
  3503. $xfer += $output->writeFieldEnd();
  3504. }
  3505. if ($this->row_cache_keys_to_save !== null) {
  3506. $xfer += $output->writeFieldBegin('row_cache_keys_to_save', TType::I32, 31);
  3507. $xfer += $output->writeI32($this->row_cache_keys_to_save);
  3508. $xfer += $output->writeFieldEnd();
  3509. }
  3510. if ($this->compression_options !== null) {
  3511. if (!is_array($this->compression_options)) {
  3512. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  3513. }
  3514. $xfer += $output->writeFieldBegin('compression_options', TType::MAP, 32);
  3515. {
  3516. $output->writeMapBegin(TType::STRING, TType::STRING, count($this->compression_options));
  3517. {
  3518. foreach ($this->compression_options as $kiter97 => $viter98)
  3519. {
  3520. $xfer += $output->writeString($kiter97);
  3521. $xfer += $output->writeString($viter98);
  3522. }
  3523. }
  3524. $output->writeMapEnd();
  3525. }
  3526. $xfer += $output->writeFieldEnd();
  3527. }
  3528. $xfer += $output->writeFieldStop();
  3529. $xfer += $output->writeStructEnd();
  3530. return $xfer;
  3531. }
  3532. }
  3533. class cassandra_KsDef {
  3534. static $_TSPEC;
  3535. public $name = null;
  3536. public $strategy_class = null;
  3537. public $strategy_options = null;
  3538. public $replication_factor = null;
  3539. public $cf_defs = null;
  3540. public $durable_writes = true;
  3541. public function __construct($vals=null) {
  3542. if (!isset(self::$_TSPEC)) {
  3543. self::$_TSPEC = array(
  3544. 1 => array(
  3545. 'var' => 'name',
  3546. 'type' => TType::STRING,
  3547. ),
  3548. 2 => array(
  3549. 'var' => 'strategy_class',
  3550. 'type' => TType::STRING,
  3551. ),
  3552. 3 => array(
  3553. 'var' => 'strategy_options',
  3554. 'type' => TType::MAP,
  3555. 'ktype' => TType::STRING,
  3556. 'vtype' => TType::STRING,
  3557. 'key' => array(
  3558. 'type' => TType::STRING,
  3559. ),
  3560. 'val' => array(
  3561. 'type' => TType::STRING,
  3562. ),
  3563. ),
  3564. 4 => array(
  3565. 'var' => 'replication_factor',
  3566. 'type' => TType::I32,
  3567. ),
  3568. 5 => array(
  3569. 'var' => 'cf_defs',
  3570. 'type' => TType::LST,
  3571. 'etype' => TType::STRUCT,
  3572. 'elem' => array(
  3573. 'type' => TType::STRUCT,
  3574. 'class' => 'cassandra_CfDef',
  3575. ),
  3576. ),
  3577. 6 => array(
  3578. 'var' => 'durable_writes',
  3579. 'type' => TType::BOOL,
  3580. ),
  3581. );
  3582. }
  3583. if (is_array($vals)) {
  3584. if (isset($vals['name'])) {
  3585. $this->name = $vals['name'];
  3586. }
  3587. if (isset($vals['strategy_class'])) {
  3588. $this->strategy_class = $vals['strategy_class'];
  3589. }
  3590. if (isset($vals['strategy_options'])) {
  3591. $this->strategy_options = $vals['strategy_options'];
  3592. }
  3593. if (isset($vals['replication_factor'])) {
  3594. $this->replication_factor = $vals['replication_factor'];
  3595. }
  3596. if (isset($vals['cf_defs'])) {
  3597. $this->cf_defs = $vals['cf_defs'];
  3598. }
  3599. if (isset($vals['durable_writes'])) {
  3600. $this->durable_writes = $vals['durable_writes'];
  3601. }
  3602. }
  3603. }
  3604. public function getName() {
  3605. return 'KsDef';
  3606. }
  3607. public function read($input)
  3608. {
  3609. $xfer = 0;
  3610. $fname = null;
  3611. $ftype = 0;
  3612. $fid = 0;
  3613. $xfer += $input->readStructBegin($fname);
  3614. while (true)
  3615. {
  3616. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  3617. if ($ftype == TType::STOP) {
  3618. break;
  3619. }
  3620. switch ($fid)
  3621. {
  3622. case 1:
  3623. if ($ftype == TType::STRING) {
  3624. $xfer += $input->readString($this->name);
  3625. } else {
  3626. $xfer += $input->skip($ftype);
  3627. }
  3628. break;
  3629. case 2:
  3630. if ($ftype == TType::STRING) {
  3631. $xfer += $input->readString($this->strategy_class);
  3632. } else {
  3633. $xfer += $input->skip($ftype);
  3634. }
  3635. break;
  3636. case 3:
  3637. if ($ftype == TType::MAP) {
  3638. $this->strategy_options = array();
  3639. $_size99 = 0;
  3640. $_ktype100 = 0;
  3641. $_vtype101 = 0;
  3642. $xfer += $input->readMapBegin($_ktype100, $_vtype101, $_size99);
  3643. for ($_i103 = 0; $_i103 < $_size99; ++$_i103)
  3644. {
  3645. $key104 = '';
  3646. $val105 = '';
  3647. $xfer += $input->readString($key104);
  3648. $xfer += $input->readString($val105);
  3649. $this->strategy_options[$key104] = $val105;
  3650. }
  3651. $xfer += $input->readMapEnd();
  3652. } else {
  3653. $xfer += $input->skip($ftype);
  3654. }
  3655. break;
  3656. case 4:
  3657. if ($ftype == TType::I32) {
  3658. $xfer += $input->readI32($this->replication_factor);
  3659. } else {
  3660. $xfer += $input->skip($ftype);
  3661. }
  3662. break;
  3663. case 5:
  3664. if ($ftype == TType::LST) {
  3665. $this->cf_defs = array();
  3666. $_size106 = 0;
  3667. $_etype109 = 0;
  3668. $xfer += $input->readListBegin($_etype109, $_size106);
  3669. for ($_i110 = 0; $_i110 < $_size106; ++$_i110)
  3670. {
  3671. $elem111 = null;
  3672. $elem111 = new cassandra_CfDef();
  3673. $xfer += $elem111->read($input);
  3674. $this->cf_defs []= $elem111;
  3675. }
  3676. $xfer += $input->readListEnd();
  3677. } else {
  3678. $xfer += $input->skip($ftype);
  3679. }
  3680. break;
  3681. case 6:
  3682. if ($ftype == TType::BOOL) {
  3683. $xfer += $input->readBool($this->durable_writes);
  3684. } else {
  3685. $xfer += $input->skip($ftype);
  3686. }
  3687. break;
  3688. default:
  3689. $xfer += $input->skip($ftype);
  3690. break;
  3691. }
  3692. $xfer += $input->readFieldEnd();
  3693. }
  3694. $xfer += $input->readStructEnd();
  3695. return $xfer;
  3696. }
  3697. public function write($output) {
  3698. $xfer = 0;
  3699. $xfer += $output->writeStructBegin('KsDef');
  3700. if ($this->name !== null) {
  3701. $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
  3702. $xfer += $output->writeString($this->name);
  3703. $xfer += $output->writeFieldEnd();
  3704. }
  3705. if ($this->strategy_class !== null) {
  3706. $xfer += $output->writeFieldBegin('strategy_class', TType::STRING, 2);
  3707. $xfer += $output->writeString($this->strategy_class);
  3708. $xfer += $output->writeFieldEnd();
  3709. }
  3710. if ($this->strategy_options !== null) {
  3711. if (!is_array($this->strategy_options)) {
  3712. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  3713. }
  3714. $xfer += $output->writeFieldBegin('strategy_options', TType::MAP, 3);
  3715. {
  3716. $output->writeMapBegin(TType::STRING, TType::STRING, count($this->strategy_options));
  3717. {
  3718. foreach ($this->strategy_options as $kiter112 => $viter113)
  3719. {
  3720. $xfer += $output->writeString($kiter112);
  3721. $xfer += $output->writeString($viter113);
  3722. }
  3723. }
  3724. $output->writeMapEnd();
  3725. }
  3726. $xfer += $output->writeFieldEnd();
  3727. }
  3728. if ($this->replication_factor !== null) {
  3729. $xfer += $output->writeFieldBegin('replication_factor', TType::I32, 4);
  3730. $xfer += $output->writeI32($this->replication_factor);
  3731. $xfer += $output->writeFieldEnd();
  3732. }
  3733. if ($this->cf_defs !== null) {
  3734. if (!is_array($this->cf_defs)) {
  3735. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  3736. }
  3737. $xfer += $output->writeFieldBegin('cf_defs', TType::LST, 5);
  3738. {
  3739. $output->writeListBegin(TType::STRUCT, count($this->cf_defs));
  3740. {
  3741. foreach ($this->cf_defs as $iter114)
  3742. {
  3743. $xfer += $iter114->write($output);
  3744. }
  3745. }
  3746. $output->writeListEnd();
  3747. }
  3748. $xfer += $output->writeFieldEnd();
  3749. }
  3750. if ($this->durable_writes !== null) {
  3751. $xfer += $output->writeFieldBegin('durable_writes', TType::BOOL, 6);
  3752. $xfer += $output->writeBool($this->durable_writes);
  3753. $xfer += $output->writeFieldEnd();
  3754. }
  3755. $xfer += $output->writeFieldStop();
  3756. $xfer += $output->writeStructEnd();
  3757. return $xfer;
  3758. }
  3759. }
  3760. class cassandra_CqlRow {
  3761. static $_TSPEC;
  3762. public $key = null;
  3763. public $columns = null;
  3764. public function __construct($vals=null) {
  3765. if (!isset(self::$_TSPEC)) {
  3766. self::$_TSPEC = array(
  3767. 1 => array(
  3768. 'var' => 'key',
  3769. 'type' => TType::STRING,
  3770. ),
  3771. 2 => array(
  3772. 'var' => 'columns',
  3773. 'type' => TType::LST,
  3774. 'etype' => TType::STRUCT,
  3775. 'elem' => array(
  3776. 'type' => TType::STRUCT,
  3777. 'class' => 'cassandra_Column',
  3778. ),
  3779. ),
  3780. );
  3781. }
  3782. if (is_array($vals)) {
  3783. if (isset($vals['key'])) {
  3784. $this->key = $vals['key'];
  3785. }
  3786. if (isset($vals['columns'])) {
  3787. $this->columns = $vals['columns'];
  3788. }
  3789. }
  3790. }
  3791. public function getName() {
  3792. return 'CqlRow';
  3793. }
  3794. public function read($input)
  3795. {
  3796. $xfer = 0;
  3797. $fname = null;
  3798. $ftype = 0;
  3799. $fid = 0;
  3800. $xfer += $input->readStructBegin($fname);
  3801. while (true)
  3802. {
  3803. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  3804. if ($ftype == TType::STOP) {
  3805. break;
  3806. }
  3807. switch ($fid)
  3808. {
  3809. case 1:
  3810. if ($ftype == TType::STRING) {
  3811. $xfer += $input->readString($this->key);
  3812. } else {
  3813. $xfer += $input->skip($ftype);
  3814. }
  3815. break;
  3816. case 2:
  3817. if ($ftype == TType::LST) {
  3818. $this->columns = array();
  3819. $_size115 = 0;
  3820. $_etype118 = 0;
  3821. $xfer += $input->readListBegin($_etype118, $_size115);
  3822. for ($_i119 = 0; $_i119 < $_size115; ++$_i119)
  3823. {
  3824. $elem120 = null;
  3825. $elem120 = new cassandra_Column();
  3826. $xfer += $elem120->read($input);
  3827. $this->columns []= $elem120;
  3828. }
  3829. $xfer += $input->readListEnd();
  3830. } else {
  3831. $xfer += $input->skip($ftype);
  3832. }
  3833. break;
  3834. default:
  3835. $xfer += $input->skip($ftype);
  3836. break;
  3837. }
  3838. $xfer += $input->readFieldEnd();
  3839. }
  3840. $xfer += $input->readStructEnd();
  3841. return $xfer;
  3842. }
  3843. public function write($output) {
  3844. $xfer = 0;
  3845. $xfer += $output->writeStructBegin('CqlRow');
  3846. if ($this->key !== null) {
  3847. $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
  3848. $xfer += $output->writeString($this->key);
  3849. $xfer += $output->writeFieldEnd();
  3850. }
  3851. if ($this->columns !== null) {
  3852. if (!is_array($this->columns)) {
  3853. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  3854. }
  3855. $xfer += $output->writeFieldBegin('columns', TType::LST, 2);
  3856. {
  3857. $output->writeListBegin(TType::STRUCT, count($this->columns));
  3858. {
  3859. foreach ($this->columns as $iter121)
  3860. {
  3861. $xfer += $iter121->write($output);
  3862. }
  3863. }
  3864. $output->writeListEnd();
  3865. }
  3866. $xfer += $output->writeFieldEnd();
  3867. }
  3868. $xfer += $output->writeFieldStop();
  3869. $xfer += $output->writeStructEnd();
  3870. return $xfer;
  3871. }
  3872. }
  3873. class cassandra_CqlMetadata {
  3874. static $_TSPEC;
  3875. public $name_types = null;
  3876. public $value_types = null;
  3877. public $default_name_type = null;
  3878. public $default_value_type = null;
  3879. public function __construct($vals=null) {
  3880. if (!isset(self::$_TSPEC)) {
  3881. self::$_TSPEC = array(
  3882. 1 => array(
  3883. 'var' => 'name_types',
  3884. 'type' => TType::MAP,
  3885. 'ktype' => TType::STRING,
  3886. 'vtype' => TType::STRING,
  3887. 'key' => array(
  3888. 'type' => TType::STRING,
  3889. ),
  3890. 'val' => array(
  3891. 'type' => TType::STRING,
  3892. ),
  3893. ),
  3894. 2 => array(
  3895. 'var' => 'value_types',
  3896. 'type' => TType::MAP,
  3897. 'ktype' => TType::STRING,
  3898. 'vtype' => TType::STRING,
  3899. 'key' => array(
  3900. 'type' => TType::STRING,
  3901. ),
  3902. 'val' => array(
  3903. 'type' => TType::STRING,
  3904. ),
  3905. ),
  3906. 3 => array(
  3907. 'var' => 'default_name_type',
  3908. 'type' => TType::STRING,
  3909. ),
  3910. 4 => array(
  3911. 'var' => 'default_value_type',
  3912. 'type' => TType::STRING,
  3913. ),
  3914. );
  3915. }
  3916. if (is_array($vals)) {
  3917. if (isset($vals['name_types'])) {
  3918. $this->name_types = $vals['name_types'];
  3919. }
  3920. if (isset($vals['value_types'])) {
  3921. $this->value_types = $vals['value_types'];
  3922. }
  3923. if (isset($vals['default_name_type'])) {
  3924. $this->default_name_type = $vals['default_name_type'];
  3925. }
  3926. if (isset($vals['default_value_type'])) {
  3927. $this->default_value_type = $vals['default_value_type'];
  3928. }
  3929. }
  3930. }
  3931. public function getName() {
  3932. return 'CqlMetadata';
  3933. }
  3934. public function read($input)
  3935. {
  3936. $xfer = 0;
  3937. $fname = null;
  3938. $ftype = 0;
  3939. $fid = 0;
  3940. $xfer += $input->readStructBegin($fname);
  3941. while (true)
  3942. {
  3943. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  3944. if ($ftype == TType::STOP) {
  3945. break;
  3946. }
  3947. switch ($fid)
  3948. {
  3949. case 1:
  3950. if ($ftype == TType::MAP) {
  3951. $this->name_types = array();
  3952. $_size122 = 0;
  3953. $_ktype123 = 0;
  3954. $_vtype124 = 0;
  3955. $xfer += $input->readMapBegin($_ktype123, $_vtype124, $_size122);
  3956. for ($_i126 = 0; $_i126 < $_size122; ++$_i126)
  3957. {
  3958. $key127 = '';
  3959. $val128 = '';
  3960. $xfer += $input->readString($key127);
  3961. $xfer += $input->readString($val128);
  3962. $this->name_types[$key127] = $val128;
  3963. }
  3964. $xfer += $input->readMapEnd();
  3965. } else {
  3966. $xfer += $input->skip($ftype);
  3967. }
  3968. break;
  3969. case 2:
  3970. if ($ftype == TType::MAP) {
  3971. $this->value_types = array();
  3972. $_size129 = 0;
  3973. $_ktype130 = 0;
  3974. $_vtype131 = 0;
  3975. $xfer += $input->readMapBegin($_ktype130, $_vtype131, $_size129);
  3976. for ($_i133 = 0; $_i133 < $_size129; ++$_i133)
  3977. {
  3978. $key134 = '';
  3979. $val135 = '';
  3980. $xfer += $input->readString($key134);
  3981. $xfer += $input->readString($val135);
  3982. $this->value_types[$key134] = $val135;
  3983. }
  3984. $xfer += $input->readMapEnd();
  3985. } else {
  3986. $xfer += $input->skip($ftype);
  3987. }
  3988. break;
  3989. case 3:
  3990. if ($ftype == TType::STRING) {
  3991. $xfer += $input->readString($this->default_name_type);
  3992. } else {
  3993. $xfer += $input->skip($ftype);
  3994. }
  3995. break;
  3996. case 4:
  3997. if ($ftype == TType::STRING) {
  3998. $xfer += $input->readString($this->default_value_type);
  3999. } else {
  4000. $xfer += $input->skip($ftype);
  4001. }
  4002. break;
  4003. default:
  4004. $xfer += $input->skip($ftype);
  4005. break;
  4006. }
  4007. $xfer += $input->readFieldEnd();
  4008. }
  4009. $xfer += $input->readStructEnd();
  4010. return $xfer;
  4011. }
  4012. public function write($output) {
  4013. $xfer = 0;
  4014. $xfer += $output->writeStructBegin('CqlMetadata');
  4015. if ($this->name_types !== null) {
  4016. if (!is_array($this->name_types)) {
  4017. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  4018. }
  4019. $xfer += $output->writeFieldBegin('name_types', TType::MAP, 1);
  4020. {
  4021. $output->writeMapBegin(TType::STRING, TType::STRING, count($this->name_types));
  4022. {
  4023. foreach ($this->name_types as $kiter136 => $viter137)
  4024. {
  4025. $xfer += $output->writeString($kiter136);
  4026. $xfer += $output->writeString($viter137);
  4027. }
  4028. }
  4029. $output->writeMapEnd();
  4030. }
  4031. $xfer += $output->writeFieldEnd();
  4032. }
  4033. if ($this->value_types !== null) {
  4034. if (!is_array($this->value_types)) {
  4035. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  4036. }
  4037. $xfer += $output->writeFieldBegin('value_types', TType::MAP, 2);
  4038. {
  4039. $output->writeMapBegin(TType::STRING, TType::STRING, count($this->value_types));
  4040. {
  4041. foreach ($this->value_types as $kiter138 => $viter139)
  4042. {
  4043. $xfer += $output->writeString($kiter138);
  4044. $xfer += $output->writeString($viter139);
  4045. }
  4046. }
  4047. $output->writeMapEnd();
  4048. }
  4049. $xfer += $output->writeFieldEnd();
  4050. }
  4051. if ($this->default_name_type !== null) {
  4052. $xfer += $output->writeFieldBegin('default_name_type', TType::STRING, 3);
  4053. $xfer += $output->writeString($this->default_name_type);
  4054. $xfer += $output->writeFieldEnd();
  4055. }
  4056. if ($this->default_value_type !== null) {
  4057. $xfer += $output->writeFieldBegin('default_value_type', TType::STRING, 4);
  4058. $xfer += $output->writeString($this->default_value_type);
  4059. $xfer += $output->writeFieldEnd();
  4060. }
  4061. $xfer += $output->writeFieldStop();
  4062. $xfer += $output->writeStructEnd();
  4063. return $xfer;
  4064. }
  4065. }
  4066. class cassandra_CqlResult {
  4067. static $_TSPEC;
  4068. public $type = null;
  4069. public $rows = null;
  4070. public $num = null;
  4071. public $schema = null;
  4072. public function __construct($vals=null) {
  4073. if (!isset(self::$_TSPEC)) {
  4074. self::$_TSPEC = array(
  4075. 1 => array(
  4076. 'var' => 'type',
  4077. 'type' => TType::I32,
  4078. ),
  4079. 2 => array(
  4080. 'var' => 'rows',
  4081. 'type' => TType::LST,
  4082. 'etype' => TType::STRUCT,
  4083. 'elem' => array(
  4084. 'type' => TType::STRUCT,
  4085. 'class' => 'cassandra_CqlRow',
  4086. ),
  4087. ),
  4088. 3 => array(
  4089. 'var' => 'num',
  4090. 'type' => TType::I32,
  4091. ),
  4092. 4 => array(
  4093. 'var' => 'schema',
  4094. 'type' => TType::STRUCT,
  4095. 'class' => 'cassandra_CqlMetadata',
  4096. ),
  4097. );
  4098. }
  4099. if (is_array($vals)) {
  4100. if (isset($vals['type'])) {
  4101. $this->type = $vals['type'];
  4102. }
  4103. if (isset($vals['rows'])) {
  4104. $this->rows = $vals['rows'];
  4105. }
  4106. if (isset($vals['num'])) {
  4107. $this->num = $vals['num'];
  4108. }
  4109. if (isset($vals['schema'])) {
  4110. $this->schema = $vals['schema'];
  4111. }
  4112. }
  4113. }
  4114. public function getName() {
  4115. return 'CqlResult';
  4116. }
  4117. public function read($input)
  4118. {
  4119. $xfer = 0;
  4120. $fname = null;
  4121. $ftype = 0;
  4122. $fid = 0;
  4123. $xfer += $input->readStructBegin($fname);
  4124. while (true)
  4125. {
  4126. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  4127. if ($ftype == TType::STOP) {
  4128. break;
  4129. }
  4130. switch ($fid)
  4131. {
  4132. case 1:
  4133. if ($ftype == TType::I32) {
  4134. $xfer += $input->readI32($this->type);
  4135. } else {
  4136. $xfer += $input->skip($ftype);
  4137. }
  4138. break;
  4139. case 2:
  4140. if ($ftype == TType::LST) {
  4141. $this->rows = array();
  4142. $_size140 = 0;
  4143. $_etype143 = 0;
  4144. $xfer += $input->readListBegin($_etype143, $_size140);
  4145. for ($_i144 = 0; $_i144 < $_size140; ++$_i144)
  4146. {
  4147. $elem145 = null;
  4148. $elem145 = new cassandra_CqlRow();
  4149. $xfer += $elem145->read($input);
  4150. $this->rows []= $elem145;
  4151. }
  4152. $xfer += $input->readListEnd();
  4153. } else {
  4154. $xfer += $input->skip($ftype);
  4155. }
  4156. break;
  4157. case 3:
  4158. if ($ftype == TType::I32) {
  4159. $xfer += $input->readI32($this->num);
  4160. } else {
  4161. $xfer += $input->skip($ftype);
  4162. }
  4163. break;
  4164. case 4:
  4165. if ($ftype == TType::STRUCT) {
  4166. $this->schema = new cassandra_CqlMetadata();
  4167. $xfer += $this->schema->read($input);
  4168. } else {
  4169. $xfer += $input->skip($ftype);
  4170. }
  4171. break;
  4172. default:
  4173. $xfer += $input->skip($ftype);
  4174. break;
  4175. }
  4176. $xfer += $input->readFieldEnd();
  4177. }
  4178. $xfer += $input->readStructEnd();
  4179. return $xfer;
  4180. }
  4181. public function write($output) {
  4182. $xfer = 0;
  4183. $xfer += $output->writeStructBegin('CqlResult');
  4184. if ($this->type !== null) {
  4185. $xfer += $output->writeFieldBegin('type', TType::I32, 1);
  4186. $xfer += $output->writeI32($this->type);
  4187. $xfer += $output->writeFieldEnd();
  4188. }
  4189. if ($this->rows !== null) {
  4190. if (!is_array($this->rows)) {
  4191. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  4192. }
  4193. $xfer += $output->writeFieldBegin('rows', TType::LST, 2);
  4194. {
  4195. $output->writeListBegin(TType::STRUCT, count($this->rows));
  4196. {
  4197. foreach ($this->rows as $iter146)
  4198. {
  4199. $xfer += $iter146->write($output);
  4200. }
  4201. }
  4202. $output->writeListEnd();
  4203. }
  4204. $xfer += $output->writeFieldEnd();
  4205. }
  4206. if ($this->num !== null) {
  4207. $xfer += $output->writeFieldBegin('num', TType::I32, 3);
  4208. $xfer += $output->writeI32($this->num);
  4209. $xfer += $output->writeFieldEnd();
  4210. }
  4211. if ($this->schema !== null) {
  4212. if (!is_object($this->schema)) {
  4213. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  4214. }
  4215. $xfer += $output->writeFieldBegin('schema', TType::STRUCT, 4);
  4216. $xfer += $this->schema->write($output);
  4217. $xfer += $output->writeFieldEnd();
  4218. }
  4219. $xfer += $output->writeFieldStop();
  4220. $xfer += $output->writeStructEnd();
  4221. return $xfer;
  4222. }
  4223. }
  4224. ?>