blob: eb480cff6fe49f17b31d5227f6a9017e02efefde [file] [log] [blame]
<?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 GetTablesRequest
{
static public $isValidate = false;
static public $_TSPEC = array(
1 => array(
'var' => 'dbName',
'isRequired' => true,
'type' => TType::STRING,
),
2 => array(
'var' => 'tblNames',
'isRequired' => false,
'type' => TType::LST,
'etype' => TType::STRING,
'elem' => array(
'type' => TType::STRING,
),
),
3 => array(
'var' => 'capabilities',
'isRequired' => false,
'type' => TType::STRUCT,
'class' => '\metastore\ClientCapabilities',
),
4 => array(
'var' => 'catName',
'isRequired' => false,
'type' => TType::STRING,
),
5 => array(
'var' => 'processorCapabilities',
'isRequired' => false,
'type' => TType::LST,
'etype' => TType::STRING,
'elem' => array(
'type' => TType::STRING,
),
),
6 => array(
'var' => 'processorIdentifier',
'isRequired' => false,
'type' => TType::STRING,
),
7 => array(
'var' => 'projectionSpec',
'isRequired' => false,
'type' => TType::STRUCT,
'class' => '\metastore\GetProjectionsSpec',
),
);
/**
* @var string
*/
public $dbName = null;
/**
* @var string[]
*/
public $tblNames = null;
/**
* @var \metastore\ClientCapabilities
*/
public $capabilities = null;
/**
* @var string
*/
public $catName = null;
/**
* @var string[]
*/
public $processorCapabilities = null;
/**
* @var string
*/
public $processorIdentifier = null;
/**
* @var \metastore\GetProjectionsSpec
*/
public $projectionSpec = null;
public function __construct($vals = null)
{
if (is_array($vals)) {
if (isset($vals['dbName'])) {
$this->dbName = $vals['dbName'];
}
if (isset($vals['tblNames'])) {
$this->tblNames = $vals['tblNames'];
}
if (isset($vals['capabilities'])) {
$this->capabilities = $vals['capabilities'];
}
if (isset($vals['catName'])) {
$this->catName = $vals['catName'];
}
if (isset($vals['processorCapabilities'])) {
$this->processorCapabilities = $vals['processorCapabilities'];
}
if (isset($vals['processorIdentifier'])) {
$this->processorIdentifier = $vals['processorIdentifier'];
}
if (isset($vals['projectionSpec'])) {
$this->projectionSpec = $vals['projectionSpec'];
}
}
}
public function getName()
{
return 'GetTablesRequest';
}
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->dbName);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::LST) {
$this->tblNames = array();
$_size889 = 0;
$_etype892 = 0;
$xfer += $input->readListBegin($_etype892, $_size889);
for ($_i893 = 0; $_i893 < $_size889; ++$_i893) {
$elem894 = null;
$xfer += $input->readString($elem894);
$this->tblNames []= $elem894;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
if ($ftype == TType::STRUCT) {
$this->capabilities = new \metastore\ClientCapabilities();
$xfer += $this->capabilities->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 4:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->catName);
} else {
$xfer += $input->skip($ftype);
}
break;
case 5:
if ($ftype == TType::LST) {
$this->processorCapabilities = array();
$_size895 = 0;
$_etype898 = 0;
$xfer += $input->readListBegin($_etype898, $_size895);
for ($_i899 = 0; $_i899 < $_size895; ++$_i899) {
$elem900 = null;
$xfer += $input->readString($elem900);
$this->processorCapabilities []= $elem900;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
case 6:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->processorIdentifier);
} else {
$xfer += $input->skip($ftype);
}
break;
case 7:
if ($ftype == TType::STRUCT) {
$this->projectionSpec = new \metastore\GetProjectionsSpec();
$xfer += $this->projectionSpec->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('GetTablesRequest');
if ($this->dbName !== null) {
$xfer += $output->writeFieldBegin('dbName', TType::STRING, 1);
$xfer += $output->writeString($this->dbName);
$xfer += $output->writeFieldEnd();
}
if ($this->tblNames !== null) {
if (!is_array($this->tblNames)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('tblNames', TType::LST, 2);
$output->writeListBegin(TType::STRING, count($this->tblNames));
foreach ($this->tblNames as $iter901) {
$xfer += $output->writeString($iter901);
}
$output->writeListEnd();
$xfer += $output->writeFieldEnd();
}
if ($this->capabilities !== null) {
if (!is_object($this->capabilities)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('capabilities', TType::STRUCT, 3);
$xfer += $this->capabilities->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->catName !== null) {
$xfer += $output->writeFieldBegin('catName', TType::STRING, 4);
$xfer += $output->writeString($this->catName);
$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, 5);
$output->writeListBegin(TType::STRING, count($this->processorCapabilities));
foreach ($this->processorCapabilities as $iter902) {
$xfer += $output->writeString($iter902);
}
$output->writeListEnd();
$xfer += $output->writeFieldEnd();
}
if ($this->processorIdentifier !== null) {
$xfer += $output->writeFieldBegin('processorIdentifier', TType::STRING, 6);
$xfer += $output->writeString($this->processorIdentifier);
$xfer += $output->writeFieldEnd();
}
if ($this->projectionSpec !== null) {
if (!is_object($this->projectionSpec)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
$xfer += $output->writeFieldBegin('projectionSpec', TType::STRUCT, 7);
$xfer += $this->projectionSpec->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
}
}