You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2015/07/20 20:57:34 UTC
[5/7] airavata-php-gateway git commit: Sync new php client model
classes and changed ExperiementUtilities.php according to that
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/e97273be/app/libraries/Airavata/Model/AppCatalog/Types.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Model/AppCatalog/Types.php b/app/libraries/Airavata/Model/AppCatalog/Types.php
deleted file mode 100644
index 2e4c195..0000000
--- a/app/libraries/Airavata/Model/AppCatalog/Types.php
+++ /dev/null
@@ -1,1636 +0,0 @@
-<?php
-namespace Airavata\Model\AppCatalog;
-
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * 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;
-
-
-final class ResourceJobManager {
- const FORK = 0;
- const PBS = 1;
- const UGE = 2;
- const SLURM = 3;
- static public $__names = array(
- 0 => 'FORK',
- 1 => 'PBS',
- 2 => 'UGE',
- 3 => 'SLURM',
- );
-}
-
-final class JobSubmissionProtocol {
- const SSH = 0;
- const GSISSH = 1;
- const GRAM = 2;
- const UNICORE = 3;
- static public $__names = array(
- 0 => 'SSH',
- 1 => 'GSISSH',
- 2 => 'GRAM',
- 3 => 'UNICORE',
- );
-}
-
-final class DataMovementProtocol {
- const SCP = 0;
- const SFTP = 1;
- const GridFTP = 2;
- const UNICORE_STORAGE_SERVICE = 3;
- static public $__names = array(
- 0 => 'SCP',
- 1 => 'SFTP',
- 2 => 'GridFTP',
- 3 => 'UNICORE_STORAGE_SERVICE',
- );
-}
-
-final class SecurityProtocol {
- const USERNAME_PASSWORD = 0;
- const SSH_KEYS = 1;
- const GSI = 2;
- const KERBEROS = 3;
- const OAUTH = 4;
- static public $__names = array(
- 0 => 'USERNAME_PASSWORD',
- 1 => 'SSH_KEYS',
- 2 => 'GSI',
- 3 => 'KERBEROS',
- 4 => 'OAUTH',
- );
-}
-
-class SCPDataMovement {
- static $_TSPEC;
-
- public $dataMovementDataID = "DO_NOT_SET_AT_CLIENTS";
- public $securityProtocol = null;
- public $sshPort = 22;
-
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'dataMovementDataID',
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'securityProtocol',
- 'type' => TType::I32,
- ),
- 3 => array(
- 'var' => 'sshPort',
- 'type' => TType::I32,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['dataMovementDataID'])) {
- $this->dataMovementDataID = $vals['dataMovementDataID'];
- }
- if (isset($vals['securityProtocol'])) {
- $this->securityProtocol = $vals['securityProtocol'];
- }
- if (isset($vals['sshPort'])) {
- $this->sshPort = $vals['sshPort'];
- }
- }
- }
-
- public function getName() {
- return 'SCPDataMovement';
- }
-
- 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->dataMovementDataID);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->securityProtocol);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->sshPort);
- } 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('SCPDataMovement');
- if ($this->dataMovementDataID !== null) {
- $xfer += $output->writeFieldBegin('dataMovementDataID', TType::STRING, 1);
- $xfer += $output->writeString($this->dataMovementDataID);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->securityProtocol !== null) {
- $xfer += $output->writeFieldBegin('securityProtocol', TType::I32, 2);
- $xfer += $output->writeI32($this->securityProtocol);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->sshPort !== null) {
- $xfer += $output->writeFieldBegin('sshPort', TType::I32, 3);
- $xfer += $output->writeI32($this->sshPort);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
-
-}
-
-class GridFTPDataMovement {
- static $_TSPEC;
-
- public $dataMovementDataID = "DO_NOT_SET_AT_CLIENTS";
- public $securityProtocol = null;
- public $gridFTPEndPoint = null;
-
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'dataMovementDataID',
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'securityProtocol',
- 'type' => TType::I32,
- ),
- 3 => array(
- 'var' => 'gridFTPEndPoint',
- 'type' => TType::LST,
- 'etype' => TType::STRING,
- 'elem' => array(
- 'type' => TType::STRING,
- ),
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['dataMovementDataID'])) {
- $this->dataMovementDataID = $vals['dataMovementDataID'];
- }
- if (isset($vals['securityProtocol'])) {
- $this->securityProtocol = $vals['securityProtocol'];
- }
- if (isset($vals['gridFTPEndPoint'])) {
- $this->gridFTPEndPoint = $vals['gridFTPEndPoint'];
- }
- }
- }
-
- public function getName() {
- return 'GridFTPDataMovement';
- }
-
- 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->dataMovementDataID);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->securityProtocol);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::LST) {
- $this->gridFTPEndPoint = array();
- $_size0 = 0;
- $_etype3 = 0;
- $xfer += $input->readListBegin($_etype3, $_size0);
- for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
- {
- $elem5 = null;
- $xfer += $input->readString($elem5);
- $this->gridFTPEndPoint []= $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('GridFTPDataMovement');
- if ($this->dataMovementDataID !== null) {
- $xfer += $output->writeFieldBegin('dataMovementDataID', TType::STRING, 1);
- $xfer += $output->writeString($this->dataMovementDataID);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->securityProtocol !== null) {
- $xfer += $output->writeFieldBegin('securityProtocol', TType::I32, 2);
- $xfer += $output->writeI32($this->securityProtocol);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->gridFTPEndPoint !== null) {
- if (!is_array($this->gridFTPEndPoint)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('gridFTPEndPoint', TType::LST, 3);
- {
- $output->writeListBegin(TType::STRING, count($this->gridFTPEndPoint));
- {
- foreach ($this->gridFTPEndPoint as $iter6)
- {
- $xfer += $output->writeString($iter6);
- }
- }
- $output->writeListEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
-
-}
-
-class SSHJobSubmission {
- static $_TSPEC;
-
- public $jobSubmissionDataID = "DO_NOT_SET_AT_CLIENTS";
- public $resourceJobManager = null;
- public $sshPort = 22;
-
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'jobSubmissionDataID',
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'resourceJobManager',
- 'type' => TType::I32,
- ),
- 3 => array(
- 'var' => 'sshPort',
- 'type' => TType::I32,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['jobSubmissionDataID'])) {
- $this->jobSubmissionDataID = $vals['jobSubmissionDataID'];
- }
- if (isset($vals['resourceJobManager'])) {
- $this->resourceJobManager = $vals['resourceJobManager'];
- }
- if (isset($vals['sshPort'])) {
- $this->sshPort = $vals['sshPort'];
- }
- }
- }
-
- public function getName() {
- return 'SSHJobSubmission';
- }
-
- 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->jobSubmissionDataID);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->resourceJobManager);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->sshPort);
- } 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('SSHJobSubmission');
- if ($this->jobSubmissionDataID !== null) {
- $xfer += $output->writeFieldBegin('jobSubmissionDataID', TType::STRING, 1);
- $xfer += $output->writeString($this->jobSubmissionDataID);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->resourceJobManager !== null) {
- $xfer += $output->writeFieldBegin('resourceJobManager', TType::I32, 2);
- $xfer += $output->writeI32($this->resourceJobManager);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->sshPort !== null) {
- $xfer += $output->writeFieldBegin('sshPort', TType::I32, 3);
- $xfer += $output->writeI32($this->sshPort);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
-
-}
-
-class GlobusJobSubmission {
- static $_TSPEC;
-
- public $jobSubmissionDataID = "DO_NOT_SET_AT_CLIENTS";
- public $securityProtocol = null;
- public $resourceJobManager = null;
- public $globusGateKeeperEndPoint = null;
-
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'jobSubmissionDataID',
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'securityProtocol',
- 'type' => TType::I32,
- ),
- 3 => array(
- 'var' => 'resourceJobManager',
- 'type' => TType::I32,
- ),
- 4 => array(
- 'var' => 'globusGateKeeperEndPoint',
- 'type' => TType::LST,
- 'etype' => TType::STRING,
- 'elem' => array(
- 'type' => TType::STRING,
- ),
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['jobSubmissionDataID'])) {
- $this->jobSubmissionDataID = $vals['jobSubmissionDataID'];
- }
- if (isset($vals['securityProtocol'])) {
- $this->securityProtocol = $vals['securityProtocol'];
- }
- if (isset($vals['resourceJobManager'])) {
- $this->resourceJobManager = $vals['resourceJobManager'];
- }
- if (isset($vals['globusGateKeeperEndPoint'])) {
- $this->globusGateKeeperEndPoint = $vals['globusGateKeeperEndPoint'];
- }
- }
- }
-
- public function getName() {
- return 'GlobusJobSubmission';
- }
-
- 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->jobSubmissionDataID);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->securityProtocol);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->resourceJobManager);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 4:
- if ($ftype == TType::LST) {
- $this->globusGateKeeperEndPoint = array();
- $_size7 = 0;
- $_etype10 = 0;
- $xfer += $input->readListBegin($_etype10, $_size7);
- for ($_i11 = 0; $_i11 < $_size7; ++$_i11)
- {
- $elem12 = null;
- $xfer += $input->readString($elem12);
- $this->globusGateKeeperEndPoint []= $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('GlobusJobSubmission');
- if ($this->jobSubmissionDataID !== null) {
- $xfer += $output->writeFieldBegin('jobSubmissionDataID', TType::STRING, 1);
- $xfer += $output->writeString($this->jobSubmissionDataID);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->securityProtocol !== null) {
- $xfer += $output->writeFieldBegin('securityProtocol', TType::I32, 2);
- $xfer += $output->writeI32($this->securityProtocol);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->resourceJobManager !== null) {
- $xfer += $output->writeFieldBegin('resourceJobManager', TType::I32, 3);
- $xfer += $output->writeI32($this->resourceJobManager);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->globusGateKeeperEndPoint !== null) {
- if (!is_array($this->globusGateKeeperEndPoint)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('globusGateKeeperEndPoint', TType::LST, 4);
- {
- $output->writeListBegin(TType::STRING, count($this->globusGateKeeperEndPoint));
- {
- foreach ($this->globusGateKeeperEndPoint as $iter13)
- {
- $xfer += $output->writeString($iter13);
- }
- }
- $output->writeListEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
-
-}
-
-class GSISSHJobSubmission {
- static $_TSPEC;
-
- public $jobSubmissionDataID = "DO_NOT_SET_AT_CLIENTS";
- public $resourceJobManager = null;
- public $sshPort = 22;
- public $exports = null;
- public $preJobCommands = null;
- public $postJobCommands = null;
- public $installedPath = null;
- public $monitorMode = null;
-
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'jobSubmissionDataID',
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'resourceJobManager',
- 'type' => TType::I32,
- ),
- 3 => array(
- 'var' => 'sshPort',
- 'type' => TType::I32,
- ),
- 4 => array(
- 'var' => 'exports',
- 'type' => TType::SET,
- 'etype' => TType::STRING,
- 'elem' => array(
- 'type' => TType::STRING,
- ),
- ),
- 5 => array(
- 'var' => 'preJobCommands',
- 'type' => TType::LST,
- 'etype' => TType::STRING,
- 'elem' => array(
- 'type' => TType::STRING,
- ),
- ),
- 6 => array(
- 'var' => 'postJobCommands',
- 'type' => TType::LST,
- 'etype' => TType::STRING,
- 'elem' => array(
- 'type' => TType::STRING,
- ),
- ),
- 7 => array(
- 'var' => 'installedPath',
- 'type' => TType::STRING,
- ),
- 8 => array(
- 'var' => 'monitorMode',
- 'type' => TType::STRING,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['jobSubmissionDataID'])) {
- $this->jobSubmissionDataID = $vals['jobSubmissionDataID'];
- }
- if (isset($vals['resourceJobManager'])) {
- $this->resourceJobManager = $vals['resourceJobManager'];
- }
- if (isset($vals['sshPort'])) {
- $this->sshPort = $vals['sshPort'];
- }
- if (isset($vals['exports'])) {
- $this->exports = $vals['exports'];
- }
- if (isset($vals['preJobCommands'])) {
- $this->preJobCommands = $vals['preJobCommands'];
- }
- if (isset($vals['postJobCommands'])) {
- $this->postJobCommands = $vals['postJobCommands'];
- }
- if (isset($vals['installedPath'])) {
- $this->installedPath = $vals['installedPath'];
- }
- if (isset($vals['monitorMode'])) {
- $this->monitorMode = $vals['monitorMode'];
- }
- }
- }
-
- public function getName() {
- return 'GSISSHJobSubmission';
- }
-
- 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->jobSubmissionDataID);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->resourceJobManager);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->sshPort);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 4:
- if ($ftype == TType::SET) {
- $this->exports = array();
- $_size14 = 0;
- $_etype17 = 0;
- $xfer += $input->readSetBegin($_etype17, $_size14);
- for ($_i18 = 0; $_i18 < $_size14; ++$_i18)
- {
- $elem19 = null;
- $xfer += $input->readString($elem19);
- if (is_scalar($elem19)) {
- $this->exports[$elem19] = true;
- } else {
- $this->exports []= $elem19;
- }
- }
- $xfer += $input->readSetEnd();
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 5:
- if ($ftype == TType::LST) {
- $this->preJobCommands = array();
- $_size20 = 0;
- $_etype23 = 0;
- $xfer += $input->readListBegin($_etype23, $_size20);
- for ($_i24 = 0; $_i24 < $_size20; ++$_i24)
- {
- $elem25 = null;
- $xfer += $input->readString($elem25);
- $this->preJobCommands []= $elem25;
- }
- $xfer += $input->readListEnd();
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 6:
- if ($ftype == TType::LST) {
- $this->postJobCommands = array();
- $_size26 = 0;
- $_etype29 = 0;
- $xfer += $input->readListBegin($_etype29, $_size26);
- for ($_i30 = 0; $_i30 < $_size26; ++$_i30)
- {
- $elem31 = null;
- $xfer += $input->readString($elem31);
- $this->postJobCommands []= $elem31;
- }
- $xfer += $input->readListEnd();
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 7:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->installedPath);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 8:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->monitorMode);
- } 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('GSISSHJobSubmission');
- if ($this->jobSubmissionDataID !== null) {
- $xfer += $output->writeFieldBegin('jobSubmissionDataID', TType::STRING, 1);
- $xfer += $output->writeString($this->jobSubmissionDataID);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->resourceJobManager !== null) {
- $xfer += $output->writeFieldBegin('resourceJobManager', TType::I32, 2);
- $xfer += $output->writeI32($this->resourceJobManager);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->sshPort !== null) {
- $xfer += $output->writeFieldBegin('sshPort', TType::I32, 3);
- $xfer += $output->writeI32($this->sshPort);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->exports !== null) {
- if (!is_array($this->exports)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('exports', TType::SET, 4);
- {
- $output->writeSetBegin(TType::STRING, count($this->exports));
- {
- foreach ($this->exports as $iter32 => $iter33)
- {
- if (is_scalar($iter33)) {
- $xfer += $output->writeString($iter32);
- } else {
- $xfer += $output->writeString($iter33);
- }
- }
- }
- $output->writeSetEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- if ($this->preJobCommands !== null) {
- if (!is_array($this->preJobCommands)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('preJobCommands', TType::LST, 5);
- {
- $output->writeListBegin(TType::STRING, count($this->preJobCommands));
- {
- foreach ($this->preJobCommands as $iter34)
- {
- $xfer += $output->writeString($iter34);
- }
- }
- $output->writeListEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- if ($this->postJobCommands !== null) {
- if (!is_array($this->postJobCommands)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('postJobCommands', TType::LST, 6);
- {
- $output->writeListBegin(TType::STRING, count($this->postJobCommands));
- {
- foreach ($this->postJobCommands as $iter35)
- {
- $xfer += $output->writeString($iter35);
- }
- }
- $output->writeListEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- if ($this->installedPath !== null) {
- $xfer += $output->writeFieldBegin('installedPath', TType::STRING, 7);
- $xfer += $output->writeString($this->installedPath);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->monitorMode !== null) {
- $xfer += $output->writeFieldBegin('monitorMode', TType::STRING, 8);
- $xfer += $output->writeString($this->monitorMode);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
-
-}
-
-class ComputeResourceDescription {
- static $_TSPEC;
-
- public $isEmpty = false;
- public $resourceId = "DO_NOT_SET_AT_CLIENTS";
- public $hostName = null;
- public $hostAliases = null;
- public $ipAddresses = null;
- public $resourceDescription = null;
- public $scratchLocation = null;
- public $preferredJobSubmissionProtocol = null;
- public $jobSubmissionProtocols = null;
- public $dataMovementProtocols = null;
-
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'isEmpty',
- 'type' => TType::BOOL,
- ),
- 2 => array(
- 'var' => 'resourceId',
- 'type' => TType::STRING,
- ),
- 3 => array(
- 'var' => 'hostName',
- 'type' => TType::STRING,
- ),
- 4 => array(
- 'var' => 'hostAliases',
- 'type' => TType::SET,
- 'etype' => TType::STRING,
- 'elem' => array(
- 'type' => TType::STRING,
- ),
- ),
- 5 => array(
- 'var' => 'ipAddresses',
- 'type' => TType::SET,
- 'etype' => TType::STRING,
- 'elem' => array(
- 'type' => TType::STRING,
- ),
- ),
- 6 => array(
- 'var' => 'resourceDescription',
- 'type' => TType::STRING,
- ),
- 7 => array(
- 'var' => 'scratchLocation',
- 'type' => TType::STRING,
- ),
- 8 => array(
- 'var' => 'preferredJobSubmissionProtocol',
- 'type' => TType::STRING,
- ),
- 9 => array(
- 'var' => 'jobSubmissionProtocols',
- 'type' => TType::MAP,
- 'ktype' => TType::STRING,
- 'vtype' => TType::I32,
- 'key' => array(
- 'type' => TType::STRING,
- ),
- 'val' => array(
- 'type' => TType::I32,
- ),
- ),
- 10 => array(
- 'var' => 'dataMovementProtocols',
- 'type' => TType::MAP,
- 'ktype' => TType::STRING,
- 'vtype' => TType::I32,
- 'key' => array(
- 'type' => TType::STRING,
- ),
- 'val' => array(
- 'type' => TType::I32,
- ),
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['isEmpty'])) {
- $this->isEmpty = $vals['isEmpty'];
- }
- if (isset($vals['resourceId'])) {
- $this->resourceId = $vals['resourceId'];
- }
- if (isset($vals['hostName'])) {
- $this->hostName = $vals['hostName'];
- }
- if (isset($vals['hostAliases'])) {
- $this->hostAliases = $vals['hostAliases'];
- }
- if (isset($vals['ipAddresses'])) {
- $this->ipAddresses = $vals['ipAddresses'];
- }
- if (isset($vals['resourceDescription'])) {
- $this->resourceDescription = $vals['resourceDescription'];
- }
- if (isset($vals['scratchLocation'])) {
- $this->scratchLocation = $vals['scratchLocation'];
- }
- if (isset($vals['preferredJobSubmissionProtocol'])) {
- $this->preferredJobSubmissionProtocol = $vals['preferredJobSubmissionProtocol'];
- }
- if (isset($vals['jobSubmissionProtocols'])) {
- $this->jobSubmissionProtocols = $vals['jobSubmissionProtocols'];
- }
- if (isset($vals['dataMovementProtocols'])) {
- $this->dataMovementProtocols = $vals['dataMovementProtocols'];
- }
- }
- }
-
- public function getName() {
- return 'ComputeResourceDescription';
- }
-
- 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::BOOL) {
- $xfer += $input->readBool($this->isEmpty);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->resourceId);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->hostName);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 4:
- if ($ftype == TType::SET) {
- $this->hostAliases = array();
- $_size36 = 0;
- $_etype39 = 0;
- $xfer += $input->readSetBegin($_etype39, $_size36);
- for ($_i40 = 0; $_i40 < $_size36; ++$_i40)
- {
- $elem41 = null;
- $xfer += $input->readString($elem41);
- if (is_scalar($elem41)) {
- $this->hostAliases[$elem41] = true;
- } else {
- $this->hostAliases []= $elem41;
- }
- }
- $xfer += $input->readSetEnd();
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 5:
- if ($ftype == TType::SET) {
- $this->ipAddresses = array();
- $_size42 = 0;
- $_etype45 = 0;
- $xfer += $input->readSetBegin($_etype45, $_size42);
- for ($_i46 = 0; $_i46 < $_size42; ++$_i46)
- {
- $elem47 = null;
- $xfer += $input->readString($elem47);
- if (is_scalar($elem47)) {
- $this->ipAddresses[$elem47] = true;
- } else {
- $this->ipAddresses []= $elem47;
- }
- }
- $xfer += $input->readSetEnd();
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 6:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->resourceDescription);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 7:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->scratchLocation);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 8:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->preferredJobSubmissionProtocol);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 9:
- if ($ftype == TType::MAP) {
- $this->jobSubmissionProtocols = array();
- $_size48 = 0;
- $_ktype49 = 0;
- $_vtype50 = 0;
- $xfer += $input->readMapBegin($_ktype49, $_vtype50, $_size48);
- for ($_i52 = 0; $_i52 < $_size48; ++$_i52)
- {
- $key53 = '';
- $val54 = 0;
- $xfer += $input->readString($key53);
- $xfer += $input->readI32($val54);
- $this->jobSubmissionProtocols[$key53] = $val54;
- }
- $xfer += $input->readMapEnd();
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 10:
- if ($ftype == TType::MAP) {
- $this->dataMovementProtocols = array();
- $_size55 = 0;
- $_ktype56 = 0;
- $_vtype57 = 0;
- $xfer += $input->readMapBegin($_ktype56, $_vtype57, $_size55);
- for ($_i59 = 0; $_i59 < $_size55; ++$_i59)
- {
- $key60 = '';
- $val61 = 0;
- $xfer += $input->readString($key60);
- $xfer += $input->readI32($val61);
- $this->dataMovementProtocols[$key60] = $val61;
- }
- $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('ComputeResourceDescription');
- if ($this->isEmpty !== null) {
- $xfer += $output->writeFieldBegin('isEmpty', TType::BOOL, 1);
- $xfer += $output->writeBool($this->isEmpty);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->resourceId !== null) {
- $xfer += $output->writeFieldBegin('resourceId', TType::STRING, 2);
- $xfer += $output->writeString($this->resourceId);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->hostName !== null) {
- $xfer += $output->writeFieldBegin('hostName', TType::STRING, 3);
- $xfer += $output->writeString($this->hostName);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->hostAliases !== null) {
- if (!is_array($this->hostAliases)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('hostAliases', TType::SET, 4);
- {
- $output->writeSetBegin(TType::STRING, count($this->hostAliases));
- {
- foreach ($this->hostAliases as $iter62 => $iter63)
- {
- if (is_scalar($iter63)) {
- $xfer += $output->writeString($iter62);
- } else {
- $xfer += $output->writeString($iter63);
- }
- }
- }
- $output->writeSetEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- if ($this->ipAddresses !== null) {
- if (!is_array($this->ipAddresses)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('ipAddresses', TType::SET, 5);
- {
- $output->writeSetBegin(TType::STRING, count($this->ipAddresses));
- {
- foreach ($this->ipAddresses as $iter64 => $iter65)
- {
- if (is_scalar($iter65)) {
- $xfer += $output->writeString($iter64);
- } else {
- $xfer += $output->writeString($iter65);
- }
- }
- }
- $output->writeSetEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- if ($this->resourceDescription !== null) {
- $xfer += $output->writeFieldBegin('resourceDescription', TType::STRING, 6);
- $xfer += $output->writeString($this->resourceDescription);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->scratchLocation !== null) {
- $xfer += $output->writeFieldBegin('scratchLocation', TType::STRING, 7);
- $xfer += $output->writeString($this->scratchLocation);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->preferredJobSubmissionProtocol !== null) {
- $xfer += $output->writeFieldBegin('preferredJobSubmissionProtocol', TType::STRING, 8);
- $xfer += $output->writeString($this->preferredJobSubmissionProtocol);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->jobSubmissionProtocols !== null) {
- if (!is_array($this->jobSubmissionProtocols)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('jobSubmissionProtocols', TType::MAP, 9);
- {
- $output->writeMapBegin(TType::STRING, TType::I32, count($this->jobSubmissionProtocols));
- {
- foreach ($this->jobSubmissionProtocols as $kiter66 => $viter67)
- {
- $xfer += $output->writeString($kiter66);
- $xfer += $output->writeI32($viter67);
- }
- }
- $output->writeMapEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- if ($this->dataMovementProtocols !== null) {
- if (!is_array($this->dataMovementProtocols)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('dataMovementProtocols', TType::MAP, 10);
- {
- $output->writeMapBegin(TType::STRING, TType::I32, count($this->dataMovementProtocols));
- {
- foreach ($this->dataMovementProtocols as $kiter68 => $viter69)
- {
- $xfer += $output->writeString($kiter68);
- $xfer += $output->writeI32($viter69);
- }
- }
- $output->writeMapEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
-
-}
-
-class ApplicationDescriptor {
- static $_TSPEC;
-
- public $applicationDescriptorId = "DO_NOT_SET_AT_CLIENTS";
- public $applicationDescriptorData = null;
-
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'applicationDescriptorId',
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'applicationDescriptorData',
- 'type' => TType::STRING,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['applicationDescriptorId'])) {
- $this->applicationDescriptorId = $vals['applicationDescriptorId'];
- }
- if (isset($vals['applicationDescriptorData'])) {
- $this->applicationDescriptorData = $vals['applicationDescriptorData'];
- }
- }
- }
-
- public function getName() {
- return 'ApplicationDescriptor';
- }
-
- 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->applicationDescriptorId);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->applicationDescriptorData);
- } 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('ApplicationDescriptor');
- if ($this->applicationDescriptorId !== null) {
- $xfer += $output->writeFieldBegin('applicationDescriptorId', TType::STRING, 1);
- $xfer += $output->writeString($this->applicationDescriptorId);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->applicationDescriptorData !== null) {
- $xfer += $output->writeFieldBegin('applicationDescriptorData', TType::STRING, 2);
- $xfer += $output->writeString($this->applicationDescriptorData);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
-
-}
-
-class ApplicationDeployment {
- static $_TSPEC;
-
- public $deploymentId = "DO_NOT_SET_AT_CLIENTS";
- public $computeResourceDescription = null;
- public $applicationDescriptor = null;
-
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'deploymentId',
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'computeResourceDescription',
- 'type' => TType::STRUCT,
- 'class' => '\Airavata\Model\AppCatalog\ComputeResourceDescription',
- ),
- 3 => array(
- 'var' => 'applicationDescriptor',
- 'type' => TType::STRUCT,
- 'class' => '\Airavata\Model\AppCatalog\ApplicationDescriptor',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['deploymentId'])) {
- $this->deploymentId = $vals['deploymentId'];
- }
- if (isset($vals['computeResourceDescription'])) {
- $this->computeResourceDescription = $vals['computeResourceDescription'];
- }
- if (isset($vals['applicationDescriptor'])) {
- $this->applicationDescriptor = $vals['applicationDescriptor'];
- }
- }
- }
-
- public function getName() {
- return 'ApplicationDeployment';
- }
-
- 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->deploymentId);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::STRUCT) {
- $this->computeResourceDescription = new \Airavata\Model\AppCatalog\ComputeResourceDescription();
- $xfer += $this->computeResourceDescription->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::STRUCT) {
- $this->applicationDescriptor = new \Airavata\Model\AppCatalog\ApplicationDescriptor();
- $xfer += $this->applicationDescriptor->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('ApplicationDeployment');
- if ($this->deploymentId !== null) {
- $xfer += $output->writeFieldBegin('deploymentId', TType::STRING, 1);
- $xfer += $output->writeString($this->deploymentId);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->computeResourceDescription !== null) {
- if (!is_object($this->computeResourceDescription)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('computeResourceDescription', TType::STRUCT, 2);
- $xfer += $this->computeResourceDescription->write($output);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->applicationDescriptor !== null) {
- if (!is_object($this->applicationDescriptor)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('applicationDescriptor', TType::STRUCT, 3);
- $xfer += $this->applicationDescriptor->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
-
-}
-
-class ApplicationInterface {
- static $_TSPEC;
-
- public $applicationInterfaceId = "DO_NOT_SET_AT_CLIENTS";
- public $applicationInterfaceData = null;
- public $applicationDeployments = null;
-
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'applicationInterfaceId',
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'applicationInterfaceData',
- 'type' => TType::STRING,
- ),
- 3 => array(
- 'var' => 'applicationDeployments',
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => '\Airavata\Model\AppCatalog\ApplicationDeployment',
- ),
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['applicationInterfaceId'])) {
- $this->applicationInterfaceId = $vals['applicationInterfaceId'];
- }
- if (isset($vals['applicationInterfaceData'])) {
- $this->applicationInterfaceData = $vals['applicationInterfaceData'];
- }
- if (isset($vals['applicationDeployments'])) {
- $this->applicationDeployments = $vals['applicationDeployments'];
- }
- }
- }
-
- public function getName() {
- return 'ApplicationInterface';
- }
-
- 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->applicationInterfaceId);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->applicationInterfaceData);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::LST) {
- $this->applicationDeployments = array();
- $_size70 = 0;
- $_etype73 = 0;
- $xfer += $input->readListBegin($_etype73, $_size70);
- for ($_i74 = 0; $_i74 < $_size70; ++$_i74)
- {
- $elem75 = null;
- $elem75 = new \Airavata\Model\AppCatalog\ApplicationDeployment();
- $xfer += $elem75->read($input);
- $this->applicationDeployments []= $elem75;
- }
- $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('ApplicationInterface');
- if ($this->applicationInterfaceId !== null) {
- $xfer += $output->writeFieldBegin('applicationInterfaceId', TType::STRING, 1);
- $xfer += $output->writeString($this->applicationInterfaceId);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->applicationInterfaceData !== null) {
- $xfer += $output->writeFieldBegin('applicationInterfaceData', TType::STRING, 2);
- $xfer += $output->writeString($this->applicationInterfaceData);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->applicationDeployments !== null) {
- if (!is_array($this->applicationDeployments)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('applicationDeployments', TType::LST, 3);
- {
- $output->writeListBegin(TType::STRUCT, count($this->applicationDeployments));
- {
- foreach ($this->applicationDeployments as $iter76)
- {
- $xfer += $iter76->write($output);
- }
- }
- $output->writeListEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
-
-}
-
-$GLOBALS['applicationCatalogDataModel_CONSTANTS']['DEFAULT_ID'] = "DO_NOT_SET_AT_CLIENTS";
-
-
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/e97273be/app/libraries/Airavata/Model/Application/Io/Types.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Model/Application/Io/Types.php b/app/libraries/Airavata/Model/Application/Io/Types.php
new file mode 100644
index 0000000..a74e0f9
--- /dev/null
+++ b/app/libraries/Airavata/Model/Application/Io/Types.php
@@ -0,0 +1,657 @@
+<?php
+namespace Airavata\Model\Application\Io;
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.2)
+ *
+ * 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;
+
+
+/**
+ * Data Types supported in Airavata. The primitive data types
+ *
+ */
+final class DataType {
+ const STRING = 0;
+ const INTEGER = 1;
+ const FLOAT = 2;
+ const URI = 3;
+ const STDOUT = 4;
+ const STDERR = 5;
+ static public $__names = array(
+ 0 => 'STRING',
+ 1 => 'INTEGER',
+ 2 => 'FLOAT',
+ 3 => 'URI',
+ 4 => 'STDOUT',
+ 5 => 'STDERR',
+ );
+}
+
+/**
+ * Application Inputs. The paramters describe how inputs are passed to the application.
+ *
+ * name:
+ * Name of the parameter.
+ *
+ * value:
+ * Value of the parameter. A default value could be set during registration.
+ *
+ * type:
+ * Data type of the parameter
+ *
+ * applicationArguement:
+ * The argument flag sent to the application. Such as -p pressure.
+ *
+ * standardInput:
+ * When this value is set, the parameter is sent as standard input rather than a parameter.
+ * Typically this is passed using redirection operator ">".
+ *
+ * userFriendlyDescription:
+ * Description to be displayed at the user interface.
+ *
+ * metaData:
+ * Any metadat. This is typically ignore by Airavata and is used by gateways for application configuration.
+ *
+ */
+class InputDataObjectType {
+ static $_TSPEC;
+
+ /**
+ * @var string
+ */
+ public $name = null;
+ /**
+ * @var string
+ */
+ public $value = null;
+ /**
+ * @var int
+ */
+ public $type = null;
+ /**
+ * @var string
+ */
+ public $applicationArgument = null;
+ /**
+ * @var bool
+ */
+ public $standardInput = null;
+ /**
+ * @var string
+ */
+ public $userFriendlyDescription = null;
+ /**
+ * @var string
+ */
+ public $metaData = null;
+ /**
+ * @var int
+ */
+ public $inputOrder = null;
+ /**
+ * @var bool
+ */
+ public $isRequired = null;
+ /**
+ * @var bool
+ */
+ public $requiredToAddedToCommandLine = null;
+ /**
+ * @var bool
+ */
+ public $dataStaged = 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' => 'type',
+ 'type' => TType::I32,
+ ),
+ 4 => array(
+ 'var' => 'applicationArgument',
+ 'type' => TType::STRING,
+ ),
+ 5 => array(
+ 'var' => 'standardInput',
+ 'type' => TType::BOOL,
+ ),
+ 6 => array(
+ 'var' => 'userFriendlyDescription',
+ 'type' => TType::STRING,
+ ),
+ 7 => array(
+ 'var' => 'metaData',
+ 'type' => TType::STRING,
+ ),
+ 8 => array(
+ 'var' => 'inputOrder',
+ 'type' => TType::I32,
+ ),
+ 9 => array(
+ 'var' => 'isRequired',
+ 'type' => TType::BOOL,
+ ),
+ 10 => array(
+ 'var' => 'requiredToAddedToCommandLine',
+ 'type' => TType::BOOL,
+ ),
+ 11 => array(
+ 'var' => 'dataStaged',
+ 'type' => TType::BOOL,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['name'])) {
+ $this->name = $vals['name'];
+ }
+ if (isset($vals['value'])) {
+ $this->value = $vals['value'];
+ }
+ if (isset($vals['type'])) {
+ $this->type = $vals['type'];
+ }
+ if (isset($vals['applicationArgument'])) {
+ $this->applicationArgument = $vals['applicationArgument'];
+ }
+ if (isset($vals['standardInput'])) {
+ $this->standardInput = $vals['standardInput'];
+ }
+ if (isset($vals['userFriendlyDescription'])) {
+ $this->userFriendlyDescription = $vals['userFriendlyDescription'];
+ }
+ if (isset($vals['metaData'])) {
+ $this->metaData = $vals['metaData'];
+ }
+ if (isset($vals['inputOrder'])) {
+ $this->inputOrder = $vals['inputOrder'];
+ }
+ if (isset($vals['isRequired'])) {
+ $this->isRequired = $vals['isRequired'];
+ }
+ if (isset($vals['requiredToAddedToCommandLine'])) {
+ $this->requiredToAddedToCommandLine = $vals['requiredToAddedToCommandLine'];
+ }
+ if (isset($vals['dataStaged'])) {
+ $this->dataStaged = $vals['dataStaged'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'InputDataObjectType';
+ }
+
+ 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::I32) {
+ $xfer += $input->readI32($this->type);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->applicationArgument);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->standardInput);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 6:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->userFriendlyDescription);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 7:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->metaData);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 8:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->inputOrder);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 9:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->isRequired);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 10:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->requiredToAddedToCommandLine);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 11:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->dataStaged);
+ } 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('InputDataObjectType');
+ 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->type !== null) {
+ $xfer += $output->writeFieldBegin('type', TType::I32, 3);
+ $xfer += $output->writeI32($this->type);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->applicationArgument !== null) {
+ $xfer += $output->writeFieldBegin('applicationArgument', TType::STRING, 4);
+ $xfer += $output->writeString($this->applicationArgument);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->standardInput !== null) {
+ $xfer += $output->writeFieldBegin('standardInput', TType::BOOL, 5);
+ $xfer += $output->writeBool($this->standardInput);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->userFriendlyDescription !== null) {
+ $xfer += $output->writeFieldBegin('userFriendlyDescription', TType::STRING, 6);
+ $xfer += $output->writeString($this->userFriendlyDescription);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->metaData !== null) {
+ $xfer += $output->writeFieldBegin('metaData', TType::STRING, 7);
+ $xfer += $output->writeString($this->metaData);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->inputOrder !== null) {
+ $xfer += $output->writeFieldBegin('inputOrder', TType::I32, 8);
+ $xfer += $output->writeI32($this->inputOrder);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->isRequired !== null) {
+ $xfer += $output->writeFieldBegin('isRequired', TType::BOOL, 9);
+ $xfer += $output->writeBool($this->isRequired);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->requiredToAddedToCommandLine !== null) {
+ $xfer += $output->writeFieldBegin('requiredToAddedToCommandLine', TType::BOOL, 10);
+ $xfer += $output->writeBool($this->requiredToAddedToCommandLine);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->dataStaged !== null) {
+ $xfer += $output->writeFieldBegin('dataStaged', TType::BOOL, 11);
+ $xfer += $output->writeBool($this->dataStaged);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+/**
+ * Application Outputs. The paramters describe how outputs generated by the application.
+ *
+ * name:
+ * Name of the parameter.
+ *
+ * value:
+ * Value of the parameter.
+ *
+ * type:
+ * Data type of the parameter
+ *
+ * applicationArguement:
+ * The argument flag sent to the application. Such as -p pressure.
+ *
+ * standardInput:
+ * When this value is set, the parameter is sent as standard input rather than a parameter.
+ * Typically this is passed using redirection operator ">".
+ *
+ * userFriendlyDescription:
+ * Description to be displayed at the user interface.
+ *
+ * metaData:
+ * Any metadat. This is typically ignore by Airavata and is used by gateways for application configuration.
+ *
+ */
+class OutputDataObjectType {
+ static $_TSPEC;
+
+ /**
+ * @var string
+ */
+ public $name = null;
+ /**
+ * @var string
+ */
+ public $value = null;
+ /**
+ * @var int
+ */
+ public $type = null;
+ /**
+ * @var string
+ */
+ public $applicationArgument = null;
+ /**
+ * @var bool
+ */
+ public $isRequired = null;
+ /**
+ * @var bool
+ */
+ public $requiredToAddedToCommandLine = null;
+ /**
+ * @var bool
+ */
+ public $dataMovement = null;
+ /**
+ * @var string
+ */
+ public $location = null;
+ /**
+ * @var string
+ */
+ public $searchQuery = 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' => 'type',
+ 'type' => TType::I32,
+ ),
+ 4 => array(
+ 'var' => 'applicationArgument',
+ 'type' => TType::STRING,
+ ),
+ 5 => array(
+ 'var' => 'isRequired',
+ 'type' => TType::BOOL,
+ ),
+ 6 => array(
+ 'var' => 'requiredToAddedToCommandLine',
+ 'type' => TType::BOOL,
+ ),
+ 7 => array(
+ 'var' => 'dataMovement',
+ 'type' => TType::BOOL,
+ ),
+ 8 => array(
+ 'var' => 'location',
+ 'type' => TType::STRING,
+ ),
+ 9 => array(
+ 'var' => 'searchQuery',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['name'])) {
+ $this->name = $vals['name'];
+ }
+ if (isset($vals['value'])) {
+ $this->value = $vals['value'];
+ }
+ if (isset($vals['type'])) {
+ $this->type = $vals['type'];
+ }
+ if (isset($vals['applicationArgument'])) {
+ $this->applicationArgument = $vals['applicationArgument'];
+ }
+ if (isset($vals['isRequired'])) {
+ $this->isRequired = $vals['isRequired'];
+ }
+ if (isset($vals['requiredToAddedToCommandLine'])) {
+ $this->requiredToAddedToCommandLine = $vals['requiredToAddedToCommandLine'];
+ }
+ if (isset($vals['dataMovement'])) {
+ $this->dataMovement = $vals['dataMovement'];
+ }
+ if (isset($vals['location'])) {
+ $this->location = $vals['location'];
+ }
+ if (isset($vals['searchQuery'])) {
+ $this->searchQuery = $vals['searchQuery'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'OutputDataObjectType';
+ }
+
+ 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::I32) {
+ $xfer += $input->readI32($this->type);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->applicationArgument);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->isRequired);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 6:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->requiredToAddedToCommandLine);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 7:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->dataMovement);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 8:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->location);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 9:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->searchQuery);
+ } 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('OutputDataObjectType');
+ 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->type !== null) {
+ $xfer += $output->writeFieldBegin('type', TType::I32, 3);
+ $xfer += $output->writeI32($this->type);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->applicationArgument !== null) {
+ $xfer += $output->writeFieldBegin('applicationArgument', TType::STRING, 4);
+ $xfer += $output->writeString($this->applicationArgument);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->isRequired !== null) {
+ $xfer += $output->writeFieldBegin('isRequired', TType::BOOL, 5);
+ $xfer += $output->writeBool($this->isRequired);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->requiredToAddedToCommandLine !== null) {
+ $xfer += $output->writeFieldBegin('requiredToAddedToCommandLine', TType::BOOL, 6);
+ $xfer += $output->writeBool($this->requiredToAddedToCommandLine);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->dataMovement !== null) {
+ $xfer += $output->writeFieldBegin('dataMovement', TType::BOOL, 7);
+ $xfer += $output->writeBool($this->dataMovement);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->location !== null) {
+ $xfer += $output->writeFieldBegin('location', TType::STRING, 8);
+ $xfer += $output->writeString($this->location);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->searchQuery !== null) {
+ $xfer += $output->writeFieldBegin('searchQuery', TType::STRING, 9);
+ $xfer += $output->writeString($this->searchQuery);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/e97273be/app/libraries/Airavata/Model/Commons/Types.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Model/Commons/Types.php b/app/libraries/Airavata/Model/Commons/Types.php
new file mode 100644
index 0000000..a4b8b85
--- /dev/null
+++ b/app/libraries/Airavata/Model/Commons/Types.php
@@ -0,0 +1,475 @@
+<?php
+namespace Airavata\Model\Commons;
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.2)
+ *
+ * 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 ErrorModel {
+ static $_TSPEC;
+
+ /**
+ * @var string
+ */
+ public $errorId = "DO_NOT_SET_AT_CLIENTS";
+ /**
+ * @var int
+ */
+ public $creationTime = null;
+ /**
+ * @var string
+ */
+ public $actualErrorMessage = null;
+ /**
+ * @var string
+ */
+ public $userFriendlyMessage = null;
+ /**
+ * @var bool
+ */
+ public $transientOrPersistent = false;
+ /**
+ * @var string[]
+ */
+ public $rootCauseErrorIdList = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'errorId',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'creationTime',
+ 'type' => TType::I64,
+ ),
+ 3 => array(
+ 'var' => 'actualErrorMessage',
+ 'type' => TType::STRING,
+ ),
+ 4 => array(
+ 'var' => 'userFriendlyMessage',
+ 'type' => TType::STRING,
+ ),
+ 5 => array(
+ 'var' => 'transientOrPersistent',
+ 'type' => TType::BOOL,
+ ),
+ 6 => array(
+ 'var' => 'rootCauseErrorIdList',
+ 'type' => TType::LST,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['errorId'])) {
+ $this->errorId = $vals['errorId'];
+ }
+ if (isset($vals['creationTime'])) {
+ $this->creationTime = $vals['creationTime'];
+ }
+ if (isset($vals['actualErrorMessage'])) {
+ $this->actualErrorMessage = $vals['actualErrorMessage'];
+ }
+ if (isset($vals['userFriendlyMessage'])) {
+ $this->userFriendlyMessage = $vals['userFriendlyMessage'];
+ }
+ if (isset($vals['transientOrPersistent'])) {
+ $this->transientOrPersistent = $vals['transientOrPersistent'];
+ }
+ if (isset($vals['rootCauseErrorIdList'])) {
+ $this->rootCauseErrorIdList = $vals['rootCauseErrorIdList'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ErrorModel';
+ }
+
+ 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->errorId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::I64) {
+ $xfer += $input->readI64($this->creationTime);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->actualErrorMessage);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->userFriendlyMessage);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->transientOrPersistent);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 6:
+ if ($ftype == TType::LST) {
+ $this->rootCauseErrorIdList = array();
+ $_size0 = 0;
+ $_etype3 = 0;
+ $xfer += $input->readListBegin($_etype3, $_size0);
+ for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
+ {
+ $elem5 = null;
+ $xfer += $input->readString($elem5);
+ $this->rootCauseErrorIdList []= $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('ErrorModel');
+ if ($this->errorId !== null) {
+ $xfer += $output->writeFieldBegin('errorId', TType::STRING, 1);
+ $xfer += $output->writeString($this->errorId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->creationTime !== null) {
+ $xfer += $output->writeFieldBegin('creationTime', TType::I64, 2);
+ $xfer += $output->writeI64($this->creationTime);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->actualErrorMessage !== null) {
+ $xfer += $output->writeFieldBegin('actualErrorMessage', TType::STRING, 3);
+ $xfer += $output->writeString($this->actualErrorMessage);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->userFriendlyMessage !== null) {
+ $xfer += $output->writeFieldBegin('userFriendlyMessage', TType::STRING, 4);
+ $xfer += $output->writeString($this->userFriendlyMessage);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->transientOrPersistent !== null) {
+ $xfer += $output->writeFieldBegin('transientOrPersistent', TType::BOOL, 5);
+ $xfer += $output->writeBool($this->transientOrPersistent);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->rootCauseErrorIdList !== null) {
+ if (!is_array($this->rootCauseErrorIdList)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('rootCauseErrorIdList', TType::LST, 6);
+ {
+ $output->writeListBegin(TType::STRING, count($this->rootCauseErrorIdList));
+ {
+ foreach ($this->rootCauseErrorIdList as $iter6)
+ {
+ $xfer += $output->writeString($iter6);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+/**
+ * This data structure can be used to store the validation results
+ * captured during validation step and during the launchExperiment
+ * operation it can be easilly checked to see the errors occured
+ * during the experiment launch operation
+ *
+ */
+class ValidatorResult {
+ static $_TSPEC;
+
+ /**
+ * @var bool
+ */
+ public $result = null;
+ /**
+ * @var string
+ */
+ public $errorDetails = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'result',
+ 'type' => TType::BOOL,
+ ),
+ 2 => array(
+ 'var' => 'errorDetails',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['result'])) {
+ $this->result = $vals['result'];
+ }
+ if (isset($vals['errorDetails'])) {
+ $this->errorDetails = $vals['errorDetails'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ValidatorResult';
+ }
+
+ 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::BOOL) {
+ $xfer += $input->readBool($this->result);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->errorDetails);
+ } 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('ValidatorResult');
+ if ($this->result !== null) {
+ $xfer += $output->writeFieldBegin('result', TType::BOOL, 1);
+ $xfer += $output->writeBool($this->result);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->errorDetails !== null) {
+ $xfer += $output->writeFieldBegin('errorDetails', TType::STRING, 2);
+ $xfer += $output->writeString($this->errorDetails);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class ValidationResults {
+ static $_TSPEC;
+
+ /**
+ * @var bool
+ */
+ public $validationState = null;
+ /**
+ * @var \Airavata\Model\Commons\ValidatorResult[]
+ */
+ public $validationResultList = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'validationState',
+ 'type' => TType::BOOL,
+ ),
+ 2 => array(
+ 'var' => 'validationResultList',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\Commons\ValidatorResult',
+ ),
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['validationState'])) {
+ $this->validationState = $vals['validationState'];
+ }
+ if (isset($vals['validationResultList'])) {
+ $this->validationResultList = $vals['validationResultList'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ValidationResults';
+ }
+
+ 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::BOOL) {
+ $xfer += $input->readBool($this->validationState);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::LST) {
+ $this->validationResultList = array();
+ $_size7 = 0;
+ $_etype10 = 0;
+ $xfer += $input->readListBegin($_etype10, $_size7);
+ for ($_i11 = 0; $_i11 < $_size7; ++$_i11)
+ {
+ $elem12 = null;
+ $elem12 = new \Airavata\Model\Commons\ValidatorResult();
+ $xfer += $elem12->read($input);
+ $this->validationResultList []= $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('ValidationResults');
+ if ($this->validationState !== null) {
+ $xfer += $output->writeFieldBegin('validationState', TType::BOOL, 1);
+ $xfer += $output->writeBool($this->validationState);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->validationResultList !== null) {
+ if (!is_array($this->validationResultList)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('validationResultList', TType::LST, 2);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->validationResultList));
+ {
+ foreach ($this->validationResultList as $iter13)
+ {
+ $xfer += $iter13->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+final class Constant extends \Thrift\Type\TConstant {
+ static protected $DEFAULT_ID;
+
+ static protected function init_DEFAULT_ID() {
+ return "DO_NOT_SET_AT_CLIENTS";
+ }
+}
+
+