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 2017/06/12 20:46:32 UTC
[1/5] airavata-php-gateway git commit: AIRAVATA-2408 Switching User
Profile calls to Profile Service
Repository: airavata-php-gateway
Updated Branches:
refs/heads/keycloak-integration 789798870 -> 135077cd6
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/3c17052f/app/libraries/Airavata/Service/Profile/User/CPI/UserProfileService.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Service/Profile/User/CPI/UserProfileService.php b/app/libraries/Airavata/Service/Profile/User/CPI/UserProfileService.php
new file mode 100644
index 0000000..6c773b6
--- /dev/null
+++ b/app/libraries/Airavata/Service/Profile/User/CPI/UserProfileService.php
@@ -0,0 +1,2025 @@
+<?php
+namespace Airavata\Service\Profile\User\CPI;
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+use Thrift\Base\TBase;
+use Thrift\Type\TType;
+use Thrift\Type\TMessageType;
+use Thrift\Exception\TException;
+use Thrift\Exception\TProtocolException;
+use Thrift\Protocol\TProtocol;
+use Thrift\Protocol\TBinaryProtocolAccelerated;
+use Thrift\Exception\TApplicationException;
+
+
+interface UserProfileServiceIf {
+ /**
+ * @param \Airavata\Model\Security\AuthzToken $authzToken
+ * @param \Airavata\Model\User\UserProfile $userProfile
+ * @return string
+ * @throws \Airavata\Service\Profile\User\CPI\Error\UserProfileServiceException
+ * @throws \Airavata\API\Error\AuthorizationException
+ */
+ public function addUserProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\User\UserProfile $userProfile);
+ /**
+ * @param \Airavata\Model\Security\AuthzToken $authzToken
+ * @param \Airavata\Model\User\UserProfile $userProfile
+ * @return bool
+ * @throws \Airavata\Service\Profile\User\CPI\Error\UserProfileServiceException
+ * @throws \Airavata\API\Error\AuthorizationException
+ */
+ public function updateUserProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\User\UserProfile $userProfile);
+ /**
+ * @param \Airavata\Model\Security\AuthzToken $authzToken
+ * @param string $userId
+ * @param string $gatewayId
+ * @return \Airavata\Model\User\UserProfile * A structure holding the user profile and its child models.
+ * *
+ * * Notes:
+ * * The model does not include passwords as it is assumed an external identity provider is used to authenticate user.
+ * * References:
+ * * NSF Demographic Information - http://www.nsf.gov/pubs/2000/00form1225/00form1225.doc
+ * * LDAP Schema - https://tools.ietf.org/html/rfc4519
+ * * SCIM 2.0 - https://tools.ietf.org/html/rfc7643
+ * *
+ * * userModelVersion:
+ * * Version number of profile
+ * *
+ * * airavataInternalUserId:
+ * * internal to Airavata, not intended to be used outside of the Airavata platform or possibly by gateways
+ * * (that is, never shown to users), never reassigned, REQUIRED
+ * *
+ * * userId:
+ * * Externally assertable unique identifier. SAML (primarly in higher education, academic) tends to keep
+ * * user name less opaque. OpenID Connect maintains them to be opaque.
+ * *
+ * * firstName, middleName, lastName:
+ * * First and Last names as assertede by the user
+ * *
+ * * namePrefix, nameSuffix:
+ * * prefix and suffix to the users name as asserted by the user
+ * *
+ * * emails:
+ * * Email identifier are Verified, REQUIRED and MULTIVALUED
+ * *
+ * * userName:
+ * * Name-based identifiers can be multivalues. To keep it simple, Airavata will make it a string.
+ * * In the future these can be enumerated as:
+ * * Official name (as asserted possibly by some external identity provider)
+ * * Prefered name (as asserted or suggested by user directly)
+ * * Components:
+ * * givenName
+ * * surname (familyName)
+ * * displayName (often asserted by user to handle things like middle names, suffix, prefix, and the like)
+ * *
+ * * orcidId: ORCID ID - http://orcid.org/about/what-is-orcid)
+ * *
+ * * phones: Telephone MULTIVALUED
+ * *
+ * * country: Country of Residance
+ * *
+ * * nationality Countries of citizenship
+ * *
+ * * comments:
+ * * Free-form information (treated as opaque by Airavata and simply passed to resource).
+ * *
+ * * labeledURI:
+ * * Google Scholar, Web of Science, ACS, e.t.c
+ * *
+ * * timeZone:
+ * * User’s preferred timezone - IANA Timezone Databases - http://www.iana.org/time-zones.
+ * *
+ *
+ * @throws \Airavata\Service\Profile\User\CPI\Error\UserProfileServiceException
+ * @throws \Airavata\API\Error\AuthorizationException
+ */
+ public function getUserProfileById(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayId);
+ /**
+ * @param \Airavata\Model\Security\AuthzToken $authzToken
+ * @param string $userId
+ * @param string $gatewayId
+ * @return bool
+ * @throws \Airavata\Service\Profile\User\CPI\Error\UserProfileServiceException
+ * @throws \Airavata\API\Error\AuthorizationException
+ */
+ public function deleteUserProfile(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayId);
+ /**
+ * @param \Airavata\Model\Security\AuthzToken $authzToken
+ * @param string $gatewayId
+ * @param int $offset
+ * @param int $limit
+ * @return \Airavata\Model\User\UserProfile[]
+ * @throws \Airavata\Service\Profile\User\CPI\Error\UserProfileServiceException
+ * @throws \Airavata\API\Error\AuthorizationException
+ */
+ public function getAllUserProfilesInGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $offset, $limit);
+ /**
+ * @param \Airavata\Model\Security\AuthzToken $authzToken
+ * @param string $userId
+ * @param string $gatewayId
+ * @return bool
+ * @throws \Airavata\Service\Profile\User\CPI\Error\UserProfileServiceException
+ * @throws \Airavata\API\Error\AuthorizationException
+ */
+ public function doesUserExist(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayId);
+}
+
+class UserProfileServiceClient implements \Airavata\Service\Profile\User\CPI\UserProfileServiceIf {
+ protected $input_ = null;
+ protected $output_ = null;
+
+ protected $seqid_ = 0;
+
+ public function __construct($input, $output=null) {
+ $this->input_ = $input;
+ $this->output_ = $output ? $output : $input;
+ }
+
+ public function addUserProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\User\UserProfile $userProfile)
+ {
+ $this->send_addUserProfile($authzToken, $userProfile);
+ return $this->recv_addUserProfile();
+ }
+
+ public function send_addUserProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\User\UserProfile $userProfile)
+ {
+ $args = new \Airavata\Service\Profile\User\CPI\UserProfileService_addUserProfile_args();
+ $args->authzToken = $authzToken;
+ $args->userProfile = $userProfile;
+ $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'addUserProfile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('addUserProfile', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_addUserProfile()
+ {
+ $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\Service\Profile\User\CPI\UserProfileService_addUserProfile_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\Service\Profile\User\CPI\UserProfileService_addUserProfile_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->upe !== null) {
+ throw $result->upe;
+ }
+ if ($result->ae !== null) {
+ throw $result->ae;
+ }
+ throw new \Exception("addUserProfile failed: unknown result");
+ }
+
+ public function updateUserProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\User\UserProfile $userProfile)
+ {
+ $this->send_updateUserProfile($authzToken, $userProfile);
+ return $this->recv_updateUserProfile();
+ }
+
+ public function send_updateUserProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\User\UserProfile $userProfile)
+ {
+ $args = new \Airavata\Service\Profile\User\CPI\UserProfileService_updateUserProfile_args();
+ $args->authzToken = $authzToken;
+ $args->userProfile = $userProfile;
+ $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'updateUserProfile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('updateUserProfile', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_updateUserProfile()
+ {
+ $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\Service\Profile\User\CPI\UserProfileService_updateUserProfile_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\Service\Profile\User\CPI\UserProfileService_updateUserProfile_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->upe !== null) {
+ throw $result->upe;
+ }
+ if ($result->ae !== null) {
+ throw $result->ae;
+ }
+ throw new \Exception("updateUserProfile failed: unknown result");
+ }
+
+ public function getUserProfileById(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayId)
+ {
+ $this->send_getUserProfileById($authzToken, $userId, $gatewayId);
+ return $this->recv_getUserProfileById();
+ }
+
+ public function send_getUserProfileById(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayId)
+ {
+ $args = new \Airavata\Service\Profile\User\CPI\UserProfileService_getUserProfileById_args();
+ $args->authzToken = $authzToken;
+ $args->userId = $userId;
+ $args->gatewayId = $gatewayId;
+ $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'getUserProfileById', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('getUserProfileById', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_getUserProfileById()
+ {
+ $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\Service\Profile\User\CPI\UserProfileService_getUserProfileById_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\Service\Profile\User\CPI\UserProfileService_getUserProfileById_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->upe !== null) {
+ throw $result->upe;
+ }
+ if ($result->ae !== null) {
+ throw $result->ae;
+ }
+ throw new \Exception("getUserProfileById failed: unknown result");
+ }
+
+ public function deleteUserProfile(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayId)
+ {
+ $this->send_deleteUserProfile($authzToken, $userId, $gatewayId);
+ return $this->recv_deleteUserProfile();
+ }
+
+ public function send_deleteUserProfile(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayId)
+ {
+ $args = new \Airavata\Service\Profile\User\CPI\UserProfileService_deleteUserProfile_args();
+ $args->authzToken = $authzToken;
+ $args->userId = $userId;
+ $args->gatewayId = $gatewayId;
+ $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'deleteUserProfile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('deleteUserProfile', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_deleteUserProfile()
+ {
+ $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\Service\Profile\User\CPI\UserProfileService_deleteUserProfile_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\Service\Profile\User\CPI\UserProfileService_deleteUserProfile_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->upe !== null) {
+ throw $result->upe;
+ }
+ if ($result->ae !== null) {
+ throw $result->ae;
+ }
+ throw new \Exception("deleteUserProfile failed: unknown result");
+ }
+
+ public function getAllUserProfilesInGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $offset, $limit)
+ {
+ $this->send_getAllUserProfilesInGateway($authzToken, $gatewayId, $offset, $limit);
+ return $this->recv_getAllUserProfilesInGateway();
+ }
+
+ public function send_getAllUserProfilesInGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $offset, $limit)
+ {
+ $args = new \Airavata\Service\Profile\User\CPI\UserProfileService_getAllUserProfilesInGateway_args();
+ $args->authzToken = $authzToken;
+ $args->gatewayId = $gatewayId;
+ $args->offset = $offset;
+ $args->limit = $limit;
+ $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'getAllUserProfilesInGateway', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('getAllUserProfilesInGateway', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_getAllUserProfilesInGateway()
+ {
+ $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\Service\Profile\User\CPI\UserProfileService_getAllUserProfilesInGateway_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\Service\Profile\User\CPI\UserProfileService_getAllUserProfilesInGateway_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->upe !== null) {
+ throw $result->upe;
+ }
+ if ($result->ae !== null) {
+ throw $result->ae;
+ }
+ throw new \Exception("getAllUserProfilesInGateway failed: unknown result");
+ }
+
+ public function doesUserExist(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayId)
+ {
+ $this->send_doesUserExist($authzToken, $userId, $gatewayId);
+ return $this->recv_doesUserExist();
+ }
+
+ public function send_doesUserExist(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayId)
+ {
+ $args = new \Airavata\Service\Profile\User\CPI\UserProfileService_doesUserExist_args();
+ $args->authzToken = $authzToken;
+ $args->userId = $userId;
+ $args->gatewayId = $gatewayId;
+ $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'doesUserExist', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('doesUserExist', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_doesUserExist()
+ {
+ $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\Service\Profile\User\CPI\UserProfileService_doesUserExist_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\Service\Profile\User\CPI\UserProfileService_doesUserExist_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->upe !== null) {
+ throw $result->upe;
+ }
+ if ($result->ae !== null) {
+ throw $result->ae;
+ }
+ throw new \Exception("doesUserExist failed: unknown result");
+ }
+
+}
+
+// HELPER FUNCTIONS AND STRUCTURES
+
+class UserProfileService_addUserProfile_args {
+ static $_TSPEC;
+
+ /**
+ * @var \Airavata\Model\Security\AuthzToken
+ */
+ public $authzToken = null;
+ /**
+ * @var \Airavata\Model\User\UserProfile
+ */
+ public $userProfile = 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' => 'userProfile',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\User\UserProfile',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['authzToken'])) {
+ $this->authzToken = $vals['authzToken'];
+ }
+ if (isset($vals['userProfile'])) {
+ $this->userProfile = $vals['userProfile'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'UserProfileService_addUserProfile_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::STRUCT) {
+ $this->userProfile = new \Airavata\Model\User\UserProfile();
+ $xfer += $this->userProfile->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('UserProfileService_addUserProfile_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->userProfile !== null) {
+ if (!is_object($this->userProfile)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('userProfile', TType::STRUCT, 2);
+ $xfer += $this->userProfile->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class UserProfileService_addUserProfile_result {
+ static $_TSPEC;
+
+ /**
+ * @var string
+ */
+ public $success = null;
+ /**
+ * @var \Airavata\Service\Profile\User\CPI\Error\UserProfileServiceException
+ */
+ public $upe = 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::STRING,
+ ),
+ 1 => array(
+ 'var' => 'upe',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Service\Profile\User\CPI\Error\UserProfileServiceException',
+ ),
+ 2 => 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['upe'])) {
+ $this->upe = $vals['upe'];
+ }
+ if (isset($vals['ae'])) {
+ $this->ae = $vals['ae'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'UserProfileService_addUserProfile_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->success);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->upe = new \Airavata\Service\Profile\User\CPI\Error\UserProfileServiceException();
+ $xfer += $this->upe->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ 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('UserProfileService_addUserProfile_result');
+ if ($this->success !== null) {
+ $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
+ $xfer += $output->writeString($this->success);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->upe !== null) {
+ $xfer += $output->writeFieldBegin('upe', TType::STRUCT, 1);
+ $xfer += $this->upe->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ae !== null) {
+ $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 2);
+ $xfer += $this->ae->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class UserProfileService_updateUserProfile_args {
+ static $_TSPEC;
+
+ /**
+ * @var \Airavata\Model\Security\AuthzToken
+ */
+ public $authzToken = null;
+ /**
+ * @var \Airavata\Model\User\UserProfile
+ */
+ public $userProfile = 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' => 'userProfile',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\User\UserProfile',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['authzToken'])) {
+ $this->authzToken = $vals['authzToken'];
+ }
+ if (isset($vals['userProfile'])) {
+ $this->userProfile = $vals['userProfile'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'UserProfileService_updateUserProfile_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::STRUCT) {
+ $this->userProfile = new \Airavata\Model\User\UserProfile();
+ $xfer += $this->userProfile->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('UserProfileService_updateUserProfile_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->userProfile !== null) {
+ if (!is_object($this->userProfile)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('userProfile', TType::STRUCT, 2);
+ $xfer += $this->userProfile->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class UserProfileService_updateUserProfile_result {
+ static $_TSPEC;
+
+ /**
+ * @var bool
+ */
+ public $success = null;
+ /**
+ * @var \Airavata\Service\Profile\User\CPI\Error\UserProfileServiceException
+ */
+ public $upe = 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' => 'upe',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Service\Profile\User\CPI\Error\UserProfileServiceException',
+ ),
+ 2 => 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['upe'])) {
+ $this->upe = $vals['upe'];
+ }
+ if (isset($vals['ae'])) {
+ $this->ae = $vals['ae'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'UserProfileService_updateUserProfile_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->upe = new \Airavata\Service\Profile\User\CPI\Error\UserProfileServiceException();
+ $xfer += $this->upe->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ 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('UserProfileService_updateUserProfile_result');
+ if ($this->success !== null) {
+ $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+ $xfer += $output->writeBool($this->success);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->upe !== null) {
+ $xfer += $output->writeFieldBegin('upe', TType::STRUCT, 1);
+ $xfer += $this->upe->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ae !== null) {
+ $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 2);
+ $xfer += $this->ae->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class UserProfileService_getUserProfileById_args {
+ static $_TSPEC;
+
+ /**
+ * @var \Airavata\Model\Security\AuthzToken
+ */
+ public $authzToken = null;
+ /**
+ * @var string
+ */
+ public $userId = null;
+ /**
+ * @var string
+ */
+ public $gatewayId = 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' => 'userId',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'gatewayId',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['authzToken'])) {
+ $this->authzToken = $vals['authzToken'];
+ }
+ if (isset($vals['userId'])) {
+ $this->userId = $vals['userId'];
+ }
+ if (isset($vals['gatewayId'])) {
+ $this->gatewayId = $vals['gatewayId'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'UserProfileService_getUserProfileById_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->userId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->gatewayId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('UserProfileService_getUserProfileById_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->userId !== null) {
+ $xfer += $output->writeFieldBegin('userId', TType::STRING, 2);
+ $xfer += $output->writeString($this->userId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->gatewayId !== null) {
+ $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 3);
+ $xfer += $output->writeString($this->gatewayId);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class UserProfileService_getUserProfileById_result {
+ static $_TSPEC;
+
+ /**
+ * @var \Airavata\Model\User\UserProfile
+ */
+ public $success = null;
+ /**
+ * @var \Airavata\Service\Profile\User\CPI\Error\UserProfileServiceException
+ */
+ public $upe = 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::STRUCT,
+ 'class' => '\Airavata\Model\User\UserProfile',
+ ),
+ 1 => array(
+ 'var' => 'upe',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Service\Profile\User\CPI\Error\UserProfileServiceException',
+ ),
+ 2 => 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['upe'])) {
+ $this->upe = $vals['upe'];
+ }
+ if (isset($vals['ae'])) {
+ $this->ae = $vals['ae'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'UserProfileService_getUserProfileById_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::STRUCT) {
+ $this->success = new \Airavata\Model\User\UserProfile();
+ $xfer += $this->success->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->upe = new \Airavata\Service\Profile\User\CPI\Error\UserProfileServiceException();
+ $xfer += $this->upe->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ 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('UserProfileService_getUserProfileById_result');
+ if ($this->success !== null) {
+ if (!is_object($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+ $xfer += $this->success->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->upe !== null) {
+ $xfer += $output->writeFieldBegin('upe', TType::STRUCT, 1);
+ $xfer += $this->upe->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ae !== null) {
+ $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 2);
+ $xfer += $this->ae->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class UserProfileService_deleteUserProfile_args {
+ static $_TSPEC;
+
+ /**
+ * @var \Airavata\Model\Security\AuthzToken
+ */
+ public $authzToken = null;
+ /**
+ * @var string
+ */
+ public $userId = null;
+ /**
+ * @var string
+ */
+ public $gatewayId = 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' => 'userId',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'gatewayId',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['authzToken'])) {
+ $this->authzToken = $vals['authzToken'];
+ }
+ if (isset($vals['userId'])) {
+ $this->userId = $vals['userId'];
+ }
+ if (isset($vals['gatewayId'])) {
+ $this->gatewayId = $vals['gatewayId'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'UserProfileService_deleteUserProfile_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->userId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->gatewayId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('UserProfileService_deleteUserProfile_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->userId !== null) {
+ $xfer += $output->writeFieldBegin('userId', TType::STRING, 2);
+ $xfer += $output->writeString($this->userId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->gatewayId !== null) {
+ $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 3);
+ $xfer += $output->writeString($this->gatewayId);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class UserProfileService_deleteUserProfile_result {
+ static $_TSPEC;
+
+ /**
+ * @var bool
+ */
+ public $success = null;
+ /**
+ * @var \Airavata\Service\Profile\User\CPI\Error\UserProfileServiceException
+ */
+ public $upe = 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' => 'upe',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Service\Profile\User\CPI\Error\UserProfileServiceException',
+ ),
+ 2 => 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['upe'])) {
+ $this->upe = $vals['upe'];
+ }
+ if (isset($vals['ae'])) {
+ $this->ae = $vals['ae'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'UserProfileService_deleteUserProfile_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->upe = new \Airavata\Service\Profile\User\CPI\Error\UserProfileServiceException();
+ $xfer += $this->upe->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ 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('UserProfileService_deleteUserProfile_result');
+ if ($this->success !== null) {
+ $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+ $xfer += $output->writeBool($this->success);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->upe !== null) {
+ $xfer += $output->writeFieldBegin('upe', TType::STRUCT, 1);
+ $xfer += $this->upe->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ae !== null) {
+ $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 2);
+ $xfer += $this->ae->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class UserProfileService_getAllUserProfilesInGateway_args {
+ static $_TSPEC;
+
+ /**
+ * @var \Airavata\Model\Security\AuthzToken
+ */
+ public $authzToken = null;
+ /**
+ * @var string
+ */
+ public $gatewayId = null;
+ /**
+ * @var int
+ */
+ public $offset = null;
+ /**
+ * @var int
+ */
+ public $limit = 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' => 'gatewayId',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'offset',
+ 'type' => TType::I32,
+ ),
+ 4 => array(
+ 'var' => 'limit',
+ 'type' => TType::I32,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['authzToken'])) {
+ $this->authzToken = $vals['authzToken'];
+ }
+ if (isset($vals['gatewayId'])) {
+ $this->gatewayId = $vals['gatewayId'];
+ }
+ if (isset($vals['offset'])) {
+ $this->offset = $vals['offset'];
+ }
+ if (isset($vals['limit'])) {
+ $this->limit = $vals['limit'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'UserProfileService_getAllUserProfilesInGateway_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->gatewayId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->offset);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->limit);
+ } 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('UserProfileService_getAllUserProfilesInGateway_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->gatewayId !== null) {
+ $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2);
+ $xfer += $output->writeString($this->gatewayId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->offset !== null) {
+ $xfer += $output->writeFieldBegin('offset', TType::I32, 3);
+ $xfer += $output->writeI32($this->offset);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->limit !== null) {
+ $xfer += $output->writeFieldBegin('limit', TType::I32, 4);
+ $xfer += $output->writeI32($this->limit);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class UserProfileService_getAllUserProfilesInGateway_result {
+ static $_TSPEC;
+
+ /**
+ * @var \Airavata\Model\User\UserProfile[]
+ */
+ public $success = null;
+ /**
+ * @var \Airavata\Service\Profile\User\CPI\Error\UserProfileServiceException
+ */
+ public $upe = 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::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\User\UserProfile',
+ ),
+ ),
+ 1 => array(
+ 'var' => 'upe',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Service\Profile\User\CPI\Error\UserProfileServiceException',
+ ),
+ 2 => 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['upe'])) {
+ $this->upe = $vals['upe'];
+ }
+ if (isset($vals['ae'])) {
+ $this->ae = $vals['ae'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'UserProfileService_getAllUserProfilesInGateway_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::LST) {
+ $this->success = array();
+ $_size0 = 0;
+ $_etype3 = 0;
+ $xfer += $input->readListBegin($_etype3, $_size0);
+ for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
+ {
+ $elem5 = null;
+ $elem5 = new \Airavata\Model\User\UserProfile();
+ $xfer += $elem5->read($input);
+ $this->success []= $elem5;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->upe = new \Airavata\Service\Profile\User\CPI\Error\UserProfileServiceException();
+ $xfer += $this->upe->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ 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('UserProfileService_getAllUserProfilesInGateway_result');
+ if ($this->success !== null) {
+ if (!is_array($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->success));
+ {
+ foreach ($this->success as $iter6)
+ {
+ $xfer += $iter6->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->upe !== null) {
+ $xfer += $output->writeFieldBegin('upe', TType::STRUCT, 1);
+ $xfer += $this->upe->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ae !== null) {
+ $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 2);
+ $xfer += $this->ae->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class UserProfileService_doesUserExist_args {
+ static $_TSPEC;
+
+ /**
+ * @var \Airavata\Model\Security\AuthzToken
+ */
+ public $authzToken = null;
+ /**
+ * @var string
+ */
+ public $userId = null;
+ /**
+ * @var string
+ */
+ public $gatewayId = 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' => 'userId',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'gatewayId',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['authzToken'])) {
+ $this->authzToken = $vals['authzToken'];
+ }
+ if (isset($vals['userId'])) {
+ $this->userId = $vals['userId'];
+ }
+ if (isset($vals['gatewayId'])) {
+ $this->gatewayId = $vals['gatewayId'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'UserProfileService_doesUserExist_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->userId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->gatewayId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('UserProfileService_doesUserExist_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->userId !== null) {
+ $xfer += $output->writeFieldBegin('userId', TType::STRING, 2);
+ $xfer += $output->writeString($this->userId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->gatewayId !== null) {
+ $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 3);
+ $xfer += $output->writeString($this->gatewayId);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class UserProfileService_doesUserExist_result {
+ static $_TSPEC;
+
+ /**
+ * @var bool
+ */
+ public $success = null;
+ /**
+ * @var \Airavata\Service\Profile\User\CPI\Error\UserProfileServiceException
+ */
+ public $upe = 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' => 'upe',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Service\Profile\User\CPI\Error\UserProfileServiceException',
+ ),
+ 2 => 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['upe'])) {
+ $this->upe = $vals['upe'];
+ }
+ if (isset($vals['ae'])) {
+ $this->ae = $vals['ae'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'UserProfileService_doesUserExist_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->upe = new \Airavata\Service\Profile\User\CPI\Error\UserProfileServiceException();
+ $xfer += $this->upe->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ 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('UserProfileService_doesUserExist_result');
+ if ($this->success !== null) {
+ $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+ $xfer += $output->writeBool($this->success);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->upe !== null) {
+ $xfer += $output->writeFieldBegin('upe', TType::STRUCT, 1);
+ $xfer += $this->upe->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ae !== null) {
+ $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 2);
+ $xfer += $this->ae->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/3c17052f/app/libraries/Airavata/UserProfileServiceProvider.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/UserProfileServiceProvider.php b/app/libraries/Airavata/UserProfileServiceProvider.php
new file mode 100644
index 0000000..7a54b69
--- /dev/null
+++ b/app/libraries/Airavata/UserProfileServiceProvider.php
@@ -0,0 +1,83 @@
+<?php namespace Airavata;
+
+use Airavata\Service\Profile\User\CPI\UserProfileServiceClient;
+use Illuminate\Routing\UrlGenerator;
+use Illuminate\Support\ServiceProvider;
+use Illuminate\Support\Facades\Config;
+use Thrift\Transport\TSocket;
+use Thrift\Protocol\TBinaryProtocol;
+use Thrift\Protocol\TMultiplexedProtocol;
+use Illuminate\Routing\Redirector;
+
+class UserProfileServiceProvider extends ServiceProvider {
+
+ /**
+ * Indicates if loading of the provider is deferred.
+ *
+ * @var bool
+ */
+ protected $defer = false;
+
+ /**
+ * Bootstrap the application events.
+ *
+ * @return void
+ */
+ public function boot()
+ {
+ $this->package('airavata/user_profile_services');
+ }
+
+ /**
+ * Register the service provider.
+ *
+ * @return void
+ */
+ public function register()
+ {
+ //registering service provider
+ $this->app['user_profile_services'] = $this->app->share(function($app)
+ {
+ try{
+ $transport = new TSocket(
+ Config::get('pga_config.airavata')['airavata-server'],
+ Config::get('pga_config.airavata')['airavata-profile-service-port']
+ );
+ $transport->setRecvTimeout( Config::get('pga_config.airavata')['airavata-timeout']);
+ $transport->setSendTimeout( Config::get('pga_config.airavata')['airavata-timeout']);
+
+ $protocol = new TBinaryProtocol($transport);
+ $protocol = new TMultiplexedProtocol($protocol, "UserProfileService");
+ $transport->open();
+
+ $client = new UserProfileServiceClient($protocol);
+
+ }catch (\Exception $ex){
+ throw new \Exception("Unable to instantiate Airavata UserProfileService Client", 0, $ex);
+ }
+
+ if( is_object( $client))
+ return $client;
+ else
+ throw new \Exception("Unable to instantiate Airavata UserProfileService Client");
+ });
+
+ //registering alis
+ $this->app->booting(function()
+ {
+ $loader = \Illuminate\Foundation\AliasLoader::getInstance();
+ $loader->alias('UserProfileService', 'Airavata\Facades\UserProfileServices');
+ });
+ }
+
+ /**
+ * Get the services provided by the provider.
+ *
+ * @return array
+ */
+ public function provides()
+ {
+ return array('user_profile_services');
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/3c17052f/app/libraries/UserProfileUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/UserProfileUtilities.php b/app/libraries/UserProfileUtilities.php
index 720bdd7..8d9c99d 100644
--- a/app/libraries/UserProfileUtilities.php
+++ b/app/libraries/UserProfileUtilities.php
@@ -8,7 +8,7 @@ class UserProfileUtilities
public static function does_user_profile_exist($userId) {
$gatewayId = Session::get('gateway_id');
- return Airavata::doesUserProfileExist(Session::get('authz-token'), $userId, $gatewayId);
+ return UserProfileService::doesUserProfileExist(Session::get('authz-token'), $userId, $gatewayId);
}
public static function create_basic_user_profile($username, $userEmail) {
@@ -30,18 +30,18 @@ class UserProfileUtilities
$userProfile->lastAccessTime = time();
$userProfile->validUntil = -1;
$userProfile->State = Status::ACTIVE;
- return Airavata::addUserProfile(Session::get('authz-token'), $userProfile);
+ return UserProfileService::addUserProfile(Session::get('authz-token'), $userProfile);
}
public static function get_user_profile($userId) {
$gatewayId = Session::get('gateway_id');
- return Airavata::getUserProfileById(Session::get('authz-token'), $userId, $gatewayId);
+ return UserProfileService::getUserProfileById(Session::get('authz-token'), $userId, $gatewayId);
}
public static function update_user_profile($userProfile) {
- return Airavata::updateUserProfile(Session::get('authz-token'), $userProfile);
+ return UserProfileService::updateUserProfile(Session::get('authz-token'), $userProfile);
}
}
[3/5] airavata-php-gateway git commit: AIRAVATA-2408 Switching User
Profile calls to Profile Service
Posted by ma...@apache.org.
AIRAVATA-2408 Switching User Profile calls to Profile Service
Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/3c17052f
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/3c17052f
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/3c17052f
Branch: refs/heads/keycloak-integration
Commit: 3c17052fd23fe04c14c9b8843028369e92ef158c
Parents: 7897988
Author: Marcus Christie <ma...@iu.edu>
Authored: Mon Jun 12 16:35:40 2017 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Mon Jun 12 16:36:22 2017 -0400
----------------------------------------------------------------------
app/config/app.php | 1 +
.../Airavata/Facades/UserProfileServices.php | 16 +
.../Airavata/Model/Workspace/Types.php | 133 +-
.../Iam/Admin/Services/CPI/IamAdminServices.php | 272 ++
.../Service/Profile/Tenant/CPI/Error/Types.php | 95 +
.../Profile/Tenant/CPI/TenantProfileService.php | 2435 ++++++++++++++++++
.../Service/Profile/Tenant/CPI/Types.php | 33 +
.../Airavata/Service/Profile/Types.php | 20 +
.../Service/Profile/User/CPI/Error/Types.php | 95 +
.../Airavata/Service/Profile/User/CPI/Types.php | 33 +
.../Profile/User/CPI/UserProfileService.php | 2025 +++++++++++++++
.../Airavata/UserProfileServiceProvider.php | 83 +
app/libraries/UserProfileUtilities.php | 8 +-
13 files changed, 5190 insertions(+), 59 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/3c17052f/app/config/app.php
----------------------------------------------------------------------
diff --git a/app/config/app.php b/app/config/app.php
index 9d863ce..ee2ff8b 100755
--- a/app/config/app.php
+++ b/app/config/app.php
@@ -125,6 +125,7 @@ return array(
'Keycloak\KeycloakServiceProvider',
'Airavata\AiravataServiceProvider',
'Airavata\IamAdminServiceProvider',
+ 'Airavata\UserProfileServiceProvider',
'Teepluss\Theme\ThemeServiceProvider',
'GrahamCampbell\Markdown\MarkdownServiceProvider',
),
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/3c17052f/app/libraries/Airavata/Facades/UserProfileServices.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Facades/UserProfileServices.php b/app/libraries/Airavata/Facades/UserProfileServices.php
new file mode 100644
index 0000000..94abcf3
--- /dev/null
+++ b/app/libraries/Airavata/Facades/UserProfileServices.php
@@ -0,0 +1,16 @@
+<?php
+
+namespace Airavata\Facades;
+
+use Illuminate\Support\Facades\Facade;
+
+class UserProfileServices extends Facade {
+
+ /**
+ * Get the registered name of the component.
+ *
+ * @return string
+ */
+ protected static function getFacadeAccessor() { return 'user_profile_services'; }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/3c17052f/app/libraries/Airavata/Model/Workspace/Types.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Model/Workspace/Types.php b/app/libraries/Airavata/Model/Workspace/Types.php
index 098511f..d929439 100644
--- a/app/libraries/Airavata/Model/Workspace/Types.php
+++ b/app/libraries/Airavata/Model/Workspace/Types.php
@@ -629,6 +629,10 @@ class Gateway {
/**
* @var string
*/
+ public $airavataInternalGatewayId = null;
+ /**
+ * @var string
+ */
public $gatewayId = null;
/**
* @var int
@@ -707,84 +711,91 @@ class Gateway {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
- 'var' => 'gatewayId',
+ 'var' => 'airavataInternalGatewayId',
'type' => TType::STRING,
),
2 => array(
+ 'var' => 'gatewayId',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
'var' => 'gatewayApprovalStatus',
'type' => TType::I32,
),
- 3 => array(
+ 4 => array(
'var' => 'gatewayName',
'type' => TType::STRING,
),
- 4 => array(
+ 5 => array(
'var' => 'domain',
'type' => TType::STRING,
),
- 5 => array(
+ 6 => array(
'var' => 'emailAddress',
'type' => TType::STRING,
),
- 6 => array(
+ 7 => array(
'var' => 'gatewayAcronym',
'type' => TType::STRING,
),
- 7 => array(
+ 8 => array(
'var' => 'gatewayURL',
'type' => TType::STRING,
),
- 8 => array(
+ 9 => array(
'var' => 'gatewayPublicAbstract',
'type' => TType::STRING,
),
- 9 => array(
+ 10 => array(
'var' => 'reviewProposalDescription',
'type' => TType::STRING,
),
- 10 => array(
+ 11 => array(
'var' => 'gatewayAdminFirstName',
'type' => TType::STRING,
),
- 11 => array(
+ 12 => array(
'var' => 'gatewayAdminLastName',
'type' => TType::STRING,
),
- 12 => array(
+ 13 => array(
'var' => 'gatewayAdminEmail',
'type' => TType::STRING,
),
- 13 => array(
+ 14 => array(
'var' => 'identityServerUserName',
'type' => TType::STRING,
),
- 14 => array(
+ 15 => array(
'var' => 'identityServerPasswordToken',
'type' => TType::STRING,
),
- 15 => array(
+ 16 => array(
'var' => 'declinedReason',
'type' => TType::STRING,
),
- 16 => array(
+ 17 => array(
'var' => 'oauthClientId',
'type' => TType::STRING,
),
- 17 => array(
+ 18 => array(
'var' => 'oauthClientSecret',
'type' => TType::STRING,
),
- 18 => array(
+ 19 => array(
'var' => 'requestCreationTime',
'type' => TType::I64,
),
- 19 => array(
+ 20 => array(
'var' => 'requesterUsername',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
+ if (isset($vals['airavataInternalGatewayId'])) {
+ $this->airavataInternalGatewayId = $vals['airavataInternalGatewayId'];
+ }
if (isset($vals['gatewayId'])) {
$this->gatewayId = $vals['gatewayId'];
}
@@ -866,131 +877,138 @@ class Gateway {
{
case 1:
if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->gatewayId);
+ $xfer += $input->readString($this->airavataInternalGatewayId);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->gatewayId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->gatewayApprovalStatus);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 3:
+ case 4:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->gatewayName);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 4:
+ case 5:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->domain);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 5:
+ case 6:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->emailAddress);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 6:
+ case 7:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->gatewayAcronym);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 7:
+ case 8:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->gatewayURL);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 8:
+ case 9:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->gatewayPublicAbstract);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 9:
+ case 10:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->reviewProposalDescription);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 10:
+ case 11:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->gatewayAdminFirstName);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 11:
+ case 12:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->gatewayAdminLastName);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 12:
+ case 13:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->gatewayAdminEmail);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 13:
+ case 14:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->identityServerUserName);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 14:
+ case 15:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->identityServerPasswordToken);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 15:
+ case 16:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->declinedReason);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 16:
+ case 17:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->oauthClientId);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 17:
+ case 18:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->oauthClientSecret);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 18:
+ case 19:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->requestCreationTime);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 19:
+ case 20:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->requesterUsername);
} else {
@@ -1010,98 +1028,103 @@ class Gateway {
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('Gateway');
+ if ($this->airavataInternalGatewayId !== null) {
+ $xfer += $output->writeFieldBegin('airavataInternalGatewayId', TType::STRING, 1);
+ $xfer += $output->writeString($this->airavataInternalGatewayId);
+ $xfer += $output->writeFieldEnd();
+ }
if ($this->gatewayId !== null) {
- $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 1);
+ $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2);
$xfer += $output->writeString($this->gatewayId);
$xfer += $output->writeFieldEnd();
}
if ($this->gatewayApprovalStatus !== null) {
- $xfer += $output->writeFieldBegin('gatewayApprovalStatus', TType::I32, 2);
+ $xfer += $output->writeFieldBegin('gatewayApprovalStatus', TType::I32, 3);
$xfer += $output->writeI32($this->gatewayApprovalStatus);
$xfer += $output->writeFieldEnd();
}
if ($this->gatewayName !== null) {
- $xfer += $output->writeFieldBegin('gatewayName', TType::STRING, 3);
+ $xfer += $output->writeFieldBegin('gatewayName', TType::STRING, 4);
$xfer += $output->writeString($this->gatewayName);
$xfer += $output->writeFieldEnd();
}
if ($this->domain !== null) {
- $xfer += $output->writeFieldBegin('domain', TType::STRING, 4);
+ $xfer += $output->writeFieldBegin('domain', TType::STRING, 5);
$xfer += $output->writeString($this->domain);
$xfer += $output->writeFieldEnd();
}
if ($this->emailAddress !== null) {
- $xfer += $output->writeFieldBegin('emailAddress', TType::STRING, 5);
+ $xfer += $output->writeFieldBegin('emailAddress', TType::STRING, 6);
$xfer += $output->writeString($this->emailAddress);
$xfer += $output->writeFieldEnd();
}
if ($this->gatewayAcronym !== null) {
- $xfer += $output->writeFieldBegin('gatewayAcronym', TType::STRING, 6);
+ $xfer += $output->writeFieldBegin('gatewayAcronym', TType::STRING, 7);
$xfer += $output->writeString($this->gatewayAcronym);
$xfer += $output->writeFieldEnd();
}
if ($this->gatewayURL !== null) {
- $xfer += $output->writeFieldBegin('gatewayURL', TType::STRING, 7);
+ $xfer += $output->writeFieldBegin('gatewayURL', TType::STRING, 8);
$xfer += $output->writeString($this->gatewayURL);
$xfer += $output->writeFieldEnd();
}
if ($this->gatewayPublicAbstract !== null) {
- $xfer += $output->writeFieldBegin('gatewayPublicAbstract', TType::STRING, 8);
+ $xfer += $output->writeFieldBegin('gatewayPublicAbstract', TType::STRING, 9);
$xfer += $output->writeString($this->gatewayPublicAbstract);
$xfer += $output->writeFieldEnd();
}
if ($this->reviewProposalDescription !== null) {
- $xfer += $output->writeFieldBegin('reviewProposalDescription', TType::STRING, 9);
+ $xfer += $output->writeFieldBegin('reviewProposalDescription', TType::STRING, 10);
$xfer += $output->writeString($this->reviewProposalDescription);
$xfer += $output->writeFieldEnd();
}
if ($this->gatewayAdminFirstName !== null) {
- $xfer += $output->writeFieldBegin('gatewayAdminFirstName', TType::STRING, 10);
+ $xfer += $output->writeFieldBegin('gatewayAdminFirstName', TType::STRING, 11);
$xfer += $output->writeString($this->gatewayAdminFirstName);
$xfer += $output->writeFieldEnd();
}
if ($this->gatewayAdminLastName !== null) {
- $xfer += $output->writeFieldBegin('gatewayAdminLastName', TType::STRING, 11);
+ $xfer += $output->writeFieldBegin('gatewayAdminLastName', TType::STRING, 12);
$xfer += $output->writeString($this->gatewayAdminLastName);
$xfer += $output->writeFieldEnd();
}
if ($this->gatewayAdminEmail !== null) {
- $xfer += $output->writeFieldBegin('gatewayAdminEmail', TType::STRING, 12);
+ $xfer += $output->writeFieldBegin('gatewayAdminEmail', TType::STRING, 13);
$xfer += $output->writeString($this->gatewayAdminEmail);
$xfer += $output->writeFieldEnd();
}
if ($this->identityServerUserName !== null) {
- $xfer += $output->writeFieldBegin('identityServerUserName', TType::STRING, 13);
+ $xfer += $output->writeFieldBegin('identityServerUserName', TType::STRING, 14);
$xfer += $output->writeString($this->identityServerUserName);
$xfer += $output->writeFieldEnd();
}
if ($this->identityServerPasswordToken !== null) {
- $xfer += $output->writeFieldBegin('identityServerPasswordToken', TType::STRING, 14);
+ $xfer += $output->writeFieldBegin('identityServerPasswordToken', TType::STRING, 15);
$xfer += $output->writeString($this->identityServerPasswordToken);
$xfer += $output->writeFieldEnd();
}
if ($this->declinedReason !== null) {
- $xfer += $output->writeFieldBegin('declinedReason', TType::STRING, 15);
+ $xfer += $output->writeFieldBegin('declinedReason', TType::STRING, 16);
$xfer += $output->writeString($this->declinedReason);
$xfer += $output->writeFieldEnd();
}
if ($this->oauthClientId !== null) {
- $xfer += $output->writeFieldBegin('oauthClientId', TType::STRING, 16);
+ $xfer += $output->writeFieldBegin('oauthClientId', TType::STRING, 17);
$xfer += $output->writeString($this->oauthClientId);
$xfer += $output->writeFieldEnd();
}
if ($this->oauthClientSecret !== null) {
- $xfer += $output->writeFieldBegin('oauthClientSecret', TType::STRING, 17);
+ $xfer += $output->writeFieldBegin('oauthClientSecret', TType::STRING, 18);
$xfer += $output->writeString($this->oauthClientSecret);
$xfer += $output->writeFieldEnd();
}
if ($this->requestCreationTime !== null) {
- $xfer += $output->writeFieldBegin('requestCreationTime', TType::I64, 18);
+ $xfer += $output->writeFieldBegin('requestCreationTime', TType::I64, 19);
$xfer += $output->writeI64($this->requestCreationTime);
$xfer += $output->writeFieldEnd();
}
if ($this->requesterUsername !== null) {
- $xfer += $output->writeFieldBegin('requesterUsername', TType::STRING, 19);
+ $xfer += $output->writeFieldBegin('requesterUsername', TType::STRING, 20);
$xfer += $output->writeString($this->requesterUsername);
$xfer += $output->writeFieldEnd();
}
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/3c17052f/app/libraries/Airavata/Service/Iam/Admin/Services/CPI/IamAdminServices.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Service/Iam/Admin/Services/CPI/IamAdminServices.php b/app/libraries/Airavata/Service/Iam/Admin/Services/CPI/IamAdminServices.php
index a6cb9ff..bda8df7 100644
--- a/app/libraries/Airavata/Service/Iam/Admin/Services/CPI/IamAdminServices.php
+++ b/app/libraries/Airavata/Service/Iam/Admin/Services/CPI/IamAdminServices.php
@@ -73,6 +73,13 @@ interface IamAdminServicesIf {
* @throws \Airavata\API\Error\AuthorizationException
*/
public function findUsers(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $email, $userId, \Airavata\Model\Credential\Store\PasswordCredential $isRealmAdminCredentials);
+ /**
+ * @param \Airavata\Model\Security\AuthzToken $authzToken
+ * @param \Airavata\Model\User\UserProfile $userDetails
+ * @throws \Airavata\Service\Iam\Admin\Services\CPI\Error\IamAdminServicesException
+ * @throws \Airavata\API\Error\AuthorizationException
+ */
+ public function updateUserProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\User\UserProfile $userDetails);
}
class IamAdminServicesClient implements \Airavata\Service\Iam\Admin\Services\CPI\IamAdminServicesIf {
@@ -442,6 +449,61 @@ class IamAdminServicesClient implements \Airavata\Service\Iam\Admin\Services\CPI
throw new \Exception("findUsers failed: unknown result");
}
+ public function updateUserProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\User\UserProfile $userDetails)
+ {
+ $this->send_updateUserProfile($authzToken, $userDetails);
+ $this->recv_updateUserProfile();
+ }
+
+ public function send_updateUserProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\User\UserProfile $userDetails)
+ {
+ $args = new \Airavata\Service\Iam\Admin\Services\CPI\IamAdminServices_updateUserProfile_args();
+ $args->authzToken = $authzToken;
+ $args->userDetails = $userDetails;
+ $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'updateUserProfile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('updateUserProfile', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_updateUserProfile()
+ {
+ $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\Service\Iam\Admin\Services\CPI\IamAdminServices_updateUserProfile_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\Service\Iam\Admin\Services\CPI\IamAdminServices_updateUserProfile_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->Idse !== null) {
+ throw $result->Idse;
+ }
+ if ($result->ae !== null) {
+ throw $result->ae;
+ }
+ return;
+ }
+
}
// HELPER FUNCTIONS AND STRUCTURES
@@ -2066,4 +2128,214 @@ class IamAdminServices_findUsers_result {
}
+class IamAdminServices_updateUserProfile_args {
+ static $_TSPEC;
+
+ /**
+ * @var \Airavata\Model\Security\AuthzToken
+ */
+ public $authzToken = null;
+ /**
+ * @var \Airavata\Model\User\UserProfile
+ */
+ public $userDetails = 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' => 'userDetails',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\User\UserProfile',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['authzToken'])) {
+ $this->authzToken = $vals['authzToken'];
+ }
+ if (isset($vals['userDetails'])) {
+ $this->userDetails = $vals['userDetails'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'IamAdminServices_updateUserProfile_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::STRUCT) {
+ $this->userDetails = new \Airavata\Model\User\UserProfile();
+ $xfer += $this->userDetails->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('IamAdminServices_updateUserProfile_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->userDetails !== null) {
+ if (!is_object($this->userDetails)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('userDetails', TType::STRUCT, 2);
+ $xfer += $this->userDetails->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class IamAdminServices_updateUserProfile_result {
+ static $_TSPEC;
+
+ /**
+ * @var \Airavata\Service\Iam\Admin\Services\CPI\Error\IamAdminServicesException
+ */
+ public $Idse = null;
+ /**
+ * @var \Airavata\API\Error\AuthorizationException
+ */
+ public $ae = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'Idse',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Service\Iam\Admin\Services\CPI\Error\IamAdminServicesException',
+ ),
+ 2 => array(
+ 'var' => 'ae',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\AuthorizationException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['Idse'])) {
+ $this->Idse = $vals['Idse'];
+ }
+ if (isset($vals['ae'])) {
+ $this->ae = $vals['ae'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'IamAdminServices_updateUserProfile_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 1:
+ if ($ftype == TType::STRUCT) {
+ $this->Idse = new \Airavata\Service\Iam\Admin\Services\CPI\Error\IamAdminServicesException();
+ $xfer += $this->Idse->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ 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('IamAdminServices_updateUserProfile_result');
+ if ($this->Idse !== null) {
+ $xfer += $output->writeFieldBegin('Idse', TType::STRUCT, 1);
+ $xfer += $this->Idse->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ae !== null) {
+ $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 2);
+ $xfer += $this->ae->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/3c17052f/app/libraries/Airavata/Service/Profile/Tenant/CPI/Error/Types.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Service/Profile/Tenant/CPI/Error/Types.php b/app/libraries/Airavata/Service/Profile/Tenant/CPI/Error/Types.php
new file mode 100644
index 0000000..796dbf6
--- /dev/null
+++ b/app/libraries/Airavata/Service/Profile/Tenant/CPI/Error/Types.php
@@ -0,0 +1,95 @@
+<?php
+namespace Airavata\Service\Profile\Tenant\CPI\Error;
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+use Thrift\Base\TBase;
+use Thrift\Type\TType;
+use Thrift\Type\TMessageType;
+use Thrift\Exception\TException;
+use Thrift\Exception\TProtocolException;
+use Thrift\Protocol\TProtocol;
+use Thrift\Protocol\TBinaryProtocolAccelerated;
+use Thrift\Exception\TApplicationException;
+
+
+class TenantProfileServiceException extends TException {
+ static $_TSPEC;
+
+ /**
+ * @var string
+ */
+ public $message = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'message',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['message'])) {
+ $this->message = $vals['message'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'TenantProfileServiceException';
+ }
+
+ 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->message);
+ } 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('TenantProfileServiceException');
+ if ($this->message !== null) {
+ $xfer += $output->writeFieldBegin('message', TType::STRING, 1);
+ $xfer += $output->writeString($this->message);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+
[5/5] airavata-php-gateway git commit: AIRAVATA-2408 Updating Thrift
stubs
Posted by ma...@apache.org.
AIRAVATA-2408 Updating Thrift stubs
Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/135077cd
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/135077cd
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/135077cd
Branch: refs/heads/keycloak-integration
Commit: 135077cd6d77fcd56733b8fd149c88e823d4b1d7
Parents: 3c17052
Author: Marcus Christie <ma...@iu.edu>
Authored: Mon Jun 12 16:46:00 2017 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Mon Jun 12 16:46:00 2017 -0400
----------------------------------------------------------------------
app/libraries/Airavata/API/Airavata.php | 11335 ++++++++++---------------
1 file changed, 4512 insertions(+), 6823 deletions(-)
----------------------------------------------------------------------
[4/5] airavata-php-gateway git commit: AIRAVATA-2408 Updating Thrift
stubs
Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/135077cd/app/libraries/Airavata/API/Airavata.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/API/Airavata.php b/app/libraries/Airavata/API/Airavata.php
index 9c20f39..ae27035 100644
--- a/app/libraries/Airavata/API/Airavata.php
+++ b/app/libraries/Airavata/API/Airavata.php
@@ -4095,126 +4095,6 @@ interface AiravataIf {
* @throws \Airavata\API\Error\AuthorizationException
*/
public function getAllGroupsUserBelongs(\Airavata\Model\Security\AuthzToken $authzToken, $userName, $gatewayId);
- /**
- * @param \Airavata\Model\Security\AuthzToken $authzToken
- * @param \Airavata\Model\User\UserProfile $userProfile
- * @return string
- * @throws \Airavata\API\Error\InvalidRequestException
- * @throws \Airavata\API\Error\AiravataClientException
- * @throws \Airavata\API\Error\AiravataSystemException
- * @throws \Airavata\API\Error\AuthorizationException
- */
- public function addUserProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\User\UserProfile $userProfile);
- /**
- * @param \Airavata\Model\Security\AuthzToken $authzToken
- * @param \Airavata\Model\User\UserProfile $userProfile
- * @return bool
- * @throws \Airavata\API\Error\InvalidRequestException
- * @throws \Airavata\API\Error\AiravataClientException
- * @throws \Airavata\API\Error\AiravataSystemException
- * @throws \Airavata\API\Error\AuthorizationException
- */
- public function updateUserProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\User\UserProfile $userProfile);
- /**
- * @param \Airavata\Model\Security\AuthzToken $authzToken
- * @param string $userId
- * @param string $gatewayId
- * @return \Airavata\Model\User\UserProfile * A structure holding the user profile and its child models.
- * *
- * * Notes:
- * * The model does not include passwords as it is assumed an external identity provider is used to authenticate user.
- * * References:
- * * NSF Demographic Information - http://www.nsf.gov/pubs/2000/00form1225/00form1225.doc
- * * LDAP Schema - https://tools.ietf.org/html/rfc4519
- * * SCIM 2.0 - https://tools.ietf.org/html/rfc7643
- * *
- * * userModelVersion:
- * * Version number of profile
- * *
- * * airavataInternalUserId:
- * * internal to Airavata, not intended to be used outside of the Airavata platform or possibly by gateways
- * * (that is, never shown to users), never reassigned, REQUIRED
- * *
- * * userId:
- * * Externally assertable unique identifier. SAML (primarly in higher education, academic) tends to keep
- * * user name less opaque. OpenID Connect maintains them to be opaque.
- * *
- * * firstName, middleName, lastName:
- * * First and Last names as assertede by the user
- * *
- * * namePrefix, nameSuffix:
- * * prefix and suffix to the users name as asserted by the user
- * *
- * * emails:
- * * Email identifier are Verified, REQUIRED and MULTIVALUED
- * *
- * * userName:
- * * Name-based identifiers can be multivalues. To keep it simple, Airavata will make it a string.
- * * In the future these can be enumerated as:
- * * Official name (as asserted possibly by some external identity provider)
- * * Prefered name (as asserted or suggested by user directly)
- * * Components:
- * * givenName
- * * surname (familyName)
- * * displayName (often asserted by user to handle things like middle names, suffix, prefix, and the like)
- * *
- * * orcidId: ORCID ID - http://orcid.org/about/what-is-orcid)
- * *
- * * phones: Telephone MULTIVALUED
- * *
- * * country: Country of Residance
- * *
- * * nationality Countries of citizenship
- * *
- * * comments:
- * * Free-form information (treated as opaque by Airavata and simply passed to resource).
- * *
- * * labeledURI:
- * * Google Scholar, Web of Science, ACS, e.t.c
- * *
- * * timeZone:
- * * User’s preferred timezone - IANA Timezone Databases - http://www.iana.org/time-zones.
- * *
- *
- * @throws \Airavata\API\Error\InvalidRequestException
- * @throws \Airavata\API\Error\AiravataClientException
- * @throws \Airavata\API\Error\AiravataSystemException
- * @throws \Airavata\API\Error\AuthorizationException
- */
- public function getUserProfileById(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayId);
- /**
- * @param \Airavata\Model\Security\AuthzToken $authzToken
- * @param string $userId
- * @return bool
- * @throws \Airavata\API\Error\InvalidRequestException
- * @throws \Airavata\API\Error\AiravataClientException
- * @throws \Airavata\API\Error\AiravataSystemException
- * @throws \Airavata\API\Error\AuthorizationException
- */
- public function deleteUserProfile(\Airavata\Model\Security\AuthzToken $authzToken, $userId);
- /**
- * @param \Airavata\Model\Security\AuthzToken $authzToken
- * @param string $gatewayId
- * @param int $offset
- * @param int $limit
- * @return \Airavata\Model\User\UserProfile[]
- * @throws \Airavata\API\Error\InvalidRequestException
- * @throws \Airavata\API\Error\AiravataClientException
- * @throws \Airavata\API\Error\AiravataSystemException
- * @throws \Airavata\API\Error\AuthorizationException
- */
- public function getAllUserProfilesInGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $offset, $limit);
- /**
- * @param \Airavata\Model\Security\AuthzToken $authzToken
- * @param string $userId
- * @param string $gatewayId
- * @return bool
- * @throws \Airavata\API\Error\InvalidRequestException
- * @throws \Airavata\API\Error\AiravataClientException
- * @throws \Airavata\API\Error\AiravataSystemException
- * @throws \Airavata\API\Error\AuthorizationException
- */
- public function doesUserProfileExist(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayId);
}
class AiravataClient implements \Airavata\API\AiravataIf {
@@ -15175,394 +15055,6 @@ class AiravataClient implements \Airavata\API\AiravataIf {
throw new \Exception("getAllGroupsUserBelongs failed: unknown result");
}
- public function addUserProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\User\UserProfile $userProfile)
- {
- $this->send_addUserProfile($authzToken, $userProfile);
- return $this->recv_addUserProfile();
- }
-
- public function send_addUserProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\User\UserProfile $userProfile)
- {
- $args = new \Airavata\API\Airavata_addUserProfile_args();
- $args->authzToken = $authzToken;
- $args->userProfile = $userProfile;
- $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
- if ($bin_accel)
- {
- thrift_protocol_write_binary($this->output_, 'addUserProfile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
- }
- else
- {
- $this->output_->writeMessageBegin('addUserProfile', TMessageType::CALL, $this->seqid_);
- $args->write($this->output_);
- $this->output_->writeMessageEnd();
- $this->output_->getTransport()->flush();
- }
- }
-
- public function recv_addUserProfile()
- {
- $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_addUserProfile_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_addUserProfile_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("addUserProfile failed: unknown result");
- }
-
- public function updateUserProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\User\UserProfile $userProfile)
- {
- $this->send_updateUserProfile($authzToken, $userProfile);
- return $this->recv_updateUserProfile();
- }
-
- public function send_updateUserProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\User\UserProfile $userProfile)
- {
- $args = new \Airavata\API\Airavata_updateUserProfile_args();
- $args->authzToken = $authzToken;
- $args->userProfile = $userProfile;
- $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
- if ($bin_accel)
- {
- thrift_protocol_write_binary($this->output_, 'updateUserProfile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
- }
- else
- {
- $this->output_->writeMessageBegin('updateUserProfile', TMessageType::CALL, $this->seqid_);
- $args->write($this->output_);
- $this->output_->writeMessageEnd();
- $this->output_->getTransport()->flush();
- }
- }
-
- public function recv_updateUserProfile()
- {
- $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_updateUserProfile_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_updateUserProfile_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("updateUserProfile failed: unknown result");
- }
-
- public function getUserProfileById(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayId)
- {
- $this->send_getUserProfileById($authzToken, $userId, $gatewayId);
- return $this->recv_getUserProfileById();
- }
-
- public function send_getUserProfileById(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayId)
- {
- $args = new \Airavata\API\Airavata_getUserProfileById_args();
- $args->authzToken = $authzToken;
- $args->userId = $userId;
- $args->gatewayId = $gatewayId;
- $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
- if ($bin_accel)
- {
- thrift_protocol_write_binary($this->output_, 'getUserProfileById', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
- }
- else
- {
- $this->output_->writeMessageBegin('getUserProfileById', TMessageType::CALL, $this->seqid_);
- $args->write($this->output_);
- $this->output_->writeMessageEnd();
- $this->output_->getTransport()->flush();
- }
- }
-
- public function recv_getUserProfileById()
- {
- $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_getUserProfileById_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_getUserProfileById_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("getUserProfileById failed: unknown result");
- }
-
- public function deleteUserProfile(\Airavata\Model\Security\AuthzToken $authzToken, $userId)
- {
- $this->send_deleteUserProfile($authzToken, $userId);
- return $this->recv_deleteUserProfile();
- }
-
- public function send_deleteUserProfile(\Airavata\Model\Security\AuthzToken $authzToken, $userId)
- {
- $args = new \Airavata\API\Airavata_deleteUserProfile_args();
- $args->authzToken = $authzToken;
- $args->userId = $userId;
- $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
- if ($bin_accel)
- {
- thrift_protocol_write_binary($this->output_, 'deleteUserProfile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
- }
- else
- {
- $this->output_->writeMessageBegin('deleteUserProfile', TMessageType::CALL, $this->seqid_);
- $args->write($this->output_);
- $this->output_->writeMessageEnd();
- $this->output_->getTransport()->flush();
- }
- }
-
- public function recv_deleteUserProfile()
- {
- $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_deleteUserProfile_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_deleteUserProfile_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("deleteUserProfile failed: unknown result");
- }
-
- public function getAllUserProfilesInGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $offset, $limit)
- {
- $this->send_getAllUserProfilesInGateway($authzToken, $gatewayId, $offset, $limit);
- return $this->recv_getAllUserProfilesInGateway();
- }
-
- public function send_getAllUserProfilesInGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $offset, $limit)
- {
- $args = new \Airavata\API\Airavata_getAllUserProfilesInGateway_args();
- $args->authzToken = $authzToken;
- $args->gatewayId = $gatewayId;
- $args->offset = $offset;
- $args->limit = $limit;
- $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
- if ($bin_accel)
- {
- thrift_protocol_write_binary($this->output_, 'getAllUserProfilesInGateway', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
- }
- else
- {
- $this->output_->writeMessageBegin('getAllUserProfilesInGateway', TMessageType::CALL, $this->seqid_);
- $args->write($this->output_);
- $this->output_->writeMessageEnd();
- $this->output_->getTransport()->flush();
- }
- }
-
- public function recv_getAllUserProfilesInGateway()
- {
- $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_getAllUserProfilesInGateway_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_getAllUserProfilesInGateway_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("getAllUserProfilesInGateway failed: unknown result");
- }
-
- public function doesUserProfileExist(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayId)
- {
- $this->send_doesUserProfileExist($authzToken, $userId, $gatewayId);
- return $this->recv_doesUserProfileExist();
- }
-
- public function send_doesUserProfileExist(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayId)
- {
- $args = new \Airavata\API\Airavata_doesUserProfileExist_args();
- $args->authzToken = $authzToken;
- $args->userId = $userId;
- $args->gatewayId = $gatewayId;
- $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
- if ($bin_accel)
- {
- thrift_protocol_write_binary($this->output_, 'doesUserProfileExist', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
- }
- else
- {
- $this->output_->writeMessageBegin('doesUserProfileExist', TMessageType::CALL, $this->seqid_);
- $args->write($this->output_);
- $this->output_->writeMessageEnd();
- $this->output_->getTransport()->flush();
- }
- }
-
- public function recv_doesUserProfileExist()
- {
- $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_doesUserProfileExist_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_doesUserProfileExist_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("doesUserProfileExist failed: unknown result");
- }
-
}
// HELPER FUNCTIONS AND STRUCTURES
@@ -30870,1863 +30362,21 @@ class Airavata_cloneExperimentByAdmin_args {
break;
case 2:
if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->existingExperimentID);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->newExperimentName);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 4:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->newExperimentProjectId);
- } 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_cloneExperimentByAdmin_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->existingExperimentID !== null) {
- $xfer += $output->writeFieldBegin('existingExperimentID', TType::STRING, 2);
- $xfer += $output->writeString($this->existingExperimentID);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->newExperimentName !== null) {
- $xfer += $output->writeFieldBegin('newExperimentName', TType::STRING, 3);
- $xfer += $output->writeString($this->newExperimentName);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->newExperimentProjectId !== null) {
- $xfer += $output->writeFieldBegin('newExperimentProjectId', TType::STRING, 4);
- $xfer += $output->writeString($this->newExperimentProjectId);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
-
-}
-
-class Airavata_cloneExperimentByAdmin_result {
- static $_TSPEC;
-
- /**
- * @var string
- */
- public $success = null;
- /**
- * @var \Airavata\API\Error\InvalidRequestException
- */
- public $ire = null;
- /**
- * @var \Airavata\API\Error\ExperimentNotFoundException
- */
- public $enf = 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;
- /**
- * @var \Airavata\API\Error\ProjectNotFoundException
- */
- public $pnfe = null;
-
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 0 => array(
- 'var' => 'success',
- 'type' => TType::STRING,
- ),
- 1 => array(
- 'var' => 'ire',
- 'type' => TType::STRUCT,
- 'class' => '\Airavata\API\Error\InvalidRequestException',
- ),
- 2 => array(
- 'var' => 'enf',
- 'type' => TType::STRUCT,
- 'class' => '\Airavata\API\Error\ExperimentNotFoundException',
- ),
- 3 => array(
- 'var' => 'ace',
- 'type' => TType::STRUCT,
- 'class' => '\Airavata\API\Error\AiravataClientException',
- ),
- 4 => array(
- 'var' => 'ase',
- 'type' => TType::STRUCT,
- 'class' => '\Airavata\API\Error\AiravataSystemException',
- ),
- 5 => array(
- 'var' => 'ae',
- 'type' => TType::STRUCT,
- 'class' => '\Airavata\API\Error\AuthorizationException',
- ),
- 6 => array(
- 'var' => 'pnfe',
- 'type' => TType::STRUCT,
- 'class' => '\Airavata\API\Error\ProjectNotFoundException',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['success'])) {
- $this->success = $vals['success'];
- }
- if (isset($vals['ire'])) {
- $this->ire = $vals['ire'];
- }
- if (isset($vals['enf'])) {
- $this->enf = $vals['enf'];
- }
- if (isset($vals['ace'])) {
- $this->ace = $vals['ace'];
- }
- if (isset($vals['ase'])) {
- $this->ase = $vals['ase'];
- }
- if (isset($vals['ae'])) {
- $this->ae = $vals['ae'];
- }
- if (isset($vals['pnfe'])) {
- $this->pnfe = $vals['pnfe'];
- }
- }
- }
-
- public function getName() {
- return 'Airavata_cloneExperimentByAdmin_result';
- }
-
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 0:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->success);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- 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->enf = new \Airavata\API\Error\ExperimentNotFoundException();
- $xfer += $this->enf->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::STRUCT) {
- $this->ace = new \Airavata\API\Error\AiravataClientException();
- $xfer += $this->ace->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 4:
- if ($ftype == TType::STRUCT) {
- $this->ase = new \Airavata\API\Error\AiravataSystemException();
- $xfer += $this->ase->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 5:
- if ($ftype == TType::STRUCT) {
- $this->ae = new \Airavata\API\Error\AuthorizationException();
- $xfer += $this->ae->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 6:
- if ($ftype == TType::STRUCT) {
- $this->pnfe = new \Airavata\API\Error\ProjectNotFoundException();
- $xfer += $this->pnfe->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_cloneExperimentByAdmin_result');
- if ($this->success !== null) {
- $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
- $xfer += $output->writeString($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->enf !== null) {
- $xfer += $output->writeFieldBegin('enf', TType::STRUCT, 2);
- $xfer += $this->enf->write($output);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->ace !== null) {
- $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 3);
- $xfer += $this->ace->write($output);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->ase !== null) {
- $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 4);
- $xfer += $this->ase->write($output);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->ae !== null) {
- $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 5);
- $xfer += $this->ae->write($output);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->pnfe !== null) {
- $xfer += $output->writeFieldBegin('pnfe', TType::STRUCT, 6);
- $xfer += $this->pnfe->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
-
-}
-
-class Airavata_terminateExperiment_args {
- static $_TSPEC;
-
- /**
- * @var \Airavata\Model\Security\AuthzToken
- */
- public $authzToken = null;
- /**
- * @var string
- */
- public $airavataExperimentId = null;
- /**
- * @var string
- */
- public $gatewayId = 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' => 'airavataExperimentId',
- 'type' => TType::STRING,
- ),
- 3 => array(
- 'var' => 'gatewayId',
- 'type' => TType::STRING,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['authzToken'])) {
- $this->authzToken = $vals['authzToken'];
- }
- if (isset($vals['airavataExperimentId'])) {
- $this->airavataExperimentId = $vals['airavataExperimentId'];
- }
- if (isset($vals['gatewayId'])) {
- $this->gatewayId = $vals['gatewayId'];
- }
- }
- }
-
- public function getName() {
- return 'Airavata_terminateExperiment_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->airavataExperimentId);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->gatewayId);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
-
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('Airavata_terminateExperiment_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->airavataExperimentId !== null) {
- $xfer += $output->writeFieldBegin('airavataExperimentId', TType::STRING, 2);
- $xfer += $output->writeString($this->airavataExperimentId);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->gatewayId !== null) {
- $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 3);
- $xfer += $output->writeString($this->gatewayId);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
-
-}
-
-class Airavata_terminateExperiment_result {
- static $_TSPEC;
-
- /**
- * @var \Airavata\API\Error\InvalidRequestException
- */
- public $ire = null;
- /**
- * @var \Airavata\API\Error\ExperimentNotFoundException
- */
- public $enf = 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(
- 1 => array(
- 'var' => 'ire',
- 'type' => TType::STRUCT,
- 'class' => '\Airavata\API\Error\InvalidRequestException',
- ),
- 2 => array(
- 'var' => 'enf',
- 'type' => TType::STRUCT,
- 'class' => '\Airavata\API\Error\ExperimentNotFoundException',
- ),
- 3 => array(
- 'var' => 'ace',
- 'type' => TType::STRUCT,
- 'class' => '\Airavata\API\Error\AiravataClientException',
- ),
- 4 => array(
- 'var' => 'ase',
- 'type' => TType::STRUCT,
- 'class' => '\Airavata\API\Error\AiravataSystemException',
- ),
- 5 => array(
- 'var' => 'ae',
- 'type' => TType::STRUCT,
- 'class' => '\Airavata\API\Error\AuthorizationException',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['ire'])) {
- $this->ire = $vals['ire'];
- }
- if (isset($vals['enf'])) {
- $this->enf = $vals['enf'];
- }
- 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_terminateExperiment_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 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->enf = new \Airavata\API\Error\ExperimentNotFoundException();
- $xfer += $this->enf->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::STRUCT) {
- $this->ace = new \Airavata\API\Error\AiravataClientException();
- $xfer += $this->ace->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 4:
- if ($ftype == TType::STRUCT) {
- $this->ase = new \Airavata\API\Error\AiravataSystemException();
- $xfer += $this->ase->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 5:
- 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_terminateExperiment_result');
- if ($this->ire !== null) {
- $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
- $xfer += $this->ire->write($output);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->enf !== null) {
- $xfer += $output->writeFieldBegin('enf', TType::STRUCT, 2);
- $xfer += $this->enf->write($output);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->ace !== null) {
- $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 3);
- $xfer += $this->ace->write($output);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->ase !== null) {
- $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 4);
- $xfer += $this->ase->write($output);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->ae !== null) {
- $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 5);
- $xfer += $this->ae->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
-
-}
-
-class Airavata_registerApplicationModule_args {
- static $_TSPEC;
-
- /**
- * @var \Airavata\Model\Security\AuthzToken
- */
- public $authzToken = null;
- /**
- * @var string
- */
- public $gatewayId = null;
- /**
- * @var \Airavata\Model\AppCatalog\AppDeployment\ApplicationModule
- */
- public $applicationModule = 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' => 'gatewayId',
- 'type' => TType::STRING,
- ),
- 3 => array(
- 'var' => 'applicationModule',
- 'type' => TType::STRUCT,
- 'class' => '\Airavata\Model\AppCatalog\AppDeployment\ApplicationModule',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['authzToken'])) {
- $this->authzToken = $vals['authzToken'];
- }
- if (isset($vals['gatewayId'])) {
- $this->gatewayId = $vals['gatewayId'];
- }
- if (isset($vals['applicationModule'])) {
- $this->applicationModule = $vals['applicationModule'];
- }
- }
- }
-
- public function getName() {
- return 'Airavata_registerApplicationModule_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->gatewayId);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::STRUCT) {
- $this->applicationModule = new \Airavata\Model\AppCatalog\AppDeployment\ApplicationModule();
- $xfer += $this->applicationModule->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_registerApplicationModule_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->gatewayId !== null) {
- $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2);
- $xfer += $output->writeString($this->gatewayId);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->applicationModule !== null) {
- if (!is_object($this->applicationModule)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('applicationModule', TType::STRUCT, 3);
- $xfer += $this->applicationModule->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
-
-}
-
-class Airavata_registerApplicationModule_result {
- static $_TSPEC;
-
- /**
- * @var string
- */
- 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::STRING,
- ),
- 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_registerApplicationModule_result';
- }
-
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 0:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->success);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- 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_registerApplicationModule_result');
- if ($this->success !== null) {
- $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
- $xfer += $output->writeString($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_getApplicationModule_args {
- static $_TSPEC;
-
- /**
- * @var \Airavata\Model\Security\AuthzToken
- */
- public $authzToken = null;
- /**
- * @var string
- */
- public $appModuleId = 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' => 'appModuleId',
- 'type' => TType::STRING,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['authzToken'])) {
- $this->authzToken = $vals['authzToken'];
- }
- if (isset($vals['appModuleId'])) {
- $this->appModuleId = $vals['appModuleId'];
- }
- }
- }
-
- public function getName() {
- return 'Airavata_getApplicationModule_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->appModuleId);
- } 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_getApplicationModule_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->appModuleId !== null) {
- $xfer += $output->writeFieldBegin('appModuleId', TType::STRING, 2);
- $xfer += $output->writeString($this->appModuleId);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
-
-}
-
-class Airavata_getApplicationModule_result {
- static $_TSPEC;
-
- /**
- * @var \Airavata\Model\AppCatalog\AppDeployment\ApplicationModule
- */
- 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::STRUCT,
- 'class' => '\Airavata\Model\AppCatalog\AppDeployment\ApplicationModule',
- ),
- 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_getApplicationModule_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::STRUCT) {
- $this->success = new \Airavata\Model\AppCatalog\AppDeployment\ApplicationModule();
- $xfer += $this->success->read($input);
- } 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_getApplicationModule_result');
- if ($this->success !== null) {
- if (!is_object($this->success)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
- $xfer += $this->success->write($output);
- $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_updateApplicationModule_args {
- static $_TSPEC;
-
- /**
- * @var \Airavata\Model\Security\AuthzToken
- */
- public $authzToken = null;
- /**
- * @var string
- */
- public $appModuleId = null;
- /**
- * @var \Airavata\Model\AppCatalog\AppDeployment\ApplicationModule
- */
- public $applicationModule = 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' => 'appModuleId',
- 'type' => TType::STRING,
- ),
- 3 => array(
- 'var' => 'applicationModule',
- 'type' => TType::STRUCT,
- 'class' => '\Airavata\Model\AppCatalog\AppDeployment\ApplicationModule',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['authzToken'])) {
- $this->authzToken = $vals['authzToken'];
- }
- if (isset($vals['appModuleId'])) {
- $this->appModuleId = $vals['appModuleId'];
- }
- if (isset($vals['applicationModule'])) {
- $this->applicationModule = $vals['applicationModule'];
- }
- }
- }
-
- public function getName() {
- return 'Airavata_updateApplicationModule_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->appModuleId);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::STRUCT) {
- $this->applicationModule = new \Airavata\Model\AppCatalog\AppDeployment\ApplicationModule();
- $xfer += $this->applicationModule->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_updateApplicationModule_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->appModuleId !== null) {
- $xfer += $output->writeFieldBegin('appModuleId', TType::STRING, 2);
- $xfer += $output->writeString($this->appModuleId);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->applicationModule !== null) {
- if (!is_object($this->applicationModule)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('applicationModule', TType::STRUCT, 3);
- $xfer += $this->applicationModule->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
-
-}
-
-class Airavata_updateApplicationModule_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_updateApplicationModule_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_updateApplicationModule_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_getAllAppModules_args {
- static $_TSPEC;
-
- /**
- * @var \Airavata\Model\Security\AuthzToken
- */
- public $authzToken = null;
- /**
- * @var string
- */
- public $gatewayId = 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' => 'gatewayId',
- 'type' => TType::STRING,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['authzToken'])) {
- $this->authzToken = $vals['authzToken'];
- }
- if (isset($vals['gatewayId'])) {
- $this->gatewayId = $vals['gatewayId'];
- }
- }
- }
-
- public function getName() {
- return 'Airavata_getAllAppModules_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->gatewayId);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
-
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('Airavata_getAllAppModules_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->gatewayId !== null) {
- $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2);
- $xfer += $output->writeString($this->gatewayId);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
-
-}
-
-class Airavata_getAllAppModules_result {
- static $_TSPEC;
-
- /**
- * @var \Airavata\Model\AppCatalog\AppDeployment\ApplicationModule[]
- */
- 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::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => '\Airavata\Model\AppCatalog\AppDeployment\ApplicationModule',
- ),
- ),
- 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_getAllAppModules_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::LST) {
- $this->success = array();
- $_size136 = 0;
- $_etype139 = 0;
- $xfer += $input->readListBegin($_etype139, $_size136);
- for ($_i140 = 0; $_i140 < $_size136; ++$_i140)
- {
- $elem141 = null;
- $elem141 = new \Airavata\Model\AppCatalog\AppDeployment\ApplicationModule();
- $xfer += $elem141->read($input);
- $this->success []= $elem141;
- }
- $xfer += $input->readListEnd();
- } 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_getAllAppModules_result');
- if ($this->success !== null) {
- if (!is_array($this->success)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('success', TType::LST, 0);
- {
- $output->writeListBegin(TType::STRUCT, count($this->success));
- {
- foreach ($this->success as $iter142)
- {
- $xfer += $iter142->write($output);
- }
- }
- $output->writeListEnd();
- }
- $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_deleteApplicationModule_args {
- static $_TSPEC;
-
- /**
- * @var \Airavata\Model\Security\AuthzToken
- */
- public $authzToken = null;
- /**
- * @var string
- */
- public $appModuleId = 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' => 'appModuleId',
- 'type' => TType::STRING,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['authzToken'])) {
- $this->authzToken = $vals['authzToken'];
- }
- if (isset($vals['appModuleId'])) {
- $this->appModuleId = $vals['appModuleId'];
- }
- }
- }
-
- public function getName() {
- return 'Airavata_deleteApplicationModule_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->appModuleId);
+ $xfer += $input->readString($this->existingExperimentID);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->newExperimentName);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->newExperimentProjectId);
} else {
$xfer += $input->skip($ftype);
}
@@ -32743,7 +30393,7 @@ class Airavata_deleteApplicationModule_args {
public function write($output) {
$xfer = 0;
- $xfer += $output->writeStructBegin('Airavata_deleteApplicationModule_args');
+ $xfer += $output->writeStructBegin('Airavata_cloneExperimentByAdmin_args');
if ($this->authzToken !== null) {
if (!is_object($this->authzToken)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
@@ -32752,9 +30402,19 @@ class Airavata_deleteApplicationModule_args {
$xfer += $this->authzToken->write($output);
$xfer += $output->writeFieldEnd();
}
- if ($this->appModuleId !== null) {
- $xfer += $output->writeFieldBegin('appModuleId', TType::STRING, 2);
- $xfer += $output->writeString($this->appModuleId);
+ if ($this->existingExperimentID !== null) {
+ $xfer += $output->writeFieldBegin('existingExperimentID', TType::STRING, 2);
+ $xfer += $output->writeString($this->existingExperimentID);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->newExperimentName !== null) {
+ $xfer += $output->writeFieldBegin('newExperimentName', TType::STRING, 3);
+ $xfer += $output->writeString($this->newExperimentName);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->newExperimentProjectId !== null) {
+ $xfer += $output->writeFieldBegin('newExperimentProjectId', TType::STRING, 4);
+ $xfer += $output->writeString($this->newExperimentProjectId);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
@@ -32764,11 +30424,11 @@ class Airavata_deleteApplicationModule_args {
}
-class Airavata_deleteApplicationModule_result {
+class Airavata_cloneExperimentByAdmin_result {
static $_TSPEC;
/**
- * @var bool
+ * @var string
*/
public $success = null;
/**
@@ -32776,6 +30436,10 @@ class Airavata_deleteApplicationModule_result {
*/
public $ire = null;
/**
+ * @var \Airavata\API\Error\ExperimentNotFoundException
+ */
+ public $enf = null;
+ /**
* @var \Airavata\API\Error\AiravataClientException
*/
public $ace = null;
@@ -32787,13 +30451,17 @@ class Airavata_deleteApplicationModule_result {
* @var \Airavata\API\Error\AuthorizationException
*/
public $ae = null;
+ /**
+ * @var \Airavata\API\Error\ProjectNotFoundException
+ */
+ public $pnfe = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
0 => array(
'var' => 'success',
- 'type' => TType::BOOL,
+ 'type' => TType::STRING,
),
1 => array(
'var' => 'ire',
@@ -32801,20 +30469,30 @@ class Airavata_deleteApplicationModule_result {
'class' => '\Airavata\API\Error\InvalidRequestException',
),
2 => array(
+ 'var' => 'enf',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\ExperimentNotFoundException',
+ ),
+ 3 => array(
'var' => 'ace',
'type' => TType::STRUCT,
'class' => '\Airavata\API\Error\AiravataClientException',
),
- 3 => array(
+ 4 => array(
'var' => 'ase',
'type' => TType::STRUCT,
'class' => '\Airavata\API\Error\AiravataSystemException',
),
- 4 => array(
+ 5 => array(
'var' => 'ae',
'type' => TType::STRUCT,
'class' => '\Airavata\API\Error\AuthorizationException',
),
+ 6 => array(
+ 'var' => 'pnfe',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\ProjectNotFoundException',
+ ),
);
}
if (is_array($vals)) {
@@ -32824,6 +30502,9 @@ class Airavata_deleteApplicationModule_result {
if (isset($vals['ire'])) {
$this->ire = $vals['ire'];
}
+ if (isset($vals['enf'])) {
+ $this->enf = $vals['enf'];
+ }
if (isset($vals['ace'])) {
$this->ace = $vals['ace'];
}
@@ -32833,11 +30514,14 @@ class Airavata_deleteApplicationModule_result {
if (isset($vals['ae'])) {
$this->ae = $vals['ae'];
}
+ if (isset($vals['pnfe'])) {
+ $this->pnfe = $vals['pnfe'];
+ }
}
}
public function getName() {
- return 'Airavata_deleteApplicationModule_result';
+ return 'Airavata_cloneExperimentByAdmin_result';
}
public function read($input)
@@ -32856,8 +30540,8 @@ class Airavata_deleteApplicationModule_result {
switch ($fid)
{
case 0:
- if ($ftype == TType::BOOL) {
- $xfer += $input->readBool($this->success);
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->success);
} else {
$xfer += $input->skip($ftype);
}
@@ -32872,13 +30556,21 @@ class Airavata_deleteApplicationModule_result {
break;
case 2:
if ($ftype == TType::STRUCT) {
+ $this->enf = new \Airavata\API\Error\ExperimentNotFoundException();
+ $xfer += $this->enf->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRUCT) {
$this->ace = new \Airavata\API\Error\AiravataClientException();
$xfer += $this->ace->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 3:
+ case 4:
if ($ftype == TType::STRUCT) {
$this->ase = new \Airavata\API\Error\AiravataSystemException();
$xfer += $this->ase->read($input);
@@ -32886,7 +30578,7 @@ class Airavata_deleteApplicationModule_result {
$xfer += $input->skip($ftype);
}
break;
- case 4:
+ case 5:
if ($ftype == TType::STRUCT) {
$this->ae = new \Airavata\API\Error\AuthorizationException();
$xfer += $this->ae->read($input);
@@ -32894,6 +30586,14 @@ class Airavata_deleteApplicationModule_result {
$xfer += $input->skip($ftype);
}
break;
+ case 6:
+ if ($ftype == TType::STRUCT) {
+ $this->pnfe = new \Airavata\API\Error\ProjectNotFoundException();
+ $xfer += $this->pnfe->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
default:
$xfer += $input->skip($ftype);
break;
@@ -32906,10 +30606,10 @@ class Airavata_deleteApplicationModule_result {
public function write($output) {
$xfer = 0;
- $xfer += $output->writeStructBegin('Airavata_deleteApplicationModule_result');
+ $xfer += $output->writeStructBegin('Airavata_cloneExperimentByAdmin_result');
if ($this->success !== null) {
- $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
- $xfer += $output->writeBool($this->success);
+ $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
+ $xfer += $output->writeString($this->success);
$xfer += $output->writeFieldEnd();
}
if ($this->ire !== null) {
@@ -32917,21 +30617,31 @@ class Airavata_deleteApplicationModule_result {
$xfer += $this->ire->write($output);
$xfer += $output->writeFieldEnd();
}
+ if ($this->enf !== null) {
+ $xfer += $output->writeFieldBegin('enf', TType::STRUCT, 2);
+ $xfer += $this->enf->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
if ($this->ace !== null) {
- $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
+ $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 3);
$xfer += $this->ace->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->ase !== null) {
- $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
+ $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 4);
$xfer += $this->ase->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->ae !== null) {
- $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 4);
+ $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 5);
$xfer += $this->ae->write($output);
$xfer += $output->writeFieldEnd();
}
+ if ($this->pnfe !== null) {
+ $xfer += $output->writeFieldBegin('pnfe', TType::STRUCT, 6);
+ $xfer += $this->pnfe->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
@@ -32939,7 +30649,7 @@ class Airavata_deleteApplicationModule_result {
}
-class Airavata_registerApplicationDeployment_args {
+class Airavata_terminateExperiment_args {
static $_TSPEC;
/**
@@ -32949,11 +30659,11 @@ class Airavata_registerApplicationDeployment_args {
/**
* @var string
*/
- public $gatewayId = null;
+ public $airavataExperimentId = null;
/**
- * @var \Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription
+ * @var string
*/
- public $applicationDeployment = null;
+ public $gatewayId = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
@@ -32964,13 +30674,12 @@ class Airavata_registerApplicationDeployment_args {
'class' => '\Airavata\Model\Security\AuthzToken',
),
2 => array(
- 'var' => 'gatewayId',
+ 'var' => 'airavataExperimentId',
'type' => TType::STRING,
),
3 => array(
- 'var' => 'applicationDeployment',
- 'type' => TType::STRUCT,
- 'class' => '\Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription',
+ 'var' => 'gatewayId',
+ 'type' => TType::STRING,
),
);
}
@@ -32978,17 +30687,17 @@ class Airavata_registerApplicationDeployment_args {
if (isset($vals['authzToken'])) {
$this->authzToken = $vals['authzToken'];
}
+ if (isset($vals['airavataExperimentId'])) {
+ $this->airavataExperimentId = $vals['airavataExperimentId'];
+ }
if (isset($vals['gatewayId'])) {
$this->gatewayId = $vals['gatewayId'];
}
- if (isset($vals['applicationDeployment'])) {
- $this->applicationDeployment = $vals['applicationDeployment'];
- }
}
}
public function getName() {
- return 'Airavata_registerApplicationDeployment_args';
+ return 'Airavata_terminateExperiment_args';
}
public function read($input)
@@ -33016,15 +30725,14 @@ class Airavata_registerApplicationDeployment_args {
break;
case 2:
if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->gatewayId);
+ $xfer += $input->readString($this->airavataExperimentId);
} else {
$xfer += $input->skip($ftype);
}
break;
case 3:
- if ($ftype == TType::STRUCT) {
- $this->applicationDeployment = new \Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription();
- $xfer += $this->applicationDeployment->read($input);
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->gatewayId);
} else {
$xfer += $input->skip($ftype);
}
@@ -33041,7 +30749,7 @@ class Airavata_registerApplicationDeployment_args {
public function write($output) {
$xfer = 0;
- $xfer += $output->writeStructBegin('Airavata_registerApplicationDeployment_args');
+ $xfer += $output->writeStructBegin('Airavata_terminateExperiment_args');
if ($this->authzToken !== null) {
if (!is_object($this->authzToken)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
@@ -33050,17 +30758,14 @@ class Airavata_registerApplicationDeployment_args {
$xfer += $this->authzToken->write($output);
$xfer += $output->writeFieldEnd();
}
- if ($this->gatewayId !== null) {
- $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2);
- $xfer += $output->writeString($this->gatewayId);
+ if ($this->airavataExperimentId !== null) {
+ $xfer += $output->writeFieldBegin('airavataExperimentId', TType::STRING, 2);
+ $xfer += $output->writeString($this->airavataExperimentId);
$xfer += $output->writeFieldEnd();
}
- if ($this->applicationDeployment !== null) {
- if (!is_object($this->applicationDeployment)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('applicationDeployment', TType::STRUCT, 3);
- $xfer += $this->applicationDeployment->write($output);
+ if ($this->gatewayId !== null) {
+ $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 3);
+ $xfer += $output->writeString($this->gatewayId);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
@@ -33070,18 +30775,18 @@ class Airavata_registerApplicationDeployment_args {
}
-class Airavata_registerApplicationDeployment_result {
+class Airavata_terminateExperiment_result {
static $_TSPEC;
/**
- * @var string
- */
- public $success = null;
- /**
* @var \Airavata\API\Error\InvalidRequestException
*/
public $ire = null;
/**
+ * @var \Airavata\API\Error\ExperimentNotFoundException
+ */
+ public $enf = null;
+ /**
* @var \Airavata\API\Error\AiravataClientException
*/
public $ace = null;
@@ -33097,26 +30802,27 @@ class Airavata_registerApplicationDeployment_result {
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
- 0 => array(
- 'var' => 'success',
- 'type' => TType::STRING,
- )
<TRUNCATED>
[2/5] airavata-php-gateway git commit: AIRAVATA-2408 Switching User
Profile calls to Profile Service
Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/3c17052f/app/libraries/Airavata/Service/Profile/Tenant/CPI/TenantProfileService.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Service/Profile/Tenant/CPI/TenantProfileService.php b/app/libraries/Airavata/Service/Profile/Tenant/CPI/TenantProfileService.php
new file mode 100644
index 0000000..c367cad
--- /dev/null
+++ b/app/libraries/Airavata/Service/Profile/Tenant/CPI/TenantProfileService.php
@@ -0,0 +1,2435 @@
+<?php
+namespace Airavata\Service\Profile\Tenant\CPI;
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+use Thrift\Base\TBase;
+use Thrift\Type\TType;
+use Thrift\Type\TMessageType;
+use Thrift\Exception\TException;
+use Thrift\Exception\TProtocolException;
+use Thrift\Protocol\TProtocol;
+use Thrift\Protocol\TBinaryProtocolAccelerated;
+use Thrift\Exception\TApplicationException;
+
+
+interface TenantProfileServiceIf {
+ /**
+ * @param \Airavata\Model\Security\AuthzToken $authzToken
+ * @return string
+ * @throws \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException
+ * @throws \Airavata\API\Error\AuthorizationException
+ */
+ public function getAPIVersion(\Airavata\Model\Security\AuthzToken $authzToken);
+ /**
+ * @param \Airavata\Model\Security\AuthzToken $authzToken
+ * @param \Airavata\Model\Workspace\Gateway $gateway
+ * @return string
+ * @throws \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException
+ * @throws \Airavata\API\Error\AuthorizationException
+ */
+ public function addGateway(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Workspace\Gateway $gateway);
+ /**
+ * @param \Airavata\Model\Security\AuthzToken $authzToken
+ * @param \Airavata\Model\Workspace\Gateway $updatedGateway
+ * @return bool
+ * @throws \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException
+ * @throws \Airavata\API\Error\AuthorizationException
+ */
+ public function updateGateway(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Workspace\Gateway $updatedGateway);
+ /**
+ * @param \Airavata\Model\Security\AuthzToken $authzToken
+ * @param string $gatewayId
+ * @return \Airavata\Model\Workspace\Gateway
+ * @throws \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException
+ * @throws \Airavata\API\Error\AuthorizationException
+ */
+ public function getGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId);
+ /**
+ * @param \Airavata\Model\Security\AuthzToken $authzToken
+ * @param string $airavataInternalGatewayId
+ * @param string $gatewayId
+ * @return bool
+ * @throws \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException
+ * @throws \Airavata\API\Error\AuthorizationException
+ */
+ public function deleteGateway(\Airavata\Model\Security\AuthzToken $authzToken, $airavataInternalGatewayId, $gatewayId);
+ /**
+ * @param \Airavata\Model\Security\AuthzToken $authzToken
+ * @return \Airavata\Model\Workspace\Gateway[]
+ * @throws \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException
+ * @throws \Airavata\API\Error\AuthorizationException
+ */
+ public function getAllGateways(\Airavata\Model\Security\AuthzToken $authzToken);
+ /**
+ * @param \Airavata\Model\Security\AuthzToken $authzToken
+ * @param string $gatewayId
+ * @return bool
+ * @throws \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException
+ * @throws \Airavata\API\Error\AuthorizationException
+ */
+ public function isGatewayExist(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId);
+ /**
+ * @param \Airavata\Model\Security\AuthzToken $authzToken
+ * @param string $requesterUsername
+ * @return \Airavata\Model\Workspace\Gateway[]
+ * @throws \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException
+ * @throws \Airavata\API\Error\AuthorizationException
+ */
+ public function getAllGatewaysForUser(\Airavata\Model\Security\AuthzToken $authzToken, $requesterUsername);
+}
+
+class TenantProfileServiceClient implements \Airavata\Service\Profile\Tenant\CPI\TenantProfileServiceIf {
+ protected $input_ = null;
+ protected $output_ = null;
+
+ protected $seqid_ = 0;
+
+ public function __construct($input, $output=null) {
+ $this->input_ = $input;
+ $this->output_ = $output ? $output : $input;
+ }
+
+ public function getAPIVersion(\Airavata\Model\Security\AuthzToken $authzToken)
+ {
+ $this->send_getAPIVersion($authzToken);
+ return $this->recv_getAPIVersion();
+ }
+
+ public function send_getAPIVersion(\Airavata\Model\Security\AuthzToken $authzToken)
+ {
+ $args = new \Airavata\Service\Profile\Tenant\CPI\TenantProfileService_getAPIVersion_args();
+ $args->authzToken = $authzToken;
+ $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'getAPIVersion', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('getAPIVersion', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_getAPIVersion()
+ {
+ $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\Service\Profile\Tenant\CPI\TenantProfileService_getAPIVersion_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\Service\Profile\Tenant\CPI\TenantProfileService_getAPIVersion_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->tpe !== null) {
+ throw $result->tpe;
+ }
+ if ($result->ae !== null) {
+ throw $result->ae;
+ }
+ throw new \Exception("getAPIVersion failed: unknown result");
+ }
+
+ public function addGateway(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Workspace\Gateway $gateway)
+ {
+ $this->send_addGateway($authzToken, $gateway);
+ return $this->recv_addGateway();
+ }
+
+ public function send_addGateway(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Workspace\Gateway $gateway)
+ {
+ $args = new \Airavata\Service\Profile\Tenant\CPI\TenantProfileService_addGateway_args();
+ $args->authzToken = $authzToken;
+ $args->gateway = $gateway;
+ $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'addGateway', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('addGateway', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_addGateway()
+ {
+ $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\Service\Profile\Tenant\CPI\TenantProfileService_addGateway_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\Service\Profile\Tenant\CPI\TenantProfileService_addGateway_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->tpe !== null) {
+ throw $result->tpe;
+ }
+ if ($result->ae !== null) {
+ throw $result->ae;
+ }
+ throw new \Exception("addGateway failed: unknown result");
+ }
+
+ public function updateGateway(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Workspace\Gateway $updatedGateway)
+ {
+ $this->send_updateGateway($authzToken, $updatedGateway);
+ return $this->recv_updateGateway();
+ }
+
+ public function send_updateGateway(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Workspace\Gateway $updatedGateway)
+ {
+ $args = new \Airavata\Service\Profile\Tenant\CPI\TenantProfileService_updateGateway_args();
+ $args->authzToken = $authzToken;
+ $args->updatedGateway = $updatedGateway;
+ $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'updateGateway', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('updateGateway', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_updateGateway()
+ {
+ $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\Service\Profile\Tenant\CPI\TenantProfileService_updateGateway_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\Service\Profile\Tenant\CPI\TenantProfileService_updateGateway_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->tpe !== null) {
+ throw $result->tpe;
+ }
+ if ($result->ae !== null) {
+ throw $result->ae;
+ }
+ throw new \Exception("updateGateway failed: unknown result");
+ }
+
+ public function getGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
+ {
+ $this->send_getGateway($authzToken, $gatewayId);
+ return $this->recv_getGateway();
+ }
+
+ public function send_getGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
+ {
+ $args = new \Airavata\Service\Profile\Tenant\CPI\TenantProfileService_getGateway_args();
+ $args->authzToken = $authzToken;
+ $args->gatewayId = $gatewayId;
+ $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'getGateway', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('getGateway', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_getGateway()
+ {
+ $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\Service\Profile\Tenant\CPI\TenantProfileService_getGateway_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\Service\Profile\Tenant\CPI\TenantProfileService_getGateway_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->tpe !== null) {
+ throw $result->tpe;
+ }
+ if ($result->ae !== null) {
+ throw $result->ae;
+ }
+ throw new \Exception("getGateway failed: unknown result");
+ }
+
+ public function deleteGateway(\Airavata\Model\Security\AuthzToken $authzToken, $airavataInternalGatewayId, $gatewayId)
+ {
+ $this->send_deleteGateway($authzToken, $airavataInternalGatewayId, $gatewayId);
+ return $this->recv_deleteGateway();
+ }
+
+ public function send_deleteGateway(\Airavata\Model\Security\AuthzToken $authzToken, $airavataInternalGatewayId, $gatewayId)
+ {
+ $args = new \Airavata\Service\Profile\Tenant\CPI\TenantProfileService_deleteGateway_args();
+ $args->authzToken = $authzToken;
+ $args->airavataInternalGatewayId = $airavataInternalGatewayId;
+ $args->gatewayId = $gatewayId;
+ $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'deleteGateway', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('deleteGateway', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_deleteGateway()
+ {
+ $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\Service\Profile\Tenant\CPI\TenantProfileService_deleteGateway_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\Service\Profile\Tenant\CPI\TenantProfileService_deleteGateway_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->tpe !== null) {
+ throw $result->tpe;
+ }
+ if ($result->ae !== null) {
+ throw $result->ae;
+ }
+ throw new \Exception("deleteGateway failed: unknown result");
+ }
+
+ public function getAllGateways(\Airavata\Model\Security\AuthzToken $authzToken)
+ {
+ $this->send_getAllGateways($authzToken);
+ return $this->recv_getAllGateways();
+ }
+
+ public function send_getAllGateways(\Airavata\Model\Security\AuthzToken $authzToken)
+ {
+ $args = new \Airavata\Service\Profile\Tenant\CPI\TenantProfileService_getAllGateways_args();
+ $args->authzToken = $authzToken;
+ $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'getAllGateways', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('getAllGateways', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_getAllGateways()
+ {
+ $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\Service\Profile\Tenant\CPI\TenantProfileService_getAllGateways_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\Service\Profile\Tenant\CPI\TenantProfileService_getAllGateways_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->tpe !== null) {
+ throw $result->tpe;
+ }
+ if ($result->ae !== null) {
+ throw $result->ae;
+ }
+ throw new \Exception("getAllGateways failed: unknown result");
+ }
+
+ public function isGatewayExist(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
+ {
+ $this->send_isGatewayExist($authzToken, $gatewayId);
+ return $this->recv_isGatewayExist();
+ }
+
+ public function send_isGatewayExist(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
+ {
+ $args = new \Airavata\Service\Profile\Tenant\CPI\TenantProfileService_isGatewayExist_args();
+ $args->authzToken = $authzToken;
+ $args->gatewayId = $gatewayId;
+ $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'isGatewayExist', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('isGatewayExist', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_isGatewayExist()
+ {
+ $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\Service\Profile\Tenant\CPI\TenantProfileService_isGatewayExist_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\Service\Profile\Tenant\CPI\TenantProfileService_isGatewayExist_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->tpe !== null) {
+ throw $result->tpe;
+ }
+ if ($result->ae !== null) {
+ throw $result->ae;
+ }
+ throw new \Exception("isGatewayExist failed: unknown result");
+ }
+
+ public function getAllGatewaysForUser(\Airavata\Model\Security\AuthzToken $authzToken, $requesterUsername)
+ {
+ $this->send_getAllGatewaysForUser($authzToken, $requesterUsername);
+ return $this->recv_getAllGatewaysForUser();
+ }
+
+ public function send_getAllGatewaysForUser(\Airavata\Model\Security\AuthzToken $authzToken, $requesterUsername)
+ {
+ $args = new \Airavata\Service\Profile\Tenant\CPI\TenantProfileService_getAllGatewaysForUser_args();
+ $args->authzToken = $authzToken;
+ $args->requesterUsername = $requesterUsername;
+ $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'getAllGatewaysForUser', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('getAllGatewaysForUser', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_getAllGatewaysForUser()
+ {
+ $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\Service\Profile\Tenant\CPI\TenantProfileService_getAllGatewaysForUser_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\Service\Profile\Tenant\CPI\TenantProfileService_getAllGatewaysForUser_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->tpe !== null) {
+ throw $result->tpe;
+ }
+ if ($result->ae !== null) {
+ throw $result->ae;
+ }
+ throw new \Exception("getAllGatewaysForUser failed: unknown result");
+ }
+
+}
+
+// HELPER FUNCTIONS AND STRUCTURES
+
+class TenantProfileService_getAPIVersion_args {
+ static $_TSPEC;
+
+ /**
+ * @var \Airavata\Model\Security\AuthzToken
+ */
+ public $authzToken = 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',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['authzToken'])) {
+ $this->authzToken = $vals['authzToken'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'TenantProfileService_getAPIVersion_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;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('TenantProfileService_getAPIVersion_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();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class TenantProfileService_getAPIVersion_result {
+ static $_TSPEC;
+
+ /**
+ * @var string
+ */
+ public $success = null;
+ /**
+ * @var \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException
+ */
+ public $tpe = 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::STRING,
+ ),
+ 1 => array(
+ 'var' => 'tpe',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException',
+ ),
+ 2 => 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['tpe'])) {
+ $this->tpe = $vals['tpe'];
+ }
+ if (isset($vals['ae'])) {
+ $this->ae = $vals['ae'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'TenantProfileService_getAPIVersion_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->success);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->tpe = new \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException();
+ $xfer += $this->tpe->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ 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('TenantProfileService_getAPIVersion_result');
+ if ($this->success !== null) {
+ $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
+ $xfer += $output->writeString($this->success);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->tpe !== null) {
+ $xfer += $output->writeFieldBegin('tpe', TType::STRUCT, 1);
+ $xfer += $this->tpe->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ae !== null) {
+ $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 2);
+ $xfer += $this->ae->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class TenantProfileService_addGateway_args {
+ static $_TSPEC;
+
+ /**
+ * @var \Airavata\Model\Security\AuthzToken
+ */
+ public $authzToken = null;
+ /**
+ * @var \Airavata\Model\Workspace\Gateway
+ */
+ public $gateway = 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' => 'gateway',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\Workspace\Gateway',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['authzToken'])) {
+ $this->authzToken = $vals['authzToken'];
+ }
+ if (isset($vals['gateway'])) {
+ $this->gateway = $vals['gateway'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'TenantProfileService_addGateway_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::STRUCT) {
+ $this->gateway = new \Airavata\Model\Workspace\Gateway();
+ $xfer += $this->gateway->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('TenantProfileService_addGateway_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->gateway !== null) {
+ if (!is_object($this->gateway)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('gateway', TType::STRUCT, 2);
+ $xfer += $this->gateway->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class TenantProfileService_addGateway_result {
+ static $_TSPEC;
+
+ /**
+ * @var string
+ */
+ public $success = null;
+ /**
+ * @var \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException
+ */
+ public $tpe = 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::STRING,
+ ),
+ 1 => array(
+ 'var' => 'tpe',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException',
+ ),
+ 2 => 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['tpe'])) {
+ $this->tpe = $vals['tpe'];
+ }
+ if (isset($vals['ae'])) {
+ $this->ae = $vals['ae'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'TenantProfileService_addGateway_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->success);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->tpe = new \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException();
+ $xfer += $this->tpe->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ 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('TenantProfileService_addGateway_result');
+ if ($this->success !== null) {
+ $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
+ $xfer += $output->writeString($this->success);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->tpe !== null) {
+ $xfer += $output->writeFieldBegin('tpe', TType::STRUCT, 1);
+ $xfer += $this->tpe->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ae !== null) {
+ $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 2);
+ $xfer += $this->ae->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class TenantProfileService_updateGateway_args {
+ static $_TSPEC;
+
+ /**
+ * @var \Airavata\Model\Security\AuthzToken
+ */
+ public $authzToken = null;
+ /**
+ * @var \Airavata\Model\Workspace\Gateway
+ */
+ public $updatedGateway = 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' => 'updatedGateway',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\Workspace\Gateway',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['authzToken'])) {
+ $this->authzToken = $vals['authzToken'];
+ }
+ if (isset($vals['updatedGateway'])) {
+ $this->updatedGateway = $vals['updatedGateway'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'TenantProfileService_updateGateway_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::STRUCT) {
+ $this->updatedGateway = new \Airavata\Model\Workspace\Gateway();
+ $xfer += $this->updatedGateway->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('TenantProfileService_updateGateway_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->updatedGateway !== null) {
+ if (!is_object($this->updatedGateway)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('updatedGateway', TType::STRUCT, 2);
+ $xfer += $this->updatedGateway->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class TenantProfileService_updateGateway_result {
+ static $_TSPEC;
+
+ /**
+ * @var bool
+ */
+ public $success = null;
+ /**
+ * @var \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException
+ */
+ public $tpe = 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' => 'tpe',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException',
+ ),
+ 2 => 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['tpe'])) {
+ $this->tpe = $vals['tpe'];
+ }
+ if (isset($vals['ae'])) {
+ $this->ae = $vals['ae'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'TenantProfileService_updateGateway_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->tpe = new \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException();
+ $xfer += $this->tpe->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ 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('TenantProfileService_updateGateway_result');
+ if ($this->success !== null) {
+ $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+ $xfer += $output->writeBool($this->success);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->tpe !== null) {
+ $xfer += $output->writeFieldBegin('tpe', TType::STRUCT, 1);
+ $xfer += $this->tpe->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ae !== null) {
+ $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 2);
+ $xfer += $this->ae->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class TenantProfileService_getGateway_args {
+ static $_TSPEC;
+
+ /**
+ * @var \Airavata\Model\Security\AuthzToken
+ */
+ public $authzToken = null;
+ /**
+ * @var string
+ */
+ public $gatewayId = 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' => 'gatewayId',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['authzToken'])) {
+ $this->authzToken = $vals['authzToken'];
+ }
+ if (isset($vals['gatewayId'])) {
+ $this->gatewayId = $vals['gatewayId'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'TenantProfileService_getGateway_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->gatewayId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('TenantProfileService_getGateway_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->gatewayId !== null) {
+ $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2);
+ $xfer += $output->writeString($this->gatewayId);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class TenantProfileService_getGateway_result {
+ static $_TSPEC;
+
+ /**
+ * @var \Airavata\Model\Workspace\Gateway
+ */
+ public $success = null;
+ /**
+ * @var \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException
+ */
+ public $tpe = 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::STRUCT,
+ 'class' => '\Airavata\Model\Workspace\Gateway',
+ ),
+ 1 => array(
+ 'var' => 'tpe',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException',
+ ),
+ 2 => 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['tpe'])) {
+ $this->tpe = $vals['tpe'];
+ }
+ if (isset($vals['ae'])) {
+ $this->ae = $vals['ae'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'TenantProfileService_getGateway_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::STRUCT) {
+ $this->success = new \Airavata\Model\Workspace\Gateway();
+ $xfer += $this->success->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->tpe = new \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException();
+ $xfer += $this->tpe->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ 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('TenantProfileService_getGateway_result');
+ if ($this->success !== null) {
+ if (!is_object($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+ $xfer += $this->success->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->tpe !== null) {
+ $xfer += $output->writeFieldBegin('tpe', TType::STRUCT, 1);
+ $xfer += $this->tpe->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ae !== null) {
+ $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 2);
+ $xfer += $this->ae->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class TenantProfileService_deleteGateway_args {
+ static $_TSPEC;
+
+ /**
+ * @var \Airavata\Model\Security\AuthzToken
+ */
+ public $authzToken = null;
+ /**
+ * @var string
+ */
+ public $airavataInternalGatewayId = null;
+ /**
+ * @var string
+ */
+ public $gatewayId = 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' => 'airavataInternalGatewayId',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'gatewayId',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['authzToken'])) {
+ $this->authzToken = $vals['authzToken'];
+ }
+ if (isset($vals['airavataInternalGatewayId'])) {
+ $this->airavataInternalGatewayId = $vals['airavataInternalGatewayId'];
+ }
+ if (isset($vals['gatewayId'])) {
+ $this->gatewayId = $vals['gatewayId'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'TenantProfileService_deleteGateway_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->airavataInternalGatewayId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->gatewayId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('TenantProfileService_deleteGateway_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->airavataInternalGatewayId !== null) {
+ $xfer += $output->writeFieldBegin('airavataInternalGatewayId', TType::STRING, 2);
+ $xfer += $output->writeString($this->airavataInternalGatewayId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->gatewayId !== null) {
+ $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 3);
+ $xfer += $output->writeString($this->gatewayId);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class TenantProfileService_deleteGateway_result {
+ static $_TSPEC;
+
+ /**
+ * @var bool
+ */
+ public $success = null;
+ /**
+ * @var \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException
+ */
+ public $tpe = 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' => 'tpe',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException',
+ ),
+ 2 => 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['tpe'])) {
+ $this->tpe = $vals['tpe'];
+ }
+ if (isset($vals['ae'])) {
+ $this->ae = $vals['ae'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'TenantProfileService_deleteGateway_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->tpe = new \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException();
+ $xfer += $this->tpe->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ 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('TenantProfileService_deleteGateway_result');
+ if ($this->success !== null) {
+ $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+ $xfer += $output->writeBool($this->success);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->tpe !== null) {
+ $xfer += $output->writeFieldBegin('tpe', TType::STRUCT, 1);
+ $xfer += $this->tpe->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ae !== null) {
+ $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 2);
+ $xfer += $this->ae->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class TenantProfileService_getAllGateways_args {
+ static $_TSPEC;
+
+ /**
+ * @var \Airavata\Model\Security\AuthzToken
+ */
+ public $authzToken = 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',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['authzToken'])) {
+ $this->authzToken = $vals['authzToken'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'TenantProfileService_getAllGateways_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;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('TenantProfileService_getAllGateways_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();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class TenantProfileService_getAllGateways_result {
+ static $_TSPEC;
+
+ /**
+ * @var \Airavata\Model\Workspace\Gateway[]
+ */
+ public $success = null;
+ /**
+ * @var \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException
+ */
+ public $tpe = 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::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\Workspace\Gateway',
+ ),
+ ),
+ 1 => array(
+ 'var' => 'tpe',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException',
+ ),
+ 2 => 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['tpe'])) {
+ $this->tpe = $vals['tpe'];
+ }
+ if (isset($vals['ae'])) {
+ $this->ae = $vals['ae'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'TenantProfileService_getAllGateways_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::LST) {
+ $this->success = array();
+ $_size0 = 0;
+ $_etype3 = 0;
+ $xfer += $input->readListBegin($_etype3, $_size0);
+ for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
+ {
+ $elem5 = null;
+ $elem5 = new \Airavata\Model\Workspace\Gateway();
+ $xfer += $elem5->read($input);
+ $this->success []= $elem5;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->tpe = new \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException();
+ $xfer += $this->tpe->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ 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('TenantProfileService_getAllGateways_result');
+ if ($this->success !== null) {
+ if (!is_array($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->success));
+ {
+ foreach ($this->success as $iter6)
+ {
+ $xfer += $iter6->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->tpe !== null) {
+ $xfer += $output->writeFieldBegin('tpe', TType::STRUCT, 1);
+ $xfer += $this->tpe->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ae !== null) {
+ $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 2);
+ $xfer += $this->ae->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class TenantProfileService_isGatewayExist_args {
+ static $_TSPEC;
+
+ /**
+ * @var \Airavata\Model\Security\AuthzToken
+ */
+ public $authzToken = null;
+ /**
+ * @var string
+ */
+ public $gatewayId = 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' => 'gatewayId',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['authzToken'])) {
+ $this->authzToken = $vals['authzToken'];
+ }
+ if (isset($vals['gatewayId'])) {
+ $this->gatewayId = $vals['gatewayId'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'TenantProfileService_isGatewayExist_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->gatewayId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('TenantProfileService_isGatewayExist_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->gatewayId !== null) {
+ $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2);
+ $xfer += $output->writeString($this->gatewayId);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class TenantProfileService_isGatewayExist_result {
+ static $_TSPEC;
+
+ /**
+ * @var bool
+ */
+ public $success = null;
+ /**
+ * @var \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException
+ */
+ public $tpe = 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' => 'tpe',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException',
+ ),
+ 2 => 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['tpe'])) {
+ $this->tpe = $vals['tpe'];
+ }
+ if (isset($vals['ae'])) {
+ $this->ae = $vals['ae'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'TenantProfileService_isGatewayExist_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->tpe = new \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException();
+ $xfer += $this->tpe->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ 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('TenantProfileService_isGatewayExist_result');
+ if ($this->success !== null) {
+ $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+ $xfer += $output->writeBool($this->success);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->tpe !== null) {
+ $xfer += $output->writeFieldBegin('tpe', TType::STRUCT, 1);
+ $xfer += $this->tpe->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ae !== null) {
+ $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 2);
+ $xfer += $this->ae->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class TenantProfileService_getAllGatewaysForUser_args {
+ static $_TSPEC;
+
+ /**
+ * @var \Airavata\Model\Security\AuthzToken
+ */
+ public $authzToken = null;
+ /**
+ * @var string
+ */
+ public $requesterUsername = 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' => 'requesterUsername',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['authzToken'])) {
+ $this->authzToken = $vals['authzToken'];
+ }
+ if (isset($vals['requesterUsername'])) {
+ $this->requesterUsername = $vals['requesterUsername'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'TenantProfileService_getAllGatewaysForUser_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->requesterUsername);
+ } 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('TenantProfileService_getAllGatewaysForUser_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->requesterUsername !== null) {
+ $xfer += $output->writeFieldBegin('requesterUsername', TType::STRING, 2);
+ $xfer += $output->writeString($this->requesterUsername);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class TenantProfileService_getAllGatewaysForUser_result {
+ static $_TSPEC;
+
+ /**
+ * @var \Airavata\Model\Workspace\Gateway[]
+ */
+ public $success = null;
+ /**
+ * @var \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException
+ */
+ public $tpe = 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::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\Workspace\Gateway',
+ ),
+ ),
+ 1 => array(
+ 'var' => 'tpe',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException',
+ ),
+ 2 => 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['tpe'])) {
+ $this->tpe = $vals['tpe'];
+ }
+ if (isset($vals['ae'])) {
+ $this->ae = $vals['ae'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'TenantProfileService_getAllGatewaysForUser_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::LST) {
+ $this->success = array();
+ $_size7 = 0;
+ $_etype10 = 0;
+ $xfer += $input->readListBegin($_etype10, $_size7);
+ for ($_i11 = 0; $_i11 < $_size7; ++$_i11)
+ {
+ $elem12 = null;
+ $elem12 = new \Airavata\Model\Workspace\Gateway();
+ $xfer += $elem12->read($input);
+ $this->success []= $elem12;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->tpe = new \Airavata\Service\Profile\Tenant\CPI\Error\TenantProfileServiceException();
+ $xfer += $this->tpe->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ 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('TenantProfileService_getAllGatewaysForUser_result');
+ if ($this->success !== null) {
+ if (!is_array($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->success));
+ {
+ foreach ($this->success as $iter13)
+ {
+ $xfer += $iter13->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->tpe !== null) {
+ $xfer += $output->writeFieldBegin('tpe', TType::STRUCT, 1);
+ $xfer += $this->tpe->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ae !== null) {
+ $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 2);
+ $xfer += $this->ae->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/3c17052f/app/libraries/Airavata/Service/Profile/Tenant/CPI/Types.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Service/Profile/Tenant/CPI/Types.php b/app/libraries/Airavata/Service/Profile/Tenant/CPI/Types.php
new file mode 100644
index 0000000..92038a2
--- /dev/null
+++ b/app/libraries/Airavata/Service/Profile/Tenant/CPI/Types.php
@@ -0,0 +1,33 @@
+<?php
+namespace Airavata\Service\Profile\Tenant\CPI;
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+use Thrift\Base\TBase;
+use Thrift\Type\TType;
+use Thrift\Type\TMessageType;
+use Thrift\Exception\TException;
+use Thrift\Exception\TProtocolException;
+use Thrift\Protocol\TProtocol;
+use Thrift\Protocol\TBinaryProtocolAccelerated;
+use Thrift\Exception\TApplicationException;
+
+
+final class Constant extends \Thrift\Type\TConstant {
+ static protected $TENANT_PROFILE_CPI_VERSION;
+ static protected $TENANT_PROFILE_CPI_NAME;
+
+ static protected function init_TENANT_PROFILE_CPI_VERSION() {
+ return "0.17";
+ }
+
+ static protected function init_TENANT_PROFILE_CPI_NAME() {
+ return "TenantProfileService";
+ }
+}
+
+
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/3c17052f/app/libraries/Airavata/Service/Profile/Types.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Service/Profile/Types.php b/app/libraries/Airavata/Service/Profile/Types.php
new file mode 100644
index 0000000..f6eafb7
--- /dev/null
+++ b/app/libraries/Airavata/Service/Profile/Types.php
@@ -0,0 +1,20 @@
+<?php
+namespace Airavata\Service\Profile;
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+use Thrift\Base\TBase;
+use Thrift\Type\TType;
+use Thrift\Type\TMessageType;
+use Thrift\Exception\TException;
+use Thrift\Exception\TProtocolException;
+use Thrift\Protocol\TProtocol;
+use Thrift\Protocol\TBinaryProtocolAccelerated;
+use Thrift\Exception\TApplicationException;
+
+
+
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/3c17052f/app/libraries/Airavata/Service/Profile/User/CPI/Error/Types.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Service/Profile/User/CPI/Error/Types.php b/app/libraries/Airavata/Service/Profile/User/CPI/Error/Types.php
new file mode 100644
index 0000000..b633c38
--- /dev/null
+++ b/app/libraries/Airavata/Service/Profile/User/CPI/Error/Types.php
@@ -0,0 +1,95 @@
+<?php
+namespace Airavata\Service\Profile\User\CPI\Error;
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+use Thrift\Base\TBase;
+use Thrift\Type\TType;
+use Thrift\Type\TMessageType;
+use Thrift\Exception\TException;
+use Thrift\Exception\TProtocolException;
+use Thrift\Protocol\TProtocol;
+use Thrift\Protocol\TBinaryProtocolAccelerated;
+use Thrift\Exception\TApplicationException;
+
+
+class UserProfileServiceException extends TException {
+ static $_TSPEC;
+
+ /**
+ * @var string
+ */
+ public $message = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'message',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['message'])) {
+ $this->message = $vals['message'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'UserProfileServiceException';
+ }
+
+ 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->message);
+ } 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('UserProfileServiceException');
+ if ($this->message !== null) {
+ $xfer += $output->writeFieldBegin('message', TType::STRING, 1);
+ $xfer += $output->writeString($this->message);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/3c17052f/app/libraries/Airavata/Service/Profile/User/CPI/Types.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Service/Profile/User/CPI/Types.php b/app/libraries/Airavata/Service/Profile/User/CPI/Types.php
new file mode 100644
index 0000000..c5c6626
--- /dev/null
+++ b/app/libraries/Airavata/Service/Profile/User/CPI/Types.php
@@ -0,0 +1,33 @@
+<?php
+namespace Airavata\Service\Profile\User\CPI;
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+use Thrift\Base\TBase;
+use Thrift\Type\TType;
+use Thrift\Type\TMessageType;
+use Thrift\Exception\TException;
+use Thrift\Exception\TProtocolException;
+use Thrift\Protocol\TProtocol;
+use Thrift\Protocol\TBinaryProtocolAccelerated;
+use Thrift\Exception\TApplicationException;
+
+
+final class Constant extends \Thrift\Type\TConstant {
+ static protected $USER_PROFILE_CPI_VERSION;
+ static protected $USER_PROFILE_CPI_NAME;
+
+ static protected function init_USER_PROFILE_CPI_VERSION() {
+ return "0.17";
+ }
+
+ static protected function init_USER_PROFILE_CPI_NAME() {
+ return "UserProfileService";
+ }
+}
+
+