| <?php |
| namespace metastore; |
| |
| /** |
| * Autogenerated by Thrift Compiler (0.13.0) |
| * |
| * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING |
| * @generated |
| */ |
| use Thrift\Base\TBase; |
| use Thrift\Type\TType; |
| use Thrift\Type\TMessageType; |
| use Thrift\Exception\TException; |
| use Thrift\Exception\TProtocolException; |
| use Thrift\Protocol\TProtocol; |
| use Thrift\Protocol\TBinaryProtocolAccelerated; |
| use Thrift\Exception\TApplicationException; |
| |
| class AlterTableRequest |
| { |
| static public $isValidate = false; |
| |
| static public $_TSPEC = array( |
| 1 => array( |
| 'var' => 'catName', |
| 'isRequired' => false, |
| 'type' => TType::STRING, |
| ), |
| 2 => array( |
| 'var' => 'dbName', |
| 'isRequired' => true, |
| 'type' => TType::STRING, |
| ), |
| 3 => array( |
| 'var' => 'tableName', |
| 'isRequired' => true, |
| 'type' => TType::STRING, |
| ), |
| 4 => array( |
| 'var' => 'table', |
| 'isRequired' => true, |
| 'type' => TType::STRUCT, |
| 'class' => '\metastore\Table', |
| ), |
| 5 => array( |
| 'var' => 'environmentContext', |
| 'isRequired' => false, |
| 'type' => TType::STRUCT, |
| 'class' => '\metastore\EnvironmentContext', |
| ), |
| 6 => array( |
| 'var' => 'writeId', |
| 'isRequired' => false, |
| 'type' => TType::I64, |
| ), |
| 7 => array( |
| 'var' => 'validWriteIdList', |
| 'isRequired' => false, |
| 'type' => TType::STRING, |
| ), |
| 8 => array( |
| 'var' => 'processorCapabilities', |
| 'isRequired' => false, |
| 'type' => TType::LST, |
| 'etype' => TType::STRING, |
| 'elem' => array( |
| 'type' => TType::STRING, |
| ), |
| ), |
| 9 => array( |
| 'var' => 'processorIdentifier', |
| 'isRequired' => false, |
| 'type' => TType::STRING, |
| ), |
| ); |
| |
| /** |
| * @var string |
| */ |
| public $catName = null; |
| /** |
| * @var string |
| */ |
| public $dbName = null; |
| /** |
| * @var string |
| */ |
| public $tableName = null; |
| /** |
| * @var \metastore\Table |
| */ |
| public $table = null; |
| /** |
| * @var \metastore\EnvironmentContext |
| */ |
| public $environmentContext = null; |
| /** |
| * @var int |
| */ |
| public $writeId = -1; |
| /** |
| * @var string |
| */ |
| public $validWriteIdList = null; |
| /** |
| * @var string[] |
| */ |
| public $processorCapabilities = null; |
| /** |
| * @var string |
| */ |
| public $processorIdentifier = null; |
| |
| public function __construct($vals = null) |
| { |
| if (is_array($vals)) { |
| if (isset($vals['catName'])) { |
| $this->catName = $vals['catName']; |
| } |
| if (isset($vals['dbName'])) { |
| $this->dbName = $vals['dbName']; |
| } |
| if (isset($vals['tableName'])) { |
| $this->tableName = $vals['tableName']; |
| } |
| if (isset($vals['table'])) { |
| $this->table = $vals['table']; |
| } |
| if (isset($vals['environmentContext'])) { |
| $this->environmentContext = $vals['environmentContext']; |
| } |
| if (isset($vals['writeId'])) { |
| $this->writeId = $vals['writeId']; |
| } |
| if (isset($vals['validWriteIdList'])) { |
| $this->validWriteIdList = $vals['validWriteIdList']; |
| } |
| if (isset($vals['processorCapabilities'])) { |
| $this->processorCapabilities = $vals['processorCapabilities']; |
| } |
| if (isset($vals['processorIdentifier'])) { |
| $this->processorIdentifier = $vals['processorIdentifier']; |
| } |
| } |
| } |
| |
| public function getName() |
| { |
| return 'AlterTableRequest'; |
| } |
| |
| |
| 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->catName); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 2: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->dbName); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 3: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->tableName); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 4: |
| if ($ftype == TType::STRUCT) { |
| $this->table = new \metastore\Table(); |
| $xfer += $this->table->read($input); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 5: |
| if ($ftype == TType::STRUCT) { |
| $this->environmentContext = new \metastore\EnvironmentContext(); |
| $xfer += $this->environmentContext->read($input); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 6: |
| if ($ftype == TType::I64) { |
| $xfer += $input->readI64($this->writeId); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 7: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->validWriteIdList); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 8: |
| if ($ftype == TType::LST) { |
| $this->processorCapabilities = array(); |
| $_size1071 = 0; |
| $_etype1074 = 0; |
| $xfer += $input->readListBegin($_etype1074, $_size1071); |
| for ($_i1075 = 0; $_i1075 < $_size1071; ++$_i1075) { |
| $elem1076 = null; |
| $xfer += $input->readString($elem1076); |
| $this->processorCapabilities []= $elem1076; |
| } |
| $xfer += $input->readListEnd(); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 9: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->processorIdentifier); |
| } 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('AlterTableRequest'); |
| if ($this->catName !== null) { |
| $xfer += $output->writeFieldBegin('catName', TType::STRING, 1); |
| $xfer += $output->writeString($this->catName); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->dbName !== null) { |
| $xfer += $output->writeFieldBegin('dbName', TType::STRING, 2); |
| $xfer += $output->writeString($this->dbName); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->tableName !== null) { |
| $xfer += $output->writeFieldBegin('tableName', TType::STRING, 3); |
| $xfer += $output->writeString($this->tableName); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->table !== null) { |
| if (!is_object($this->table)) { |
| throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| } |
| $xfer += $output->writeFieldBegin('table', TType::STRUCT, 4); |
| $xfer += $this->table->write($output); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->environmentContext !== null) { |
| if (!is_object($this->environmentContext)) { |
| throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| } |
| $xfer += $output->writeFieldBegin('environmentContext', TType::STRUCT, 5); |
| $xfer += $this->environmentContext->write($output); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->writeId !== null) { |
| $xfer += $output->writeFieldBegin('writeId', TType::I64, 6); |
| $xfer += $output->writeI64($this->writeId); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->validWriteIdList !== null) { |
| $xfer += $output->writeFieldBegin('validWriteIdList', TType::STRING, 7); |
| $xfer += $output->writeString($this->validWriteIdList); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->processorCapabilities !== null) { |
| if (!is_array($this->processorCapabilities)) { |
| throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| } |
| $xfer += $output->writeFieldBegin('processorCapabilities', TType::LST, 8); |
| $output->writeListBegin(TType::STRING, count($this->processorCapabilities)); |
| foreach ($this->processorCapabilities as $iter1077) { |
| $xfer += $output->writeString($iter1077); |
| } |
| $output->writeListEnd(); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->processorIdentifier !== null) { |
| $xfer += $output->writeFieldBegin('processorIdentifier', TType::STRING, 9); |
| $xfer += $output->writeString($this->processorIdentifier); |
| $xfer += $output->writeFieldEnd(); |
| } |
| $xfer += $output->writeFieldStop(); |
| $xfer += $output->writeStructEnd(); |
| return $xfer; |
| } |
| } |