| <?php |
| namespace Airavata\API\GatewayManagement; |
| /** |
| * Autogenerated by Thrift Compiler (0.9.3) |
| * |
| * 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; |
| |
| |
| interface GatewayManagementServiceIf { |
| /** |
| * @param string $gatewayName |
| * @return string |
| */ |
| public function registerGateway($gatewayName); |
| /** |
| * @param string $gatewayId |
| * @return string |
| */ |
| public function getGatewayName($gatewayId); |
| } |
| |
| class GatewayManagementServiceClient implements \Airavata\API\GatewayManagement\GatewayManagementServiceIf { |
| protected $input_ = null; |
| protected $output_ = null; |
| |
| protected $seqid_ = 0; |
| |
| public function __construct($input, $output=null) { |
| $this->input_ = $input; |
| $this->output_ = $output ? $output : $input; |
| } |
| |
| public function registerGateway($gatewayName) |
| { |
| $this->send_registerGateway($gatewayName); |
| return $this->recv_registerGateway(); |
| } |
| |
| public function send_registerGateway($gatewayName) |
| { |
| $args = new \Airavata\API\GatewayManagement\GatewayManagementService_registerGateway_args(); |
| $args->gatewayName = $gatewayName; |
| $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); |
| if ($bin_accel) |
| { |
| thrift_protocol_write_binary($this->output_, 'registerGateway', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); |
| } |
| else |
| { |
| $this->output_->writeMessageBegin('registerGateway', TMessageType::CALL, $this->seqid_); |
| $args->write($this->output_); |
| $this->output_->writeMessageEnd(); |
| $this->output_->getTransport()->flush(); |
| } |
| } |
| |
| public function recv_registerGateway() |
| { |
| $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); |
| if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\GatewayManagement\GatewayManagementService_registerGateway_result', $this->input_->isStrictRead()); |
| else |
| { |
| $rseqid = 0; |
| $fname = null; |
| $mtype = 0; |
| |
| $this->input_->readMessageBegin($fname, $mtype, $rseqid); |
| if ($mtype == TMessageType::EXCEPTION) { |
| $x = new TApplicationException(); |
| $x->read($this->input_); |
| $this->input_->readMessageEnd(); |
| throw $x; |
| } |
| $result = new \Airavata\API\GatewayManagement\GatewayManagementService_registerGateway_result(); |
| $result->read($this->input_); |
| $this->input_->readMessageEnd(); |
| } |
| if ($result->success !== null) { |
| return $result->success; |
| } |
| throw new \Exception("registerGateway failed: unknown result"); |
| } |
| |
| public function getGatewayName($gatewayId) |
| { |
| $this->send_getGatewayName($gatewayId); |
| return $this->recv_getGatewayName(); |
| } |
| |
| public function send_getGatewayName($gatewayId) |
| { |
| $args = new \Airavata\API\GatewayManagement\GatewayManagementService_getGatewayName_args(); |
| $args->gatewayId = $gatewayId; |
| $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); |
| if ($bin_accel) |
| { |
| thrift_protocol_write_binary($this->output_, 'getGatewayName', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); |
| } |
| else |
| { |
| $this->output_->writeMessageBegin('getGatewayName', TMessageType::CALL, $this->seqid_); |
| $args->write($this->output_); |
| $this->output_->writeMessageEnd(); |
| $this->output_->getTransport()->flush(); |
| } |
| } |
| |
| public function recv_getGatewayName() |
| { |
| $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); |
| if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\GatewayManagement\GatewayManagementService_getGatewayName_result', $this->input_->isStrictRead()); |
| else |
| { |
| $rseqid = 0; |
| $fname = null; |
| $mtype = 0; |
| |
| $this->input_->readMessageBegin($fname, $mtype, $rseqid); |
| if ($mtype == TMessageType::EXCEPTION) { |
| $x = new TApplicationException(); |
| $x->read($this->input_); |
| $this->input_->readMessageEnd(); |
| throw $x; |
| } |
| $result = new \Airavata\API\GatewayManagement\GatewayManagementService_getGatewayName_result(); |
| $result->read($this->input_); |
| $this->input_->readMessageEnd(); |
| } |
| if ($result->success !== null) { |
| return $result->success; |
| } |
| throw new \Exception("getGatewayName failed: unknown result"); |
| } |
| |
| } |
| |
| // HELPER FUNCTIONS AND STRUCTURES |
| |
| class GatewayManagementService_registerGateway_args { |
| static $_TSPEC; |
| |
| /** |
| * @var string |
| */ |
| public $gatewayName = null; |
| |
| public function __construct($vals=null) { |
| if (!isset(self::$_TSPEC)) { |
| self::$_TSPEC = array( |
| 1 => array( |
| 'var' => 'gatewayName', |
| 'type' => TType::STRING, |
| ), |
| ); |
| } |
| if (is_array($vals)) { |
| if (isset($vals['gatewayName'])) { |
| $this->gatewayName = $vals['gatewayName']; |
| } |
| } |
| } |
| |
| public function getName() { |
| return 'GatewayManagementService_registerGateway_args'; |
| } |
| |
| 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->gatewayName); |
| } 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('GatewayManagementService_registerGateway_args'); |
| if ($this->gatewayName !== null) { |
| $xfer += $output->writeFieldBegin('gatewayName', TType::STRING, 1); |
| $xfer += $output->writeString($this->gatewayName); |
| $xfer += $output->writeFieldEnd(); |
| } |
| $xfer += $output->writeFieldStop(); |
| $xfer += $output->writeStructEnd(); |
| return $xfer; |
| } |
| |
| } |
| |
| class GatewayManagementService_registerGateway_result { |
| static $_TSPEC; |
| |
| /** |
| * @var string |
| */ |
| public $success = null; |
| |
| public function __construct($vals=null) { |
| if (!isset(self::$_TSPEC)) { |
| self::$_TSPEC = array( |
| 0 => array( |
| 'var' => 'success', |
| 'type' => TType::STRING, |
| ), |
| ); |
| } |
| if (is_array($vals)) { |
| if (isset($vals['success'])) { |
| $this->success = $vals['success']; |
| } |
| } |
| } |
| |
| public function getName() { |
| return 'GatewayManagementService_registerGateway_result'; |
| } |
| |
| 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 0: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->success); |
| } 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('GatewayManagementService_registerGateway_result'); |
| if ($this->success !== null) { |
| $xfer += $output->writeFieldBegin('success', TType::STRING, 0); |
| $xfer += $output->writeString($this->success); |
| $xfer += $output->writeFieldEnd(); |
| } |
| $xfer += $output->writeFieldStop(); |
| $xfer += $output->writeStructEnd(); |
| return $xfer; |
| } |
| |
| } |
| |
| class GatewayManagementService_getGatewayName_args { |
| static $_TSPEC; |
| |
| /** |
| * @var string |
| */ |
| public $gatewayId = null; |
| |
| public function __construct($vals=null) { |
| if (!isset(self::$_TSPEC)) { |
| self::$_TSPEC = array( |
| 1 => array( |
| 'var' => 'gatewayId', |
| 'type' => TType::STRING, |
| ), |
| ); |
| } |
| if (is_array($vals)) { |
| if (isset($vals['gatewayId'])) { |
| $this->gatewayId = $vals['gatewayId']; |
| } |
| } |
| } |
| |
| public function getName() { |
| return 'GatewayManagementService_getGatewayName_args'; |
| } |
| |
| 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->gatewayId); |
| } 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('GatewayManagementService_getGatewayName_args'); |
| if ($this->gatewayId !== null) { |
| $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 1); |
| $xfer += $output->writeString($this->gatewayId); |
| $xfer += $output->writeFieldEnd(); |
| } |
| $xfer += $output->writeFieldStop(); |
| $xfer += $output->writeStructEnd(); |
| return $xfer; |
| } |
| |
| } |
| |
| class GatewayManagementService_getGatewayName_result { |
| static $_TSPEC; |
| |
| /** |
| * @var string |
| */ |
| public $success = null; |
| |
| public function __construct($vals=null) { |
| if (!isset(self::$_TSPEC)) { |
| self::$_TSPEC = array( |
| 0 => array( |
| 'var' => 'success', |
| 'type' => TType::STRING, |
| ), |
| ); |
| } |
| if (is_array($vals)) { |
| if (isset($vals['success'])) { |
| $this->success = $vals['success']; |
| } |
| } |
| } |
| |
| public function getName() { |
| return 'GatewayManagementService_getGatewayName_result'; |
| } |
| |
| 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 0: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->success); |
| } 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('GatewayManagementService_getGatewayName_result'); |
| if ($this->success !== null) { |
| $xfer += $output->writeFieldBegin('success', TType::STRING, 0); |
| $xfer += $output->writeString($this->success); |
| $xfer += $output->writeFieldEnd(); |
| } |
| $xfer += $output->writeFieldStop(); |
| $xfer += $output->writeStructEnd(); |
| return $xfer; |
| } |
| |
| } |
| |
| |