You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2018/10/02 18:41:17 UTC
[airavata-php-gateway] 01/03: Regenerated Thrift stubs
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-php-gateway.git
commit 1953d2831f0fc06c0c83b61d6f69e092c2747ba2
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Tue Oct 2 13:16:04 2018 -0400
Regenerated Thrift stubs
---
app/libraries/Airavata/API/Airavata.php | 379 ++++
app/libraries/Airavata/Model/Workflow/Types.php | 2518 +++++++++++++++++++++++
2 files changed, 2897 insertions(+)
diff --git a/app/libraries/Airavata/API/Airavata.php b/app/libraries/Airavata/API/Airavata.php
index a22ef84..30fecc2 100644
--- a/app/libraries/Airavata/API/Airavata.php
+++ b/app/libraries/Airavata/API/Airavata.php
@@ -3451,6 +3451,19 @@ interface AiravataIf {
*/
public function doesUserHaveSSHAccount(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $userId);
/**
+ * Check if SSH account setup is complete for this user on the given compute resource.
+ *
+ * @param \Airavata\Model\Security\AuthzToken $authzToken
+ * @param string $computeResourceId
+ * @param string $airavataCredStoreToken
+ * @return bool
+ * @throws \Airavata\API\Error\InvalidRequestException
+ * @throws \Airavata\API\Error\AiravataClientException
+ * @throws \Airavata\API\Error\AiravataSystemException
+ * @throws \Airavata\API\Error\AuthorizationException
+ */
+ public function isSSHSetupCompleteForUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $airavataCredStoreToken);
+ /**
* Setup and return a UserComputeResourcePreference object for this user to SSH into the given compute resource with
* the given SSH credential. This method will only work if the compute resource has an SSHAccountProvisioner
* configured for it. The returned UserComputeResourcePreference object is not saved; it is up to the client to
@@ -12923,6 +12936,71 @@ class AiravataClient implements \Airavata\API\AiravataIf {
throw new \Exception("doesUserHaveSSHAccount failed: unknown result");
}
+ public function isSSHSetupCompleteForUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $airavataCredStoreToken)
+ {
+ $this->send_isSSHSetupCompleteForUserComputeResourcePreference($authzToken, $computeResourceId, $airavataCredStoreToken);
+ return $this->recv_isSSHSetupCompleteForUserComputeResourcePreference();
+ }
+
+ public function send_isSSHSetupCompleteForUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $airavataCredStoreToken)
+ {
+ $args = new \Airavata\API\Airavata_isSSHSetupCompleteForUserComputeResourcePreference_args();
+ $args->authzToken = $authzToken;
+ $args->computeResourceId = $computeResourceId;
+ $args->airavataCredStoreToken = $airavataCredStoreToken;
+ $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'isSSHSetupCompleteForUserComputeResourcePreference', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('isSSHSetupCompleteForUserComputeResourcePreference', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_isSSHSetupCompleteForUserComputeResourcePreference()
+ {
+ $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_isSSHSetupCompleteForUserComputeResourcePreference_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new \Airavata\API\Airavata_isSSHSetupCompleteForUserComputeResourcePreference_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->ire !== null) {
+ throw $result->ire;
+ }
+ if ($result->ace !== null) {
+ throw $result->ace;
+ }
+ if ($result->ase !== null) {
+ throw $result->ase;
+ }
+ if ($result->ae !== null) {
+ throw $result->ae;
+ }
+ throw new \Exception("isSSHSetupCompleteForUserComputeResourcePreference failed: unknown result");
+ }
+
public function setupUserComputeResourcePreferencesForSSH(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $userId, $airavataCredStoreToken)
{
$this->send_setupUserComputeResourcePreferencesForSSH($authzToken, $computeResourceId, $userId, $airavataCredStoreToken);
@@ -56622,6 +56700,307 @@ class Airavata_doesUserHaveSSHAccount_result {
}
+class Airavata_isSSHSetupCompleteForUserComputeResourcePreference_args {
+ static $_TSPEC;
+
+ /**
+ * @var \Airavata\Model\Security\AuthzToken
+ */
+ public $authzToken = null;
+ /**
+ * @var string
+ */
+ public $computeResourceId = null;
+ /**
+ * @var string
+ */
+ public $airavataCredStoreToken = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'authzToken',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\Security\AuthzToken',
+ ),
+ 2 => array(
+ 'var' => 'computeResourceId',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'airavataCredStoreToken',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['authzToken'])) {
+ $this->authzToken = $vals['authzToken'];
+ }
+ if (isset($vals['computeResourceId'])) {
+ $this->computeResourceId = $vals['computeResourceId'];
+ }
+ if (isset($vals['airavataCredStoreToken'])) {
+ $this->airavataCredStoreToken = $vals['airavataCredStoreToken'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'Airavata_isSSHSetupCompleteForUserComputeResourcePreference_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->authzToken = new \Airavata\Model\Security\AuthzToken();
+ $xfer += $this->authzToken->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->computeResourceId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->airavataCredStoreToken);
+ } 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('Airavata_isSSHSetupCompleteForUserComputeResourcePreference_args');
+ if ($this->authzToken !== null) {
+ if (!is_object($this->authzToken)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
+ $xfer += $this->authzToken->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->computeResourceId !== null) {
+ $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 2);
+ $xfer += $output->writeString($this->computeResourceId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->airavataCredStoreToken !== null) {
+ $xfer += $output->writeFieldBegin('airavataCredStoreToken', TType::STRING, 3);
+ $xfer += $output->writeString($this->airavataCredStoreToken);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class Airavata_isSSHSetupCompleteForUserComputeResourcePreference_result {
+ static $_TSPEC;
+
+ /**
+ * @var bool
+ */
+ public $success = null;
+ /**
+ * @var \Airavata\API\Error\InvalidRequestException
+ */
+ public $ire = null;
+ /**
+ * @var \Airavata\API\Error\AiravataClientException
+ */
+ public $ace = null;
+ /**
+ * @var \Airavata\API\Error\AiravataSystemException
+ */
+ public $ase = null;
+ /**
+ * @var \Airavata\API\Error\AuthorizationException
+ */
+ public $ae = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::BOOL,
+ ),
+ 1 => array(
+ 'var' => 'ire',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\InvalidRequestException',
+ ),
+ 2 => array(
+ 'var' => 'ace',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\AiravataClientException',
+ ),
+ 3 => array(
+ 'var' => 'ase',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\AiravataSystemException',
+ ),
+ 4 => array(
+ 'var' => 'ae',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\AuthorizationException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['ire'])) {
+ $this->ire = $vals['ire'];
+ }
+ if (isset($vals['ace'])) {
+ $this->ace = $vals['ace'];
+ }
+ if (isset($vals['ase'])) {
+ $this->ase = $vals['ase'];
+ }
+ if (isset($vals['ae'])) {
+ $this->ae = $vals['ae'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'Airavata_isSSHSetupCompleteForUserComputeResourcePreference_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->success);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->ire = new \Airavata\API\Error\InvalidRequestException();
+ $xfer += $this->ire->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->ace = new \Airavata\API\Error\AiravataClientException();
+ $xfer += $this->ace->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRUCT) {
+ $this->ase = new \Airavata\API\Error\AiravataSystemException();
+ $xfer += $this->ase->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::STRUCT) {
+ $this->ae = new \Airavata\API\Error\AuthorizationException();
+ $xfer += $this->ae->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('Airavata_isSSHSetupCompleteForUserComputeResourcePreference_result');
+ if ($this->success !== null) {
+ $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+ $xfer += $output->writeBool($this->success);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ire !== null) {
+ $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+ $xfer += $this->ire->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ace !== null) {
+ $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
+ $xfer += $this->ace->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ase !== null) {
+ $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
+ $xfer += $this->ase->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ae !== null) {
+ $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 4);
+ $xfer += $this->ae->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
class Airavata_setupUserComputeResourcePreferencesForSSH_args {
static $_TSPEC;
diff --git a/app/libraries/Airavata/Model/Workflow/Types.php b/app/libraries/Airavata/Model/Workflow/Types.php
new file mode 100644
index 0000000..e9cc2c4
--- /dev/null
+++ b/app/libraries/Airavata/Model/Workflow/Types.php
@@ -0,0 +1,2518 @@
+<?php
+namespace Airavata\Model\Workflow;
+
+/**
+ * Autogenerated by Thrift Compiler (0.10.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+use Thrift\Base\TBase;
+use Thrift\Type\TType;
+use Thrift\Type\TMessageType;
+use Thrift\Exception\TException;
+use Thrift\Exception\TProtocolException;
+use Thrift\Protocol\TProtocol;
+use Thrift\Protocol\TBinaryProtocolAccelerated;
+use Thrift\Exception\TApplicationException;
+
+
+final class WorkflowState {
+ const CREATED = 0;
+ const VALIDATED = 1;
+ const SCHEDULED = 2;
+ const LAUNCHED = 3;
+ const EXECUTING = 4;
+ const PAUSING = 5;
+ const PAUSED = 6;
+ const RESTARTING = 7;
+ const CANCELING = 8;
+ const CANCELED = 9;
+ const COMPLETED = 10;
+ const FAILED = 11;
+ static public $__names = array(
+ 0 => 'CREATED',
+ 1 => 'VALIDATED',
+ 2 => 'SCHEDULED',
+ 3 => 'LAUNCHED',
+ 4 => 'EXECUTING',
+ 5 => 'PAUSING',
+ 6 => 'PAUSED',
+ 7 => 'RESTARTING',
+ 8 => 'CANCELING',
+ 9 => 'CANCELED',
+ 10 => 'COMPLETED',
+ 11 => 'FAILED',
+ );
+}
+
+final class ApplicationState {
+ const CREATED = 0;
+ const VALIDATED = 1;
+ const SCHEDULED = 2;
+ const LAUNCHED = 3;
+ const EXECUTING = 4;
+ const CANCELING = 5;
+ const CANCELED = 6;
+ const COMPLETED = 7;
+ const FAILED = 8;
+ static public $__names = array(
+ 0 => 'CREATED',
+ 1 => 'VALIDATED',
+ 2 => 'SCHEDULED',
+ 3 => 'LAUNCHED',
+ 4 => 'EXECUTING',
+ 5 => 'CANCELING',
+ 6 => 'CANCELED',
+ 7 => 'COMPLETED',
+ 8 => 'FAILED',
+ );
+}
+
+final class HandlerType {
+ const FLOW_STARTER = 0;
+ const FLOW_TERMINATOR = 1;
+ const DOWHILE_LOOP = 2;
+ const FOREACH_LOOP = 3;
+ static public $__names = array(
+ 0 => 'FLOW_STARTER',
+ 1 => 'FLOW_TERMINATOR',
+ 2 => 'DOWHILE_LOOP',
+ 3 => 'FOREACH_LOOP',
+ );
+}
+
+final class HandlerState {
+ const CREATED = 0;
+ const VALIDATED = 1;
+ const SCHEDULED = 2;
+ const LAUNCHED = 3;
+ const EXECUTING = 4;
+ const CANCELING = 5;
+ const CANCELED = 6;
+ const COMPLETED = 7;
+ const FAILED = 8;
+ static public $__names = array(
+ 0 => 'CREATED',
+ 1 => 'VALIDATED',
+ 2 => 'SCHEDULED',
+ 3 => 'LAUNCHED',
+ 4 => 'EXECUTING',
+ 5 => 'CANCELING',
+ 6 => 'CANCELED',
+ 7 => 'COMPLETED',
+ 8 => 'FAILED',
+ );
+}
+
+final class ComponentType {
+ const APPLICATION = 0;
+ const HANDLER = 1;
+ static public $__names = array(
+ 0 => 'APPLICATION',
+ 1 => 'HANDLER',
+ );
+}
+
+class WorkflowStatus {
+ static $_TSPEC;
+
+ /**
+ * @var string
+ */
+ public $id = null;
+ /**
+ * @var int
+ */
+ public $state = null;
+ /**
+ * @var string
+ */
+ public $description = null;
+ /**
+ * @var int
+ */
+ public $updatedAt = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'id',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'state',
+ 'type' => TType::I32,
+ ),
+ 3 => array(
+ 'var' => 'description',
+ 'type' => TType::STRING,
+ ),
+ 4 => array(
+ 'var' => 'updatedAt',
+ 'type' => TType::I64,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['id'])) {
+ $this->id = $vals['id'];
+ }
+ if (isset($vals['state'])) {
+ $this->state = $vals['state'];
+ }
+ if (isset($vals['description'])) {
+ $this->description = $vals['description'];
+ }
+ if (isset($vals['updatedAt'])) {
+ $this->updatedAt = $vals['updatedAt'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'WorkflowStatus';
+ }
+
+ 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->id);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->state);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->description);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::I64) {
+ $xfer += $input->readI64($this->updatedAt);
+ } 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('WorkflowStatus');
+ if ($this->id !== null) {
+ $xfer += $output->writeFieldBegin('id', TType::STRING, 1);
+ $xfer += $output->writeString($this->id);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->state !== null) {
+ $xfer += $output->writeFieldBegin('state', TType::I32, 2);
+ $xfer += $output->writeI32($this->state);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->description !== null) {
+ $xfer += $output->writeFieldBegin('description', TType::STRING, 3);
+ $xfer += $output->writeString($this->description);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->updatedAt !== null) {
+ $xfer += $output->writeFieldBegin('updatedAt', TType::I64, 4);
+ $xfer += $output->writeI64($this->updatedAt);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class NotificationEmail {
+ static $_TSPEC;
+
+ /**
+ * @var string
+ */
+ public $email = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'email',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['email'])) {
+ $this->email = $vals['email'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'NotificationEmail';
+ }
+
+ 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->email);
+ } 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('NotificationEmail');
+ if ($this->email !== null) {
+ $xfer += $output->writeFieldBegin('email', TType::STRING, 1);
+ $xfer += $output->writeString($this->email);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class ApplicationStatus {
+ static $_TSPEC;
+
+ /**
+ * @var string
+ */
+ public $id = null;
+ /**
+ * @var int
+ */
+ public $state = null;
+ /**
+ * @var string
+ */
+ public $description = null;
+ /**
+ * @var int
+ */
+ public $updatedAt = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'id',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'state',
+ 'type' => TType::I32,
+ ),
+ 3 => array(
+ 'var' => 'description',
+ 'type' => TType::STRING,
+ ),
+ 4 => array(
+ 'var' => 'updatedAt',
+ 'type' => TType::I64,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['id'])) {
+ $this->id = $vals['id'];
+ }
+ if (isset($vals['state'])) {
+ $this->state = $vals['state'];
+ }
+ if (isset($vals['description'])) {
+ $this->description = $vals['description'];
+ }
+ if (isset($vals['updatedAt'])) {
+ $this->updatedAt = $vals['updatedAt'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ApplicationStatus';
+ }
+
+ 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->id);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->state);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->description);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::I64) {
+ $xfer += $input->readI64($this->updatedAt);
+ } 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('ApplicationStatus');
+ if ($this->id !== null) {
+ $xfer += $output->writeFieldBegin('id', TType::STRING, 1);
+ $xfer += $output->writeString($this->id);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->state !== null) {
+ $xfer += $output->writeFieldBegin('state', TType::I32, 2);
+ $xfer += $output->writeI32($this->state);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->description !== null) {
+ $xfer += $output->writeFieldBegin('description', TType::STRING, 3);
+ $xfer += $output->writeString($this->description);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->updatedAt !== null) {
+ $xfer += $output->writeFieldBegin('updatedAt', TType::I64, 4);
+ $xfer += $output->writeI64($this->updatedAt);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class WorkflowApplication {
+ static $_TSPEC;
+
+ /**
+ * @var string
+ */
+ public $id = null;
+ /**
+ * @var bool
+ */
+ public $belongsToMainWorkflow = null;
+ /**
+ * @var string
+ */
+ public $applicationInterfaceId = null;
+ /**
+ * @var string
+ */
+ public $computeResourceId = null;
+ /**
+ * @var string
+ */
+ public $queueName = null;
+ /**
+ * @var int
+ */
+ public $nodeCount = null;
+ /**
+ * @var int
+ */
+ public $coreCount = null;
+ /**
+ * @var int
+ */
+ public $wallTimeLimit = null;
+ /**
+ * @var int
+ */
+ public $physicalMemory = null;
+ /**
+ * @var \Airavata\Model\Workflow\ApplicationStatus[]
+ */
+ public $statuses = null;
+ /**
+ * @var \Airavata\Model\Commons\ErrorModel[]
+ */
+ public $errors = null;
+ /**
+ * @var int
+ */
+ public $createdAt = null;
+ /**
+ * @var int
+ */
+ public $updatedAt = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'id',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'belongsToMainWorkflow',
+ 'type' => TType::BOOL,
+ ),
+ 3 => array(
+ 'var' => 'applicationInterfaceId',
+ 'type' => TType::STRING,
+ ),
+ 4 => array(
+ 'var' => 'computeResourceId',
+ 'type' => TType::STRING,
+ ),
+ 5 => array(
+ 'var' => 'queueName',
+ 'type' => TType::STRING,
+ ),
+ 6 => array(
+ 'var' => 'nodeCount',
+ 'type' => TType::I32,
+ ),
+ 7 => array(
+ 'var' => 'coreCount',
+ 'type' => TType::I32,
+ ),
+ 8 => array(
+ 'var' => 'wallTimeLimit',
+ 'type' => TType::I32,
+ ),
+ 9 => array(
+ 'var' => 'physicalMemory',
+ 'type' => TType::I32,
+ ),
+ 10 => array(
+ 'var' => 'statuses',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\Workflow\ApplicationStatus',
+ ),
+ ),
+ 11 => array(
+ 'var' => 'errors',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\Commons\ErrorModel',
+ ),
+ ),
+ 12 => array(
+ 'var' => 'createdAt',
+ 'type' => TType::I64,
+ ),
+ 13 => array(
+ 'var' => 'updatedAt',
+ 'type' => TType::I64,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['id'])) {
+ $this->id = $vals['id'];
+ }
+ if (isset($vals['belongsToMainWorkflow'])) {
+ $this->belongsToMainWorkflow = $vals['belongsToMainWorkflow'];
+ }
+ if (isset($vals['applicationInterfaceId'])) {
+ $this->applicationInterfaceId = $vals['applicationInterfaceId'];
+ }
+ if (isset($vals['computeResourceId'])) {
+ $this->computeResourceId = $vals['computeResourceId'];
+ }
+ if (isset($vals['queueName'])) {
+ $this->queueName = $vals['queueName'];
+ }
+ if (isset($vals['nodeCount'])) {
+ $this->nodeCount = $vals['nodeCount'];
+ }
+ if (isset($vals['coreCount'])) {
+ $this->coreCount = $vals['coreCount'];
+ }
+ if (isset($vals['wallTimeLimit'])) {
+ $this->wallTimeLimit = $vals['wallTimeLimit'];
+ }
+ if (isset($vals['physicalMemory'])) {
+ $this->physicalMemory = $vals['physicalMemory'];
+ }
+ if (isset($vals['statuses'])) {
+ $this->statuses = $vals['statuses'];
+ }
+ if (isset($vals['errors'])) {
+ $this->errors = $vals['errors'];
+ }
+ if (isset($vals['createdAt'])) {
+ $this->createdAt = $vals['createdAt'];
+ }
+ if (isset($vals['updatedAt'])) {
+ $this->updatedAt = $vals['updatedAt'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'WorkflowApplication';
+ }
+
+ 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->id);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->belongsToMainWorkflow);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->applicationInterfaceId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->computeResourceId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->queueName);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 6:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->nodeCount);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 7:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->coreCount);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 8:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->wallTimeLimit);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 9:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->physicalMemory);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 10:
+ if ($ftype == TType::LST) {
+ $this->statuses = array();
+ $_size0 = 0;
+ $_etype3 = 0;
+ $xfer += $input->readListBegin($_etype3, $_size0);
+ for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
+ {
+ $elem5 = null;
+ $elem5 = new \Airavata\Model\Workflow\ApplicationStatus();
+ $xfer += $elem5->read($input);
+ $this->statuses []= $elem5;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 11:
+ if ($ftype == TType::LST) {
+ $this->errors = array();
+ $_size6 = 0;
+ $_etype9 = 0;
+ $xfer += $input->readListBegin($_etype9, $_size6);
+ for ($_i10 = 0; $_i10 < $_size6; ++$_i10)
+ {
+ $elem11 = null;
+ $elem11 = new \Airavata\Model\Commons\ErrorModel();
+ $xfer += $elem11->read($input);
+ $this->errors []= $elem11;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 12:
+ if ($ftype == TType::I64) {
+ $xfer += $input->readI64($this->createdAt);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 13:
+ if ($ftype == TType::I64) {
+ $xfer += $input->readI64($this->updatedAt);
+ } 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('WorkflowApplication');
+ if ($this->id !== null) {
+ $xfer += $output->writeFieldBegin('id', TType::STRING, 1);
+ $xfer += $output->writeString($this->id);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->belongsToMainWorkflow !== null) {
+ $xfer += $output->writeFieldBegin('belongsToMainWorkflow', TType::BOOL, 2);
+ $xfer += $output->writeBool($this->belongsToMainWorkflow);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->applicationInterfaceId !== null) {
+ $xfer += $output->writeFieldBegin('applicationInterfaceId', TType::STRING, 3);
+ $xfer += $output->writeString($this->applicationInterfaceId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->computeResourceId !== null) {
+ $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 4);
+ $xfer += $output->writeString($this->computeResourceId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->queueName !== null) {
+ $xfer += $output->writeFieldBegin('queueName', TType::STRING, 5);
+ $xfer += $output->writeString($this->queueName);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->nodeCount !== null) {
+ $xfer += $output->writeFieldBegin('nodeCount', TType::I32, 6);
+ $xfer += $output->writeI32($this->nodeCount);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->coreCount !== null) {
+ $xfer += $output->writeFieldBegin('coreCount', TType::I32, 7);
+ $xfer += $output->writeI32($this->coreCount);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->wallTimeLimit !== null) {
+ $xfer += $output->writeFieldBegin('wallTimeLimit', TType::I32, 8);
+ $xfer += $output->writeI32($this->wallTimeLimit);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->physicalMemory !== null) {
+ $xfer += $output->writeFieldBegin('physicalMemory', TType::I32, 9);
+ $xfer += $output->writeI32($this->physicalMemory);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->statuses !== null) {
+ if (!is_array($this->statuses)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('statuses', TType::LST, 10);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->statuses));
+ {
+ foreach ($this->statuses as $iter12)
+ {
+ $xfer += $iter12->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->errors !== null) {
+ if (!is_array($this->errors)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('errors', TType::LST, 11);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->errors));
+ {
+ foreach ($this->errors as $iter13)
+ {
+ $xfer += $iter13->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->createdAt !== null) {
+ $xfer += $output->writeFieldBegin('createdAt', TType::I64, 12);
+ $xfer += $output->writeI64($this->createdAt);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->updatedAt !== null) {
+ $xfer += $output->writeFieldBegin('updatedAt', TType::I64, 13);
+ $xfer += $output->writeI64($this->updatedAt);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class WorkflowConnection {
+ static $_TSPEC;
+
+ /**
+ * @var string
+ */
+ public $id = "DO_NOT_SET_AT_CLIENTS";
+ /**
+ * @var bool
+ */
+ public $belongsToMainWorkflow = null;
+ /**
+ * @var int
+ */
+ public $fromType = null;
+ /**
+ * @var string
+ */
+ public $fromId = null;
+ /**
+ * @var string
+ */
+ public $fromOutputName = null;
+ /**
+ * @var int
+ */
+ public $toType = null;
+ /**
+ * @var string
+ */
+ public $toId = null;
+ /**
+ * @var string
+ */
+ public $toInputName = null;
+ /**
+ * @var int
+ */
+ public $createdAt = null;
+ /**
+ * @var int
+ */
+ public $updatedAt = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'id',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'belongsToMainWorkflow',
+ 'type' => TType::BOOL,
+ ),
+ 3 => array(
+ 'var' => 'fromType',
+ 'type' => TType::I32,
+ ),
+ 4 => array(
+ 'var' => 'fromId',
+ 'type' => TType::STRING,
+ ),
+ 5 => array(
+ 'var' => 'fromOutputName',
+ 'type' => TType::STRING,
+ ),
+ 6 => array(
+ 'var' => 'toType',
+ 'type' => TType::I32,
+ ),
+ 7 => array(
+ 'var' => 'toId',
+ 'type' => TType::STRING,
+ ),
+ 8 => array(
+ 'var' => 'toInputName',
+ 'type' => TType::STRING,
+ ),
+ 9 => array(
+ 'var' => 'createdAt',
+ 'type' => TType::I64,
+ ),
+ 10 => array(
+ 'var' => 'updatedAt',
+ 'type' => TType::I64,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['id'])) {
+ $this->id = $vals['id'];
+ }
+ if (isset($vals['belongsToMainWorkflow'])) {
+ $this->belongsToMainWorkflow = $vals['belongsToMainWorkflow'];
+ }
+ if (isset($vals['fromType'])) {
+ $this->fromType = $vals['fromType'];
+ }
+ if (isset($vals['fromId'])) {
+ $this->fromId = $vals['fromId'];
+ }
+ if (isset($vals['fromOutputName'])) {
+ $this->fromOutputName = $vals['fromOutputName'];
+ }
+ if (isset($vals['toType'])) {
+ $this->toType = $vals['toType'];
+ }
+ if (isset($vals['toId'])) {
+ $this->toId = $vals['toId'];
+ }
+ if (isset($vals['toInputName'])) {
+ $this->toInputName = $vals['toInputName'];
+ }
+ if (isset($vals['createdAt'])) {
+ $this->createdAt = $vals['createdAt'];
+ }
+ if (isset($vals['updatedAt'])) {
+ $this->updatedAt = $vals['updatedAt'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'WorkflowConnection';
+ }
+
+ 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->id);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->belongsToMainWorkflow);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->fromType);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->fromId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->fromOutputName);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 6:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->toType);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 7:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->toId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 8:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->toInputName);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 9:
+ if ($ftype == TType::I64) {
+ $xfer += $input->readI64($this->createdAt);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 10:
+ if ($ftype == TType::I64) {
+ $xfer += $input->readI64($this->updatedAt);
+ } 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('WorkflowConnection');
+ if ($this->id !== null) {
+ $xfer += $output->writeFieldBegin('id', TType::STRING, 1);
+ $xfer += $output->writeString($this->id);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->belongsToMainWorkflow !== null) {
+ $xfer += $output->writeFieldBegin('belongsToMainWorkflow', TType::BOOL, 2);
+ $xfer += $output->writeBool($this->belongsToMainWorkflow);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->fromType !== null) {
+ $xfer += $output->writeFieldBegin('fromType', TType::I32, 3);
+ $xfer += $output->writeI32($this->fromType);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->fromId !== null) {
+ $xfer += $output->writeFieldBegin('fromId', TType::STRING, 4);
+ $xfer += $output->writeString($this->fromId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->fromOutputName !== null) {
+ $xfer += $output->writeFieldBegin('fromOutputName', TType::STRING, 5);
+ $xfer += $output->writeString($this->fromOutputName);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->toType !== null) {
+ $xfer += $output->writeFieldBegin('toType', TType::I32, 6);
+ $xfer += $output->writeI32($this->toType);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->toId !== null) {
+ $xfer += $output->writeFieldBegin('toId', TType::STRING, 7);
+ $xfer += $output->writeString($this->toId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->toInputName !== null) {
+ $xfer += $output->writeFieldBegin('toInputName', TType::STRING, 8);
+ $xfer += $output->writeString($this->toInputName);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->createdAt !== null) {
+ $xfer += $output->writeFieldBegin('createdAt', TType::I64, 9);
+ $xfer += $output->writeI64($this->createdAt);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->updatedAt !== null) {
+ $xfer += $output->writeFieldBegin('updatedAt', TType::I64, 10);
+ $xfer += $output->writeI64($this->updatedAt);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class HandlerStatus {
+ static $_TSPEC;
+
+ /**
+ * @var string
+ */
+ public $id = null;
+ /**
+ * @var int
+ */
+ public $state = null;
+ /**
+ * @var string
+ */
+ public $description = null;
+ /**
+ * @var int
+ */
+ public $updatedAt = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'id',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'state',
+ 'type' => TType::I32,
+ ),
+ 3 => array(
+ 'var' => 'description',
+ 'type' => TType::STRING,
+ ),
+ 4 => array(
+ 'var' => 'updatedAt',
+ 'type' => TType::I64,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['id'])) {
+ $this->id = $vals['id'];
+ }
+ if (isset($vals['state'])) {
+ $this->state = $vals['state'];
+ }
+ if (isset($vals['description'])) {
+ $this->description = $vals['description'];
+ }
+ if (isset($vals['updatedAt'])) {
+ $this->updatedAt = $vals['updatedAt'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'HandlerStatus';
+ }
+
+ 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->id);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->state);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->description);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::I64) {
+ $xfer += $input->readI64($this->updatedAt);
+ } 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('HandlerStatus');
+ if ($this->id !== null) {
+ $xfer += $output->writeFieldBegin('id', TType::STRING, 1);
+ $xfer += $output->writeString($this->id);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->state !== null) {
+ $xfer += $output->writeFieldBegin('state', TType::I32, 2);
+ $xfer += $output->writeI32($this->state);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->description !== null) {
+ $xfer += $output->writeFieldBegin('description', TType::STRING, 3);
+ $xfer += $output->writeString($this->description);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->updatedAt !== null) {
+ $xfer += $output->writeFieldBegin('updatedAt', TType::I64, 4);
+ $xfer += $output->writeI64($this->updatedAt);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class DataBlock {
+ static $_TSPEC;
+
+ /**
+ * @var string
+ */
+ public $id = null;
+ /**
+ * @var string
+ */
+ public $value = null;
+ /**
+ * @var int
+ */
+ public $type = null;
+ /**
+ * @var int
+ */
+ public $createdAt = null;
+ /**
+ * @var int
+ */
+ public $updatedAt = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'id',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'value',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'type',
+ 'type' => TType::I32,
+ ),
+ 4 => array(
+ 'var' => 'createdAt',
+ 'type' => TType::I64,
+ ),
+ 5 => array(
+ 'var' => 'updatedAt',
+ 'type' => TType::I64,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['id'])) {
+ $this->id = $vals['id'];
+ }
+ if (isset($vals['value'])) {
+ $this->value = $vals['value'];
+ }
+ if (isset($vals['type'])) {
+ $this->type = $vals['type'];
+ }
+ if (isset($vals['createdAt'])) {
+ $this->createdAt = $vals['createdAt'];
+ }
+ if (isset($vals['updatedAt'])) {
+ $this->updatedAt = $vals['updatedAt'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'DataBlock';
+ }
+
+ 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->id);
+ } 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::I64) {
+ $xfer += $input->readI64($this->createdAt);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
+ if ($ftype == TType::I64) {
+ $xfer += $input->readI64($this->updatedAt);
+ } 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('DataBlock');
+ if ($this->id !== null) {
+ $xfer += $output->writeFieldBegin('id', TType::STRING, 1);
+ $xfer += $output->writeString($this->id);
+ $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->createdAt !== null) {
+ $xfer += $output->writeFieldBegin('createdAt', TType::I64, 4);
+ $xfer += $output->writeI64($this->createdAt);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->updatedAt !== null) {
+ $xfer += $output->writeFieldBegin('updatedAt', TType::I64, 5);
+ $xfer += $output->writeI64($this->updatedAt);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class WorkflowHandler {
+ static $_TSPEC;
+
+ /**
+ * @var string
+ */
+ public $id = null;
+ /**
+ * @var bool
+ */
+ public $belongsToMainWorkflow = null;
+ /**
+ * @var int
+ */
+ public $type = null;
+ /**
+ * @var \Airavata\Model\Application\Io\InputDataObjectType[]
+ */
+ public $inputs = null;
+ /**
+ * @var \Airavata\Model\Application\Io\OutputDataObjectType[]
+ */
+ public $outputs = null;
+ /**
+ * @var \Airavata\Model\Workflow\WorkflowApplication[]
+ */
+ public $applications = null;
+ /**
+ * @var \Airavata\Model\Workflow\WorkflowConnection[]
+ */
+ public $connections = null;
+ /**
+ * @var \Airavata\Model\Workflow\HandlerStatus[]
+ */
+ public $statuses = null;
+ /**
+ * @var \Airavata\Model\Commons\ErrorModel[]
+ */
+ public $errors = null;
+ /**
+ * @var int
+ */
+ public $createdAt = null;
+ /**
+ * @var int
+ */
+ public $updatedAt = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'id',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'belongsToMainWorkflow',
+ 'type' => TType::BOOL,
+ ),
+ 3 => array(
+ 'var' => 'type',
+ 'type' => TType::I32,
+ ),
+ 4 => array(
+ 'var' => 'inputs',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\Application\Io\InputDataObjectType',
+ ),
+ ),
+ 5 => array(
+ 'var' => 'outputs',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\Application\Io\OutputDataObjectType',
+ ),
+ ),
+ 6 => array(
+ 'var' => 'applications',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\Workflow\WorkflowApplication',
+ ),
+ ),
+ 7 => array(
+ 'var' => 'connections',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\Workflow\WorkflowConnection',
+ ),
+ ),
+ 8 => array(
+ 'var' => 'statuses',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\Workflow\HandlerStatus',
+ ),
+ ),
+ 9 => array(
+ 'var' => 'errors',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\Commons\ErrorModel',
+ ),
+ ),
+ 10 => array(
+ 'var' => 'createdAt',
+ 'type' => TType::I64,
+ ),
+ 11 => array(
+ 'var' => 'updatedAt',
+ 'type' => TType::I64,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['id'])) {
+ $this->id = $vals['id'];
+ }
+ if (isset($vals['belongsToMainWorkflow'])) {
+ $this->belongsToMainWorkflow = $vals['belongsToMainWorkflow'];
+ }
+ if (isset($vals['type'])) {
+ $this->type = $vals['type'];
+ }
+ if (isset($vals['inputs'])) {
+ $this->inputs = $vals['inputs'];
+ }
+ if (isset($vals['outputs'])) {
+ $this->outputs = $vals['outputs'];
+ }
+ if (isset($vals['applications'])) {
+ $this->applications = $vals['applications'];
+ }
+ if (isset($vals['connections'])) {
+ $this->connections = $vals['connections'];
+ }
+ if (isset($vals['statuses'])) {
+ $this->statuses = $vals['statuses'];
+ }
+ if (isset($vals['errors'])) {
+ $this->errors = $vals['errors'];
+ }
+ if (isset($vals['createdAt'])) {
+ $this->createdAt = $vals['createdAt'];
+ }
+ if (isset($vals['updatedAt'])) {
+ $this->updatedAt = $vals['updatedAt'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'WorkflowHandler';
+ }
+
+ 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->id);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->belongsToMainWorkflow);
+ } 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::LST) {
+ $this->inputs = array();
+ $_size14 = 0;
+ $_etype17 = 0;
+ $xfer += $input->readListBegin($_etype17, $_size14);
+ for ($_i18 = 0; $_i18 < $_size14; ++$_i18)
+ {
+ $elem19 = null;
+ $elem19 = new \Airavata\Model\Application\Io\InputDataObjectType();
+ $xfer += $elem19->read($input);
+ $this->inputs []= $elem19;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
+ if ($ftype == TType::LST) {
+ $this->outputs = array();
+ $_size20 = 0;
+ $_etype23 = 0;
+ $xfer += $input->readListBegin($_etype23, $_size20);
+ for ($_i24 = 0; $_i24 < $_size20; ++$_i24)
+ {
+ $elem25 = null;
+ $elem25 = new \Airavata\Model\Application\Io\OutputDataObjectType();
+ $xfer += $elem25->read($input);
+ $this->outputs []= $elem25;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 6:
+ if ($ftype == TType::LST) {
+ $this->applications = array();
+ $_size26 = 0;
+ $_etype29 = 0;
+ $xfer += $input->readListBegin($_etype29, $_size26);
+ for ($_i30 = 0; $_i30 < $_size26; ++$_i30)
+ {
+ $elem31 = null;
+ $elem31 = new \Airavata\Model\Workflow\WorkflowApplication();
+ $xfer += $elem31->read($input);
+ $this->applications []= $elem31;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 7:
+ if ($ftype == TType::LST) {
+ $this->connections = array();
+ $_size32 = 0;
+ $_etype35 = 0;
+ $xfer += $input->readListBegin($_etype35, $_size32);
+ for ($_i36 = 0; $_i36 < $_size32; ++$_i36)
+ {
+ $elem37 = null;
+ $elem37 = new \Airavata\Model\Workflow\WorkflowConnection();
+ $xfer += $elem37->read($input);
+ $this->connections []= $elem37;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 8:
+ if ($ftype == TType::LST) {
+ $this->statuses = array();
+ $_size38 = 0;
+ $_etype41 = 0;
+ $xfer += $input->readListBegin($_etype41, $_size38);
+ for ($_i42 = 0; $_i42 < $_size38; ++$_i42)
+ {
+ $elem43 = null;
+ $elem43 = new \Airavata\Model\Workflow\HandlerStatus();
+ $xfer += $elem43->read($input);
+ $this->statuses []= $elem43;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 9:
+ if ($ftype == TType::LST) {
+ $this->errors = array();
+ $_size44 = 0;
+ $_etype47 = 0;
+ $xfer += $input->readListBegin($_etype47, $_size44);
+ for ($_i48 = 0; $_i48 < $_size44; ++$_i48)
+ {
+ $elem49 = null;
+ $elem49 = new \Airavata\Model\Commons\ErrorModel();
+ $xfer += $elem49->read($input);
+ $this->errors []= $elem49;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 10:
+ if ($ftype == TType::I64) {
+ $xfer += $input->readI64($this->createdAt);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 11:
+ if ($ftype == TType::I64) {
+ $xfer += $input->readI64($this->updatedAt);
+ } 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('WorkflowHandler');
+ if ($this->id !== null) {
+ $xfer += $output->writeFieldBegin('id', TType::STRING, 1);
+ $xfer += $output->writeString($this->id);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->belongsToMainWorkflow !== null) {
+ $xfer += $output->writeFieldBegin('belongsToMainWorkflow', TType::BOOL, 2);
+ $xfer += $output->writeBool($this->belongsToMainWorkflow);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->type !== null) {
+ $xfer += $output->writeFieldBegin('type', TType::I32, 3);
+ $xfer += $output->writeI32($this->type);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->inputs !== null) {
+ if (!is_array($this->inputs)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('inputs', TType::LST, 4);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->inputs));
+ {
+ foreach ($this->inputs as $iter50)
+ {
+ $xfer += $iter50->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->outputs !== null) {
+ if (!is_array($this->outputs)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('outputs', TType::LST, 5);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->outputs));
+ {
+ foreach ($this->outputs as $iter51)
+ {
+ $xfer += $iter51->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->applications !== null) {
+ if (!is_array($this->applications)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('applications', TType::LST, 6);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->applications));
+ {
+ foreach ($this->applications as $iter52)
+ {
+ $xfer += $iter52->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->connections !== null) {
+ if (!is_array($this->connections)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('connections', TType::LST, 7);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->connections));
+ {
+ foreach ($this->connections as $iter53)
+ {
+ $xfer += $iter53->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->statuses !== null) {
+ if (!is_array($this->statuses)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('statuses', TType::LST, 8);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->statuses));
+ {
+ foreach ($this->statuses as $iter54)
+ {
+ $xfer += $iter54->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->errors !== null) {
+ if (!is_array($this->errors)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('errors', TType::LST, 9);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->errors));
+ {
+ foreach ($this->errors as $iter55)
+ {
+ $xfer += $iter55->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->createdAt !== null) {
+ $xfer += $output->writeFieldBegin('createdAt', TType::I64, 10);
+ $xfer += $output->writeI64($this->createdAt);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->updatedAt !== null) {
+ $xfer += $output->writeFieldBegin('updatedAt', TType::I64, 11);
+ $xfer += $output->writeI64($this->updatedAt);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class AiravataWorkflow {
+ static $_TSPEC;
+
+ /**
+ * @var string
+ */
+ public $id = "DO_NOT_SET_AT_CLIENTS";
+ /**
+ * @var string
+ */
+ public $name = null;
+ /**
+ * @var string
+ */
+ public $gatewayId = null;
+ /**
+ * @var string
+ */
+ public $userName = null;
+ /**
+ * @var string
+ */
+ public $storageResourceId = null;
+ /**
+ * @var string
+ */
+ public $description = null;
+ /**
+ * @var bool
+ */
+ public $enableEmailNotification = null;
+ /**
+ * @var \Airavata\Model\Workflow\NotificationEmail[]
+ */
+ public $notificationEmails = null;
+ /**
+ * @var \Airavata\Model\Workflow\WorkflowApplication[]
+ */
+ public $applications = null;
+ /**
+ * @var \Airavata\Model\Workflow\WorkflowHandler[]
+ */
+ public $handlers = null;
+ /**
+ * @var \Airavata\Model\Workflow\WorkflowConnection[]
+ */
+ public $connections = null;
+ /**
+ * @var \Airavata\Model\Workflow\WorkflowStatus[]
+ */
+ public $statuses = null;
+ /**
+ * @var \Airavata\Model\Commons\ErrorModel[]
+ */
+ public $errors = null;
+ /**
+ * @var int
+ */
+ public $createdAt = null;
+ /**
+ * @var int
+ */
+ public $updatedAt = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'id',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'name',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'gatewayId',
+ 'type' => TType::STRING,
+ ),
+ 4 => array(
+ 'var' => 'userName',
+ 'type' => TType::STRING,
+ ),
+ 5 => array(
+ 'var' => 'storageResourceId',
+ 'type' => TType::STRING,
+ ),
+ 6 => array(
+ 'var' => 'description',
+ 'type' => TType::STRING,
+ ),
+ 7 => array(
+ 'var' => 'enableEmailNotification',
+ 'type' => TType::BOOL,
+ ),
+ 8 => array(
+ 'var' => 'notificationEmails',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\Workflow\NotificationEmail',
+ ),
+ ),
+ 9 => array(
+ 'var' => 'applications',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\Workflow\WorkflowApplication',
+ ),
+ ),
+ 10 => array(
+ 'var' => 'handlers',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\Workflow\WorkflowHandler',
+ ),
+ ),
+ 11 => array(
+ 'var' => 'connections',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\Workflow\WorkflowConnection',
+ ),
+ ),
+ 12 => array(
+ 'var' => 'statuses',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\Workflow\WorkflowStatus',
+ ),
+ ),
+ 13 => array(
+ 'var' => 'errors',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\Commons\ErrorModel',
+ ),
+ ),
+ 14 => array(
+ 'var' => 'createdAt',
+ 'type' => TType::I64,
+ ),
+ 15 => array(
+ 'var' => 'updatedAt',
+ 'type' => TType::I64,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['id'])) {
+ $this->id = $vals['id'];
+ }
+ if (isset($vals['name'])) {
+ $this->name = $vals['name'];
+ }
+ if (isset($vals['gatewayId'])) {
+ $this->gatewayId = $vals['gatewayId'];
+ }
+ if (isset($vals['userName'])) {
+ $this->userName = $vals['userName'];
+ }
+ if (isset($vals['storageResourceId'])) {
+ $this->storageResourceId = $vals['storageResourceId'];
+ }
+ if (isset($vals['description'])) {
+ $this->description = $vals['description'];
+ }
+ if (isset($vals['enableEmailNotification'])) {
+ $this->enableEmailNotification = $vals['enableEmailNotification'];
+ }
+ if (isset($vals['notificationEmails'])) {
+ $this->notificationEmails = $vals['notificationEmails'];
+ }
+ if (isset($vals['applications'])) {
+ $this->applications = $vals['applications'];
+ }
+ if (isset($vals['handlers'])) {
+ $this->handlers = $vals['handlers'];
+ }
+ if (isset($vals['connections'])) {
+ $this->connections = $vals['connections'];
+ }
+ if (isset($vals['statuses'])) {
+ $this->statuses = $vals['statuses'];
+ }
+ if (isset($vals['errors'])) {
+ $this->errors = $vals['errors'];
+ }
+ if (isset($vals['createdAt'])) {
+ $this->createdAt = $vals['createdAt'];
+ }
+ if (isset($vals['updatedAt'])) {
+ $this->updatedAt = $vals['updatedAt'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'AiravataWorkflow';
+ }
+
+ 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->id);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->gatewayId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->userName);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->storageResourceId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 6:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->description);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 7:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->enableEmailNotification);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 8:
+ if ($ftype == TType::LST) {
+ $this->notificationEmails = array();
+ $_size56 = 0;
+ $_etype59 = 0;
+ $xfer += $input->readListBegin($_etype59, $_size56);
+ for ($_i60 = 0; $_i60 < $_size56; ++$_i60)
+ {
+ $elem61 = null;
+ $elem61 = new \Airavata\Model\Workflow\NotificationEmail();
+ $xfer += $elem61->read($input);
+ $this->notificationEmails []= $elem61;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 9:
+ if ($ftype == TType::LST) {
+ $this->applications = array();
+ $_size62 = 0;
+ $_etype65 = 0;
+ $xfer += $input->readListBegin($_etype65, $_size62);
+ for ($_i66 = 0; $_i66 < $_size62; ++$_i66)
+ {
+ $elem67 = null;
+ $elem67 = new \Airavata\Model\Workflow\WorkflowApplication();
+ $xfer += $elem67->read($input);
+ $this->applications []= $elem67;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 10:
+ if ($ftype == TType::LST) {
+ $this->handlers = array();
+ $_size68 = 0;
+ $_etype71 = 0;
+ $xfer += $input->readListBegin($_etype71, $_size68);
+ for ($_i72 = 0; $_i72 < $_size68; ++$_i72)
+ {
+ $elem73 = null;
+ $elem73 = new \Airavata\Model\Workflow\WorkflowHandler();
+ $xfer += $elem73->read($input);
+ $this->handlers []= $elem73;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 11:
+ if ($ftype == TType::LST) {
+ $this->connections = array();
+ $_size74 = 0;
+ $_etype77 = 0;
+ $xfer += $input->readListBegin($_etype77, $_size74);
+ for ($_i78 = 0; $_i78 < $_size74; ++$_i78)
+ {
+ $elem79 = null;
+ $elem79 = new \Airavata\Model\Workflow\WorkflowConnection();
+ $xfer += $elem79->read($input);
+ $this->connections []= $elem79;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 12:
+ if ($ftype == TType::LST) {
+ $this->statuses = array();
+ $_size80 = 0;
+ $_etype83 = 0;
+ $xfer += $input->readListBegin($_etype83, $_size80);
+ for ($_i84 = 0; $_i84 < $_size80; ++$_i84)
+ {
+ $elem85 = null;
+ $elem85 = new \Airavata\Model\Workflow\WorkflowStatus();
+ $xfer += $elem85->read($input);
+ $this->statuses []= $elem85;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 13:
+ if ($ftype == TType::LST) {
+ $this->errors = array();
+ $_size86 = 0;
+ $_etype89 = 0;
+ $xfer += $input->readListBegin($_etype89, $_size86);
+ for ($_i90 = 0; $_i90 < $_size86; ++$_i90)
+ {
+ $elem91 = null;
+ $elem91 = new \Airavata\Model\Commons\ErrorModel();
+ $xfer += $elem91->read($input);
+ $this->errors []= $elem91;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 14:
+ if ($ftype == TType::I64) {
+ $xfer += $input->readI64($this->createdAt);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 15:
+ if ($ftype == TType::I64) {
+ $xfer += $input->readI64($this->updatedAt);
+ } 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('AiravataWorkflow');
+ if ($this->id !== null) {
+ $xfer += $output->writeFieldBegin('id', TType::STRING, 1);
+ $xfer += $output->writeString($this->id);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->name !== null) {
+ $xfer += $output->writeFieldBegin('name', TType::STRING, 2);
+ $xfer += $output->writeString($this->name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->gatewayId !== null) {
+ $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 3);
+ $xfer += $output->writeString($this->gatewayId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->userName !== null) {
+ $xfer += $output->writeFieldBegin('userName', TType::STRING, 4);
+ $xfer += $output->writeString($this->userName);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->storageResourceId !== null) {
+ $xfer += $output->writeFieldBegin('storageResourceId', TType::STRING, 5);
+ $xfer += $output->writeString($this->storageResourceId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->description !== null) {
+ $xfer += $output->writeFieldBegin('description', TType::STRING, 6);
+ $xfer += $output->writeString($this->description);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->enableEmailNotification !== null) {
+ $xfer += $output->writeFieldBegin('enableEmailNotification', TType::BOOL, 7);
+ $xfer += $output->writeBool($this->enableEmailNotification);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->notificationEmails !== null) {
+ if (!is_array($this->notificationEmails)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('notificationEmails', TType::LST, 8);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->notificationEmails));
+ {
+ foreach ($this->notificationEmails as $iter92)
+ {
+ $xfer += $iter92->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->applications !== null) {
+ if (!is_array($this->applications)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('applications', TType::LST, 9);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->applications));
+ {
+ foreach ($this->applications as $iter93)
+ {
+ $xfer += $iter93->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->handlers !== null) {
+ if (!is_array($this->handlers)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('handlers', TType::LST, 10);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->handlers));
+ {
+ foreach ($this->handlers as $iter94)
+ {
+ $xfer += $iter94->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->connections !== null) {
+ if (!is_array($this->connections)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('connections', TType::LST, 11);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->connections));
+ {
+ foreach ($this->connections as $iter95)
+ {
+ $xfer += $iter95->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->statuses !== null) {
+ if (!is_array($this->statuses)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('statuses', TType::LST, 12);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->statuses));
+ {
+ foreach ($this->statuses as $iter96)
+ {
+ $xfer += $iter96->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->errors !== null) {
+ if (!is_array($this->errors)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('errors', TType::LST, 13);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->errors));
+ {
+ foreach ($this->errors as $iter97)
+ {
+ $xfer += $iter97->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->createdAt !== null) {
+ $xfer += $output->writeFieldBegin('createdAt', TType::I64, 14);
+ $xfer += $output->writeI64($this->createdAt);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->updatedAt !== null) {
+ $xfer += $output->writeFieldBegin('updatedAt', TType::I64, 15);
+ $xfer += $output->writeI64($this->updatedAt);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+