/thrift/packages/cassandra/cassandra_types.php
PHP | 4460 lines | 4218 code | 236 blank | 6 comment | 755 complexity | 471af85419337474af7d8af16817f599 MD5 | raw file
- <?php
- /**
- * Autogenerated by Thrift Compiler (0.8.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
- include_once $GLOBALS['THRIFT_ROOT'].'/Thrift.php';
- $GLOBALS['cassandra_E_ConsistencyLevel'] = array(
- 'ONE' => 1,
- 'QUORUM' => 2,
- 'LOCAL_QUORUM' => 3,
- 'EACH_QUORUM' => 4,
- 'ALL' => 5,
- 'ANY' => 6,
- 'TWO' => 7,
- 'THREE' => 8,
- );
- final class ConsistencyLevel {
- const ONE = 1;
- const QUORUM = 2;
- const LOCAL_QUORUM = 3;
- const EACH_QUORUM = 4;
- const ALL = 5;
- const ANY = 6;
- const TWO = 7;
- const THREE = 8;
- static public $__names = array(
- 1 => 'ONE',
- 2 => 'QUORUM',
- 3 => 'LOCAL_QUORUM',
- 4 => 'EACH_QUORUM',
- 5 => 'ALL',
- 6 => 'ANY',
- 7 => 'TWO',
- 8 => 'THREE',
- );
- }
- $GLOBALS['cassandra_E_IndexOperator'] = array(
- 'EQ' => 0,
- 'GTE' => 1,
- 'GT' => 2,
- 'LTE' => 3,
- 'LT' => 4,
- );
- final class IndexOperator {
- const EQ = 0;
- const GTE = 1;
- const GT = 2;
- const LTE = 3;
- const LT = 4;
- static public $__names = array(
- 0 => 'EQ',
- 1 => 'GTE',
- 2 => 'GT',
- 3 => 'LTE',
- 4 => 'LT',
- );
- }
- $GLOBALS['cassandra_E_IndexType'] = array(
- 'KEYS' => 0,
- 'CUSTOM' => 1,
- );
- final class IndexType {
- const KEYS = 0;
- const CUSTOM = 1;
- static public $__names = array(
- 0 => 'KEYS',
- 1 => 'CUSTOM',
- );
- }
- $GLOBALS['cassandra_E_Compression'] = array(
- 'GZIP' => 1,
- 'NONE' => 2,
- );
- final class Compression {
- const GZIP = 1;
- const NONE = 2;
- static public $__names = array(
- 1 => 'GZIP',
- 2 => 'NONE',
- );
- }
- $GLOBALS['cassandra_E_CqlResultType'] = array(
- 'ROWS' => 1,
- 'VOID' => 2,
- 'INT' => 3,
- );
- final class CqlResultType {
- const ROWS = 1;
- const VOID = 2;
- const INT = 3;
- static public $__names = array(
- 1 => 'ROWS',
- 2 => 'VOID',
- 3 => 'INT',
- );
- }
- class cassandra_Column {
- static $_TSPEC;
- public $name = null;
- public $value = null;
- public $timestamp = null;
- public $ttl = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'name',
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'value',
- 'type' => TType::STRING,
- ),
- 3 => array(
- 'var' => 'timestamp',
- 'type' => TType::I64,
- ),
- 4 => array(
- 'var' => 'ttl',
- 'type' => TType::I32,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['name'])) {
- $this->name = $vals['name'];
- }
- if (isset($vals['value'])) {
- $this->value = $vals['value'];
- }
- if (isset($vals['timestamp'])) {
- $this->timestamp = $vals['timestamp'];
- }
- if (isset($vals['ttl'])) {
- $this->ttl = $vals['ttl'];
- }
- }
- }
- public function getName() {
- return 'Column';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->name);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->value);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::I64) {
- $xfer += $input->readI64($this->timestamp);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 4:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->ttl);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('Column');
- if ($this->name !== null) {
- $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
- $xfer += $output->writeString($this->name);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->value !== null) {
- $xfer += $output->writeFieldBegin('value', TType::STRING, 2);
- $xfer += $output->writeString($this->value);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->timestamp !== null) {
- $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
- $xfer += $output->writeI64($this->timestamp);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->ttl !== null) {
- $xfer += $output->writeFieldBegin('ttl', TType::I32, 4);
- $xfer += $output->writeI32($this->ttl);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_SuperColumn {
- static $_TSPEC;
- public $name = null;
- public $columns = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'name',
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'columns',
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => 'cassandra_Column',
- ),
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['name'])) {
- $this->name = $vals['name'];
- }
- if (isset($vals['columns'])) {
- $this->columns = $vals['columns'];
- }
- }
- }
- public function getName() {
- return 'SuperColumn';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->name);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::LST) {
- $this->columns = array();
- $_size0 = 0;
- $_etype3 = 0;
- $xfer += $input->readListBegin($_etype3, $_size0);
- for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
- {
- $elem5 = null;
- $elem5 = new cassandra_Column();
- $xfer += $elem5->read($input);
- $this->columns []= $elem5;
- }
- $xfer += $input->readListEnd();
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('SuperColumn');
- if ($this->name !== null) {
- $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
- $xfer += $output->writeString($this->name);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->columns !== null) {
- if (!is_array($this->columns)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('columns', TType::LST, 2);
- {
- $output->writeListBegin(TType::STRUCT, count($this->columns));
- {
- foreach ($this->columns as $iter6)
- {
- $xfer += $iter6->write($output);
- }
- }
- $output->writeListEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_CounterColumn {
- static $_TSPEC;
- public $name = null;
- public $value = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'name',
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'value',
- 'type' => TType::I64,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['name'])) {
- $this->name = $vals['name'];
- }
- if (isset($vals['value'])) {
- $this->value = $vals['value'];
- }
- }
- }
- public function getName() {
- return 'CounterColumn';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->name);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::I64) {
- $xfer += $input->readI64($this->value);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('CounterColumn');
- if ($this->name !== null) {
- $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
- $xfer += $output->writeString($this->name);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->value !== null) {
- $xfer += $output->writeFieldBegin('value', TType::I64, 2);
- $xfer += $output->writeI64($this->value);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_CounterSuperColumn {
- static $_TSPEC;
- public $name = null;
- public $columns = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'name',
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'columns',
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => 'cassandra_CounterColumn',
- ),
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['name'])) {
- $this->name = $vals['name'];
- }
- if (isset($vals['columns'])) {
- $this->columns = $vals['columns'];
- }
- }
- }
- public function getName() {
- return 'CounterSuperColumn';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->name);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::LST) {
- $this->columns = array();
- $_size7 = 0;
- $_etype10 = 0;
- $xfer += $input->readListBegin($_etype10, $_size7);
- for ($_i11 = 0; $_i11 < $_size7; ++$_i11)
- {
- $elem12 = null;
- $elem12 = new cassandra_CounterColumn();
- $xfer += $elem12->read($input);
- $this->columns []= $elem12;
- }
- $xfer += $input->readListEnd();
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('CounterSuperColumn');
- if ($this->name !== null) {
- $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
- $xfer += $output->writeString($this->name);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->columns !== null) {
- if (!is_array($this->columns)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('columns', TType::LST, 2);
- {
- $output->writeListBegin(TType::STRUCT, count($this->columns));
- {
- foreach ($this->columns as $iter13)
- {
- $xfer += $iter13->write($output);
- }
- }
- $output->writeListEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_ColumnOrSuperColumn {
- static $_TSPEC;
- public $column = null;
- public $super_column = null;
- public $counter_column = null;
- public $counter_super_column = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'column',
- 'type' => TType::STRUCT,
- 'class' => 'cassandra_Column',
- ),
- 2 => array(
- 'var' => 'super_column',
- 'type' => TType::STRUCT,
- 'class' => 'cassandra_SuperColumn',
- ),
- 3 => array(
- 'var' => 'counter_column',
- 'type' => TType::STRUCT,
- 'class' => 'cassandra_CounterColumn',
- ),
- 4 => array(
- 'var' => 'counter_super_column',
- 'type' => TType::STRUCT,
- 'class' => 'cassandra_CounterSuperColumn',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['column'])) {
- $this->column = $vals['column'];
- }
- if (isset($vals['super_column'])) {
- $this->super_column = $vals['super_column'];
- }
- if (isset($vals['counter_column'])) {
- $this->counter_column = $vals['counter_column'];
- }
- if (isset($vals['counter_super_column'])) {
- $this->counter_super_column = $vals['counter_super_column'];
- }
- }
- }
- public function getName() {
- return 'ColumnOrSuperColumn';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRUCT) {
- $this->column = new cassandra_Column();
- $xfer += $this->column->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::STRUCT) {
- $this->super_column = new cassandra_SuperColumn();
- $xfer += $this->super_column->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::STRUCT) {
- $this->counter_column = new cassandra_CounterColumn();
- $xfer += $this->counter_column->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 4:
- if ($ftype == TType::STRUCT) {
- $this->counter_super_column = new cassandra_CounterSuperColumn();
- $xfer += $this->counter_super_column->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('ColumnOrSuperColumn');
- if ($this->column !== null) {
- if (!is_object($this->column)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('column', TType::STRUCT, 1);
- $xfer += $this->column->write($output);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->super_column !== null) {
- if (!is_object($this->super_column)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('super_column', TType::STRUCT, 2);
- $xfer += $this->super_column->write($output);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->counter_column !== null) {
- if (!is_object($this->counter_column)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('counter_column', TType::STRUCT, 3);
- $xfer += $this->counter_column->write($output);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->counter_super_column !== null) {
- if (!is_object($this->counter_super_column)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('counter_super_column', TType::STRUCT, 4);
- $xfer += $this->counter_super_column->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_NotFoundException extends TException {
- static $_TSPEC;
- public function __construct() {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- );
- }
- }
- public function getName() {
- return 'NotFoundException';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('NotFoundException');
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_InvalidRequestException extends TException {
- static $_TSPEC;
- public $why = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'why',
- 'type' => TType::STRING,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['why'])) {
- $this->why = $vals['why'];
- }
- }
- }
- public function getName() {
- return 'InvalidRequestException';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->why);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('InvalidRequestException');
- if ($this->why !== null) {
- $xfer += $output->writeFieldBegin('why', TType::STRING, 1);
- $xfer += $output->writeString($this->why);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_UnavailableException extends TException {
- static $_TSPEC;
- public function __construct() {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- );
- }
- }
- public function getName() {
- return 'UnavailableException';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('UnavailableException');
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_TimedOutException extends TException {
- static $_TSPEC;
- public function __construct() {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- );
- }
- }
- public function getName() {
- return 'TimedOutException';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('TimedOutException');
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_AuthenticationException extends TException {
- static $_TSPEC;
- public $why = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'why',
- 'type' => TType::STRING,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['why'])) {
- $this->why = $vals['why'];
- }
- }
- }
- public function getName() {
- return 'AuthenticationException';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->why);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('AuthenticationException');
- if ($this->why !== null) {
- $xfer += $output->writeFieldBegin('why', TType::STRING, 1);
- $xfer += $output->writeString($this->why);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_AuthorizationException extends TException {
- static $_TSPEC;
- public $why = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'why',
- 'type' => TType::STRING,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['why'])) {
- $this->why = $vals['why'];
- }
- }
- }
- public function getName() {
- return 'AuthorizationException';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->why);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('AuthorizationException');
- if ($this->why !== null) {
- $xfer += $output->writeFieldBegin('why', TType::STRING, 1);
- $xfer += $output->writeString($this->why);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_SchemaDisagreementException extends TException {
- static $_TSPEC;
- public function __construct() {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- );
- }
- }
- public function getName() {
- return 'SchemaDisagreementException';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('SchemaDisagreementException');
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_ColumnParent {
- static $_TSPEC;
- public $column_family = null;
- public $super_column = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 3 => array(
- 'var' => 'column_family',
- 'type' => TType::STRING,
- ),
- 4 => array(
- 'var' => 'super_column',
- 'type' => TType::STRING,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['column_family'])) {
- $this->column_family = $vals['column_family'];
- }
- if (isset($vals['super_column'])) {
- $this->super_column = $vals['super_column'];
- }
- }
- }
- public function getName() {
- return 'ColumnParent';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 3:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->column_family);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 4:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->super_column);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('ColumnParent');
- if ($this->column_family !== null) {
- $xfer += $output->writeFieldBegin('column_family', TType::STRING, 3);
- $xfer += $output->writeString($this->column_family);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->super_column !== null) {
- $xfer += $output->writeFieldBegin('super_column', TType::STRING, 4);
- $xfer += $output->writeString($this->super_column);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_ColumnPath {
- static $_TSPEC;
- public $column_family = null;
- public $super_column = null;
- public $column = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 3 => array(
- 'var' => 'column_family',
- 'type' => TType::STRING,
- ),
- 4 => array(
- 'var' => 'super_column',
- 'type' => TType::STRING,
- ),
- 5 => array(
- 'var' => 'column',
- 'type' => TType::STRING,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['column_family'])) {
- $this->column_family = $vals['column_family'];
- }
- if (isset($vals['super_column'])) {
- $this->super_column = $vals['super_column'];
- }
- if (isset($vals['column'])) {
- $this->column = $vals['column'];
- }
- }
- }
- public function getName() {
- return 'ColumnPath';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 3:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->column_family);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 4:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->super_column);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 5:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->column);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('ColumnPath');
- if ($this->column_family !== null) {
- $xfer += $output->writeFieldBegin('column_family', TType::STRING, 3);
- $xfer += $output->writeString($this->column_family);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->super_column !== null) {
- $xfer += $output->writeFieldBegin('super_column', TType::STRING, 4);
- $xfer += $output->writeString($this->super_column);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->column !== null) {
- $xfer += $output->writeFieldBegin('column', TType::STRING, 5);
- $xfer += $output->writeString($this->column);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_SliceRange {
- static $_TSPEC;
- public $start = null;
- public $finish = null;
- public $reversed = false;
- public $count = 100;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'start',
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'finish',
- 'type' => TType::STRING,
- ),
- 3 => array(
- 'var' => 'reversed',
- 'type' => TType::BOOL,
- ),
- 4 => array(
- 'var' => 'count',
- 'type' => TType::I32,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['start'])) {
- $this->start = $vals['start'];
- }
- if (isset($vals['finish'])) {
- $this->finish = $vals['finish'];
- }
- if (isset($vals['reversed'])) {
- $this->reversed = $vals['reversed'];
- }
- if (isset($vals['count'])) {
- $this->count = $vals['count'];
- }
- }
- }
- public function getName() {
- return 'SliceRange';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->start);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->finish);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::BOOL) {
- $xfer += $input->readBool($this->reversed);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 4:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->count);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('SliceRange');
- if ($this->start !== null) {
- $xfer += $output->writeFieldBegin('start', TType::STRING, 1);
- $xfer += $output->writeString($this->start);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->finish !== null) {
- $xfer += $output->writeFieldBegin('finish', TType::STRING, 2);
- $xfer += $output->writeString($this->finish);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->reversed !== null) {
- $xfer += $output->writeFieldBegin('reversed', TType::BOOL, 3);
- $xfer += $output->writeBool($this->reversed);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->count !== null) {
- $xfer += $output->writeFieldBegin('count', TType::I32, 4);
- $xfer += $output->writeI32($this->count);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_SlicePredicate {
- static $_TSPEC;
- public $column_names = null;
- public $slice_range = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'column_names',
- 'type' => TType::LST,
- 'etype' => TType::STRING,
- 'elem' => array(
- 'type' => TType::STRING,
- ),
- ),
- 2 => array(
- 'var' => 'slice_range',
- 'type' => TType::STRUCT,
- 'class' => 'cassandra_SliceRange',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['column_names'])) {
- $this->column_names = $vals['column_names'];
- }
- if (isset($vals['slice_range'])) {
- $this->slice_range = $vals['slice_range'];
- }
- }
- }
- public function getName() {
- return 'SlicePredicate';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::LST) {
- $this->column_names = array();
- $_size14 = 0;
- $_etype17 = 0;
- $xfer += $input->readListBegin($_etype17, $_size14);
- for ($_i18 = 0; $_i18 < $_size14; ++$_i18)
- {
- $elem19 = null;
- $xfer += $input->readString($elem19);
- $this->column_names []= $elem19;
- }
- $xfer += $input->readListEnd();
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::STRUCT) {
- $this->slice_range = new cassandra_SliceRange();
- $xfer += $this->slice_range->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('SlicePredicate');
- if ($this->column_names !== null) {
- if (!is_array($this->column_names)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('column_names', TType::LST, 1);
- {
- $output->writeListBegin(TType::STRING, count($this->column_names));
- {
- foreach ($this->column_names as $iter20)
- {
- $xfer += $output->writeString($iter20);
- }
- }
- $output->writeListEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- if ($this->slice_range !== null) {
- if (!is_object($this->slice_range)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('slice_range', TType::STRUCT, 2);
- $xfer += $this->slice_range->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_IndexExpression {
- static $_TSPEC;
- public $column_name = null;
- public $op = null;
- public $value = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'column_name',
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'op',
- 'type' => TType::I32,
- ),
- 3 => array(
- 'var' => 'value',
- 'type' => TType::STRING,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['column_name'])) {
- $this->column_name = $vals['column_name'];
- }
- if (isset($vals['op'])) {
- $this->op = $vals['op'];
- }
- if (isset($vals['value'])) {
- $this->value = $vals['value'];
- }
- }
- }
- public function getName() {
- return 'IndexExpression';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->column_name);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->op);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->value);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('IndexExpression');
- if ($this->column_name !== null) {
- $xfer += $output->writeFieldBegin('column_name', TType::STRING, 1);
- $xfer += $output->writeString($this->column_name);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->op !== null) {
- $xfer += $output->writeFieldBegin('op', TType::I32, 2);
- $xfer += $output->writeI32($this->op);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->value !== null) {
- $xfer += $output->writeFieldBegin('value', TType::STRING, 3);
- $xfer += $output->writeString($this->value);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_IndexClause {
- static $_TSPEC;
- public $expressions = null;
- public $start_key = null;
- public $count = 100;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'expressions',
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => 'cassandra_IndexExpression',
- ),
- ),
- 2 => array(
- 'var' => 'start_key',
- 'type' => TType::STRING,
- ),
- 3 => array(
- 'var' => 'count',
- 'type' => TType::I32,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['expressions'])) {
- $this->expressions = $vals['expressions'];
- }
- if (isset($vals['start_key'])) {
- $this->start_key = $vals['start_key'];
- }
- if (isset($vals['count'])) {
- $this->count = $vals['count'];
- }
- }
- }
- public function getName() {
- return 'IndexClause';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::LST) {
- $this->expressions = array();
- $_size21 = 0;
- $_etype24 = 0;
- $xfer += $input->readListBegin($_etype24, $_size21);
- for ($_i25 = 0; $_i25 < $_size21; ++$_i25)
- {
- $elem26 = null;
- $elem26 = new cassandra_IndexExpression();
- $xfer += $elem26->read($input);
- $this->expressions []= $elem26;
- }
- $xfer += $input->readListEnd();
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->start_key);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->count);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('IndexClause');
- if ($this->expressions !== null) {
- if (!is_array($this->expressions)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('expressions', TType::LST, 1);
- {
- $output->writeListBegin(TType::STRUCT, count($this->expressions));
- {
- foreach ($this->expressions as $iter27)
- {
- $xfer += $iter27->write($output);
- }
- }
- $output->writeListEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- if ($this->start_key !== null) {
- $xfer += $output->writeFieldBegin('start_key', TType::STRING, 2);
- $xfer += $output->writeString($this->start_key);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->count !== null) {
- $xfer += $output->writeFieldBegin('count', TType::I32, 3);
- $xfer += $output->writeI32($this->count);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_KeyRange {
- static $_TSPEC;
- public $start_key = null;
- public $end_key = null;
- public $start_token = null;
- public $end_token = null;
- public $count = 100;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'start_key',
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'end_key',
- 'type' => TType::STRING,
- ),
- 3 => array(
- 'var' => 'start_token',
- 'type' => TType::STRING,
- ),
- 4 => array(
- 'var' => 'end_token',
- 'type' => TType::STRING,
- ),
- 5 => array(
- 'var' => 'count',
- 'type' => TType::I32,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['start_key'])) {
- $this->start_key = $vals['start_key'];
- }
- if (isset($vals['end_key'])) {
- $this->end_key = $vals['end_key'];
- }
- if (isset($vals['start_token'])) {
- $this->start_token = $vals['start_token'];
- }
- if (isset($vals['end_token'])) {
- $this->end_token = $vals['end_token'];
- }
- if (isset($vals['count'])) {
- $this->count = $vals['count'];
- }
- }
- }
- public function getName() {
- return 'KeyRange';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->start_key);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->end_key);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->start_token);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 4:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->end_token);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 5:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->count);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('KeyRange');
- if ($this->start_key !== null) {
- $xfer += $output->writeFieldBegin('start_key', TType::STRING, 1);
- $xfer += $output->writeString($this->start_key);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->end_key !== null) {
- $xfer += $output->writeFieldBegin('end_key', TType::STRING, 2);
- $xfer += $output->writeString($this->end_key);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->start_token !== null) {
- $xfer += $output->writeFieldBegin('start_token', TType::STRING, 3);
- $xfer += $output->writeString($this->start_token);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->end_token !== null) {
- $xfer += $output->writeFieldBegin('end_token', TType::STRING, 4);
- $xfer += $output->writeString($this->end_token);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->count !== null) {
- $xfer += $output->writeFieldBegin('count', TType::I32, 5);
- $xfer += $output->writeI32($this->count);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_KeySlice {
- static $_TSPEC;
- public $key = null;
- public $columns = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'key',
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'columns',
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => 'cassandra_ColumnOrSuperColumn',
- ),
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['key'])) {
- $this->key = $vals['key'];
- }
- if (isset($vals['columns'])) {
- $this->columns = $vals['columns'];
- }
- }
- }
- public function getName() {
- return 'KeySlice';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->key);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::LST) {
- $this->columns = array();
- $_size28 = 0;
- $_etype31 = 0;
- $xfer += $input->readListBegin($_etype31, $_size28);
- for ($_i32 = 0; $_i32 < $_size28; ++$_i32)
- {
- $elem33 = null;
- $elem33 = new cassandra_ColumnOrSuperColumn();
- $xfer += $elem33->read($input);
- $this->columns []= $elem33;
- }
- $xfer += $input->readListEnd();
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('KeySlice');
- if ($this->key !== null) {
- $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
- $xfer += $output->writeString($this->key);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->columns !== null) {
- if (!is_array($this->columns)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('columns', TType::LST, 2);
- {
- $output->writeListBegin(TType::STRUCT, count($this->columns));
- {
- foreach ($this->columns as $iter34)
- {
- $xfer += $iter34->write($output);
- }
- }
- $output->writeListEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_KeyCount {
- static $_TSPEC;
- public $key = null;
- public $count = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'key',
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'count',
- 'type' => TType::I32,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['key'])) {
- $this->key = $vals['key'];
- }
- if (isset($vals['count'])) {
- $this->count = $vals['count'];
- }
- }
- }
- public function getName() {
- return 'KeyCount';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->key);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->count);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('KeyCount');
- if ($this->key !== null) {
- $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
- $xfer += $output->writeString($this->key);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->count !== null) {
- $xfer += $output->writeFieldBegin('count', TType::I32, 2);
- $xfer += $output->writeI32($this->count);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_Deletion {
- static $_TSPEC;
- public $timestamp = null;
- public $super_column = null;
- public $predicate = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'timestamp',
- 'type' => TType::I64,
- ),
- 2 => array(
- 'var' => 'super_column',
- 'type' => TType::STRING,
- ),
- 3 => array(
- 'var' => 'predicate',
- 'type' => TType::STRUCT,
- 'class' => 'cassandra_SlicePredicate',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['timestamp'])) {
- $this->timestamp = $vals['timestamp'];
- }
- if (isset($vals['super_column'])) {
- $this->super_column = $vals['super_column'];
- }
- if (isset($vals['predicate'])) {
- $this->predicate = $vals['predicate'];
- }
- }
- }
- public function getName() {
- return 'Deletion';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::I64) {
- $xfer += $input->readI64($this->timestamp);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->super_column);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::STRUCT) {
- $this->predicate = new cassandra_SlicePredicate();
- $xfer += $this->predicate->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('Deletion');
- if ($this->timestamp !== null) {
- $xfer += $output->writeFieldBegin('timestamp', TType::I64, 1);
- $xfer += $output->writeI64($this->timestamp);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->super_column !== null) {
- $xfer += $output->writeFieldBegin('super_column', TType::STRING, 2);
- $xfer += $output->writeString($this->super_column);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->predicate !== null) {
- if (!is_object($this->predicate)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('predicate', TType::STRUCT, 3);
- $xfer += $this->predicate->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_Mutation {
- static $_TSPEC;
- public $column_or_supercolumn = null;
- public $deletion = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'column_or_supercolumn',
- 'type' => TType::STRUCT,
- 'class' => 'cassandra_ColumnOrSuperColumn',
- ),
- 2 => array(
- 'var' => 'deletion',
- 'type' => TType::STRUCT,
- 'class' => 'cassandra_Deletion',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['column_or_supercolumn'])) {
- $this->column_or_supercolumn = $vals['column_or_supercolumn'];
- }
- if (isset($vals['deletion'])) {
- $this->deletion = $vals['deletion'];
- }
- }
- }
- public function getName() {
- return 'Mutation';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRUCT) {
- $this->column_or_supercolumn = new cassandra_ColumnOrSuperColumn();
- $xfer += $this->column_or_supercolumn->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::STRUCT) {
- $this->deletion = new cassandra_Deletion();
- $xfer += $this->deletion->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('Mutation');
- if ($this->column_or_supercolumn !== null) {
- if (!is_object($this->column_or_supercolumn)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('column_or_supercolumn', TType::STRUCT, 1);
- $xfer += $this->column_or_supercolumn->write($output);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->deletion !== null) {
- if (!is_object($this->deletion)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('deletion', TType::STRUCT, 2);
- $xfer += $this->deletion->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_EndpointDetails {
- static $_TSPEC;
- public $host = null;
- public $datacenter = null;
- public $rack = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'host',
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'datacenter',
- 'type' => TType::STRING,
- ),
- 3 => array(
- 'var' => 'rack',
- 'type' => TType::STRING,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['host'])) {
- $this->host = $vals['host'];
- }
- if (isset($vals['datacenter'])) {
- $this->datacenter = $vals['datacenter'];
- }
- if (isset($vals['rack'])) {
- $this->rack = $vals['rack'];
- }
- }
- }
- public function getName() {
- return 'EndpointDetails';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->host);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->datacenter);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->rack);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('EndpointDetails');
- if ($this->host !== null) {
- $xfer += $output->writeFieldBegin('host', TType::STRING, 1);
- $xfer += $output->writeString($this->host);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->datacenter !== null) {
- $xfer += $output->writeFieldBegin('datacenter', TType::STRING, 2);
- $xfer += $output->writeString($this->datacenter);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->rack !== null) {
- $xfer += $output->writeFieldBegin('rack', TType::STRING, 3);
- $xfer += $output->writeString($this->rack);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_TokenRange {
- static $_TSPEC;
- public $start_token = null;
- public $end_token = null;
- public $endpoints = null;
- public $rpc_endpoints = null;
- public $endpoint_details = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'start_token',
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'end_token',
- 'type' => TType::STRING,
- ),
- 3 => array(
- 'var' => 'endpoints',
- 'type' => TType::LST,
- 'etype' => TType::STRING,
- 'elem' => array(
- 'type' => TType::STRING,
- ),
- ),
- 4 => array(
- 'var' => 'rpc_endpoints',
- 'type' => TType::LST,
- 'etype' => TType::STRING,
- 'elem' => array(
- 'type' => TType::STRING,
- ),
- ),
- 5 => array(
- 'var' => 'endpoint_details',
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => 'cassandra_EndpointDetails',
- ),
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['start_token'])) {
- $this->start_token = $vals['start_token'];
- }
- if (isset($vals['end_token'])) {
- $this->end_token = $vals['end_token'];
- }
- if (isset($vals['endpoints'])) {
- $this->endpoints = $vals['endpoints'];
- }
- if (isset($vals['rpc_endpoints'])) {
- $this->rpc_endpoints = $vals['rpc_endpoints'];
- }
- if (isset($vals['endpoint_details'])) {
- $this->endpoint_details = $vals['endpoint_details'];
- }
- }
- }
- public function getName() {
- return 'TokenRange';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->start_token);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->end_token);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::LST) {
- $this->endpoints = array();
- $_size35 = 0;
- $_etype38 = 0;
- $xfer += $input->readListBegin($_etype38, $_size35);
- for ($_i39 = 0; $_i39 < $_size35; ++$_i39)
- {
- $elem40 = null;
- $xfer += $input->readString($elem40);
- $this->endpoints []= $elem40;
- }
- $xfer += $input->readListEnd();
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 4:
- if ($ftype == TType::LST) {
- $this->rpc_endpoints = array();
- $_size41 = 0;
- $_etype44 = 0;
- $xfer += $input->readListBegin($_etype44, $_size41);
- for ($_i45 = 0; $_i45 < $_size41; ++$_i45)
- {
- $elem46 = null;
- $xfer += $input->readString($elem46);
- $this->rpc_endpoints []= $elem46;
- }
- $xfer += $input->readListEnd();
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 5:
- if ($ftype == TType::LST) {
- $this->endpoint_details = array();
- $_size47 = 0;
- $_etype50 = 0;
- $xfer += $input->readListBegin($_etype50, $_size47);
- for ($_i51 = 0; $_i51 < $_size47; ++$_i51)
- {
- $elem52 = null;
- $elem52 = new cassandra_EndpointDetails();
- $xfer += $elem52->read($input);
- $this->endpoint_details []= $elem52;
- }
- $xfer += $input->readListEnd();
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('TokenRange');
- if ($this->start_token !== null) {
- $xfer += $output->writeFieldBegin('start_token', TType::STRING, 1);
- $xfer += $output->writeString($this->start_token);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->end_token !== null) {
- $xfer += $output->writeFieldBegin('end_token', TType::STRING, 2);
- $xfer += $output->writeString($this->end_token);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->endpoints !== null) {
- if (!is_array($this->endpoints)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('endpoints', TType::LST, 3);
- {
- $output->writeListBegin(TType::STRING, count($this->endpoints));
- {
- foreach ($this->endpoints as $iter53)
- {
- $xfer += $output->writeString($iter53);
- }
- }
- $output->writeListEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- if ($this->rpc_endpoints !== null) {
- if (!is_array($this->rpc_endpoints)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('rpc_endpoints', TType::LST, 4);
- {
- $output->writeListBegin(TType::STRING, count($this->rpc_endpoints));
- {
- foreach ($this->rpc_endpoints as $iter54)
- {
- $xfer += $output->writeString($iter54);
- }
- }
- $output->writeListEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- if ($this->endpoint_details !== null) {
- if (!is_array($this->endpoint_details)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('endpoint_details', TType::LST, 5);
- {
- $output->writeListBegin(TType::STRUCT, count($this->endpoint_details));
- {
- foreach ($this->endpoint_details as $iter55)
- {
- $xfer += $iter55->write($output);
- }
- }
- $output->writeListEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_AuthenticationRequest {
- static $_TSPEC;
- public $credentials = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'credentials',
- 'type' => TType::MAP,
- 'ktype' => TType::STRING,
- 'vtype' => TType::STRING,
- 'key' => array(
- 'type' => TType::STRING,
- ),
- 'val' => array(
- 'type' => TType::STRING,
- ),
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['credentials'])) {
- $this->credentials = $vals['credentials'];
- }
- }
- }
- public function getName() {
- return 'AuthenticationRequest';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::MAP) {
- $this->credentials = array();
- $_size56 = 0;
- $_ktype57 = 0;
- $_vtype58 = 0;
- $xfer += $input->readMapBegin($_ktype57, $_vtype58, $_size56);
- for ($_i60 = 0; $_i60 < $_size56; ++$_i60)
- {
- $key61 = '';
- $val62 = '';
- $xfer += $input->readString($key61);
- $xfer += $input->readString($val62);
- $this->credentials[$key61] = $val62;
- }
- $xfer += $input->readMapEnd();
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('AuthenticationRequest');
- if ($this->credentials !== null) {
- if (!is_array($this->credentials)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('credentials', TType::MAP, 1);
- {
- $output->writeMapBegin(TType::STRING, TType::STRING, count($this->credentials));
- {
- foreach ($this->credentials as $kiter63 => $viter64)
- {
- $xfer += $output->writeString($kiter63);
- $xfer += $output->writeString($viter64);
- }
- }
- $output->writeMapEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_ColumnDef {
- static $_TSPEC;
- public $name = null;
- public $validation_class = null;
- public $index_type = null;
- public $index_name = null;
- public $index_options = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'name',
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'validation_class',
- 'type' => TType::STRING,
- ),
- 3 => array(
- 'var' => 'index_type',
- 'type' => TType::I32,
- ),
- 4 => array(
- 'var' => 'index_name',
- 'type' => TType::STRING,
- ),
- 5 => array(
- 'var' => 'index_options',
- 'type' => TType::MAP,
- 'ktype' => TType::STRING,
- 'vtype' => TType::STRING,
- 'key' => array(
- 'type' => TType::STRING,
- ),
- 'val' => array(
- 'type' => TType::STRING,
- ),
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['name'])) {
- $this->name = $vals['name'];
- }
- if (isset($vals['validation_class'])) {
- $this->validation_class = $vals['validation_class'];
- }
- if (isset($vals['index_type'])) {
- $this->index_type = $vals['index_type'];
- }
- if (isset($vals['index_name'])) {
- $this->index_name = $vals['index_name'];
- }
- if (isset($vals['index_options'])) {
- $this->index_options = $vals['index_options'];
- }
- }
- }
- public function getName() {
- return 'ColumnDef';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->name);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->validation_class);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->index_type);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 4:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->index_name);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 5:
- if ($ftype == TType::MAP) {
- $this->index_options = array();
- $_size65 = 0;
- $_ktype66 = 0;
- $_vtype67 = 0;
- $xfer += $input->readMapBegin($_ktype66, $_vtype67, $_size65);
- for ($_i69 = 0; $_i69 < $_size65; ++$_i69)
- {
- $key70 = '';
- $val71 = '';
- $xfer += $input->readString($key70);
- $xfer += $input->readString($val71);
- $this->index_options[$key70] = $val71;
- }
- $xfer += $input->readMapEnd();
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('ColumnDef');
- if ($this->name !== null) {
- $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
- $xfer += $output->writeString($this->name);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->validation_class !== null) {
- $xfer += $output->writeFieldBegin('validation_class', TType::STRING, 2);
- $xfer += $output->writeString($this->validation_class);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->index_type !== null) {
- $xfer += $output->writeFieldBegin('index_type', TType::I32, 3);
- $xfer += $output->writeI32($this->index_type);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->index_name !== null) {
- $xfer += $output->writeFieldBegin('index_name', TType::STRING, 4);
- $xfer += $output->writeString($this->index_name);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->index_options !== null) {
- if (!is_array($this->index_options)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('index_options', TType::MAP, 5);
- {
- $output->writeMapBegin(TType::STRING, TType::STRING, count($this->index_options));
- {
- foreach ($this->index_options as $kiter72 => $viter73)
- {
- $xfer += $output->writeString($kiter72);
- $xfer += $output->writeString($viter73);
- }
- }
- $output->writeMapEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_CfDef {
- static $_TSPEC;
- public $keyspace = null;
- public $name = null;
- public $column_type = "Standard";
- public $comparator_type = "BytesType";
- public $subcomparator_type = null;
- public $comment = null;
- public $row_cache_size = 0;
- public $key_cache_size = 200000;
- public $read_repair_chance = 1;
- public $column_metadata = null;
- public $gc_grace_seconds = null;
- public $default_validation_class = null;
- public $id = null;
- public $min_compaction_threshold = null;
- public $max_compaction_threshold = null;
- public $row_cache_save_period_in_seconds = null;
- public $key_cache_save_period_in_seconds = null;
- public $replicate_on_write = true;
- public $merge_shards_chance = null;
- public $key_validation_class = null;
- public $row_cache_provider = null;
- public $key_alias = null;
- public $compaction_strategy = null;
- public $compaction_strategy_options = null;
- public $row_cache_keys_to_save = null;
- public $compression_options = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'keyspace',
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'name',
- 'type' => TType::STRING,
- ),
- 3 => array(
- 'var' => 'column_type',
- 'type' => TType::STRING,
- ),
- 5 => array(
- 'var' => 'comparator_type',
- 'type' => TType::STRING,
- ),
- 6 => array(
- 'var' => 'subcomparator_type',
- 'type' => TType::STRING,
- ),
- 8 => array(
- 'var' => 'comment',
- 'type' => TType::STRING,
- ),
- 9 => array(
- 'var' => 'row_cache_size',
- 'type' => TType::DOUBLE,
- ),
- 11 => array(
- 'var' => 'key_cache_size',
- 'type' => TType::DOUBLE,
- ),
- 12 => array(
- 'var' => 'read_repair_chance',
- 'type' => TType::DOUBLE,
- ),
- 13 => array(
- 'var' => 'column_metadata',
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => 'cassandra_ColumnDef',
- ),
- ),
- 14 => array(
- 'var' => 'gc_grace_seconds',
- 'type' => TType::I32,
- ),
- 15 => array(
- 'var' => 'default_validation_class',
- 'type' => TType::STRING,
- ),
- 16 => array(
- 'var' => 'id',
- 'type' => TType::I32,
- ),
- 17 => array(
- 'var' => 'min_compaction_threshold',
- 'type' => TType::I32,
- ),
- 18 => array(
- 'var' => 'max_compaction_threshold',
- 'type' => TType::I32,
- ),
- 19 => array(
- 'var' => 'row_cache_save_period_in_seconds',
- 'type' => TType::I32,
- ),
- 20 => array(
- 'var' => 'key_cache_save_period_in_seconds',
- 'type' => TType::I32,
- ),
- 24 => array(
- 'var' => 'replicate_on_write',
- 'type' => TType::BOOL,
- ),
- 25 => array(
- 'var' => 'merge_shards_chance',
- 'type' => TType::DOUBLE,
- ),
- 26 => array(
- 'var' => 'key_validation_class',
- 'type' => TType::STRING,
- ),
- 27 => array(
- 'var' => 'row_cache_provider',
- 'type' => TType::STRING,
- ),
- 28 => array(
- 'var' => 'key_alias',
- 'type' => TType::STRING,
- ),
- 29 => array(
- 'var' => 'compaction_strategy',
- 'type' => TType::STRING,
- ),
- 30 => array(
- 'var' => 'compaction_strategy_options',
- 'type' => TType::MAP,
- 'ktype' => TType::STRING,
- 'vtype' => TType::STRING,
- 'key' => array(
- 'type' => TType::STRING,
- ),
- 'val' => array(
- 'type' => TType::STRING,
- ),
- ),
- 31 => array(
- 'var' => 'row_cache_keys_to_save',
- 'type' => TType::I32,
- ),
- 32 => array(
- 'var' => 'compression_options',
- 'type' => TType::MAP,
- 'ktype' => TType::STRING,
- 'vtype' => TType::STRING,
- 'key' => array(
- 'type' => TType::STRING,
- ),
- 'val' => array(
- 'type' => TType::STRING,
- ),
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['keyspace'])) {
- $this->keyspace = $vals['keyspace'];
- }
- if (isset($vals['name'])) {
- $this->name = $vals['name'];
- }
- if (isset($vals['column_type'])) {
- $this->column_type = $vals['column_type'];
- }
- if (isset($vals['comparator_type'])) {
- $this->comparator_type = $vals['comparator_type'];
- }
- if (isset($vals['subcomparator_type'])) {
- $this->subcomparator_type = $vals['subcomparator_type'];
- }
- if (isset($vals['comment'])) {
- $this->comment = $vals['comment'];
- }
- if (isset($vals['row_cache_size'])) {
- $this->row_cache_size = $vals['row_cache_size'];
- }
- if (isset($vals['key_cache_size'])) {
- $this->key_cache_size = $vals['key_cache_size'];
- }
- if (isset($vals['read_repair_chance'])) {
- $this->read_repair_chance = $vals['read_repair_chance'];
- }
- if (isset($vals['column_metadata'])) {
- $this->column_metadata = $vals['column_metadata'];
- }
- if (isset($vals['gc_grace_seconds'])) {
- $this->gc_grace_seconds = $vals['gc_grace_seconds'];
- }
- if (isset($vals['default_validation_class'])) {
- $this->default_validation_class = $vals['default_validation_class'];
- }
- if (isset($vals['id'])) {
- $this->id = $vals['id'];
- }
- if (isset($vals['min_compaction_threshold'])) {
- $this->min_compaction_threshold = $vals['min_compaction_threshold'];
- }
- if (isset($vals['max_compaction_threshold'])) {
- $this->max_compaction_threshold = $vals['max_compaction_threshold'];
- }
- if (isset($vals['row_cache_save_period_in_seconds'])) {
- $this->row_cache_save_period_in_seconds = $vals['row_cache_save_period_in_seconds'];
- }
- if (isset($vals['key_cache_save_period_in_seconds'])) {
- $this->key_cache_save_period_in_seconds = $vals['key_cache_save_period_in_seconds'];
- }
- if (isset($vals['replicate_on_write'])) {
- $this->replicate_on_write = $vals['replicate_on_write'];
- }
- if (isset($vals['merge_shards_chance'])) {
- $this->merge_shards_chance = $vals['merge_shards_chance'];
- }
- if (isset($vals['key_validation_class'])) {
- $this->key_validation_class = $vals['key_validation_class'];
- }
- if (isset($vals['row_cache_provider'])) {
- $this->row_cache_provider = $vals['row_cache_provider'];
- }
- if (isset($vals['key_alias'])) {
- $this->key_alias = $vals['key_alias'];
- }
- if (isset($vals['compaction_strategy'])) {
- $this->compaction_strategy = $vals['compaction_strategy'];
- }
- if (isset($vals['compaction_strategy_options'])) {
- $this->compaction_strategy_options = $vals['compaction_strategy_options'];
- }
- if (isset($vals['row_cache_keys_to_save'])) {
- $this->row_cache_keys_to_save = $vals['row_cache_keys_to_save'];
- }
- if (isset($vals['compression_options'])) {
- $this->compression_options = $vals['compression_options'];
- }
- }
- }
- public function getName() {
- return 'CfDef';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->keyspace);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->name);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->column_type);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 5:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->comparator_type);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 6:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->subcomparator_type);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 8:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->comment);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 9:
- if ($ftype == TType::DOUBLE) {
- $xfer += $input->readDouble($this->row_cache_size);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 11:
- if ($ftype == TType::DOUBLE) {
- $xfer += $input->readDouble($this->key_cache_size);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 12:
- if ($ftype == TType::DOUBLE) {
- $xfer += $input->readDouble($this->read_repair_chance);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 13:
- if ($ftype == TType::LST) {
- $this->column_metadata = array();
- $_size74 = 0;
- $_etype77 = 0;
- $xfer += $input->readListBegin($_etype77, $_size74);
- for ($_i78 = 0; $_i78 < $_size74; ++$_i78)
- {
- $elem79 = null;
- $elem79 = new cassandra_ColumnDef();
- $xfer += $elem79->read($input);
- $this->column_metadata []= $elem79;
- }
- $xfer += $input->readListEnd();
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 14:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->gc_grace_seconds);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 15:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->default_validation_class);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 16:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->id);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 17:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->min_compaction_threshold);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 18:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->max_compaction_threshold);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 19:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->row_cache_save_period_in_seconds);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 20:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->key_cache_save_period_in_seconds);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 24:
- if ($ftype == TType::BOOL) {
- $xfer += $input->readBool($this->replicate_on_write);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 25:
- if ($ftype == TType::DOUBLE) {
- $xfer += $input->readDouble($this->merge_shards_chance);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 26:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->key_validation_class);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 27:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->row_cache_provider);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 28:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->key_alias);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 29:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->compaction_strategy);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 30:
- if ($ftype == TType::MAP) {
- $this->compaction_strategy_options = array();
- $_size80 = 0;
- $_ktype81 = 0;
- $_vtype82 = 0;
- $xfer += $input->readMapBegin($_ktype81, $_vtype82, $_size80);
- for ($_i84 = 0; $_i84 < $_size80; ++$_i84)
- {
- $key85 = '';
- $val86 = '';
- $xfer += $input->readString($key85);
- $xfer += $input->readString($val86);
- $this->compaction_strategy_options[$key85] = $val86;
- }
- $xfer += $input->readMapEnd();
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 31:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->row_cache_keys_to_save);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 32:
- if ($ftype == TType::MAP) {
- $this->compression_options = array();
- $_size87 = 0;
- $_ktype88 = 0;
- $_vtype89 = 0;
- $xfer += $input->readMapBegin($_ktype88, $_vtype89, $_size87);
- for ($_i91 = 0; $_i91 < $_size87; ++$_i91)
- {
- $key92 = '';
- $val93 = '';
- $xfer += $input->readString($key92);
- $xfer += $input->readString($val93);
- $this->compression_options[$key92] = $val93;
- }
- $xfer += $input->readMapEnd();
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('CfDef');
- if ($this->keyspace !== null) {
- $xfer += $output->writeFieldBegin('keyspace', TType::STRING, 1);
- $xfer += $output->writeString($this->keyspace);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->name !== null) {
- $xfer += $output->writeFieldBegin('name', TType::STRING, 2);
- $xfer += $output->writeString($this->name);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->column_type !== null) {
- $xfer += $output->writeFieldBegin('column_type', TType::STRING, 3);
- $xfer += $output->writeString($this->column_type);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->comparator_type !== null) {
- $xfer += $output->writeFieldBegin('comparator_type', TType::STRING, 5);
- $xfer += $output->writeString($this->comparator_type);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->subcomparator_type !== null) {
- $xfer += $output->writeFieldBegin('subcomparator_type', TType::STRING, 6);
- $xfer += $output->writeString($this->subcomparator_type);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->comment !== null) {
- $xfer += $output->writeFieldBegin('comment', TType::STRING, 8);
- $xfer += $output->writeString($this->comment);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->row_cache_size !== null) {
- $xfer += $output->writeFieldBegin('row_cache_size', TType::DOUBLE, 9);
- $xfer += $output->writeDouble($this->row_cache_size);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->key_cache_size !== null) {
- $xfer += $output->writeFieldBegin('key_cache_size', TType::DOUBLE, 11);
- $xfer += $output->writeDouble($this->key_cache_size);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->read_repair_chance !== null) {
- $xfer += $output->writeFieldBegin('read_repair_chance', TType::DOUBLE, 12);
- $xfer += $output->writeDouble($this->read_repair_chance);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->column_metadata !== null) {
- if (!is_array($this->column_metadata)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('column_metadata', TType::LST, 13);
- {
- $output->writeListBegin(TType::STRUCT, count($this->column_metadata));
- {
- foreach ($this->column_metadata as $iter94)
- {
- $xfer += $iter94->write($output);
- }
- }
- $output->writeListEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- if ($this->gc_grace_seconds !== null) {
- $xfer += $output->writeFieldBegin('gc_grace_seconds', TType::I32, 14);
- $xfer += $output->writeI32($this->gc_grace_seconds);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->default_validation_class !== null) {
- $xfer += $output->writeFieldBegin('default_validation_class', TType::STRING, 15);
- $xfer += $output->writeString($this->default_validation_class);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->id !== null) {
- $xfer += $output->writeFieldBegin('id', TType::I32, 16);
- $xfer += $output->writeI32($this->id);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->min_compaction_threshold !== null) {
- $xfer += $output->writeFieldBegin('min_compaction_threshold', TType::I32, 17);
- $xfer += $output->writeI32($this->min_compaction_threshold);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->max_compaction_threshold !== null) {
- $xfer += $output->writeFieldBegin('max_compaction_threshold', TType::I32, 18);
- $xfer += $output->writeI32($this->max_compaction_threshold);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->row_cache_save_period_in_seconds !== null) {
- $xfer += $output->writeFieldBegin('row_cache_save_period_in_seconds', TType::I32, 19);
- $xfer += $output->writeI32($this->row_cache_save_period_in_seconds);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->key_cache_save_period_in_seconds !== null) {
- $xfer += $output->writeFieldBegin('key_cache_save_period_in_seconds', TType::I32, 20);
- $xfer += $output->writeI32($this->key_cache_save_period_in_seconds);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->replicate_on_write !== null) {
- $xfer += $output->writeFieldBegin('replicate_on_write', TType::BOOL, 24);
- $xfer += $output->writeBool($this->replicate_on_write);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->merge_shards_chance !== null) {
- $xfer += $output->writeFieldBegin('merge_shards_chance', TType::DOUBLE, 25);
- $xfer += $output->writeDouble($this->merge_shards_chance);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->key_validation_class !== null) {
- $xfer += $output->writeFieldBegin('key_validation_class', TType::STRING, 26);
- $xfer += $output->writeString($this->key_validation_class);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->row_cache_provider !== null) {
- $xfer += $output->writeFieldBegin('row_cache_provider', TType::STRING, 27);
- $xfer += $output->writeString($this->row_cache_provider);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->key_alias !== null) {
- $xfer += $output->writeFieldBegin('key_alias', TType::STRING, 28);
- $xfer += $output->writeString($this->key_alias);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->compaction_strategy !== null) {
- $xfer += $output->writeFieldBegin('compaction_strategy', TType::STRING, 29);
- $xfer += $output->writeString($this->compaction_strategy);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->compaction_strategy_options !== null) {
- if (!is_array($this->compaction_strategy_options)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('compaction_strategy_options', TType::MAP, 30);
- {
- $output->writeMapBegin(TType::STRING, TType::STRING, count($this->compaction_strategy_options));
- {
- foreach ($this->compaction_strategy_options as $kiter95 => $viter96)
- {
- $xfer += $output->writeString($kiter95);
- $xfer += $output->writeString($viter96);
- }
- }
- $output->writeMapEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- if ($this->row_cache_keys_to_save !== null) {
- $xfer += $output->writeFieldBegin('row_cache_keys_to_save', TType::I32, 31);
- $xfer += $output->writeI32($this->row_cache_keys_to_save);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->compression_options !== null) {
- if (!is_array($this->compression_options)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('compression_options', TType::MAP, 32);
- {
- $output->writeMapBegin(TType::STRING, TType::STRING, count($this->compression_options));
- {
- foreach ($this->compression_options as $kiter97 => $viter98)
- {
- $xfer += $output->writeString($kiter97);
- $xfer += $output->writeString($viter98);
- }
- }
- $output->writeMapEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_KsDef {
- static $_TSPEC;
- public $name = null;
- public $strategy_class = null;
- public $strategy_options = null;
- public $replication_factor = null;
- public $cf_defs = null;
- public $durable_writes = true;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'name',
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'strategy_class',
- 'type' => TType::STRING,
- ),
- 3 => array(
- 'var' => 'strategy_options',
- 'type' => TType::MAP,
- 'ktype' => TType::STRING,
- 'vtype' => TType::STRING,
- 'key' => array(
- 'type' => TType::STRING,
- ),
- 'val' => array(
- 'type' => TType::STRING,
- ),
- ),
- 4 => array(
- 'var' => 'replication_factor',
- 'type' => TType::I32,
- ),
- 5 => array(
- 'var' => 'cf_defs',
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => 'cassandra_CfDef',
- ),
- ),
- 6 => array(
- 'var' => 'durable_writes',
- 'type' => TType::BOOL,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['name'])) {
- $this->name = $vals['name'];
- }
- if (isset($vals['strategy_class'])) {
- $this->strategy_class = $vals['strategy_class'];
- }
- if (isset($vals['strategy_options'])) {
- $this->strategy_options = $vals['strategy_options'];
- }
- if (isset($vals['replication_factor'])) {
- $this->replication_factor = $vals['replication_factor'];
- }
- if (isset($vals['cf_defs'])) {
- $this->cf_defs = $vals['cf_defs'];
- }
- if (isset($vals['durable_writes'])) {
- $this->durable_writes = $vals['durable_writes'];
- }
- }
- }
- public function getName() {
- return 'KsDef';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->name);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->strategy_class);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::MAP) {
- $this->strategy_options = array();
- $_size99 = 0;
- $_ktype100 = 0;
- $_vtype101 = 0;
- $xfer += $input->readMapBegin($_ktype100, $_vtype101, $_size99);
- for ($_i103 = 0; $_i103 < $_size99; ++$_i103)
- {
- $key104 = '';
- $val105 = '';
- $xfer += $input->readString($key104);
- $xfer += $input->readString($val105);
- $this->strategy_options[$key104] = $val105;
- }
- $xfer += $input->readMapEnd();
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 4:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->replication_factor);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 5:
- if ($ftype == TType::LST) {
- $this->cf_defs = array();
- $_size106 = 0;
- $_etype109 = 0;
- $xfer += $input->readListBegin($_etype109, $_size106);
- for ($_i110 = 0; $_i110 < $_size106; ++$_i110)
- {
- $elem111 = null;
- $elem111 = new cassandra_CfDef();
- $xfer += $elem111->read($input);
- $this->cf_defs []= $elem111;
- }
- $xfer += $input->readListEnd();
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 6:
- if ($ftype == TType::BOOL) {
- $xfer += $input->readBool($this->durable_writes);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('KsDef');
- if ($this->name !== null) {
- $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
- $xfer += $output->writeString($this->name);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->strategy_class !== null) {
- $xfer += $output->writeFieldBegin('strategy_class', TType::STRING, 2);
- $xfer += $output->writeString($this->strategy_class);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->strategy_options !== null) {
- if (!is_array($this->strategy_options)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('strategy_options', TType::MAP, 3);
- {
- $output->writeMapBegin(TType::STRING, TType::STRING, count($this->strategy_options));
- {
- foreach ($this->strategy_options as $kiter112 => $viter113)
- {
- $xfer += $output->writeString($kiter112);
- $xfer += $output->writeString($viter113);
- }
- }
- $output->writeMapEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- if ($this->replication_factor !== null) {
- $xfer += $output->writeFieldBegin('replication_factor', TType::I32, 4);
- $xfer += $output->writeI32($this->replication_factor);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->cf_defs !== null) {
- if (!is_array($this->cf_defs)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('cf_defs', TType::LST, 5);
- {
- $output->writeListBegin(TType::STRUCT, count($this->cf_defs));
- {
- foreach ($this->cf_defs as $iter114)
- {
- $xfer += $iter114->write($output);
- }
- }
- $output->writeListEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- if ($this->durable_writes !== null) {
- $xfer += $output->writeFieldBegin('durable_writes', TType::BOOL, 6);
- $xfer += $output->writeBool($this->durable_writes);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_CqlRow {
- static $_TSPEC;
- public $key = null;
- public $columns = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'key',
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'columns',
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => 'cassandra_Column',
- ),
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['key'])) {
- $this->key = $vals['key'];
- }
- if (isset($vals['columns'])) {
- $this->columns = $vals['columns'];
- }
- }
- }
- public function getName() {
- return 'CqlRow';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->key);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::LST) {
- $this->columns = array();
- $_size115 = 0;
- $_etype118 = 0;
- $xfer += $input->readListBegin($_etype118, $_size115);
- for ($_i119 = 0; $_i119 < $_size115; ++$_i119)
- {
- $elem120 = null;
- $elem120 = new cassandra_Column();
- $xfer += $elem120->read($input);
- $this->columns []= $elem120;
- }
- $xfer += $input->readListEnd();
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('CqlRow');
- if ($this->key !== null) {
- $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
- $xfer += $output->writeString($this->key);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->columns !== null) {
- if (!is_array($this->columns)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('columns', TType::LST, 2);
- {
- $output->writeListBegin(TType::STRUCT, count($this->columns));
- {
- foreach ($this->columns as $iter121)
- {
- $xfer += $iter121->write($output);
- }
- }
- $output->writeListEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_CqlMetadata {
- static $_TSPEC;
- public $name_types = null;
- public $value_types = null;
- public $default_name_type = null;
- public $default_value_type = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'name_types',
- 'type' => TType::MAP,
- 'ktype' => TType::STRING,
- 'vtype' => TType::STRING,
- 'key' => array(
- 'type' => TType::STRING,
- ),
- 'val' => array(
- 'type' => TType::STRING,
- ),
- ),
- 2 => array(
- 'var' => 'value_types',
- 'type' => TType::MAP,
- 'ktype' => TType::STRING,
- 'vtype' => TType::STRING,
- 'key' => array(
- 'type' => TType::STRING,
- ),
- 'val' => array(
- 'type' => TType::STRING,
- ),
- ),
- 3 => array(
- 'var' => 'default_name_type',
- 'type' => TType::STRING,
- ),
- 4 => array(
- 'var' => 'default_value_type',
- 'type' => TType::STRING,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['name_types'])) {
- $this->name_types = $vals['name_types'];
- }
- if (isset($vals['value_types'])) {
- $this->value_types = $vals['value_types'];
- }
- if (isset($vals['default_name_type'])) {
- $this->default_name_type = $vals['default_name_type'];
- }
- if (isset($vals['default_value_type'])) {
- $this->default_value_type = $vals['default_value_type'];
- }
- }
- }
- public function getName() {
- return 'CqlMetadata';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::MAP) {
- $this->name_types = array();
- $_size122 = 0;
- $_ktype123 = 0;
- $_vtype124 = 0;
- $xfer += $input->readMapBegin($_ktype123, $_vtype124, $_size122);
- for ($_i126 = 0; $_i126 < $_size122; ++$_i126)
- {
- $key127 = '';
- $val128 = '';
- $xfer += $input->readString($key127);
- $xfer += $input->readString($val128);
- $this->name_types[$key127] = $val128;
- }
- $xfer += $input->readMapEnd();
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::MAP) {
- $this->value_types = array();
- $_size129 = 0;
- $_ktype130 = 0;
- $_vtype131 = 0;
- $xfer += $input->readMapBegin($_ktype130, $_vtype131, $_size129);
- for ($_i133 = 0; $_i133 < $_size129; ++$_i133)
- {
- $key134 = '';
- $val135 = '';
- $xfer += $input->readString($key134);
- $xfer += $input->readString($val135);
- $this->value_types[$key134] = $val135;
- }
- $xfer += $input->readMapEnd();
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->default_name_type);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 4:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->default_value_type);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('CqlMetadata');
- if ($this->name_types !== null) {
- if (!is_array($this->name_types)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('name_types', TType::MAP, 1);
- {
- $output->writeMapBegin(TType::STRING, TType::STRING, count($this->name_types));
- {
- foreach ($this->name_types as $kiter136 => $viter137)
- {
- $xfer += $output->writeString($kiter136);
- $xfer += $output->writeString($viter137);
- }
- }
- $output->writeMapEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- if ($this->value_types !== null) {
- if (!is_array($this->value_types)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('value_types', TType::MAP, 2);
- {
- $output->writeMapBegin(TType::STRING, TType::STRING, count($this->value_types));
- {
- foreach ($this->value_types as $kiter138 => $viter139)
- {
- $xfer += $output->writeString($kiter138);
- $xfer += $output->writeString($viter139);
- }
- }
- $output->writeMapEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- if ($this->default_name_type !== null) {
- $xfer += $output->writeFieldBegin('default_name_type', TType::STRING, 3);
- $xfer += $output->writeString($this->default_name_type);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->default_value_type !== null) {
- $xfer += $output->writeFieldBegin('default_value_type', TType::STRING, 4);
- $xfer += $output->writeString($this->default_value_type);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class cassandra_CqlResult {
- static $_TSPEC;
- public $type = null;
- public $rows = null;
- public $num = null;
- public $schema = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'type',
- 'type' => TType::I32,
- ),
- 2 => array(
- 'var' => 'rows',
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => 'cassandra_CqlRow',
- ),
- ),
- 3 => array(
- 'var' => 'num',
- 'type' => TType::I32,
- ),
- 4 => array(
- 'var' => 'schema',
- 'type' => TType::STRUCT,
- 'class' => 'cassandra_CqlMetadata',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['type'])) {
- $this->type = $vals['type'];
- }
- if (isset($vals['rows'])) {
- $this->rows = $vals['rows'];
- }
- if (isset($vals['num'])) {
- $this->num = $vals['num'];
- }
- if (isset($vals['schema'])) {
- $this->schema = $vals['schema'];
- }
- }
- }
- public function getName() {
- return 'CqlResult';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->type);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::LST) {
- $this->rows = array();
- $_size140 = 0;
- $_etype143 = 0;
- $xfer += $input->readListBegin($_etype143, $_size140);
- for ($_i144 = 0; $_i144 < $_size140; ++$_i144)
- {
- $elem145 = null;
- $elem145 = new cassandra_CqlRow();
- $xfer += $elem145->read($input);
- $this->rows []= $elem145;
- }
- $xfer += $input->readListEnd();
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->num);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 4:
- if ($ftype == TType::STRUCT) {
- $this->schema = new cassandra_CqlMetadata();
- $xfer += $this->schema->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('CqlResult');
- if ($this->type !== null) {
- $xfer += $output->writeFieldBegin('type', TType::I32, 1);
- $xfer += $output->writeI32($this->type);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->rows !== null) {
- if (!is_array($this->rows)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('rows', TType::LST, 2);
- {
- $output->writeListBegin(TType::STRUCT, count($this->rows));
- {
- foreach ($this->rows as $iter146)
- {
- $xfer += $iter146->write($output);
- }
- }
- $output->writeListEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- if ($this->num !== null) {
- $xfer += $output->writeFieldBegin('num', TType::I32, 3);
- $xfer += $output->writeI32($this->num);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->schema !== null) {
- if (!is_object($this->schema)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('schema', TType::STRUCT, 4);
- $xfer += $this->schema->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- ?>