Return-Path: X-Original-To: apmail-airavata-commits-archive@www.apache.org Delivered-To: apmail-airavata-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 76F1D116BC for ; Thu, 3 Jul 2014 14:15:10 +0000 (UTC) Received: (qmail 88516 invoked by uid 500); 3 Jul 2014 14:15:10 -0000 Delivered-To: apmail-airavata-commits-archive@airavata.apache.org Received: (qmail 88465 invoked by uid 500); 3 Jul 2014 14:15:10 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 88452 invoked by uid 99); 3 Jul 2014 14:15:10 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Jul 2014 14:15:10 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 05B53995BCD; Thu, 3 Jul 2014 14:15:10 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: smarru@apache.org To: commits@airavata.apache.org Date: Thu, 03 Jul 2014 14:15:09 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/3] Updating ComputeResource Namespace to align with application descrrptions - AIRAVATA-1203 Repository: airavata Updated Branches: refs/heads/master 169e6f9d1 -> 0a002531b http://git-wip-us.apache.org/repos/asf/airavata/blob/0a002531/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/ComputeHost/Types.php ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/ComputeHost/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/ComputeHost/Types.php deleted file mode 100644 index 8f347f2..0000000 --- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/ComputeHost/Types.php +++ /dev/null @@ -1,1262 +0,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 $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, - ), - 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['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 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->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; - } - -} - -$GLOBALS['computeResourceModel_CONSTANTS']['DEFAULT_ID'] = "DO_NOT_SET_AT_CLIENTS"; - -