<?php
namespace Airavata\API;
/**
 * Autogenerated by Thrift Compiler (0.10.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
use Thrift\Base\TBase;
use Thrift\Type\TType;
use Thrift\Type\TMessageType;
use Thrift\Exception\TException;
use Thrift\Exception\TProtocolException;
use Thrift\Protocol\TProtocol;
use Thrift\Protocol\TBinaryProtocolAccelerated;
use Thrift\Exception\TApplicationException;


interface AiravataIf extends \Airavata\Base\API\BaseAPIIf {
  /**
   * Verify if User Exists within Airavata.
   * 
   * @param gatewayId
   * 
   *  @param userName
   * 
   * @return true/false
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayId
   * @param string $userName
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function isUserExists(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $userName);
  /**
   * Register a Gateway with Airavata.
   * 
   * @param gateway
   *    The gateway data model.
   * 
   * @return gatewayId
   *   Th unique identifier of the  newly registered gateway.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param \Airavata\Model\Workspace\Gateway $gateway
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function addGateway(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Workspace\Gateway $gateway);
  /**
   * Get all users in the gateway
   * 
   * @param gatewayId
   *    The gateway data model.
   * 
   * @return users
   *   list of usernames of the users in the gateway
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayId
   * @return string[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getAllUsersInGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId);
  /**
   * Update previously registered Gateway metadata.
   * 
   * @param gatewayId
   *    The gateway Id of the Gateway which require an update.
   * 
   * @return gateway
   *    Modified gateway obejct.
   * 
   * @exception AiravataClientException
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayId
   * @param \Airavata\Model\Workspace\Gateway $updatedGateway
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function updateGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, \Airavata\Model\Workspace\Gateway $updatedGateway);
  /**
   * Get Gateway details by providing gatewayId
   * 
   * @param gatewayId
   *    The gateway Id of the Gateway.
   * 
   * @return gateway
   *    Gateway obejct.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayId
   * @return \Airavata\Model\Workspace\Gateway
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId);
  /**
   * Delete a Gateway
   * 
   * @param gatewayId
   *    The gateway Id of the Gateway to be deleted.
   * 
   * @return boolean
   *    Boolean identifier for the success or failure of the deletion operation.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @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 deleteGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId);
  /**
   * Get All the Gateways Connected to Airavata.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @return \Airavata\Model\Workspace\Gateway[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getAllGateways(\Airavata\Model\Security\AuthzToken $authzToken);
  /**
   * Check for the Existance of a Gateway within Airavata
   * 
   * @param gatewayId
   *   Provide the gatewayId of the gateway you want to check the existancy
   * 
   * @return boolean
   *   Boolean idetifier for the existance or non-existane of the gatewayId
   * 
   * @return gatewayId
   *   return the gatewayId of the existing gateway.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @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 isGatewayExist(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId);
  /**
   *   * API methods to retrieve notifications
   * *
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param \Airavata\Model\Workspace\Notification $notification
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function createNotification(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Workspace\Notification $notification);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param \Airavata\Model\Workspace\Notification $notification
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function updateNotification(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Workspace\Notification $notification);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayId
   * @param string $notificationId
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function deleteNotification(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $notificationId);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayId
   * @param string $notificationId
   * @return \Airavata\Model\Workspace\Notification
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getNotification(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $notificationId);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayId
   * @return \Airavata\Model\Workspace\Notification[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getAllNotifications(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId);
  /**
   * Generate and Register SSH Key Pair with Airavata Credential Store.
   * 
   * @param description
   *    The description field for a credential type, all type of credential can have a description.
   * 
   * @return airavataCredStoreToken
   *   An SSH Key pair is generated and stored in the credential store and associated with users or community account
   *   belonging to a Gateway.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $description
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   */
  public function generateAndRegisterSSHKeys(\Airavata\Model\Security\AuthzToken $authzToken, $description);
  /**
   * Generate and Register Username PWD Pair with Airavata Credential Store.
   * 
   * @param loginUserName
   * 
   * @param password
   * 
   * @return airavataCredStoreToken
   *   An SSH Key pair is generated and stored in the credential store and associated with users or community account
   *   belonging to a Gateway.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $loginUserName
   * @param string $password
   * @param string $description
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   */
  public function registerPwdCredential(\Airavata\Model\Security\AuthzToken $authzToken, $loginUserName, $password, $description);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $tokenId
   * @return \Airavata\Model\Credential\Store\CredentialSummary
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getCredentialSummary(\Airavata\Model\Security\AuthzToken $authzToken, $tokenId);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param int $type
   * @return \Airavata\Model\Credential\Store\CredentialSummary[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   */
  public function getAllCredentialSummaries(\Airavata\Model\Security\AuthzToken $authzToken, $type);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $airavataCredStoreToken
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function deleteSSHPubKey(\Airavata\Model\Security\AuthzToken $authzToken, $airavataCredStoreToken);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $airavataCredStoreToken
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function deletePWDCredential(\Airavata\Model\Security\AuthzToken $authzToken, $airavataCredStoreToken);
  /**
   * 
   * Creates a Project with basic metadata.
   *    A Project is a container of experiments.
   * 
   * @param gatewayId
   *    The identifier for the requested gateway.
   * 
   * @param Project
   *    The Project Object described in the workspace_model.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayId
   * @param \Airavata\Model\Workspace\Project $project
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function createProject(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, \Airavata\Model\Workspace\Project $project);
  /**
   * 
   * Update an Existing Project
   * 
   * @param projectId
   *    The projectId of the project needed an update.
   * 
   * @return void
   *    Currently this does not return any value.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $projectId
   * @param \Airavata\Model\Workspace\Project $updatedProject
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\ProjectNotFoundException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function updateProject(\Airavata\Model\Security\AuthzToken $authzToken, $projectId, \Airavata\Model\Workspace\Project $updatedProject);
  /**
   * 
   * Get a Project by ID
   *    This method is to obtain a project by providing a projectId.
   * 
   * @param projectId
   *    projectId of the project you require.
   * 
   * @return project
   *    project data model will be returned.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $projectId
   * @return \Airavata\Model\Workspace\Project
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\ProjectNotFoundException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getProject(\Airavata\Model\Security\AuthzToken $authzToken, $projectId);
  /**
   * 
   * Delete a Project
   *    This method is used to delete an existing Project.
   * 
   * @param projectId
   *    projectId of the project you want to delete.
   * 
   * @return boolean
   *    Boolean identifier for the success or failure of the deletion operation.
   * 
   *    NOTE: This method is not used within gateways connected with Airavata.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $projectId
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\ProjectNotFoundException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function deleteProject(\Airavata\Model\Security\AuthzToken $authzToken, $projectId);
  /**
   * 
   * Get All User Projects
   * Get all Project for the user with pagination. Results will be ordered based on creation time DESC.
   * 
   * @param gatewayId
   *    The identifier for the requested gateway.
   * 
   * @param userName
   *    The identifier of the user.
   * 
   * @param limit
   *    The amount results to be fetched.
   * 
   * @param offset
   *    The starting point of the results to be fetched.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayId
   * @param string $userName
   * @param int $limit
   * @param int $offset
   * @return \Airavata\Model\Workspace\Project[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getUserProjects(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $userName, $limit, $offset);
  /**
   * 
   * Search User Projects
   * Search and get all Projects for user by project description or/and project name  with pagination.
   * Results will be ordered based on creation time DESC.
   * 
   * @param gatewayId
   *    The unique identifier of the gateway making the request.
   * 
   * @param userName
   *    The identifier of the user.
   * 
   * @param filters
   *    Map of multiple filter criteria. Currenlt search filters includes Project Name and Project Description
   * 
   * @param limit
   *    The amount results to be fetched.
   * 
   * @param offset
   *    The starting point of the results to be fetched.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayId
   * @param string $userName
   * @param array $filters
   * @param int $limit
   * @param int $offset
   * @return \Airavata\Model\Workspace\Project[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function searchProjects(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $userName, array $filters, $limit, $offset);
  /**
   * Search Experiments.
   * Search Experiments by using multiple filter criteria with pagination. Results will be sorted based on creation time DESC.
   * 
   * @param gatewayId
   *       Identifier of the requested gateway.
   * 
   * @param userName
   *       Username of the user requesting the search function.
   * 
   * @param filters
   *       Map of multiple filter criteria. Currenlt search filters includes Experiment Name, Description, Application, etc....
   * 
   * @param limit
   *       Amount of results to be fetched.
   * 
   * @param offset
   *       The starting point of the results to be fetched.
   * 
   * @return ExperimentSummaryModel
   *    List of experiments for the given search filter. Here only the Experiment summary will be returned.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayId
   * @param string $userName
   * @param array $filters
   * @param int $limit
   * @param int $offset
   * @return \Airavata\Model\Experiment\ExperimentSummaryModel[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function searchExperiments(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $userName, array $filters, $limit, $offset);
  /**
   * 
   * Get Experiment Statistics
   * Get Experiment Statisitics for a given gateway for a specific time period. This feature is available only for admins of a particular gateway. Gateway admin access is managed by the user roles.
   * 
   * @param gatewayId
   *       Unique identifier of the gateway making the request to fetch statistics.
   * 
   * @param fromTime
   *       Starting date time.
   * 
   * @param toTime
   *       Ending data time.
   * 
   * @param userName
   *       Gateway username substring with which to further filter statistics.
   * 
   * @param applicationName
   *       Application id substring with which to further filter statistics.
   * 
   * @param resourceHostName
   *       Hostname id substring with which to further filter statistics.
   * 
   * @param limit
   *       Amount of results to be fetched.
   * 
   * @param offset
   *       The starting point of the results to be fetched.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayId
   * @param int $fromTime
   * @param int $toTime
   * @param string $userName
   * @param string $applicationName
   * @param string $resourceHostName
   * @param int $limit
   * @param int $offset
   * @return \Airavata\Model\Experiment\ExperimentStatistics
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getExperimentStatistics(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $fromTime, $toTime, $userName, $applicationName, $resourceHostName, $limit, $offset);
  /**
   * 
   * Get All Experiments of the Project
   * Get Experiments within project with pagination. Results will be sorted based on creation time DESC.
   * 
   * @param projectId
   *       Uniqie identifier of the project.
   * 
   * @param limit
   *       Amount of results to be fetched.
   * 
   * @param offset
   *       The starting point of the results to be fetched.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $projectId
   * @param int $limit
   * @param int $offset
   * @return \Airavata\Model\Experiment\ExperimentModel[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\ProjectNotFoundException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getExperimentsInProject(\Airavata\Model\Security\AuthzToken $authzToken, $projectId, $limit, $offset);
  /**
   * 
   * Get All Experiments of the User
   * Get experiments by user with pagination. Results will be sorted based on creation time DESC.
   * 
   * @param gatewayId
   *       Identifier of the requesting gateway.
   * 
   * @param userName
   *       Username of the requested end user.
   * 
   * @param limit
   *       Amount of results to be fetched.
   * 
   * @param offset
   *       The starting point of the results to be fetched.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayId
   * @param string $userName
   * @param int $limit
   * @param int $offset
   * @return \Airavata\Model\Experiment\ExperimentModel[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getUserExperiments(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $userName, $limit, $offset);
  /**
   *   *
   *   * Create New Experiment
   *   * Create an experiment for the specified user belonging to the gateway. The gateway identity is not explicitly passed
   *   *   but inferred from the sshKeyAuthentication header. This experiment is just a persistent place holder. The client
   *   *   has to subsequently configure and launch the created experiment. No action is taken on Airavata Server except
   *   *   registering the experiment in a persistent store.
   *   *
   *   * @param gatewayId
   *   *    The unique ID of the gateway where the experiment is been created.
   *   *
   *   * @param ExperimentModel
   *   *    The create experiment will require the basic experiment metadata like the name and description, intended user,
   *   *      the gateway identifer and if the experiment should be shared public by defualt. During the creation of an experiment
   *   *      the ExperimentMetadata is a required field.
   *   *
   *   * @return
   *   *   The server-side generated.airavata.registry.core.experiment.globally unique identifier.
   *   *
   *   * @throws org.apache.airavata.model.error.InvalidRequestException
   *   *    For any incorrect forming of the request itself.
   *   *
   *   * @throws org.apache.airavata.model.error.AiravataClientException
   *   *    The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
   *   *
   *   *      UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
   *   *         step, then Airavata Registry will not have a provenance area setup. The client has to follow
   *   *         gateway registration steps and retry this request.
   *   *
   *   *      AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
   *   *         For now this is a place holder.
   *   *
   *   *      INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
   *   *         is implemented, the authorization will be more substantial.
   *   *
   *   * @throws org.apache.airavata.model.error.AiravataSystemException
   *   *    This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
   *   *       rather an Airavata Administrator will be notified to take corrective action.
   *   *
   * *
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayId
   * @param \Airavata\Model\Experiment\ExperimentModel $experiment
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function createExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, \Airavata\Model\Experiment\ExperimentModel $experiment);
  /**
   * 
   * Delete an Experiment
   * If the experiment is not already launched experiment can be deleted.
   * 
   * @param authzToken
   * 
   * @param experiementId
   *     Experiment ID of the experimnet you want to delete.
   * 
   * @return boolean
   *     Identifier for the success or failure of the deletion operation.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $experimentId
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function deleteExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $experimentId);
  /**
   *   *
   *   * Get Experiment
   *   * Fetch previously created experiment metadata.
   *   *
   *   * @param airavataExperimentId
   *   *    The unique identifier of the requested experiment. This ID is returned during the create experiment step.
   *   *
   *   * @return ExperimentModel
   *   *   This method will return the previously stored experiment metadata.
   *   *
   *   * @throws org.apache.airavata.model.error.InvalidRequestException
   *   *    For any incorrect forming of the request itself.
   *   *
   *   * @throws org.apache.airavata.model.error.ExperimentNotFoundException
   *   *    If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
   *   *
   *   * @throws org.apache.airavata.model.error.AiravataClientException
   *   *    The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
   *   *
   *   *      UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
   *   *         step, then Airavata Registry will not have a provenance area setup. The client has to follow
   *   *         gateway registration steps and retry this request.
   *   *
   *   *      AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
   *   *         For now this is a place holder.
   *   *
   *   *      INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
   *   *         is implemented, the authorization will be more substantial.
   *   *
   *   * @throws org.apache.airavata.model.error.AiravataSystemException
   *   *    This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
   *   *       rather an Airavata Administrator will be notified to take corrective action.
   *   *
   * *
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $airavataExperimentId
   * @return \Airavata\Model\Experiment\ExperimentModel A structure holding the experiment metadata and its child models.
   * 
   * userName:
   *   The user name of the targeted gateway end user on whose behalf the experiment is being created.
   *     the associated gateway identity can only be inferred from the security hand-shake so as to avoid
   *     authorized Airavata Clients mimicking an unauthorized request. If a gateway is not registered with
   *     Airavata, an authorization exception is thrown.
   * 
   * experimentName:
   *   The name of the experiment as defined by the user. The name need not be unique as uniqueness is enforced
   *      by the generated experiment id.
   * 
   * experimentDescription:
   *    The verbose description of the experiment. This is an optional parameter.
   * 
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\ExperimentNotFoundException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId);
  /**
   *   *
   *   * Get Experiment by an admin user
   *   *
   *   * Used by an admin user to fetch previously created experiment metadata.
   *   *
   *   * @param airavataExperimentId
   *   *    The unique identifier of the requested experiment. This ID is returned during the create experiment step.
   *   *
   *   * @return ExperimentModel
   *   *   This method will return the previously stored experiment metadata.
   *   *
   *   * @throws org.apache.airavata.model.error.InvalidRequestException
   *   *    For any incorrect forming of the request itself.
   *   *
   *   * @throws org.apache.airavata.model.error.ExperimentNotFoundException
   *   *    If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
   *   *
   *   * @throws org.apache.airavata.model.error.AiravataClientException
   *   *    The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
   *   *
   *   *      UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
   *   *         step, then Airavata Registry will not have a provenance area setup. The client has to follow
   *   *         gateway registration steps and retry this request.
   *   *
   *   *      AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
   *   *         For now this is a place holder.
   *   *
   *   *      INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
   *   *         is implemented, the authorization will be more substantial.
   *   *
   *   * @throws org.apache.airavata.model.error.AiravataSystemException
   *   *    This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
   *   *       rather an Airavata Administrator will be notified to take corrective action.
   *   *
   * *
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $airavataExperimentId
   * @return \Airavata\Model\Experiment\ExperimentModel A structure holding the experiment metadata and its child models.
   * 
   * userName:
   *   The user name of the targeted gateway end user on whose behalf the experiment is being created.
   *     the associated gateway identity can only be inferred from the security hand-shake so as to avoid
   *     authorized Airavata Clients mimicking an unauthorized request. If a gateway is not registered with
   *     Airavata, an authorization exception is thrown.
   * 
   * experimentName:
   *   The name of the experiment as defined by the user. The name need not be unique as uniqueness is enforced
   *      by the generated experiment id.
   * 
   * experimentDescription:
   *    The verbose description of the experiment. This is an optional parameter.
   * 
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\ExperimentNotFoundException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getExperimentByAdmin(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId);
  /**
   * 
   * Get Complete Experiment Details
   * Fetch the completed nested tree structue of previously created experiment metadata which includes processes ->
   * tasks -> jobs information.
   * 
   * @param airavataExperimentId
   *    The identifier for the requested experiment. This is returned during the create experiment step.
   * 
   * @return ExperimentModel
   *   This method will return the previously stored experiment metadata including application input parameters, computational resource scheduling
   *   information, special input output handling and additional quality of service parameters.
   * 
   * @throws org.apache.airavata.model.error.InvalidRequestException
   *    For any incorrect forming of the request itself.
   * 
   * @throws org.apache.airavata.model.error.ExperimentNotFoundException
   *    If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
   * 
   * @throws org.apache.airavata.model.error.AiravataClientException
   *    The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
   * 
   *      UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
   *         step, then Airavata Registry will not have a provenance area setup. The client has to follow
   *         gateway registration steps and retry this request.
   * 
   *      AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
   *         For now this is a place holder.
   * 
   *      INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
   *         is implemented, the authorization will be more substantial.
   * 
   * @throws org.apache.airavata.model.error.AiravataSystemException
   *    This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
   *       rather an Airavata Administrator will be notified to take corrective action.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $airavataExperimentId
   * @return \Airavata\Model\Experiment\ExperimentModel A structure holding the experiment metadata and its child models.
   * 
   * userName:
   *   The user name of the targeted gateway end user on whose behalf the experiment is being created.
   *     the associated gateway identity can only be inferred from the security hand-shake so as to avoid
   *     authorized Airavata Clients mimicking an unauthorized request. If a gateway is not registered with
   *     Airavata, an authorization exception is thrown.
   * 
   * experimentName:
   *   The name of the experiment as defined by the user. The name need not be unique as uniqueness is enforced
   *      by the generated experiment id.
   * 
   * experimentDescription:
   *    The verbose description of the experiment. This is an optional parameter.
   * 
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\ExperimentNotFoundException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getDetailedExperimentTree(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId);
  /**
   * 
   * Update a Previously Created Experiment
   * Configure the CREATED experiment with required inputs, scheduling and other quality of service parameters. This method only updates the experiment object within the registry.
   * The experiment has to be launched to make it actionable by the server.
   * 
   * @param airavataExperimentId
   *    The identifier for the requested experiment. This is returned during the create experiment step.
   * 
   * @param ExperimentModel
   *    The configuration information of the experiment with application input parameters, computational resource scheduling
   *      information, special input output handling and additional quality of service parameters.
   * 
   * @return
   *   This method call does not have a return value.
   * 
   * @throws org.apache.airavata.model.error.InvalidRequestException
   *    For any incorrect forming of the request itself.
   * 
   * @throws org.apache.airavata.model.error.ExperimentNotFoundException
   *    If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
   * 
   * @throws org.apache.airavata.model.error.AiravataClientException
   *    The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
   *      
   *      UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
   *         step, then Airavata Registry will not have a provenance area setup. The client has to follow
   *         gateway registration steps and retry this request.
   * 
   *      AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
   *         For now this is a place holder.
   * 
   *      INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
   *         is implemented, the authorization will be more substantial.
   * 
   * @throws org.apache.airavata.model.error.AiravataSystemException
   *    This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
   *       rather an Airavata Administrator will be notified to take corrective action.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $airavataExperimentId
   * @param \Airavata\Model\Experiment\ExperimentModel $experiment
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\ExperimentNotFoundException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function updateExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId, \Airavata\Model\Experiment\ExperimentModel $experiment);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $airavataExperimentId
   * @param \Airavata\Model\Experiment\UserConfigurationDataModel $userConfiguration
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function updateExperimentConfiguration(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId, \Airavata\Model\Experiment\UserConfigurationDataModel $userConfiguration);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $airavataExperimentId
   * @param \Airavata\Model\Scheduling\ComputationalResourceSchedulingModel $resourceScheduling
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function updateResourceScheduleing(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId, \Airavata\Model\Scheduling\ComputationalResourceSchedulingModel $resourceScheduling);
  /**
   *  *
   *  * Validate experiment configuration.
   *  * A true in general indicates, the experiment is ready to be launched.
   *  *
   *  * @param airavataExperimentId
   *  *    Unique identifier of the experiment (Experimnent ID) of the experiment which need to be validated.
   *  *
   *  * @return boolean
   *  *      Identifier for the success or failure of the validation operation.
   *  *
   * *
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $airavataExperimentId
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\ExperimentNotFoundException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function validateExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId);
  /**
   * 
   * Launch a Previously Created & Configured Experiment.
   * Airavata Server will then start processing the request and appropriate notifications and intermediate and output data will be subsequently available for this experiment.
   * 
   * @gatewayId
   *    ID of the gateway which will launch the experiment.
   * 
   * @param airavataExperimentId
   *    The identifier for the requested experiment. This is returned during the create experiment step.
   * 
   * @return
   *   This method call does not have a return value.
   * 
   * @throws org.apache.airavata.model.error.InvalidRequestException
   *    For any incorrect forming of the request itself.
   * 
   * @throws org.apache.airavata.model.error.ExperimentNotFoundException
   *    If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
   * 
   * @throws org.apache.airavata.model.error.AiravataClientException
   *    The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
   *      
   *      UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
   *         step, then Airavata Registry will not have a provenance area setup. The client has to follow
   *         gateway registration steps and retry this request.
   * 
   *      AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
   *         For now this is a place holder.
   * 
   *      INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
   *         is implemented, the authorization will be more substantial.
   * 
   * @throws org.apache.airavata.model.error.AiravataSystemException
   *    This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
   *       rather an Airavata Administrator will be notified to take corrective action.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $airavataExperimentId
   * @param string $gatewayId
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\ExperimentNotFoundException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function launchExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId, $gatewayId);
  /**
   * 
   * Get Experiment Status
   * 
   * Obtain the status of an experiment by providing the Experiment Id
   * 
   * @param authzToken
   * 
   * @param airavataExperimentId
   *     Experiment ID of the experimnet you require the status.
   * 
   * @return ExperimentStatus
   *     ExperimentStatus model with the current status will be returned.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $airavataExperimentId
   * @return \Airavata\Model\Status\ExperimentStatus Status: A generic status object.
   * 
   * state:
   *   State .
   * 
   * timeOfStateChange:
   *   time the status was last updated.
   * 
   * reason:
   *   User friendly reason on how the state is inferred.
   * 
   * 
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\ExperimentNotFoundException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getExperimentStatus(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId);
  /**
   * 
   * Get Experiment Outputs
   * This method to be used when need to obtain final outputs of a certain Experiment
   * 
   * @param authzToken
   * 
   * @param airavataExperimentId
   *     Experiment ID of the experimnet you need the outputs.
   * 
   * @return list
   *     List of experiment outputs will be returned. They will be returned as a list of OutputDataObjectType for the experiment.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $airavataExperimentId
   * @return \Airavata\Model\Application\Io\OutputDataObjectType[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\ExperimentNotFoundException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getExperimentOutputs(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId);
  /**
   * 
   * Get Intermediate Experiment Outputs
   * This method to be used when need to obtain intermediate outputs of a certain Experiment
   * 
   * @param authzToken
   * 
   * @param airavataExperimentId
   *     Experiment ID of the experimnet you need intermediate outputs.
   * 
   * @return list
   *     List of intermediate experiment outputs will be returned. They will be returned as a list of OutputDataObjectType for the experiment.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $airavataExperimentId
   * @return \Airavata\Model\Application\Io\OutputDataObjectType[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\ExperimentNotFoundException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getIntermediateOutputs(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId);
  /**
   * Request fetching of output files for an experiment that is still executing.
   * This method results in a new Process being created for the Experiment with
   * tasks for fetching each output file.
   * 
   * @param authzToken
   * 
   * @param airavataExperimentId
   *     Experiment ID of the experiment
   * 
   * @param outputNames
   *     List of names of the experiment's outputs to fetch.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $airavataExperimentId
   * @param string[] $outputNames
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\ExperimentNotFoundException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function fetchIntermediateOutputs(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId, array $outputNames);
  /**
   * Get the status of the most recent intermediate output fetching process for the given output names.
   * 
   * @param authzToken
   * 
   * @param airavataExperimentId
   *     Experiment ID of the experiment
   * 
   * @param outputNames
   *     List of names of the experiment's outputs to fetch.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $airavataExperimentId
   * @param string[] $outputNames
   * @return \Airavata\Model\Status\ProcessStatus
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\ExperimentNotFoundException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getIntermediateOutputProcessStatus(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId, array $outputNames);
  /**
   * 
   * Get Job Statuses for an Experiment
   * This method to be used when need to get the job status of an Experiment. An experiment may have one or many jobs; there for one or many job statuses may turnup
   * 
   * @param authzToken
   * 
   * @param experiementId
   *     Experiment ID of the experimnet you need the job statuses.
   * 
   * @return JobStatus
   *     Job status (string) for all all the existing jobs for the experiment will be returned in the form of a map
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $airavataExperimentId
   * @return array
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\ExperimentNotFoundException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getJobStatuses(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId);
  /**
   * 
   * Get Job Details for all the jobs within an Experiment.
   * This method to be used when need to get the job details for one or many jobs of an Experiment.
   * 
   * @param authzToken
   * 
   * @param experiementId
   *     Experiment ID of the experimnet you need job details.
   * 
   * @return list of JobDetails
   *     Job details.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $airavataExperimentId
   * @return \Airavata\Model\Job\JobModel[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\ExperimentNotFoundException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getJobDetails(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId);
  /**
   * 
   * Clone an Existing Experiment
   * Existing specified experiment is cloned and a new name is provided. A copy of the experiment configuration is made and is persisted with new metadata.
   *   The client has to subsequently update this configuration if needed and launch the cloned experiment.
   * 
   * @param newExperimentName
   *    experiment name that should be used in the cloned experiment
   * 
   * @param updatedExperiment
   *    Once an experiment is cloned, to disambiguate, the users are suggested to provide new metadata. This will again require
   *      the basic experiment metadata like the name and description, intended user, the gateway identifier and if the experiment
   *      should be shared public by default.
   * @param newExperimentProjectId
   *    The project in which to create the cloned experiment. This is optional and if null the experiment will be created
   *      in the same project as the existing experiment.
   * 
   * @return
   *   The server-side generated.airavata.registry.core.experiment.globally unique identifier (Experiment ID) for the newly cloned experiment.
   * 
   * @throws org.apache.airavata.model.error.InvalidRequestException
   *    For any incorrect forming of the request itself.
   * 
   * @throws org.apache.airavata.model.error.ExperimentNotFoundException
   *    If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
   * 
   * @throws org.apache.airavata.model.error.AiravataClientException
   *    The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
   *      
   *      UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
   *         step, then Airavata Registry will not have a provenance area setup. The client has to follow
   *         gateway registration steps and retry this request.
   * 
   *      AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
   *         For now this is a place holder.
   * 
   *      INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
   *         is implemented, the authorization will be more substantial.
   * 
   * @throws org.apache.airavata.model.error.AiravataSystemException
   *    This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
   *       rather an Airavata Administrator will be notified to take corrective action.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $existingExperimentID
   * @param string $newExperimentName
   * @param string $newExperimentProjectId
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\ExperimentNotFoundException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   * @throws \Airavata\API\Error\ProjectNotFoundException
   */
  public function cloneExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $existingExperimentID, $newExperimentName, $newExperimentProjectId);
  /**
   * 
   * Clone an Existing Experiment by an admin user
   * Existing specified experiment is cloned and a new name is provided. A copy of the experiment configuration is made and is persisted with new metadata.
   *   The client has to subsequently update this configuration if needed and launch the cloned experiment.
   * 
   * @param newExperimentName
   *    experiment name that should be used in the cloned experiment
   * 
   * @param updatedExperiment
   *    Once an experiment is cloned, to disambiguate, the users are suggested to provide new metadata. This will again require
   *      the basic experiment metadata like the name and description, intended user, the gateway identifier and if the experiment
   *      should be shared public by default.
   * @param newExperimentProjectId
   *    The project in which to create the cloned experiment. This is optional and if null the experiment will be created
   *      in the same project as the existing experiment.
   * 
   * @return
   *   The server-side generated.airavata.registry.core.experiment.globally unique identifier (Experiment ID) for the newly cloned experiment.
   * 
   * @throws org.apache.airavata.model.error.InvalidRequestException
   *    For any incorrect forming of the request itself.
   * 
   * @throws org.apache.airavata.model.error.ExperimentNotFoundException
   *    If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
   * 
   * @throws org.apache.airavata.model.error.AiravataClientException
   *    The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
   * 
   *      UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
   *         step, then Airavata Registry will not have a provenance area setup. The client has to follow
   *         gateway registration steps and retry this request.
   * 
   *      AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
   *         For now this is a place holder.
   * 
   *      INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
   *         is implemented, the authorization will be more substantial.
   * 
   * @throws org.apache.airavata.model.error.AiravataSystemException
   *    This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
   *       rather an Airavata Administrator will be notified to take corrective action.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $existingExperimentID
   * @param string $newExperimentName
   * @param string $newExperimentProjectId
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\ExperimentNotFoundException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   * @throws \Airavata\API\Error\ProjectNotFoundException
   */
  public function cloneExperimentByAdmin(\Airavata\Model\Security\AuthzToken $authzToken, $existingExperimentID, $newExperimentName, $newExperimentProjectId);
  /**
   * 
   * Terminate a running Experiment.
   * 
   * @gatewayId
   *    ID of the gateway which will terminate the running Experiment.
   * 
   * @param airavataExperimentId
   *    The identifier of the experiment required termination. This ID is returned during the create experiment step.
   * 
   * @return status
   *   This method call does not have a return value.
   * 
   * @throws org.apache.airavata.model.error.InvalidRequestException
   *    For any incorrect forming of the request itself.
   * 
   * @throws org.apache.airavata.model.error.ExperimentNotFoundException
   *    If the specified experiment is not previously created, then an Experiment Not Found Exception is thrown.
   * 
   * @throws org.apache.airavata.model.error.AiravataClientException
   *    The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve:
   *      
   *      UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time administrative
   *         step, then Airavata Registry will not have a provenance area setup. The client has to follow
   *         gateway registration steps and retry this request.
   * 
   *      AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
   *         For now this is a place holder.
   * 
   *      INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
   *         is implemented, the authorization will be more substantial.
   * 
   * @throws org.apache.airavata.model.error.AiravataSystemException
   *    This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
   *       rather an Airavata Administrator will be notified to take corrective action.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $airavataExperimentId
   * @param string $gatewayId
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\ExperimentNotFoundException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function terminateExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId, $gatewayId);
  /**
   * 
   * Register a Application Module.
   * 
   * @gatewayId
   *    ID of the gateway which is registering the new Application Module.
   * 
   * @param applicationModule
   *    Application Module Object created from the datamodel.
   * 
   * @return appModuleId
   *   Returns the server-side generated airavata appModule globally unique identifier.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayId
   * @param \Airavata\Model\AppCatalog\AppDeployment\ApplicationModule $applicationModule
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function registerApplicationModule(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, \Airavata\Model\AppCatalog\AppDeployment\ApplicationModule $applicationModule);
  /**
   * 
   * Fetch a Application Module.
   * 
   * @param appModuleId
   *   The unique identifier of the application module required
   * 
   * @return applicationModule
   *   Returns an Application Module Object.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $appModuleId
   * @return \Airavata\Model\AppCatalog\AppDeployment\ApplicationModule Application Module Information. A module has to be registered before registering a deployment.
   * 
   * appModuleId: Airavata Internal Unique Job ID. This is set by the registry.
   * 
   * appModuleName:
   *   Name of the application module.
   * 
   * appModuleVersion:
   *   Version of the application.
   * 
   * appModuleDescription:
   *    Descriprion of the Module
   * 
   * 
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getApplicationModule(\Airavata\Model\Security\AuthzToken $authzToken, $appModuleId);
  /**
   * 
   * Update a Application Module.
   * 
   * @param appModuleId
   *   The identifier for the requested application module to be updated.
   * 
   * @param applicationModule
   *    Application Module Object created from the datamodel.
   * 
   * @return status
   *   Returns a success/failure of the update.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $appModuleId
   * @param \Airavata\Model\AppCatalog\AppDeployment\ApplicationModule $applicationModule
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function updateApplicationModule(\Airavata\Model\Security\AuthzToken $authzToken, $appModuleId, \Airavata\Model\AppCatalog\AppDeployment\ApplicationModule $applicationModule);
  /**
   * 
   * Fetch all Application Module Descriptions.
   * 
   * @param gatewayId
   *    ID of the gateway which need to list all available application deployment documentation.
   * 
   * @return list
   *    Returns the list of all Application Module Objects.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayId
   * @return \Airavata\Model\AppCatalog\AppDeployment\ApplicationModule[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getAllAppModules(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId);
  /**
   * 
   * Fetch all accessible Application Module Descriptions.
   * 
   * @param gatewayId
   *    ID of the gateway which need to list all accessible application deployment documentation.
   * 
   * @return list
   *    Returns the list of all Application Module Objects that are accessible to the user.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayId
   * @return \Airavata\Model\AppCatalog\AppDeployment\ApplicationModule[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getAccessibleAppModules(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId);
  /**
   * 
   * Delete an Application Module.
   * 
   * @param appModuleId
   *   The identifier of the Application Module to be deleted.
   * 
   * @return status
   *   Returns a success/failure of the deletion.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $appModuleId
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function deleteApplicationModule(\Airavata\Model\Security\AuthzToken $authzToken, $appModuleId);
  /**
   * 
   * Register an Application Deployment.
   * 
   * @param gatewayId
   *    ID of the gateway which is registering the new Application Deployment.
   * 
   * @param applicationDeployment
   *    Application Module Object created from the datamodel.
   * 
   * @return appDeploymentId
   *   Returns a server-side generated airavata appDeployment globally unique identifier.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayId
   * @param \Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription $applicationDeployment
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function registerApplicationDeployment(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, \Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription $applicationDeployment);
  /**
   * 
   * Fetch a Application Deployment.
   * 
   * @param appDeploymentId
   *   The identifier for the requested application module
   * 
   * @return applicationDeployment
   *   Returns a application Deployment Object.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $appDeploymentId
   * @return \Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription Application Deployment Description
   * 
   * appDeploymentId: Airavata Internal Unique Job ID. This is set by the registry.
   * 
   * appModuleName:
   *   Application Module Name. This has to be precise describing the binary.
   * 
   * computeHostId:
   *   This ID maps application deployment to a particular resource previously described within Airavata.
   *   Example: Stampede is first registered and refered when registering WRF.
   * 
   * moduleLoadCmd:
   *  Command string to load modules. This will be placed in the job submisison
   *  Ex: module load amber
   * 
   * libPrependPaths:
   *  prepend to a path variable the value
   * 
   * libAppendPaths:
   *  append to a path variable the value
   * 
   * setEnvironment:
   *  assigns to the environment variable "NAME" the value
   * 
   * 
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getApplicationDeployment(\Airavata\Model\Security\AuthzToken $authzToken, $appDeploymentId);
  /**
   * 
   * Update an Application Deployment.
   * 
   * @param appDeploymentId
   *   The identifier of the requested application deployment to be updated.
   * 
   * @param appDeployment
   *    Application Deployment Object created from the datamodel.
   * 
   * @return status
   *   Returns a success/failure of the update.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $appDeploymentId
   * @param \Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription $applicationDeployment
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function updateApplicationDeployment(\Airavata\Model\Security\AuthzToken $authzToken, $appDeploymentId, \Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription $applicationDeployment);
  /**
   * 
   * Delete an Application Deployment.
   * 
   * @param appDeploymentId
   *   The unique identifier of application deployment to be deleted.
   * 
   * @return status
   *   Returns a success/failure of the deletion.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $appDeploymentId
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function deleteApplicationDeployment(\Airavata\Model\Security\AuthzToken $authzToken, $appDeploymentId);
  /**
   * 
   * Fetch all Application Deployment Descriptions.
   * 
   * @param gatewayId
   *    ID of the gateway which need to list all available application deployment documentation.
   * 
   * @return list<applicationDeployment.
   *    Returns the list of all application Deployment Objects.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayId
   * @return \Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getAllApplicationDeployments(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId);
  /**
   * 
   * Fetch all accessible Application Deployment Descriptions.
   * 
   * @param gatewayId
   *    ID of the gateway which need to list all accessible application deployment documentation.
   * @param permissionType
   *    ResourcePermissionType to check for this user
   * 
   * @return list<applicationDeployment.
   *    Returns the list of all application Deployment Objects that are accessible to the user.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayId
   * @param int $permissionType
   * @return \Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getAccessibleApplicationDeployments(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $permissionType);
  /**
   * Fetch a list of Deployed Compute Hosts.
   * 
   * @param appModuleId
   *   The identifier for the requested application module
   * 
   * @return list<string>
   *   Returns a list of Deployed Resources.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $appModuleId
   * @return string[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getAppModuleDeployedResources(\Airavata\Model\Security\AuthzToken $authzToken, $appModuleId);
  /**
   * Fetch a list of Application Deployments that this user can use for executing the given Application Module using the given Group Resource Profile.
   * The user must have at least READ access to the Group Resource Profile.
   * 
   * @param appModuleId
   *    The identifier for the Application Module
   * 
   * @param groupResourceProfileId
   *    The identifier for the Group Resource Profile
   * 
   * @return list<ApplicationDeploymentDescription>
   *    Returns a list of Application Deployments
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $appModuleId
   * @param string $groupResourceProfileId
   * @return \Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getApplicationDeploymentsForAppModuleAndGroupResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $appModuleId, $groupResourceProfileId);
  /**
   * 
   * Register a Application Interface.
   * 
   * @param applicationInterface
   *    Application Module Object created from the datamodel.
   * 
   * @return appInterfaceId
   *   Returns a server-side generated airavata application interface globally unique identifier.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayId
   * @param \Airavata\Model\AppCatalog\AppInterface\ApplicationInterfaceDescription $applicationInterface
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function registerApplicationInterface(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, \Airavata\Model\AppCatalog\AppInterface\ApplicationInterfaceDescription $applicationInterface);
  /**
   * 
   * Clone an Application Interface.
   * 
   * @gatewayId
   *    The identifier for the gateway profile to be requested
   * 
   * @param existingAppInterfaceID
   *    Identifier of the existing Application interface you wich to clone.
   * 
   * @param newApplicationName
   *    Name for the new application interface.
   * 
   * @return appInterfaceId
   *    Returns a server-side generated globally unique identifier for the newly cloned application interface.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $existingAppInterfaceID
   * @param string $newApplicationName
   * @param string $gatewayId
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function cloneApplicationInterface(\Airavata\Model\Security\AuthzToken $authzToken, $existingAppInterfaceID, $newApplicationName, $gatewayId);
  /**
   * 
   * Fetch an Application Interface.
   * 
   * @param appInterfaceId
   *   The identifier for the requested application interface.
   * 
   * @return applicationInterface
   *   Returns an application Interface Object.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $appInterfaceId
   * @return \Airavata\Model\AppCatalog\AppInterface\ApplicationInterfaceDescription Application Interface Description
   * 
   * applicationModules:
   *   Associate all application modules with versions which interface is applicable to.
   * 
   * applicationInputs:
   *   Inputs to be passed to the application
   * 
   * applicationOutputs:
   *   Outputs generated from the application
   * 
   * 
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getApplicationInterface(\Airavata\Model\Security\AuthzToken $authzToken, $appInterfaceId);
  /**
   * 
   * Update a Application Interface.
   * 
   * @param appInterfaceId
   *   The identifier of the requested application deployment to be updated.
   * 
   * @param appInterface
   *    Application Interface Object created from the datamodel.
   * 
   * @return status
   *   Returns a success/failure of the update.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $appInterfaceId
   * @param \Airavata\Model\AppCatalog\AppInterface\ApplicationInterfaceDescription $applicationInterface
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function updateApplicationInterface(\Airavata\Model\Security\AuthzToken $authzToken, $appInterfaceId, \Airavata\Model\AppCatalog\AppInterface\ApplicationInterfaceDescription $applicationInterface);
  /**
   * 
   * Delete an Application Interface.
   * 
   * @param appInterfaceId
   *   The identifier for the requested application interface to be deleted.
   * 
   * @return status
   *   Returns a success/failure of the deletion.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $appInterfaceId
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function deleteApplicationInterface(\Airavata\Model\Security\AuthzToken $authzToken, $appInterfaceId);
  /**
   * 
   * Fetch name and ID of  Application Interface documents.
   * 
   * 
   * @return map<applicationId, applicationInterfaceNames>
   *   Returns a list of application interfaces with corresponsing ID's
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayId
   * @return array
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getAllApplicationInterfaceNames(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId);
  /**
   * 
   * Fetch all Application Interface documents.
   * 
   * 
   * @return map<applicationId, applicationInterfaceNames>
   *   Returns a list of application interfaces documents (Application Interface ID, name, description, Inputs and Outputs objects).
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayId
   * @return \Airavata\Model\AppCatalog\AppInterface\ApplicationInterfaceDescription[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getAllApplicationInterfaces(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId);
  /**
   * 
   * Fetch the list of Application Inputs.
   * 
   * @param appInterfaceId
   *   The identifier of the application interface which need inputs to be fetched.
   * 
   * @return list<application_interface_model.InputDataObjectType>
   *   Returns a list of application inputs.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $appInterfaceId
   * @return \Airavata\Model\Application\Io\InputDataObjectType[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getApplicationInputs(\Airavata\Model\Security\AuthzToken $authzToken, $appInterfaceId);
  /**
   * 
   * Fetch list of Application Outputs.
   * 
   * @param appInterfaceId
   *   The identifier of the application interface which need outputs to be fetched.
   * 
   * @return list<application_interface_model.OutputDataObjectType>
   *   Returns a list of application outputs.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $appInterfaceId
   * @return \Airavata\Model\Application\Io\OutputDataObjectType[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getApplicationOutputs(\Airavata\Model\Security\AuthzToken $authzToken, $appInterfaceId);
  /**
   * 
   * Fetch a list of all deployed Compute Hosts for a given application interfaces.
   * 
   * @param appInterfaceId
   *   The identifier for the requested application interface.
   * 
   * @return map<computeResourceId, computeResourceName>
   *   A map of registered compute resource id's and their corresponding hostnames.
   *   Deployments of each modules listed within the interfaces will be listed.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $appInterfaceId
   * @return array
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getAvailableAppInterfaceComputeResources(\Airavata\Model\Security\AuthzToken $authzToken, $appInterfaceId);
  /**
   * Register a Compute Resource.
   * 
   * @param computeResourceDescription
   *    Compute Resource Object created from the datamodel.
   * 
   * @return computeResourceId
   *   Returns a server-side generated airavata compute resource globally unique identifier.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param \Airavata\Model\AppCatalog\ComputeResource\ComputeResourceDescription $computeResourceDescription
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function registerComputeResource(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\ComputeResource\ComputeResourceDescription $computeResourceDescription);
  /**
   * Fetch the given Compute Resource.
   * 
   * @param computeResourceId
   *   The identifier for the requested compute resource
   * 
   * @return computeResourceDescription
   *    Compute Resource Object created from the datamodel..
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $computeResourceId
   * @return \Airavata\Model\AppCatalog\ComputeResource\ComputeResourceDescription Computational Resource Description
   * 
   * computeResourceId: Airavata Internal Unique Identifier to distinguish Compute Resource.
   * 
   * hostName:
   *   Fully Qualified Host Name.
   * 
   * hostAliases:
   *   Aliases if any.
   * 
   * ipAddress:
   *   IP Addresses of the Resource.
   * 
   * resourceDescription:
   *  A user friendly description of the resource.
   * 
   * JobSubmissionProtocols:
   *  A computational resources may have one or more ways of submitting Jobs. This structure
   *    will hold all available mechanisms to interact with the resource.
   *  The key is the priority
   * 
   * DataMovementProtocol:
   *  Option to specify a prefered data movement mechanism of the available options.
   * 
   * fileSystems:
   *  Map of file systems type and the path.
   * 
   * 
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getComputeResource(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId);
  /**
   * 
   * Fetch all registered Compute Resources.
   * 
   * @return A map of registered compute resource id's and thier corresponding hostnames.
   *    Compute Resource Object created from the datamodel..
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @return array
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getAllComputeResourceNames(\Airavata\Model\Security\AuthzToken $authzToken);
  /**
   * Update a Compute Resource.
   * 
   * @param computeResourceId
   *   The identifier for the requested compute resource to be updated.
   * 
   * @param computeResourceDescription
   *    Compute Resource Object created from the datamodel.
   * 
   * @return status
   *   Returns a success/failure of the update.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $computeResourceId
   * @param \Airavata\Model\AppCatalog\ComputeResource\ComputeResourceDescription $computeResourceDescription
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function updateComputeResource(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, \Airavata\Model\AppCatalog\ComputeResource\ComputeResourceDescription $computeResourceDescription);
  /**
   * Delete a Compute Resource.
   * 
   * @param computeResourceId
   *   The identifier for the requested compute resource to be deleted.
   * 
   * @return status
   *   Returns a success/failure of the deletion.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $computeResourceId
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function deleteComputeResource(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId);
  /**
   * Register a Storage Resource.
   * 
   * @param storageResourceDescription
   *    Storge Resource Object created from the datamodel.
   * 
   * @return storageResourceId
   *   Returns a server-side generated airavata storage resource globally unique identifier.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param \Airavata\Model\AppCatalog\StorageResource\StorageResourceDescription $storageResourceDescription
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function registerStorageResource(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\StorageResource\StorageResourceDescription $storageResourceDescription);
  /**
   * Fetch the given Storage Resource.
   * 
   * @param storageResourceId
   *   The identifier for the requested storage resource
   * 
   * @return storageResourceDescription
   *    Storage Resource Object created from the datamodel..
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $storageResourceId
   * @return \Airavata\Model\AppCatalog\StorageResource\StorageResourceDescription Storage Resource Description
   * 
   * storageResourceId: Airavata Internal Unique Identifier to distinguish Compute Resource.
   * 
   * hostName:
   *   Fully Qualified Host Name.
   * 
   * storageResourceDescription:
   *  A user friendly description of the resource.
   * 
   * 
   * DataMovementProtocol:
   *  Option to specify a prefered data movement mechanism of the available options.
   * 
   * 
   * 
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getStorageResource(\Airavata\Model\Security\AuthzToken $authzToken, $storageResourceId);
  /**
   * Fetch all registered Storage Resources.
   * 
   * @return A map of registered compute resource id's and thier corresponding hostnames.
   *    Compute Resource Object created from the datamodel..
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @return array
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getAllStorageResourceNames(\Airavata\Model\Security\AuthzToken $authzToken);
  /**
   * Update a Storage Resource.
   * 
   * @param storageResourceId
   *   The identifier for the requested compute resource to be updated.
   * 
   * @param storageResourceDescription
   *    Storage Resource Object created from the datamodel.
   * 
   * @return status
   *   Returns a success/failure of the update.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $storageResourceId
   * @param \Airavata\Model\AppCatalog\StorageResource\StorageResourceDescription $storageResourceDescription
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function updateStorageResource(\Airavata\Model\Security\AuthzToken $authzToken, $storageResourceId, \Airavata\Model\AppCatalog\StorageResource\StorageResourceDescription $storageResourceDescription);
  /**
   * Delete a Storage Resource.
   * 
   * @param storageResourceId
   *   The identifier of the requested compute resource to be deleted.
   * 
   * @return status
   *   Returns a success/failure of the deletion.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $storageResourceId
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function deleteStorageResource(\Airavata\Model\Security\AuthzToken $authzToken, $storageResourceId);
  /**
   * Add a Local Job Submission details to a compute resource
   *  App catalog will return a jobSubmissionInterfaceId which will be added to the jobSubmissionInterfaces.
   * 
   * @param computeResourceId
   *   The identifier of the compute resource to which JobSubmission protocol to be added
   * 
   * @param priorityOrder
   *   Specify the priority of this job manager. If this is the only jobmanager, the priority can be zero.
   * 
   * @param localSubmission
   *   The LOCALSubmission object to be added to the resource.
   * 
   * @return status
   *   Returns the unique job submission id.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $computeResourceId
   * @param int $priorityOrder
   * @param \Airavata\Model\AppCatalog\ComputeResource\LOCALSubmission $localSubmission
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function addLocalSubmissionDetails(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $priorityOrder, \Airavata\Model\AppCatalog\ComputeResource\LOCALSubmission $localSubmission);
  /**
   * Update the given Local Job Submission details
   * 
   * @param jobSubmissionInterfaceId
   *   The identifier of the JobSubmission Interface to be updated.
   * 
   * @param localSubmission
   *   The LOCALSubmission object to be updated.
   * 
   * @return status
   *   Returns a success/failure of the deletion.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $jobSubmissionInterfaceId
   * @param \Airavata\Model\AppCatalog\ComputeResource\LOCALSubmission $localSubmission
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function updateLocalSubmissionDetails(\Airavata\Model\Security\AuthzToken $authzToken, $jobSubmissionInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\LOCALSubmission $localSubmission);
  /**
   * This method returns localJobSubmission object
   * @param jobSubmissionInterfaceId
   *   The identifier of the JobSubmission Interface to be retrieved.
   *  @return LOCALSubmission instance
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $jobSubmissionId
   * @return \Airavata\Model\AppCatalog\ComputeResource\LOCALSubmission Locally Fork Jobs as OS processes
   * 
   * alternativeSSHHostName:
   *  If the login to ssh is different than the hostname itself, specify it here
   * 
   * sshPort:
   *  If a non-default port needs to used, specify it.
   * 
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getLocalJobSubmission(\Airavata\Model\Security\AuthzToken $authzToken, $jobSubmissionId);
  /**
   * Add a SSH Job Submission details to a compute resource
   *  App catalog will return a jobSubmissionInterfaceId which will be added to the jobSubmissionInterfaces.
   * 
   * @param computeResourceId
   *   The identifier of the compute resource to which JobSubmission protocol to be added
   * 
   * @param priorityOrder
   *   Specify the priority of this job manager. If this is the only jobmanager, the priority can be zero.
   * 
   * @param sshJobSubmission
   *   The SSHJobSubmission object to be added to the resource.
   * 
   * @return status
   *   Returns the unique job submission id.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $computeResourceId
   * @param int $priorityOrder
   * @param \Airavata\Model\AppCatalog\ComputeResource\SSHJobSubmission $sshJobSubmission
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function addSSHJobSubmissionDetails(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $priorityOrder, \Airavata\Model\AppCatalog\ComputeResource\SSHJobSubmission $sshJobSubmission);
  /**
   * Add a SSH_FORK Job Submission details to a compute resource
   *  App catalog will return a jobSubmissionInterfaceId which will be added to the jobSubmissionInterfaces.
   * 
   * @param computeResourceId
   *   The identifier of the compute resource to which JobSubmission protocol to be added
   * 
   * @param priorityOrder
   *   Specify the priority of this job manager. If this is the only jobmanager, the priority can be zero.
   * 
   * @param sshJobSubmission
   *   The SSHJobSubmission object to be added to the resource.
   * 
   * @return status
   *   Returns the unique job submission id.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $computeResourceId
   * @param int $priorityOrder
   * @param \Airavata\Model\AppCatalog\ComputeResource\SSHJobSubmission $sshJobSubmission
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function addSSHForkJobSubmissionDetails(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $priorityOrder, \Airavata\Model\AppCatalog\ComputeResource\SSHJobSubmission $sshJobSubmission);
  /**
   * This method returns SSHJobSubmission object
   * @param jobSubmissionInterfaceId
   *   The identifier of the JobSubmission Interface to be retrieved.
   *  @return SSHJobSubmission instance
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $jobSubmissionId
   * @return \Airavata\Model\AppCatalog\ComputeResource\SSHJobSubmission Authenticate using Secured Shell
   * 
   * alternativeSSHHostName:
   *  If the login to ssh is different than the hostname itself, specify it here
   * 
   * sshPort:
   *  If a non-default port needs to used, specify it.
   * 
   * batchQueueEmailSenders:
   *  If a resource always sends the monitoring from a specific address, specify the
   *   full email address. If a resource sends emails from multiple addresses (
   *    example: based on the submitted login node) then use the wildchar * to indicate
   *    the same. Example: *@*.example.com or *@example.com
   * 
   * 
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getSSHJobSubmission(\Airavata\Model\Security\AuthzToken $authzToken, $jobSubmissionId);
  /**
   * 
   * Add a UNICORE Job Submission details to a compute resource
   *  App catalog will return a jobSubmissionInterfaceId which will be added to the jobSubmissionInterfaces.
   * 
   * @param computeResourceId
   *   The identifier of the compute resource to which JobSubmission protocol to be added
   * 
   * @param priorityOrder
   *   Specify the priority of this job manager. If this is the only jobmanager, the priority can be zero.
   * 
   * @param unicoreJobSubmission
   *   The UnicoreJobSubmission object to be added to the resource.
   * 
   * @return status
   *  Returns the unique job submission id.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $computeResourceId
   * @param int $priorityOrder
   * @param \Airavata\Model\AppCatalog\ComputeResource\UnicoreJobSubmission $unicoreJobSubmission
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function addUNICOREJobSubmissionDetails(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $priorityOrder, \Airavata\Model\AppCatalog\ComputeResource\UnicoreJobSubmission $unicoreJobSubmission);
  /**
   *   *
   *   * This method returns UnicoreJobSubmission object
   *   *
   *   * @param jobSubmissionInterfaceId
   *   *   The identifier of the JobSubmission Interface to be retrieved.
   *   *  @return UnicoreJobSubmission instance
   *   *
   * *
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $jobSubmissionId
   * @return \Airavata\Model\AppCatalog\ComputeResource\UnicoreJobSubmission Unicore Job Submission
   * 
   * unicoreEndPointURL:
   *  unicoreGateway End Point. The provider will query this service to fetch required service end points.
   * authenticationMode
   *  The authenticationMode defines the way certificate is fetched.
   * 
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getUnicoreJobSubmission(\Airavata\Model\Security\AuthzToken $authzToken, $jobSubmissionId);
  /**
   *    *
   *    * Add a Cloud Job Submission details to a compute resource
   *    *  App catalog will return a jobSubmissionInterfaceId which will be added to the jobSubmissionInterfaces.
   *    *
   *    * @param computeResourceId
   *    *   The identifier of the compute resource to which JobSubmission protocol to be added
   *    *
   *    * @param priorityOrder
   *    *   Specify the priority of this job manager. If this is the only jobmanager, the priority can be zero.
   *    *
   *    * @param sshJobSubmission
   *    *   The SSHJobSubmission object to be added to the resource.
   *    *
   *    * @return status
   *    *   Returns the unique job submission id.
   *    *
   * *
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $computeResourceId
   * @param int $priorityOrder
   * @param \Airavata\Model\AppCatalog\ComputeResource\CloudJobSubmission $cloudSubmission
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function addCloudJobSubmissionDetails(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $priorityOrder, \Airavata\Model\AppCatalog\ComputeResource\CloudJobSubmission $cloudSubmission);
  /**
   *    *
   *    * This method returns cloudJobSubmission object
   *    * @param jobSubmissionInterfaceI
   *        *   The identifier of the JobSubmission Interface to be retrieved.
   *    *  @return CloudJobSubmission instance
   * *
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $jobSubmissionId
   * @return \Airavata\Model\AppCatalog\ComputeResource\CloudJobSubmission Cloud Job Submission
   * 
   * 
   * 
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getCloudJobSubmission(\Airavata\Model\Security\AuthzToken $authzToken, $jobSubmissionId);
  /**
   * 
   * Update the given SSH Job Submission details
   * 
   * @param jobSubmissionInterfaceId
   *   The identifier of the JobSubmission Interface to be updated.
   * 
   * @param sshJobSubmission
   *   The SSHJobSubmission object to be updated.
   * 
   * @return status
   *   Returns a success/failure of the update.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $jobSubmissionInterfaceId
   * @param \Airavata\Model\AppCatalog\ComputeResource\SSHJobSubmission $sshJobSubmission
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function updateSSHJobSubmissionDetails(\Airavata\Model\Security\AuthzToken $authzToken, $jobSubmissionInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\SSHJobSubmission $sshJobSubmission);
  /**
   * 
   * Update the cloud Job Submission details
   * 
   * @param jobSubmissionInterfaceId
   *   The identifier of the JobSubmission Interface to be updated.
   * 
   * @param cloudJobSubmission
   *   The CloudJobSubmission object to be updated.
   * 
   * @return status
   *   Returns a success/failure of the update.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $jobSubmissionInterfaceId
   * @param \Airavata\Model\AppCatalog\ComputeResource\CloudJobSubmission $sshJobSubmission
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function updateCloudJobSubmissionDetails(\Airavata\Model\Security\AuthzToken $authzToken, $jobSubmissionInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\CloudJobSubmission $sshJobSubmission);
  /**
   * 
   * Update the UNIOCRE Job Submission details
   * 
   * @param jobSubmissionInterfaceId
   *   The identifier of the JobSubmission Interface to be updated.
   * 
   * @param UnicoreJobSubmission
   *   The UnicoreJobSubmission object to be updated.
   * 
   * @return status
   *   Returns a success/failure of the update.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $jobSubmissionInterfaceId
   * @param \Airavata\Model\AppCatalog\ComputeResource\UnicoreJobSubmission $unicoreJobSubmission
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function updateUnicoreJobSubmissionDetails(\Airavata\Model\Security\AuthzToken $authzToken, $jobSubmissionInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\UnicoreJobSubmission $unicoreJobSubmission);
  /**
   * 
   * Add a Local data movement details to a compute resource
   *  App catalog will return a dataMovementInterfaceId which will be added to the dataMovementInterfaces.
   * 
   * @param productUri
   *   The identifier of the compute resource to which JobSubmission protocol to be added
   * 
   * @param DMType
   *   DMType object to be added to the resource.
   * 
   * @param priorityOrder
   *   Specify the priority of this job manager. If this is the only jobmanager, the priority can be zero.
   * 
   * @param localDataMovement
   *   The LOCALDataMovement object to be added to the resource.
   * 
   * @return status
   *   Returns the unique job submission id.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $productUri
   * @param int $dataMoveType
   * @param int $priorityOrder
   * @param \Airavata\Model\Data\Movement\LOCALDataMovement $localDataMovement
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function addLocalDataMovementDetails(\Airavata\Model\Security\AuthzToken $authzToken, $productUri, $dataMoveType, $priorityOrder, \Airavata\Model\Data\Movement\LOCALDataMovement $localDataMovement);
  /**
   * 
   * Update the given Local data movement details
   * 
   * @param dataMovementInterfaceId
   *   The identifier of the data movement Interface to be updated.
   * 
   * @param localDataMovement
   *   The LOCALDataMovement object to be updated.
   * 
   * @return status
   *   Returns a success/failure of the update.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $dataMovementInterfaceId
   * @param \Airavata\Model\Data\Movement\LOCALDataMovement $localDataMovement
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function updateLocalDataMovementDetails(\Airavata\Model\Security\AuthzToken $authzToken, $dataMovementInterfaceId, \Airavata\Model\Data\Movement\LOCALDataMovement $localDataMovement);
  /**
   * 
   * This method returns local datamovement object.
   * 
   * @param dataMovementId
   *   The identifier of the datamovement Interface to be retrieved.
   * 
   *  @return LOCALDataMovement instance
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $dataMovementId
   * @return \Airavata\Model\Data\Movement\LOCALDataMovement LOCAL
   * 
   * alternativeSCPHostName:
   *  If the login to scp is different than the hostname itself, specify it here
   * 
   * sshPort:
   *  If a non-defualt port needs to used, specify it.
   * 
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getLocalDataMovement(\Airavata\Model\Security\AuthzToken $authzToken, $dataMovementId);
  /**
   * 
   * Add a SCP data movement details to a compute resource
   *  App catalog will return a dataMovementInterfaceId which will be added to the dataMovementInterfaces.
   * 
   * @param productUri
   *   The identifier of the compute resource to which JobSubmission protocol to be added
   * 
   * @param priorityOrder
   *   Specify the priority of this job manager. If this is the only jobmanager, the priority can be zero.
   * 
   * @param scpDataMovement
   *   The SCPDataMovement object to be added to the resource.
   * 
   * @return status
   *   Returns the unique job submission id.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $productUri
   * @param int $dataMoveType
   * @param int $priorityOrder
   * @param \Airavata\Model\Data\Movement\SCPDataMovement $scpDataMovement
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function addSCPDataMovementDetails(\Airavata\Model\Security\AuthzToken $authzToken, $productUri, $dataMoveType, $priorityOrder, \Airavata\Model\Data\Movement\SCPDataMovement $scpDataMovement);
  /**
   * 
   * Update the given scp data movement details
   *  App catalog will return a dataMovementInterfaceId which will be added to the dataMovementInterfaces.
   * 
   * @param dataMovementInterfaceId
   *   The identifier of the data movement Interface to be updated.
   * 
   * @param scpDataMovement
   *   The SCPDataMovement object to be updated.
   * 
   * @return status
   *   Returns a success/failure of the update.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $dataMovementInterfaceId
   * @param \Airavata\Model\Data\Movement\SCPDataMovement $scpDataMovement
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function updateSCPDataMovementDetails(\Airavata\Model\Security\AuthzToken $authzToken, $dataMovementInterfaceId, \Airavata\Model\Data\Movement\SCPDataMovement $scpDataMovement);
  /**
   * This method returns SCP datamovement object
   * 
   * @param dataMovementId
   *   The identifier of the datamovement Interface to be retrieved.
   * 
   * @return SCPDataMovement instance
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $dataMovementId
   * @return \Airavata\Model\Data\Movement\SCPDataMovement Data Movement through Secured Copy
   * 
   * alternativeSCPHostName:
   *  If the login to scp is different than the hostname itself, specify it here
   * 
   * sshPort:
   *  If a non-default port needs to used, specify it.
   * 
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getSCPDataMovement(\Airavata\Model\Security\AuthzToken $authzToken, $dataMovementId);
  /**
   * 
   * Add a UNICORE data movement details to a compute resource
   *  App catalog will return a dataMovementInterfaceId which will be added to the dataMovementInterfaces.
   * 
   * @param productUri
   *   The identifier of the compute resource to which data movement protocol to be added
   * 
   * @param priorityOrder
   *   Specify the priority of this job manager. If this is the only jobmanager, the priority can be zero.
   * 
   * @param UnicoreDataMovement
   *   The UnicoreDataMovement object to be added to the resource.
   * 
   * @return status
   *   Returns the unique data movement id.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $productUri
   * @param int $dataMoveType
   * @param int $priorityOrder
   * @param \Airavata\Model\Data\Movement\UnicoreDataMovement $unicoreDataMovement
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function addUnicoreDataMovementDetails(\Airavata\Model\Security\AuthzToken $authzToken, $productUri, $dataMoveType, $priorityOrder, \Airavata\Model\Data\Movement\UnicoreDataMovement $unicoreDataMovement);
  /**
   * 
   * Update a selected UNICORE data movement details
   *  App catalog will return a dataMovementInterfaceId which will be added to the dataMovementInterfaces.
   * 
   * @param dataMovementInterfaceId
   *   The identifier of the data movement Interface to be updated.
   * 
   * @param UnicoreDataMovement
   *   The UnicoreDataMovement object to be updated.
   * 
   * @return status
   *   Returns a success/failure of the update.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $dataMovementInterfaceId
   * @param \Airavata\Model\Data\Movement\UnicoreDataMovement $unicoreDataMovement
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function updateUnicoreDataMovementDetails(\Airavata\Model\Security\AuthzToken $authzToken, $dataMovementInterfaceId, \Airavata\Model\Data\Movement\UnicoreDataMovement $unicoreDataMovement);
  /**
   * 
   * This method returns UNICORE datamovement object
   * 
   * @param dataMovementId
   *   The identifier of the datamovement Interface to be retrieved.
   * 
   * @return UnicoreDataMovement instance
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $dataMovementId
   * @return \Airavata\Model\Data\Movement\UnicoreDataMovement Data Movement through UnicoreStorage
   * 
   * unicoreEndPointURL:
   *  unicoreGateway End Point. The provider will query this service to fetch required service end points.
   * 
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getUnicoreDataMovement(\Airavata\Model\Security\AuthzToken $authzToken, $dataMovementId);
  /**
   * 
   * Add a GridFTP data movement details to a compute resource
   *  App catalog will return a dataMovementInterfaceId which will be added to the dataMovementInterfaces.
   * 
   * @param productUri
   *   The identifier of the compute resource to which dataMovement protocol to be added
   * 
   * @param DMType
   *    The DMType object to be added to the resource.
   * 
   * @param priorityOrder
   *   Specify the priority of this job manager. If this is the only jobmanager, the priority can be zero.
   * 
   * @param gridFTPDataMovement
   *   The GridFTPDataMovement object to be added to the resource.
   * 
   * @return status
   *   Returns the unique data movement id.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $productUri
   * @param int $dataMoveType
   * @param int $priorityOrder
   * @param \Airavata\Model\Data\Movement\GridFTPDataMovement $gridFTPDataMovement
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function addGridFTPDataMovementDetails(\Airavata\Model\Security\AuthzToken $authzToken, $productUri, $dataMoveType, $priorityOrder, \Airavata\Model\Data\Movement\GridFTPDataMovement $gridFTPDataMovement);
  /**
   * Update the given GridFTP data movement details to a compute resource
   *  App catalog will return a dataMovementInterfaceId which will be added to the dataMovementInterfaces.
   * 
   * @param dataMovementInterfaceId
   *   The identifier of the data movement Interface to be updated.
   * 
   * @param gridFTPDataMovement
   *   The GridFTPDataMovement object to be updated.
   * 
   * @return boolean
   *   Returns a success/failure of the update.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $dataMovementInterfaceId
   * @param \Airavata\Model\Data\Movement\GridFTPDataMovement $gridFTPDataMovement
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function updateGridFTPDataMovementDetails(\Airavata\Model\Security\AuthzToken $authzToken, $dataMovementInterfaceId, \Airavata\Model\Data\Movement\GridFTPDataMovement $gridFTPDataMovement);
  /**
   * This method returns GridFTP datamovement object
   * 
   * @param dataMovementId
   *   The identifier of the datamovement Interface to be retrieved.
   * 
   *  @return GridFTPDataMovement instance
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $dataMovementId
   * @return \Airavata\Model\Data\Movement\GridFTPDataMovement Data Movement through GridFTP
   * 
   * alternativeSCPHostName:
   *  If the login to scp is different than the hostname itself, specify it here
   * 
   * sshPort:
   *  If a non-default port needs to used, specify it.
   * 
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getGridFTPDataMovement(\Airavata\Model\Security\AuthzToken $authzToken, $dataMovementId);
  /**
   * Change the priority of a given job submisison interface
   * 
   * @param jobSubmissionInterfaceId
   *   The identifier of the JobSubmission Interface to be changed
   * 
   * @param priorityOrder
   *   The new priority of the job manager interface.
   * 
   * @return status
   *   Returns a success/failure of the change.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $jobSubmissionInterfaceId
   * @param int $newPriorityOrder
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function changeJobSubmissionPriority(\Airavata\Model\Security\AuthzToken $authzToken, $jobSubmissionInterfaceId, $newPriorityOrder);
  /**
   * Change the priority of a given data movement interface
   * 
   * @param dataMovementInterfaceId
   *   The identifier of the DataMovement Interface to be changed
   * 
   * @param priorityOrder
   *   The new priority of the data movement interface.
   * 
   * @return status
   *   Returns a success/failure of the change.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $dataMovementInterfaceId
   * @param int $newPriorityOrder
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function changeDataMovementPriority(\Airavata\Model\Security\AuthzToken $authzToken, $dataMovementInterfaceId, $newPriorityOrder);
  /**
   * Change the priorities of a given set of job submission interfaces
   * 
   * @param jobSubmissionPriorityMap
   *   A Map of identifiers of the JobSubmission Interfaces and thier associated priorities to be set.
   * 
   * @return status
   *   Returns a success/failure of the changes.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param array $jobSubmissionPriorityMap
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function changeJobSubmissionPriorities(\Airavata\Model\Security\AuthzToken $authzToken, array $jobSubmissionPriorityMap);
  /**
   * Change the priorities of a given set of data movement interfaces
   * 
   * @param dataMovementPriorityMap
   *   A Map of identifiers of the DataMovement Interfaces and thier associated priorities to be set.
   * 
   * @return status
   *   Returns a success/failure of the changes.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param array $dataMovementPriorityMap
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function changeDataMovementPriorities(\Airavata\Model\Security\AuthzToken $authzToken, array $dataMovementPriorityMap);
  /**
   * Delete a given job submisison interface
   * 
   * @param jobSubmissionInterfaceId
   *   The identifier of the JobSubmission Interface to be changed
   * 
   * @return status
   *   Returns a success/failure of the deletion.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $computeResourceId
   * @param string $jobSubmissionInterfaceId
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function deleteJobSubmissionInterface(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $jobSubmissionInterfaceId);
  /**
   * Delete a given data movement interface
   * 
   * @param dataMovementInterfaceId
   *   The identifier of the DataMovement Interface to be changed
   * 
   * @return status
   *   Returns a success/failure of the deletion.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $productUri
   * @param string $dataMovementInterfaceId
   * @param int $dataMoveType
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function deleteDataMovementInterface(\Airavata\Model\Security\AuthzToken $authzToken, $productUri, $dataMovementInterfaceId, $dataMoveType);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager $resourceJobManager
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function registerResourceJobManager(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager $resourceJobManager);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $resourceJobManagerId
   * @param \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager $updatedResourceJobManager
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function updateResourceJobManager(\Airavata\Model\Security\AuthzToken $authzToken, $resourceJobManagerId, \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager $updatedResourceJobManager);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $resourceJobManagerId
   * @return \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager Resource Job Manager Information
   * 
   * resourceJobManagerType:
   *  A typical HPC cluster has a single Job Manager to manage the resources.
   * 
   * pushMonitoringEndpoint:
   *  If the job manager pushes out state changes to a database or bus, specify the service endpoint.
   *   Ex: Moab Web Service, Moab MongoDB URL, AMQP (GLUE2) Broker
   * 
   * jobManagerBinPath:
   *  Path to the Job Manager Installation Binary directory.
   * 
   * jobManagerCommands:
   *  An enumeration of commonly used manager commands.
   * 
   * 
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getResourceJobManager(\Airavata\Model\Security\AuthzToken $authzToken, $resourceJobManagerId);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $resourceJobManagerId
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function deleteResourceJobManager(\Airavata\Model\Security\AuthzToken $authzToken, $resourceJobManagerId);
  /**
   * Delete a Compute Resource Queue
   * 
   * @param computeResourceId
   *   The identifier of the compute resource which has the queue to be deleted
   * 
   * @param queueName
   *   Name of the queue need to be deleted. Name is the uniqueue identifier for the queue within a compute resource
   * 
   * @return status
   *   Returns a success/failure of the deletion.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $computeResourceId
   * @param string $queueName
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function deleteBatchQueue(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $queueName);
  /**
   * Register a Gateway Resource Profile.
   * 
   * @param gatewayResourceProfile
   *    Gateway Resource Profile Object.
   *    The GatewayID should be obtained from Airavata gateway registration and passed to register a corresponding
   *      resource profile.
   * 
   * @return status
   *   Returns a success/failure of the update.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param \Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile $gatewayResourceProfile
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function registerGatewayResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile $gatewayResourceProfile);
  /**
   * Fetch the given Gateway Resource Profile.
   * 
   * @param gatewayID
   *   The identifier for the requested gateway resource.
   * 
   * @return gatewayResourceProfile
   *    Gateway Resource Profile Object.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayID
   * @return \Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile Gateway Resource Profile
   * 
   * gatewayID:
   *  Unique identifier for the gateway assigned by Airavata. Corelate this to Airavata Admin API Gateway Registration.
   * 
   * credentialStoreToken:
   *  Gateway's defualt credential store token.
   * 
   * computeResourcePreferences:
   *  List of resource preferences for each of the registered compute resources.
   * 
   *  identityServerTenant:
   * 
   *  identityServerPwdCredToken:
   * 
   * 
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getGatewayResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID);
  /**
   * Update a Gateway Resource Profile.
   * 
   * @param gatewayID
   *   The identifier for the requested gateway resource to be updated.
   * 
   * @param gatewayResourceProfile
   *    Gateway Resource Profile Object.
   * 
   * @return status
   *   Returns a success/failure of the update.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayID
   * @param \Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile $gatewayResourceProfile
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function updateGatewayResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, \Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile $gatewayResourceProfile);
  /**
   * Delete the given Gateway Resource Profile.
   * 
   * @param gatewayID
   *   The identifier for the requested gateway resource to be deleted.
   * 
   * @return status
   *   Returns a success/failure of the deletion.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @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 deleteGatewayResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID);
  /**
   * Add a Compute Resource Preference to a registered gateway profile.
   * 
   * @param gatewayID
   *   The identifier for the gateway profile to be added.
   * 
   * @param computeResourceId
   *   Preferences related to a particular compute resource
   * 
   * @param computeResourcePreference
   *   The ComputeResourcePreference object to be added to the resource profile.
   * 
   * @return status
   *   Returns a success/failure of the addition. If a profile already exists, this operation will fail.
   *    Instead an update should be used.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayID
   * @param string $computeResourceId
   * @param \Airavata\Model\AppCatalog\GatewayProfile\ComputeResourcePreference $computeResourcePreference
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function addGatewayComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $computeResourceId, \Airavata\Model\AppCatalog\GatewayProfile\ComputeResourcePreference $computeResourcePreference);
  /**
   * Add a Storage Resource Preference to a registered gateway profile.
   * 
   * @param gatewayID
   *   The identifier of the gateway profile to be added.
   * 
   * @param storageResourceId
   *   Preferences related to a particular compute resource
   * 
   * @param computeResourcePreference
   *   The ComputeResourcePreference object to be added to the resource profile.
   * 
   * @return status
   *   Returns a success/failure of the addition. If a profile already exists, this operation will fail.
   *    Instead an update should be used.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayID
   * @param string $storageResourceId
   * @param \Airavata\Model\AppCatalog\GatewayProfile\StoragePreference $storagePreference
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function addGatewayStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $storageResourceId, \Airavata\Model\AppCatalog\GatewayProfile\StoragePreference $storagePreference);
  /**
   * 
   * Fetch a Compute Resource Preference of a registered gateway profile.
   * 
   * @param gatewayID
   *   The identifier for the gateway profile to be requested
   * 
   * @param computeResourceId
   *   Preferences related to a particular compute resource
   * 
   * @return computeResourcePreference
   *   Returns the ComputeResourcePreference object.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayID
   * @param string $computeResourceId
   * @return \Airavata\Model\AppCatalog\GatewayProfile\ComputeResourcePreference Gateway specific preferences for a Computer Resource
   * 
   * computeResourceId:
   *   Corelate the preference to a compute resource.
   * 
   * overridebyAiravata:
   *   If turned true, Airavata will override the preferences of better alternatives exist.
   * 
   * loginUserName:
   *   If turned true, Airavata will override the preferences of better alternatives exist.
   * 
   * preferredJobSubmissionProtocol:
   *   For resources with multiple job submission protocols, the gateway can pick a preferred option.
   * 
   * preferredDataMovementProtocol:
   *   For resources with multiple data movement protocols, the gateway can pick a preferred option.
   * 
   * preferredBatchQueue:
   *  Gateways can choose a defualt batch queue based on average job dimention, reservations or other metrics.
   * 
   * scratchLocation:
   *  Path to the local scratch space on a HPC cluster. Typically used to create working directory for job execution.
   * 
   * allocationProjectNumber:
   *  Typically used on HPC machines to charge computing usage to a account number. For instance, on XSEDE once an
   *    allocation is approved, an allocation number is assigned. Before passing this number with job submittions, the
   *    account to be used has to be added to the allocation.
   * 
   * resourceSpecificCredentialStoreToken:
   *  Resource specific credential store token. If this token is specified, then it is superceeded by the gateway's
   *   default credential store.
   * 
   * 
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getGatewayComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $computeResourceId);
  /**
   * 
   * Fetch a Storage Resource Preference of a registered gateway profile.
   * 
   * @param gatewayID
   *   The identifier of the gateway profile to request to fetch the particular storage resource preference.
   * 
   * @param storageResourceId
   *   Identifier of the Stprage Preference required to be fetched.
   * 
   * @return StoragePreference
   *   Returns the StoragePreference object.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayID
   * @param string $storageResourceId
   * @return \Airavata\Model\AppCatalog\GatewayProfile\StoragePreference
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getGatewayStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $storageResourceId);
  /**
   * 
   * Fetch all Compute Resource Preferences of a registered gateway profile.
   * 
   * @param gatewayID
   *   The identifier for the gateway profile to be requested
   * 
   * @return computeResourcePreference
   *   Returns the ComputeResourcePreference object.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayID
   * @return \Airavata\Model\AppCatalog\GatewayProfile\ComputeResourcePreference[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getAllGatewayComputeResourcePreferences(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID);
  /**
   * Fetch all Storage Resource Preferences of a registered gateway profile.
   * 
   * @param gatewayID
   *   The identifier for the gateway profile to be requested
   * 
   * @return StoragePreference
   *   Returns the StoragePreference object.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayID
   * @return \Airavata\Model\AppCatalog\GatewayProfile\StoragePreference[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getAllGatewayStoragePreferences(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID);
  /**
   * 
   * Fetch all Gateway Profiles registered
   * 
   * @return GatewayResourceProfile
   *   Returns all the GatewayResourcePrifle list object.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @return \Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getAllGatewayResourceProfiles(\Airavata\Model\Security\AuthzToken $authzToken);
  /**
   * Update a Compute Resource Preference to a registered gateway profile.
   * 
   * @param gatewayID
   *   The identifier for the gateway profile to be updated.
   * 
   * @param computeResourceId
   *   Preferences related to a particular compute resource
   * 
   * @param computeResourcePreference
   *   The ComputeResourcePreference object to be updated to the resource profile.
   * 
   * @return status
   *   Returns a success/failure of the updation.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayID
   * @param string $computeResourceId
   * @param \Airavata\Model\AppCatalog\GatewayProfile\ComputeResourcePreference $computeResourcePreference
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function updateGatewayComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $computeResourceId, \Airavata\Model\AppCatalog\GatewayProfile\ComputeResourcePreference $computeResourcePreference);
  /**
   * Update a Storage Resource Preference of a registered gateway profile.
   * 
   * @param gatewayID
   *   The identifier of the gateway profile to be updated.
   * 
   * @param storageId
   *   The Storage resource identifier of the one that you want to update
   * 
   * @param storagePreference
   *   The storagePreference object to be updated to the resource profile.
   * 
   * @return status
   *   Returns a success/failure of the updation.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayID
   * @param string $storageId
   * @param \Airavata\Model\AppCatalog\GatewayProfile\StoragePreference $storagePreference
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function updateGatewayStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $storageId, \Airavata\Model\AppCatalog\GatewayProfile\StoragePreference $storagePreference);
  /**
   * Delete the Compute Resource Preference of a registered gateway profile.
   * 
   * @param gatewayID
   *   The identifier for the gateway profile to be deleted.
   * 
   * @param computeResourceId
   *   Preferences related to a particular compute resource
   * 
   * @return status
   *   Returns a success/failure of the deletion.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayID
   * @param string $computeResourceId
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function deleteGatewayComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $computeResourceId);
  /**
   * Delete the Storage Resource Preference of a registered gateway profile.
   * 
   * @param gatewayID
   *   The identifier of the gateway profile to be deleted.
   * 
   * @param storageId
   *   ID of the storage preference you want to delete.
   * 
   * @return status
   *   Returns a success/failure of the deletion.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayID
   * @param string $storageId
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function deleteGatewayStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $storageId);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @return \Airavata\Model\AppCatalog\AccountProvisioning\SSHAccountProvisioner[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getSSHAccountProvisioners(\Airavata\Model\Security\AuthzToken $authzToken);
  /**
   * Check if user has an SSH account on the given compute resource. This
   * method will only work if the compute resource has an SSHAccountProvisioner configured for it.
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $computeResourceId
   * @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 doesUserHaveSSHAccount(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $userId);
  /**
   * Check if SSH account setup is complete for this user on the given compute resource.
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $computeResourceId
   * @param string $airavataCredStoreToken
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function isSSHSetupCompleteForUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $airavataCredStoreToken);
  /**
   * Setup and return a UserComputeResourcePreference object for this user to SSH into the given compute resource with
   * the given SSH credential. This method will only work if the compute resource has an SSHAccountProvisioner
   * configured for it. The returned UserComputeResourcePreference object is not saved; it is up to the client to
   * call addUserComputeResourcePreference to persist it.
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $computeResourceId
   * @param string $userId
   * @param string $airavataCredStoreToken
   * @return \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference User specific preferences for a Computer Resource
   * 
   * computeResourceId:
   *   Corelate the preference to a compute resource.
   * 
   * 
   * loginUserName:
   *   If turned true, Airavata will override the preferences of better alternatives exist.
   * 
   * 
   * preferredBatchQueue:
   *  Gateways can choose a defualt batch queue based on average job dimention, reservations or other metrics.
   * 
   * scratchLocation:
   *  Path to the local scratch space on a HPC cluster. Typically used to create working directory for job execution.
   * 
   * allocationProjectNumber:
   *  Typically used on HPC machines to charge computing usage to a account number. For instance, on XSEDE once an
   *    allocation is approved, an allocation number is assigned. Before passing this number with job submittions, the
   *    account to be used has to be added to the allocation.
   * 
   * resourceSpecificCredentialStoreToken:
   *  Resource specific credential store token. If this token is specified, then it is superceeded by the gateway's
   *   default credential store.
   * 
   * validated:
   *  If true the the configuration has been validated in the sense that the username and credential can be used to
   *  login to the remote host and the scratchLocation is a valid location that the user has permission to write to.
   *  Should be treated as read-only and only mutated by Airavata middleware.
   * 
   * 
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function setupUserComputeResourcePreferencesForSSH(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $userId, $airavataCredStoreToken);
  /**
   * Register User Resource Profile.
   * 
   * @param UserResourceProfile
   *    User Resource Profile Object.
   *    The userId should be obtained from Airavata user profile data model and passed to register a corresponding
   *      resource profile.
   * 
   * @return status
   *   Returns a success/failure of the update.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile $userResourceProfile
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function registerUserResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile $userResourceProfile);
  /**
   * Check if User Resource Profile exists.
   * 
   * @param userId
   *   The identifier for the requested user resource profile.
   * 
   * @param gatewayID
   *   The identifier to link a gateway for the requested user resource profile.
   * 
   * @return bool
   * 
   * 
   * @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 isUserResourceProfileExists(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID);
  /**
   * Fetch the given User Resource Profile.
   * 
   * @param userId
   *   The identifier for the requested user resource profile.
   * 
   * @param gatewayID
   *   The identifier to link a gateway for the requested user resource profile.
   * 
   * @return UserResourceProfile
   *    User Resource Profile Object.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $userId
   * @param string $gatewayID
   * @return \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile User Resource Profile
   * 
   * userId:
   * Unique identifier used to link user to corresponding user data model
   * 
   * gatewayID:
   *  Unique identifier for the gateway assigned by Airavata. Corelate this to Airavata Admin API Gateway Registration.
   * 
   * credentialStoreToken:
   *  Gateway's defualt credential store token.
   * 
   * computeResourcePreferences:
   *  List of resource preferences for each of the registered compute resources.
   * 
   *  identityServerTenant:
   * 
   *  identityServerPwdCredToken:
   * 
   * 
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getUserResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID);
  /**
   * Update a User Resource Profile.
   * 
   * @param userId
   *   The identifier for the requested user resource to be updated.
   * 
   * @param gatewayID
   *   The identifier to link a gateway for the requested user resource profile.
   * 
   * @param UserResourceProfile
   *    User Resource Profile Object.
   * 
   * @return status
   *   Returns a success/failure of the update.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $userId
   * @param string $gatewayID
   * @param \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile $userResourceProfile
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function updateUserResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile $userResourceProfile);
  /**
   * Delete the given User Resource Profile.
   * 
   * @param userId
   *   The identifier for the requested user resource to be deleted.
   * 
   * @param gatewayID
   *   The identifier to link a gateway for the requested user resource profile.
   * 
   * @return status
   *   Returns a success/failure of the deletion.
   * 
   * 
   * @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 deleteUserResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID);
  /**
   * Add a Compute Resource Preference to a registered User profile.
   * 
   * @param userId
   *   The identifier for the User resource profile to be added.
   * 
   * @param gatewayID
   *   The identifier to link a gateway for the requested user resource profile.
   * 
   * @param computeResourceId
   *   Preferences related to a particular compute resource
   * 
   * @param computeResourcePreference
   *   The ComputeResourcePreference object to be added to the resource profile.
   * 
   * @return status
   *   Returns a success/failure of the addition. If a profile already exists, this operation will fail.
   *    Instead an update should be used.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $userId
   * @param string $gatewayID
   * @param string $userComputeResourceId
   * @param \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference $userComputeResourcePreference
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function addUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userComputeResourceId, \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference $userComputeResourcePreference);
  /**
   * Add a Storage Resource Preference to a registered user resource profile.
   * 
   * @param userId
   *   The identifier of the user resource profile to be added.
   * 
   * @param gatewayID
   *   The identifier to link a gateway for the requested user resource profile.
   * 
   * @param storageResourceId
   *   Preferences related to a particular compute resource
   * 
   * @param computeResourcePreference
   *   The ComputeResourcePreference object to be added to the resource profile.
   * 
   * @return status
   *   Returns a success/failure of the addition. If a profile already exists, this operation will fail.
   *    Instead an update should be used.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $userId
   * @param string $gatewayID
   * @param string $userStorageResourceId
   * @param \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference $userStoragePreference
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function addUserStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userStorageResourceId, \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference $userStoragePreference);
  /**
   * 
   * Fetch a Compute Resource Preference of a registered user resource profile.
   * 
   * @param userId
   *   The identifier for the user profile to be requested
   * 
   * @param gatewayID
   *   The identifier to link a gateway for the requested user resource profile.
   * 
   * @param userComputeResourceId
   *   Preferences related to a particular compute resource
   * 
   * @return computeResourcePreference
   *   Returns the ComputeResourcePreference object.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $userId
   * @param string $gatewayID
   * @param string $userComputeResourceId
   * @return \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference User specific preferences for a Computer Resource
   * 
   * computeResourceId:
   *   Corelate the preference to a compute resource.
   * 
   * 
   * loginUserName:
   *   If turned true, Airavata will override the preferences of better alternatives exist.
   * 
   * 
   * preferredBatchQueue:
   *  Gateways can choose a defualt batch queue based on average job dimention, reservations or other metrics.
   * 
   * scratchLocation:
   *  Path to the local scratch space on a HPC cluster. Typically used to create working directory for job execution.
   * 
   * allocationProjectNumber:
   *  Typically used on HPC machines to charge computing usage to a account number. For instance, on XSEDE once an
   *    allocation is approved, an allocation number is assigned. Before passing this number with job submittions, the
   *    account to be used has to be added to the allocation.
   * 
   * resourceSpecificCredentialStoreToken:
   *  Resource specific credential store token. If this token is specified, then it is superceeded by the gateway's
   *   default credential store.
   * 
   * validated:
   *  If true the the configuration has been validated in the sense that the username and credential can be used to
   *  login to the remote host and the scratchLocation is a valid location that the user has permission to write to.
   *  Should be treated as read-only and only mutated by Airavata middleware.
   * 
   * 
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userComputeResourceId);
  /**
   * 
   * Fetch a Storage Resource Preference of a registered user resource profile.
   * 
   * @param userId
   *   The identifier of the user resource profile to request to fetch the particular storage resource preference.
   * 
   * @param gatewayID
   *   The identifier to link a gateway for the requested user resource profile.
   * 
   * @param userStorageResourceId
   *   Identifier of the Stprage Preference required to be fetched.
   * 
   * @return UserStoragePreference
   *   Returns the StoragePreference object.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $userId
   * @param string $gatewayID
   * @param string $userStorageResourceId
   * @return \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getUserStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userStorageResourceId);
  /**
   * 
   * Fetch all Compute Resource Preferences of a registered gateway profile.
   * 
   * @param userId
   *   The identifier of the user resource profile to request to fetch the particular storage resource preference.
   * 
   * @param gatewayID
   *   The identifier for the gateway profile to be requested
   * 
   * @return computeResourcePreference
   *   Returns the ComputeResourcePreference object.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $userId
   * @param string $gatewayID
   * @return \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getAllUserComputeResourcePreferences(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID);
  /**
   * Fetch all User Storage Resource Preferences of a registered user profile.
   * 
   * @param userId
   *   The identifier of the user resource profile to request to fetch the particular storage resource preference.
   * 
   * @param gatewayID
   *   The identifier for the gateway profile to be requested
   * 
   * @return StoragePreference
   *   Returns the StoragePreference object.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $userId
   * @param string $gatewayID
   * @return \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getAllUserStoragePreferences(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID);
  /**
   * 
   * Fetch all user resources Profiles registered
   * 
   * @return UserResourceProfile
   *   Returns all the UserResourcePrifle list object.
   * 
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @return \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getAllUserResourceProfiles(\Airavata\Model\Security\AuthzToken $authzToken);
  /**
   * Update a Compute Resource Preference to a registered user resource profile.
   * 
   * @param userId
   *   The identifier for the user profile to be updated.
   * 
   * @param gatewayID
   *   The identifier to link a gateway for the requested user resource profile.
   * 
   * @param userComputeResourceId
   *   Preferences related to a particular compute resource
   * 
   * @param userComputeResourcePreference
   *   The ComputeResourcePreference object to be updated to the resource profile.
   * 
   * @return status
   *   Returns a success/failure of the updation.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $userId
   * @param string $gatewayID
   * @param string $userComputeResourceId
   * @param \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference $userComputeResourcePreference
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function updateUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userComputeResourceId, \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference $userComputeResourcePreference);
  /**
   * Update a Storage Resource Preference of a registered user resource profile.
   * 
   * @param userId
   *   The identifier of the user resource profile to be updated.
   * 
   * @param gatewayID
   *   The identifier to link a gateway for the requested user resource profile.
   * 
   * @param userStorageId
   *   The Storage resource identifier of the one that you want to update
   * 
   * @param userStoragePreference
   *   The storagePreference object to be updated to the resource profile.
   * 
   * @return status
   *   Returns a success/failure of the updation.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $userId
   * @param string $gatewayID
   * @param string $userStorageId
   * @param \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference $userStoragePreference
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function updateUserStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userStorageId, \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference $userStoragePreference);
  /**
   * Delete the Compute Resource Preference of a registered user resource profile.
   * 
   * @param userId
   *   The identifier for the user resource profile to be deleted.
   * 
   * @param gatewayID
   *   The identifier to link a gateway for the requested user resource profile.
   * 
   * @param userComputeResourceId
   *   Preferences related to a particular compute resource
   * 
   * @return status
   *   Returns a success/failure of the deletion.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $userId
   * @param string $gatewayID
   * @param string $userComputeResourceId
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function deleteUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userComputeResourceId);
  /**
   * Delete the Storage Resource Preference of a registered user resource profile.
   * 
   * @param userId
   *   The identifier of the user profile to be deleted.
   * 
   * @param gatewayID
   *   The identifier to link a gateway for the requested user resource profile.
   * 
   * @param userStorageId
   *   ID of the storage preference you want to delete.
   * 
   * @return status
   *   Returns a success/failure of the deletion.
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $userId
   * @param string $gatewayID
   * @param string $userStorageId
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function deleteUserStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userStorageId);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @return \Airavata\Model\Status\QueueStatusModel[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getLatestQueueStatuses(\Airavata\Model\Security\AuthzToken $authzToken);
  /**
   * API Methods related to replica catalog
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param \Airavata\Model\Data\Replica\DataProductModel $dataProductModel
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function registerDataProduct(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Data\Replica\DataProductModel $dataProductModel);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $dataProductUri
   * @return \Airavata\Model\Data\Replica\DataProductModel
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getDataProduct(\Airavata\Model\Security\AuthzToken $authzToken, $dataProductUri);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param \Airavata\Model\Data\Replica\DataReplicaLocationModel $replicaLocationModel
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function registerReplicaLocation(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Data\Replica\DataReplicaLocationModel $replicaLocationModel);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $productUri
   * @return \Airavata\Model\Data\Replica\DataProductModel
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getParentDataProduct(\Airavata\Model\Security\AuthzToken $authzToken, $productUri);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $productUri
   * @return \Airavata\Model\Data\Replica\DataProductModel[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getChildDataProducts(\Airavata\Model\Security\AuthzToken $authzToken, $productUri);
  /**
   * Group Manager and Data Sharing Related API methods
   * 
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $resourceId
   * @param array $userPermissionList
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function shareResourceWithUsers(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, array $userPermissionList);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $resourceId
   * @param array $groupPermissionList
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function shareResourceWithGroups(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, array $groupPermissionList);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $resourceId
   * @param array $userPermissionList
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function revokeSharingOfResourceFromUsers(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, array $userPermissionList);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $resourceId
   * @param array $groupPermissionList
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function revokeSharingOfResourceFromGroups(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, array $groupPermissionList);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $resourceId
   * @param int $permissionType
   * @return string[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getAllAccessibleUsers(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, $permissionType);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $resourceId
   * @param int $permissionType
   * @return string[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getAllAccessibleGroups(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, $permissionType);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $resourceId
   * @param int $permissionType
   * @return string[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getAllDirectlyAccessibleUsers(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, $permissionType);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $resourceId
   * @param int $permissionType
   * @return string[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getAllDirectlyAccessibleGroups(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, $permissionType);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $resourceId
   * @param int $permissionType
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function userHasAccess(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, $permissionType);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param \Airavata\Model\AppCatalog\GroupResourceProfile\GroupResourceProfile $groupResourceProfile
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function createGroupResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\GroupResourceProfile\GroupResourceProfile $groupResourceProfile);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param \Airavata\Model\AppCatalog\GroupResourceProfile\GroupResourceProfile $groupResourceProfile
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function updateGroupResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\GroupResourceProfile\GroupResourceProfile $groupResourceProfile);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $groupResourceProfileId
   * @return \Airavata\Model\AppCatalog\GroupResourceProfile\GroupResourceProfile Group Resource Profile
   * 
   * gatewayID:
   *  Unique identifier for the gateway assigned by Airavata. Corelate this to Airavata Admin API Gateway Registration.
   * 
   * groupResourceProfileId:
   * 
   * computeResourcePreferences:
   *  List of resource preferences for each of the registered compute resources.
   * 
   * computeResourcePolicies:
   *  List of enforced policies for each of the registered compute resources.
   * 
   * batchQueueResourcePolicies:
   *  List of enforced policies on registered batch queues
   * 
   * defaultCredentialStoreToken:
   *  The default credential store token to use for compute resources that don't specify a resource specific credential store token.
   * 
   * 
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getGroupResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $groupResourceProfileId);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $groupResourceProfileId
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function removeGroupResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $groupResourceProfileId);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayId
   * @return \Airavata\Model\AppCatalog\GroupResourceProfile\GroupResourceProfile[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getGroupResourceList(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $computeResourceId
   * @param string $groupResourceProfileId
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function removeGroupComputePrefs(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $groupResourceProfileId);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $resourcePolicyId
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function removeGroupComputeResourcePolicy(\Airavata\Model\Security\AuthzToken $authzToken, $resourcePolicyId);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $resourcePolicyId
   * @return bool
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function removeGroupBatchQueueResourcePolicy(\Airavata\Model\Security\AuthzToken $authzToken, $resourcePolicyId);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $computeResourceId
   * @param string $groupResourceProfileId
   * @return \Airavata\Model\AppCatalog\GroupResourceProfile\GroupComputeResourcePreference
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getGroupComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $groupResourceProfileId);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $resourcePolicyId
   * @return \Airavata\Model\AppCatalog\GroupResourceProfile\ComputeResourcePolicy
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getGroupComputeResourcePolicy(\Airavata\Model\Security\AuthzToken $authzToken, $resourcePolicyId);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $resourcePolicyId
   * @return \Airavata\Model\AppCatalog\GroupResourceProfile\BatchQueueResourcePolicy
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getBatchQueueResourcePolicy(\Airavata\Model\Security\AuthzToken $authzToken, $resourcePolicyId);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $groupResourceProfileId
   * @return \Airavata\Model\AppCatalog\GroupResourceProfile\GroupComputeResourcePreference[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getGroupComputeResourcePrefList(\Airavata\Model\Security\AuthzToken $authzToken, $groupResourceProfileId);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $groupResourceProfileId
   * @return \Airavata\Model\AppCatalog\GroupResourceProfile\BatchQueueResourcePolicy[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getGroupBatchQueueResourcePolicyList(\Airavata\Model\Security\AuthzToken $authzToken, $groupResourceProfileId);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $groupResourceProfileId
   * @return \Airavata\Model\AppCatalog\GroupResourceProfile\ComputeResourcePolicy[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getGroupComputeResourcePolicyList(\Airavata\Model\Security\AuthzToken $authzToken, $groupResourceProfileId);
  /**
   * GatewayGroups API methods
   * 
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @return \Airavata\Model\AppCatalog\GatewayGroups\GatewayGroups
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getGatewayGroups(\Airavata\Model\Security\AuthzToken $authzToken);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $parserId
   * @param string $gatewayId
   * @return \Airavata\Model\AppCatalog\Parser\Parser
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getParser(\Airavata\Model\Security\AuthzToken $authzToken, $parserId, $gatewayId);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param \Airavata\Model\AppCatalog\Parser\Parser $parser
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function saveParser(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\Parser\Parser $parser);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayId
   * @return \Airavata\Model\AppCatalog\Parser\Parser[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function listAllParsers(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $parserId
   * @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 removeParser(\Airavata\Model\Security\AuthzToken $authzToken, $parserId, $gatewayId);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $templateId
   * @param string $gatewayId
   * @return \Airavata\Model\AppCatalog\Parser\ParsingTemplate
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getParsingTemplate(\Airavata\Model\Security\AuthzToken $authzToken, $templateId, $gatewayId);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $experimentId
   * @param string $gatewayId
   * @return \Airavata\Model\AppCatalog\Parser\ParsingTemplate[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function getParsingTemplatesForExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $experimentId, $gatewayId);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param \Airavata\Model\AppCatalog\Parser\ParsingTemplate $parsingTemplate
   * @return string
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function saveParsingTemplate(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\Parser\ParsingTemplate $parsingTemplate);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $templateId
   * @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 removeParsingTemplate(\Airavata\Model\Security\AuthzToken $authzToken, $templateId, $gatewayId);
  /**
   * @param \Airavata\Model\Security\AuthzToken $authzToken
   * @param string $gatewayId
   * @return \Airavata\Model\AppCatalog\Parser\ParsingTemplate[]
   * @throws \Airavata\API\Error\InvalidRequestException
   * @throws \Airavata\API\Error\AiravataClientException
   * @throws \Airavata\API\Error\AiravataSystemException
   * @throws \Airavata\API\Error\AuthorizationException
   */
  public function listAllParsingTemplates(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId);
}


class AiravataClient extends \Airavata\Base\API\BaseAPIClient implements \Airavata\API\AiravataIf {
  public function __construct($input, $output=null) {
    parent::__construct($input, $output);
  }

  public function isUserExists(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $userName)
  {
    $this->send_isUserExists($authzToken, $gatewayId, $userName);
    return $this->recv_isUserExists();
  }

  public function send_isUserExists(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $userName)
  {
    $args = new \Airavata\API\Airavata_isUserExists_args();
    $args->authzToken = $authzToken;
    $args->gatewayId = $gatewayId;
    $args->userName = $userName;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'isUserExists', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('isUserExists', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_isUserExists()
  {
    $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_isUserExists_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_isUserExists_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("isUserExists 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\API\Airavata_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\API\Airavata_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\API\Airavata_addGateway_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("addGateway failed: unknown result");
  }

  public function getAllUsersInGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
  {
    $this->send_getAllUsersInGateway($authzToken, $gatewayId);
    return $this->recv_getAllUsersInGateway();
  }

  public function send_getAllUsersInGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
  {
    $args = new \Airavata\API\Airavata_getAllUsersInGateway_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_, 'getAllUsersInGateway', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getAllUsersInGateway', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getAllUsersInGateway()
  {
    $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_getAllUsersInGateway_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_getAllUsersInGateway_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("getAllUsersInGateway failed: unknown result");
  }

  public function updateGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, \Airavata\Model\Workspace\Gateway $updatedGateway)
  {
    $this->send_updateGateway($authzToken, $gatewayId, $updatedGateway);
    return $this->recv_updateGateway();
  }

  public function send_updateGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, \Airavata\Model\Workspace\Gateway $updatedGateway)
  {
    $args = new \Airavata\API\Airavata_updateGateway_args();
    $args->authzToken = $authzToken;
    $args->gatewayId = $gatewayId;
    $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\API\Airavata_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\API\Airavata_updateGateway_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("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\API\Airavata_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\API\Airavata_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\API\Airavata_getGateway_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("getGateway failed: unknown result");
  }

  public function deleteGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
  {
    $this->send_deleteGateway($authzToken, $gatewayId);
    return $this->recv_deleteGateway();
  }

  public function send_deleteGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
  {
    $args = new \Airavata\API\Airavata_deleteGateway_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_, '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\API\Airavata_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\API\Airavata_deleteGateway_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("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\API\Airavata_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\API\Airavata_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\API\Airavata_getAllGateways_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("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\API\Airavata_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\API\Airavata_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\API\Airavata_isGatewayExist_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("isGatewayExist failed: unknown result");
  }

  public function createNotification(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Workspace\Notification $notification)
  {
    $this->send_createNotification($authzToken, $notification);
    return $this->recv_createNotification();
  }

  public function send_createNotification(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Workspace\Notification $notification)
  {
    $args = new \Airavata\API\Airavata_createNotification_args();
    $args->authzToken = $authzToken;
    $args->notification = $notification;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'createNotification', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('createNotification', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_createNotification()
  {
    $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_createNotification_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_createNotification_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("createNotification failed: unknown result");
  }

  public function updateNotification(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Workspace\Notification $notification)
  {
    $this->send_updateNotification($authzToken, $notification);
    return $this->recv_updateNotification();
  }

  public function send_updateNotification(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Workspace\Notification $notification)
  {
    $args = new \Airavata\API\Airavata_updateNotification_args();
    $args->authzToken = $authzToken;
    $args->notification = $notification;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'updateNotification', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('updateNotification', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_updateNotification()
  {
    $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_updateNotification_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_updateNotification_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("updateNotification failed: unknown result");
  }

  public function deleteNotification(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $notificationId)
  {
    $this->send_deleteNotification($authzToken, $gatewayId, $notificationId);
    return $this->recv_deleteNotification();
  }

  public function send_deleteNotification(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $notificationId)
  {
    $args = new \Airavata\API\Airavata_deleteNotification_args();
    $args->authzToken = $authzToken;
    $args->gatewayId = $gatewayId;
    $args->notificationId = $notificationId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'deleteNotification', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('deleteNotification', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_deleteNotification()
  {
    $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_deleteNotification_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_deleteNotification_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("deleteNotification failed: unknown result");
  }

  public function getNotification(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $notificationId)
  {
    $this->send_getNotification($authzToken, $gatewayId, $notificationId);
    return $this->recv_getNotification();
  }

  public function send_getNotification(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $notificationId)
  {
    $args = new \Airavata\API\Airavata_getNotification_args();
    $args->authzToken = $authzToken;
    $args->gatewayId = $gatewayId;
    $args->notificationId = $notificationId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getNotification', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getNotification', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getNotification()
  {
    $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_getNotification_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_getNotification_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("getNotification failed: unknown result");
  }

  public function getAllNotifications(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
  {
    $this->send_getAllNotifications($authzToken, $gatewayId);
    return $this->recv_getAllNotifications();
  }

  public function send_getAllNotifications(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
  {
    $args = new \Airavata\API\Airavata_getAllNotifications_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_, 'getAllNotifications', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getAllNotifications', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getAllNotifications()
  {
    $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_getAllNotifications_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_getAllNotifications_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("getAllNotifications failed: unknown result");
  }

  public function generateAndRegisterSSHKeys(\Airavata\Model\Security\AuthzToken $authzToken, $description)
  {
    $this->send_generateAndRegisterSSHKeys($authzToken, $description);
    return $this->recv_generateAndRegisterSSHKeys();
  }

  public function send_generateAndRegisterSSHKeys(\Airavata\Model\Security\AuthzToken $authzToken, $description)
  {
    $args = new \Airavata\API\Airavata_generateAndRegisterSSHKeys_args();
    $args->authzToken = $authzToken;
    $args->description = $description;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'generateAndRegisterSSHKeys', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('generateAndRegisterSSHKeys', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_generateAndRegisterSSHKeys()
  {
    $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_generateAndRegisterSSHKeys_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_generateAndRegisterSSHKeys_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;
    }
    throw new \Exception("generateAndRegisterSSHKeys failed: unknown result");
  }

  public function registerPwdCredential(\Airavata\Model\Security\AuthzToken $authzToken, $loginUserName, $password, $description)
  {
    $this->send_registerPwdCredential($authzToken, $loginUserName, $password, $description);
    return $this->recv_registerPwdCredential();
  }

  public function send_registerPwdCredential(\Airavata\Model\Security\AuthzToken $authzToken, $loginUserName, $password, $description)
  {
    $args = new \Airavata\API\Airavata_registerPwdCredential_args();
    $args->authzToken = $authzToken;
    $args->loginUserName = $loginUserName;
    $args->password = $password;
    $args->description = $description;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'registerPwdCredential', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('registerPwdCredential', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_registerPwdCredential()
  {
    $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_registerPwdCredential_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_registerPwdCredential_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;
    }
    throw new \Exception("registerPwdCredential failed: unknown result");
  }

  public function getCredentialSummary(\Airavata\Model\Security\AuthzToken $authzToken, $tokenId)
  {
    $this->send_getCredentialSummary($authzToken, $tokenId);
    return $this->recv_getCredentialSummary();
  }

  public function send_getCredentialSummary(\Airavata\Model\Security\AuthzToken $authzToken, $tokenId)
  {
    $args = new \Airavata\API\Airavata_getCredentialSummary_args();
    $args->authzToken = $authzToken;
    $args->tokenId = $tokenId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getCredentialSummary', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getCredentialSummary', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getCredentialSummary()
  {
    $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_getCredentialSummary_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_getCredentialSummary_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("getCredentialSummary failed: unknown result");
  }

  public function getAllCredentialSummaries(\Airavata\Model\Security\AuthzToken $authzToken, $type)
  {
    $this->send_getAllCredentialSummaries($authzToken, $type);
    return $this->recv_getAllCredentialSummaries();
  }

  public function send_getAllCredentialSummaries(\Airavata\Model\Security\AuthzToken $authzToken, $type)
  {
    $args = new \Airavata\API\Airavata_getAllCredentialSummaries_args();
    $args->authzToken = $authzToken;
    $args->type = $type;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getAllCredentialSummaries', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getAllCredentialSummaries', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getAllCredentialSummaries()
  {
    $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_getAllCredentialSummaries_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_getAllCredentialSummaries_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;
    }
    throw new \Exception("getAllCredentialSummaries failed: unknown result");
  }

  public function deleteSSHPubKey(\Airavata\Model\Security\AuthzToken $authzToken, $airavataCredStoreToken)
  {
    $this->send_deleteSSHPubKey($authzToken, $airavataCredStoreToken);
    return $this->recv_deleteSSHPubKey();
  }

  public function send_deleteSSHPubKey(\Airavata\Model\Security\AuthzToken $authzToken, $airavataCredStoreToken)
  {
    $args = new \Airavata\API\Airavata_deleteSSHPubKey_args();
    $args->authzToken = $authzToken;
    $args->airavataCredStoreToken = $airavataCredStoreToken;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'deleteSSHPubKey', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('deleteSSHPubKey', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_deleteSSHPubKey()
  {
    $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_deleteSSHPubKey_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_deleteSSHPubKey_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("deleteSSHPubKey failed: unknown result");
  }

  public function deletePWDCredential(\Airavata\Model\Security\AuthzToken $authzToken, $airavataCredStoreToken)
  {
    $this->send_deletePWDCredential($authzToken, $airavataCredStoreToken);
    return $this->recv_deletePWDCredential();
  }

  public function send_deletePWDCredential(\Airavata\Model\Security\AuthzToken $authzToken, $airavataCredStoreToken)
  {
    $args = new \Airavata\API\Airavata_deletePWDCredential_args();
    $args->authzToken = $authzToken;
    $args->airavataCredStoreToken = $airavataCredStoreToken;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'deletePWDCredential', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('deletePWDCredential', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_deletePWDCredential()
  {
    $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_deletePWDCredential_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_deletePWDCredential_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("deletePWDCredential failed: unknown result");
  }

  public function createProject(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, \Airavata\Model\Workspace\Project $project)
  {
    $this->send_createProject($authzToken, $gatewayId, $project);
    return $this->recv_createProject();
  }

  public function send_createProject(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, \Airavata\Model\Workspace\Project $project)
  {
    $args = new \Airavata\API\Airavata_createProject_args();
    $args->authzToken = $authzToken;
    $args->gatewayId = $gatewayId;
    $args->project = $project;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'createProject', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('createProject', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_createProject()
  {
    $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_createProject_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_createProject_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("createProject failed: unknown result");
  }

  public function updateProject(\Airavata\Model\Security\AuthzToken $authzToken, $projectId, \Airavata\Model\Workspace\Project $updatedProject)
  {
    $this->send_updateProject($authzToken, $projectId, $updatedProject);
    $this->recv_updateProject();
  }

  public function send_updateProject(\Airavata\Model\Security\AuthzToken $authzToken, $projectId, \Airavata\Model\Workspace\Project $updatedProject)
  {
    $args = new \Airavata\API\Airavata_updateProject_args();
    $args->authzToken = $authzToken;
    $args->projectId = $projectId;
    $args->updatedProject = $updatedProject;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'updateProject', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('updateProject', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_updateProject()
  {
    $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_updateProject_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_updateProject_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->ire !== null) {
      throw $result->ire;
    }
    if ($result->ace !== null) {
      throw $result->ace;
    }
    if ($result->ase !== null) {
      throw $result->ase;
    }
    if ($result->pnfe !== null) {
      throw $result->pnfe;
    }
    if ($result->ae !== null) {
      throw $result->ae;
    }
    return;
  }

  public function getProject(\Airavata\Model\Security\AuthzToken $authzToken, $projectId)
  {
    $this->send_getProject($authzToken, $projectId);
    return $this->recv_getProject();
  }

  public function send_getProject(\Airavata\Model\Security\AuthzToken $authzToken, $projectId)
  {
    $args = new \Airavata\API\Airavata_getProject_args();
    $args->authzToken = $authzToken;
    $args->projectId = $projectId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getProject', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getProject', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getProject()
  {
    $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_getProject_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_getProject_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->pnfe !== null) {
      throw $result->pnfe;
    }
    if ($result->ae !== null) {
      throw $result->ae;
    }
    throw new \Exception("getProject failed: unknown result");
  }

  public function deleteProject(\Airavata\Model\Security\AuthzToken $authzToken, $projectId)
  {
    $this->send_deleteProject($authzToken, $projectId);
    return $this->recv_deleteProject();
  }

  public function send_deleteProject(\Airavata\Model\Security\AuthzToken $authzToken, $projectId)
  {
    $args = new \Airavata\API\Airavata_deleteProject_args();
    $args->authzToken = $authzToken;
    $args->projectId = $projectId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'deleteProject', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('deleteProject', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_deleteProject()
  {
    $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_deleteProject_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_deleteProject_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->pnfe !== null) {
      throw $result->pnfe;
    }
    if ($result->ae !== null) {
      throw $result->ae;
    }
    throw new \Exception("deleteProject failed: unknown result");
  }

  public function getUserProjects(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $userName, $limit, $offset)
  {
    $this->send_getUserProjects($authzToken, $gatewayId, $userName, $limit, $offset);
    return $this->recv_getUserProjects();
  }

  public function send_getUserProjects(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $userName, $limit, $offset)
  {
    $args = new \Airavata\API\Airavata_getUserProjects_args();
    $args->authzToken = $authzToken;
    $args->gatewayId = $gatewayId;
    $args->userName = $userName;
    $args->limit = $limit;
    $args->offset = $offset;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getUserProjects', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getUserProjects', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getUserProjects()
  {
    $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_getUserProjects_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_getUserProjects_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("getUserProjects failed: unknown result");
  }

  public function searchProjects(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $userName, array $filters, $limit, $offset)
  {
    $this->send_searchProjects($authzToken, $gatewayId, $userName, $filters, $limit, $offset);
    return $this->recv_searchProjects();
  }

  public function send_searchProjects(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $userName, array $filters, $limit, $offset)
  {
    $args = new \Airavata\API\Airavata_searchProjects_args();
    $args->authzToken = $authzToken;
    $args->gatewayId = $gatewayId;
    $args->userName = $userName;
    $args->filters = $filters;
    $args->limit = $limit;
    $args->offset = $offset;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'searchProjects', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('searchProjects', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_searchProjects()
  {
    $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_searchProjects_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_searchProjects_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("searchProjects failed: unknown result");
  }

  public function searchExperiments(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $userName, array $filters, $limit, $offset)
  {
    $this->send_searchExperiments($authzToken, $gatewayId, $userName, $filters, $limit, $offset);
    return $this->recv_searchExperiments();
  }

  public function send_searchExperiments(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $userName, array $filters, $limit, $offset)
  {
    $args = new \Airavata\API\Airavata_searchExperiments_args();
    $args->authzToken = $authzToken;
    $args->gatewayId = $gatewayId;
    $args->userName = $userName;
    $args->filters = $filters;
    $args->limit = $limit;
    $args->offset = $offset;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'searchExperiments', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('searchExperiments', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_searchExperiments()
  {
    $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_searchExperiments_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_searchExperiments_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("searchExperiments failed: unknown result");
  }

  public function getExperimentStatistics(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $fromTime, $toTime, $userName, $applicationName, $resourceHostName, $limit, $offset)
  {
    $this->send_getExperimentStatistics($authzToken, $gatewayId, $fromTime, $toTime, $userName, $applicationName, $resourceHostName, $limit, $offset);
    return $this->recv_getExperimentStatistics();
  }

  public function send_getExperimentStatistics(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $fromTime, $toTime, $userName, $applicationName, $resourceHostName, $limit, $offset)
  {
    $args = new \Airavata\API\Airavata_getExperimentStatistics_args();
    $args->authzToken = $authzToken;
    $args->gatewayId = $gatewayId;
    $args->fromTime = $fromTime;
    $args->toTime = $toTime;
    $args->userName = $userName;
    $args->applicationName = $applicationName;
    $args->resourceHostName = $resourceHostName;
    $args->limit = $limit;
    $args->offset = $offset;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getExperimentStatistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getExperimentStatistics', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getExperimentStatistics()
  {
    $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_getExperimentStatistics_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_getExperimentStatistics_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("getExperimentStatistics failed: unknown result");
  }

  public function getExperimentsInProject(\Airavata\Model\Security\AuthzToken $authzToken, $projectId, $limit, $offset)
  {
    $this->send_getExperimentsInProject($authzToken, $projectId, $limit, $offset);
    return $this->recv_getExperimentsInProject();
  }

  public function send_getExperimentsInProject(\Airavata\Model\Security\AuthzToken $authzToken, $projectId, $limit, $offset)
  {
    $args = new \Airavata\API\Airavata_getExperimentsInProject_args();
    $args->authzToken = $authzToken;
    $args->projectId = $projectId;
    $args->limit = $limit;
    $args->offset = $offset;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getExperimentsInProject', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getExperimentsInProject', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getExperimentsInProject()
  {
    $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_getExperimentsInProject_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_getExperimentsInProject_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->pnfe !== null) {
      throw $result->pnfe;
    }
    if ($result->ae !== null) {
      throw $result->ae;
    }
    throw new \Exception("getExperimentsInProject failed: unknown result");
  }

  public function getUserExperiments(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $userName, $limit, $offset)
  {
    $this->send_getUserExperiments($authzToken, $gatewayId, $userName, $limit, $offset);
    return $this->recv_getUserExperiments();
  }

  public function send_getUserExperiments(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $userName, $limit, $offset)
  {
    $args = new \Airavata\API\Airavata_getUserExperiments_args();
    $args->authzToken = $authzToken;
    $args->gatewayId = $gatewayId;
    $args->userName = $userName;
    $args->limit = $limit;
    $args->offset = $offset;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getUserExperiments', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getUserExperiments', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getUserExperiments()
  {
    $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_getUserExperiments_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_getUserExperiments_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("getUserExperiments failed: unknown result");
  }

  public function createExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, \Airavata\Model\Experiment\ExperimentModel $experiment)
  {
    $this->send_createExperiment($authzToken, $gatewayId, $experiment);
    return $this->recv_createExperiment();
  }

  public function send_createExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, \Airavata\Model\Experiment\ExperimentModel $experiment)
  {
    $args = new \Airavata\API\Airavata_createExperiment_args();
    $args->authzToken = $authzToken;
    $args->gatewayId = $gatewayId;
    $args->experiment = $experiment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'createExperiment', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('createExperiment', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_createExperiment()
  {
    $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_createExperiment_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_createExperiment_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("createExperiment failed: unknown result");
  }

  public function deleteExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $experimentId)
  {
    $this->send_deleteExperiment($authzToken, $experimentId);
    return $this->recv_deleteExperiment();
  }

  public function send_deleteExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $experimentId)
  {
    $args = new \Airavata\API\Airavata_deleteExperiment_args();
    $args->authzToken = $authzToken;
    $args->experimentId = $experimentId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'deleteExperiment', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('deleteExperiment', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_deleteExperiment()
  {
    $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_deleteExperiment_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_deleteExperiment_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("deleteExperiment failed: unknown result");
  }

  public function getExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId)
  {
    $this->send_getExperiment($authzToken, $airavataExperimentId);
    return $this->recv_getExperiment();
  }

  public function send_getExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId)
  {
    $args = new \Airavata\API\Airavata_getExperiment_args();
    $args->authzToken = $authzToken;
    $args->airavataExperimentId = $airavataExperimentId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getExperiment', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getExperiment', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getExperiment()
  {
    $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_getExperiment_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_getExperiment_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ire !== null) {
      throw $result->ire;
    }
    if ($result->enf !== null) {
      throw $result->enf;
    }
    if ($result->ace !== null) {
      throw $result->ace;
    }
    if ($result->ase !== null) {
      throw $result->ase;
    }
    if ($result->ae !== null) {
      throw $result->ae;
    }
    throw new \Exception("getExperiment failed: unknown result");
  }

  public function getExperimentByAdmin(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId)
  {
    $this->send_getExperimentByAdmin($authzToken, $airavataExperimentId);
    return $this->recv_getExperimentByAdmin();
  }

  public function send_getExperimentByAdmin(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId)
  {
    $args = new \Airavata\API\Airavata_getExperimentByAdmin_args();
    $args->authzToken = $authzToken;
    $args->airavataExperimentId = $airavataExperimentId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getExperimentByAdmin', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getExperimentByAdmin', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getExperimentByAdmin()
  {
    $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_getExperimentByAdmin_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_getExperimentByAdmin_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ire !== null) {
      throw $result->ire;
    }
    if ($result->enf !== null) {
      throw $result->enf;
    }
    if ($result->ace !== null) {
      throw $result->ace;
    }
    if ($result->ase !== null) {
      throw $result->ase;
    }
    if ($result->ae !== null) {
      throw $result->ae;
    }
    throw new \Exception("getExperimentByAdmin failed: unknown result");
  }

  public function getDetailedExperimentTree(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId)
  {
    $this->send_getDetailedExperimentTree($authzToken, $airavataExperimentId);
    return $this->recv_getDetailedExperimentTree();
  }

  public function send_getDetailedExperimentTree(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId)
  {
    $args = new \Airavata\API\Airavata_getDetailedExperimentTree_args();
    $args->authzToken = $authzToken;
    $args->airavataExperimentId = $airavataExperimentId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getDetailedExperimentTree', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getDetailedExperimentTree', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getDetailedExperimentTree()
  {
    $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_getDetailedExperimentTree_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_getDetailedExperimentTree_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ire !== null) {
      throw $result->ire;
    }
    if ($result->enf !== null) {
      throw $result->enf;
    }
    if ($result->ace !== null) {
      throw $result->ace;
    }
    if ($result->ase !== null) {
      throw $result->ase;
    }
    if ($result->ae !== null) {
      throw $result->ae;
    }
    throw new \Exception("getDetailedExperimentTree failed: unknown result");
  }

  public function updateExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId, \Airavata\Model\Experiment\ExperimentModel $experiment)
  {
    $this->send_updateExperiment($authzToken, $airavataExperimentId, $experiment);
    $this->recv_updateExperiment();
  }

  public function send_updateExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId, \Airavata\Model\Experiment\ExperimentModel $experiment)
  {
    $args = new \Airavata\API\Airavata_updateExperiment_args();
    $args->authzToken = $authzToken;
    $args->airavataExperimentId = $airavataExperimentId;
    $args->experiment = $experiment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'updateExperiment', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('updateExperiment', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_updateExperiment()
  {
    $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_updateExperiment_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_updateExperiment_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->ire !== null) {
      throw $result->ire;
    }
    if ($result->enf !== null) {
      throw $result->enf;
    }
    if ($result->ace !== null) {
      throw $result->ace;
    }
    if ($result->ase !== null) {
      throw $result->ase;
    }
    if ($result->ae !== null) {
      throw $result->ae;
    }
    return;
  }

  public function updateExperimentConfiguration(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId, \Airavata\Model\Experiment\UserConfigurationDataModel $userConfiguration)
  {
    $this->send_updateExperimentConfiguration($authzToken, $airavataExperimentId, $userConfiguration);
    $this->recv_updateExperimentConfiguration();
  }

  public function send_updateExperimentConfiguration(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId, \Airavata\Model\Experiment\UserConfigurationDataModel $userConfiguration)
  {
    $args = new \Airavata\API\Airavata_updateExperimentConfiguration_args();
    $args->authzToken = $authzToken;
    $args->airavataExperimentId = $airavataExperimentId;
    $args->userConfiguration = $userConfiguration;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'updateExperimentConfiguration', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('updateExperimentConfiguration', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_updateExperimentConfiguration()
  {
    $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_updateExperimentConfiguration_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_updateExperimentConfiguration_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->ae !== null) {
      throw $result->ae;
    }
    return;
  }

  public function updateResourceScheduleing(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId, \Airavata\Model\Scheduling\ComputationalResourceSchedulingModel $resourceScheduling)
  {
    $this->send_updateResourceScheduleing($authzToken, $airavataExperimentId, $resourceScheduling);
    $this->recv_updateResourceScheduleing();
  }

  public function send_updateResourceScheduleing(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId, \Airavata\Model\Scheduling\ComputationalResourceSchedulingModel $resourceScheduling)
  {
    $args = new \Airavata\API\Airavata_updateResourceScheduleing_args();
    $args->authzToken = $authzToken;
    $args->airavataExperimentId = $airavataExperimentId;
    $args->resourceScheduling = $resourceScheduling;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'updateResourceScheduleing', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('updateResourceScheduleing', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_updateResourceScheduleing()
  {
    $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_updateResourceScheduleing_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_updateResourceScheduleing_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->ae !== null) {
      throw $result->ae;
    }
    return;
  }

  public function validateExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId)
  {
    $this->send_validateExperiment($authzToken, $airavataExperimentId);
    return $this->recv_validateExperiment();
  }

  public function send_validateExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId)
  {
    $args = new \Airavata\API\Airavata_validateExperiment_args();
    $args->authzToken = $authzToken;
    $args->airavataExperimentId = $airavataExperimentId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'validateExperiment', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('validateExperiment', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_validateExperiment()
  {
    $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_validateExperiment_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_validateExperiment_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ire !== null) {
      throw $result->ire;
    }
    if ($result->enf !== null) {
      throw $result->enf;
    }
    if ($result->ace !== null) {
      throw $result->ace;
    }
    if ($result->ase !== null) {
      throw $result->ase;
    }
    if ($result->ae !== null) {
      throw $result->ae;
    }
    throw new \Exception("validateExperiment failed: unknown result");
  }

  public function launchExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId, $gatewayId)
  {
    $this->send_launchExperiment($authzToken, $airavataExperimentId, $gatewayId);
    $this->recv_launchExperiment();
  }

  public function send_launchExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId, $gatewayId)
  {
    $args = new \Airavata\API\Airavata_launchExperiment_args();
    $args->authzToken = $authzToken;
    $args->airavataExperimentId = $airavataExperimentId;
    $args->gatewayId = $gatewayId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'launchExperiment', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('launchExperiment', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_launchExperiment()
  {
    $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_launchExperiment_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_launchExperiment_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->ire !== null) {
      throw $result->ire;
    }
    if ($result->enf !== null) {
      throw $result->enf;
    }
    if ($result->ace !== null) {
      throw $result->ace;
    }
    if ($result->ase !== null) {
      throw $result->ase;
    }
    if ($result->ae !== null) {
      throw $result->ae;
    }
    return;
  }

  public function getExperimentStatus(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId)
  {
    $this->send_getExperimentStatus($authzToken, $airavataExperimentId);
    return $this->recv_getExperimentStatus();
  }

  public function send_getExperimentStatus(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId)
  {
    $args = new \Airavata\API\Airavata_getExperimentStatus_args();
    $args->authzToken = $authzToken;
    $args->airavataExperimentId = $airavataExperimentId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getExperimentStatus', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getExperimentStatus', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getExperimentStatus()
  {
    $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_getExperimentStatus_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_getExperimentStatus_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ire !== null) {
      throw $result->ire;
    }
    if ($result->enf !== null) {
      throw $result->enf;
    }
    if ($result->ace !== null) {
      throw $result->ace;
    }
    if ($result->ase !== null) {
      throw $result->ase;
    }
    if ($result->ae !== null) {
      throw $result->ae;
    }
    throw new \Exception("getExperimentStatus failed: unknown result");
  }

  public function getExperimentOutputs(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId)
  {
    $this->send_getExperimentOutputs($authzToken, $airavataExperimentId);
    return $this->recv_getExperimentOutputs();
  }

  public function send_getExperimentOutputs(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId)
  {
    $args = new \Airavata\API\Airavata_getExperimentOutputs_args();
    $args->authzToken = $authzToken;
    $args->airavataExperimentId = $airavataExperimentId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getExperimentOutputs', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getExperimentOutputs', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getExperimentOutputs()
  {
    $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_getExperimentOutputs_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_getExperimentOutputs_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ire !== null) {
      throw $result->ire;
    }
    if ($result->enf !== null) {
      throw $result->enf;
    }
    if ($result->ace !== null) {
      throw $result->ace;
    }
    if ($result->ase !== null) {
      throw $result->ase;
    }
    if ($result->ae !== null) {
      throw $result->ae;
    }
    throw new \Exception("getExperimentOutputs failed: unknown result");
  }

  public function getIntermediateOutputs(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId)
  {
    $this->send_getIntermediateOutputs($authzToken, $airavataExperimentId);
    return $this->recv_getIntermediateOutputs();
  }

  public function send_getIntermediateOutputs(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId)
  {
    $args = new \Airavata\API\Airavata_getIntermediateOutputs_args();
    $args->authzToken = $authzToken;
    $args->airavataExperimentId = $airavataExperimentId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getIntermediateOutputs', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getIntermediateOutputs', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getIntermediateOutputs()
  {
    $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_getIntermediateOutputs_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_getIntermediateOutputs_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ire !== null) {
      throw $result->ire;
    }
    if ($result->enf !== null) {
      throw $result->enf;
    }
    if ($result->ace !== null) {
      throw $result->ace;
    }
    if ($result->ase !== null) {
      throw $result->ase;
    }
    if ($result->ae !== null) {
      throw $result->ae;
    }
    throw new \Exception("getIntermediateOutputs failed: unknown result");
  }

  public function fetchIntermediateOutputs(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId, array $outputNames)
  {
    $this->send_fetchIntermediateOutputs($authzToken, $airavataExperimentId, $outputNames);
    $this->recv_fetchIntermediateOutputs();
  }

  public function send_fetchIntermediateOutputs(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId, array $outputNames)
  {
    $args = new \Airavata\API\Airavata_fetchIntermediateOutputs_args();
    $args->authzToken = $authzToken;
    $args->airavataExperimentId = $airavataExperimentId;
    $args->outputNames = $outputNames;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'fetchIntermediateOutputs', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('fetchIntermediateOutputs', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_fetchIntermediateOutputs()
  {
    $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_fetchIntermediateOutputs_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_fetchIntermediateOutputs_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->ire !== null) {
      throw $result->ire;
    }
    if ($result->enf !== null) {
      throw $result->enf;
    }
    if ($result->ace !== null) {
      throw $result->ace;
    }
    if ($result->ase !== null) {
      throw $result->ase;
    }
    if ($result->ae !== null) {
      throw $result->ae;
    }
    return;
  }

  public function getIntermediateOutputProcessStatus(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId, array $outputNames)
  {
    $this->send_getIntermediateOutputProcessStatus($authzToken, $airavataExperimentId, $outputNames);
    return $this->recv_getIntermediateOutputProcessStatus();
  }

  public function send_getIntermediateOutputProcessStatus(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId, array $outputNames)
  {
    $args = new \Airavata\API\Airavata_getIntermediateOutputProcessStatus_args();
    $args->authzToken = $authzToken;
    $args->airavataExperimentId = $airavataExperimentId;
    $args->outputNames = $outputNames;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getIntermediateOutputProcessStatus', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getIntermediateOutputProcessStatus', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getIntermediateOutputProcessStatus()
  {
    $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_getIntermediateOutputProcessStatus_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_getIntermediateOutputProcessStatus_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ire !== null) {
      throw $result->ire;
    }
    if ($result->enf !== null) {
      throw $result->enf;
    }
    if ($result->ace !== null) {
      throw $result->ace;
    }
    if ($result->ase !== null) {
      throw $result->ase;
    }
    if ($result->ae !== null) {
      throw $result->ae;
    }
    throw new \Exception("getIntermediateOutputProcessStatus failed: unknown result");
  }

  public function getJobStatuses(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId)
  {
    $this->send_getJobStatuses($authzToken, $airavataExperimentId);
    return $this->recv_getJobStatuses();
  }

  public function send_getJobStatuses(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId)
  {
    $args = new \Airavata\API\Airavata_getJobStatuses_args();
    $args->authzToken = $authzToken;
    $args->airavataExperimentId = $airavataExperimentId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getJobStatuses', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getJobStatuses', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getJobStatuses()
  {
    $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_getJobStatuses_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_getJobStatuses_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ire !== null) {
      throw $result->ire;
    }
    if ($result->enf !== null) {
      throw $result->enf;
    }
    if ($result->ace !== null) {
      throw $result->ace;
    }
    if ($result->ase !== null) {
      throw $result->ase;
    }
    if ($result->ae !== null) {
      throw $result->ae;
    }
    throw new \Exception("getJobStatuses failed: unknown result");
  }

  public function getJobDetails(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId)
  {
    $this->send_getJobDetails($authzToken, $airavataExperimentId);
    return $this->recv_getJobDetails();
  }

  public function send_getJobDetails(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId)
  {
    $args = new \Airavata\API\Airavata_getJobDetails_args();
    $args->authzToken = $authzToken;
    $args->airavataExperimentId = $airavataExperimentId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getJobDetails', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getJobDetails', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getJobDetails()
  {
    $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_getJobDetails_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_getJobDetails_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ire !== null) {
      throw $result->ire;
    }
    if ($result->enf !== null) {
      throw $result->enf;
    }
    if ($result->ace !== null) {
      throw $result->ace;
    }
    if ($result->ase !== null) {
      throw $result->ase;
    }
    if ($result->ae !== null) {
      throw $result->ae;
    }
    throw new \Exception("getJobDetails failed: unknown result");
  }

  public function cloneExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $existingExperimentID, $newExperimentName, $newExperimentProjectId)
  {
    $this->send_cloneExperiment($authzToken, $existingExperimentID, $newExperimentName, $newExperimentProjectId);
    return $this->recv_cloneExperiment();
  }

  public function send_cloneExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $existingExperimentID, $newExperimentName, $newExperimentProjectId)
  {
    $args = new \Airavata\API\Airavata_cloneExperiment_args();
    $args->authzToken = $authzToken;
    $args->existingExperimentID = $existingExperimentID;
    $args->newExperimentName = $newExperimentName;
    $args->newExperimentProjectId = $newExperimentProjectId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'cloneExperiment', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('cloneExperiment', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_cloneExperiment()
  {
    $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_cloneExperiment_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_cloneExperiment_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ire !== null) {
      throw $result->ire;
    }
    if ($result->enf !== null) {
      throw $result->enf;
    }
    if ($result->ace !== null) {
      throw $result->ace;
    }
    if ($result->ase !== null) {
      throw $result->ase;
    }
    if ($result->ae !== null) {
      throw $result->ae;
    }
    if ($result->pnfe !== null) {
      throw $result->pnfe;
    }
    throw new \Exception("cloneExperiment failed: unknown result");
  }

  public function cloneExperimentByAdmin(\Airavata\Model\Security\AuthzToken $authzToken, $existingExperimentID, $newExperimentName, $newExperimentProjectId)
  {
    $this->send_cloneExperimentByAdmin($authzToken, $existingExperimentID, $newExperimentName, $newExperimentProjectId);
    return $this->recv_cloneExperimentByAdmin();
  }

  public function send_cloneExperimentByAdmin(\Airavata\Model\Security\AuthzToken $authzToken, $existingExperimentID, $newExperimentName, $newExperimentProjectId)
  {
    $args = new \Airavata\API\Airavata_cloneExperimentByAdmin_args();
    $args->authzToken = $authzToken;
    $args->existingExperimentID = $existingExperimentID;
    $args->newExperimentName = $newExperimentName;
    $args->newExperimentProjectId = $newExperimentProjectId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'cloneExperimentByAdmin', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('cloneExperimentByAdmin', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_cloneExperimentByAdmin()
  {
    $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_cloneExperimentByAdmin_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_cloneExperimentByAdmin_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ire !== null) {
      throw $result->ire;
    }
    if ($result->enf !== null) {
      throw $result->enf;
    }
    if ($result->ace !== null) {
      throw $result->ace;
    }
    if ($result->ase !== null) {
      throw $result->ase;
    }
    if ($result->ae !== null) {
      throw $result->ae;
    }
    if ($result->pnfe !== null) {
      throw $result->pnfe;
    }
    throw new \Exception("cloneExperimentByAdmin failed: unknown result");
  }

  public function terminateExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId, $gatewayId)
  {
    $this->send_terminateExperiment($authzToken, $airavataExperimentId, $gatewayId);
    $this->recv_terminateExperiment();
  }

  public function send_terminateExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $airavataExperimentId, $gatewayId)
  {
    $args = new \Airavata\API\Airavata_terminateExperiment_args();
    $args->authzToken = $authzToken;
    $args->airavataExperimentId = $airavataExperimentId;
    $args->gatewayId = $gatewayId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'terminateExperiment', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('terminateExperiment', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_terminateExperiment()
  {
    $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_terminateExperiment_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_terminateExperiment_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->ire !== null) {
      throw $result->ire;
    }
    if ($result->enf !== null) {
      throw $result->enf;
    }
    if ($result->ace !== null) {
      throw $result->ace;
    }
    if ($result->ase !== null) {
      throw $result->ase;
    }
    if ($result->ae !== null) {
      throw $result->ae;
    }
    return;
  }

  public function registerApplicationModule(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, \Airavata\Model\AppCatalog\AppDeployment\ApplicationModule $applicationModule)
  {
    $this->send_registerApplicationModule($authzToken, $gatewayId, $applicationModule);
    return $this->recv_registerApplicationModule();
  }

  public function send_registerApplicationModule(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, \Airavata\Model\AppCatalog\AppDeployment\ApplicationModule $applicationModule)
  {
    $args = new \Airavata\API\Airavata_registerApplicationModule_args();
    $args->authzToken = $authzToken;
    $args->gatewayId = $gatewayId;
    $args->applicationModule = $applicationModule;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'registerApplicationModule', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('registerApplicationModule', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_registerApplicationModule()
  {
    $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_registerApplicationModule_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_registerApplicationModule_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("registerApplicationModule failed: unknown result");
  }

  public function getApplicationModule(\Airavata\Model\Security\AuthzToken $authzToken, $appModuleId)
  {
    $this->send_getApplicationModule($authzToken, $appModuleId);
    return $this->recv_getApplicationModule();
  }

  public function send_getApplicationModule(\Airavata\Model\Security\AuthzToken $authzToken, $appModuleId)
  {
    $args = new \Airavata\API\Airavata_getApplicationModule_args();
    $args->authzToken = $authzToken;
    $args->appModuleId = $appModuleId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getApplicationModule', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getApplicationModule', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getApplicationModule()
  {
    $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_getApplicationModule_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_getApplicationModule_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("getApplicationModule failed: unknown result");
  }

  public function updateApplicationModule(\Airavata\Model\Security\AuthzToken $authzToken, $appModuleId, \Airavata\Model\AppCatalog\AppDeployment\ApplicationModule $applicationModule)
  {
    $this->send_updateApplicationModule($authzToken, $appModuleId, $applicationModule);
    return $this->recv_updateApplicationModule();
  }

  public function send_updateApplicationModule(\Airavata\Model\Security\AuthzToken $authzToken, $appModuleId, \Airavata\Model\AppCatalog\AppDeployment\ApplicationModule $applicationModule)
  {
    $args = new \Airavata\API\Airavata_updateApplicationModule_args();
    $args->authzToken = $authzToken;
    $args->appModuleId = $appModuleId;
    $args->applicationModule = $applicationModule;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'updateApplicationModule', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('updateApplicationModule', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_updateApplicationModule()
  {
    $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_updateApplicationModule_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_updateApplicationModule_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("updateApplicationModule failed: unknown result");
  }

  public function getAllAppModules(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
  {
    $this->send_getAllAppModules($authzToken, $gatewayId);
    return $this->recv_getAllAppModules();
  }

  public function send_getAllAppModules(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
  {
    $args = new \Airavata\API\Airavata_getAllAppModules_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_, 'getAllAppModules', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getAllAppModules', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getAllAppModules()
  {
    $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_getAllAppModules_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_getAllAppModules_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("getAllAppModules failed: unknown result");
  }

  public function getAccessibleAppModules(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
  {
    $this->send_getAccessibleAppModules($authzToken, $gatewayId);
    return $this->recv_getAccessibleAppModules();
  }

  public function send_getAccessibleAppModules(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
  {
    $args = new \Airavata\API\Airavata_getAccessibleAppModules_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_, 'getAccessibleAppModules', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getAccessibleAppModules', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getAccessibleAppModules()
  {
    $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_getAccessibleAppModules_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_getAccessibleAppModules_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("getAccessibleAppModules failed: unknown result");
  }

  public function deleteApplicationModule(\Airavata\Model\Security\AuthzToken $authzToken, $appModuleId)
  {
    $this->send_deleteApplicationModule($authzToken, $appModuleId);
    return $this->recv_deleteApplicationModule();
  }

  public function send_deleteApplicationModule(\Airavata\Model\Security\AuthzToken $authzToken, $appModuleId)
  {
    $args = new \Airavata\API\Airavata_deleteApplicationModule_args();
    $args->authzToken = $authzToken;
    $args->appModuleId = $appModuleId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'deleteApplicationModule', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('deleteApplicationModule', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_deleteApplicationModule()
  {
    $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_deleteApplicationModule_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_deleteApplicationModule_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("deleteApplicationModule failed: unknown result");
  }

  public function registerApplicationDeployment(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, \Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription $applicationDeployment)
  {
    $this->send_registerApplicationDeployment($authzToken, $gatewayId, $applicationDeployment);
    return $this->recv_registerApplicationDeployment();
  }

  public function send_registerApplicationDeployment(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, \Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription $applicationDeployment)
  {
    $args = new \Airavata\API\Airavata_registerApplicationDeployment_args();
    $args->authzToken = $authzToken;
    $args->gatewayId = $gatewayId;
    $args->applicationDeployment = $applicationDeployment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'registerApplicationDeployment', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('registerApplicationDeployment', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_registerApplicationDeployment()
  {
    $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_registerApplicationDeployment_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_registerApplicationDeployment_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("registerApplicationDeployment failed: unknown result");
  }

  public function getApplicationDeployment(\Airavata\Model\Security\AuthzToken $authzToken, $appDeploymentId)
  {
    $this->send_getApplicationDeployment($authzToken, $appDeploymentId);
    return $this->recv_getApplicationDeployment();
  }

  public function send_getApplicationDeployment(\Airavata\Model\Security\AuthzToken $authzToken, $appDeploymentId)
  {
    $args = new \Airavata\API\Airavata_getApplicationDeployment_args();
    $args->authzToken = $authzToken;
    $args->appDeploymentId = $appDeploymentId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getApplicationDeployment', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getApplicationDeployment', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getApplicationDeployment()
  {
    $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_getApplicationDeployment_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_getApplicationDeployment_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("getApplicationDeployment failed: unknown result");
  }

  public function updateApplicationDeployment(\Airavata\Model\Security\AuthzToken $authzToken, $appDeploymentId, \Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription $applicationDeployment)
  {
    $this->send_updateApplicationDeployment($authzToken, $appDeploymentId, $applicationDeployment);
    return $this->recv_updateApplicationDeployment();
  }

  public function send_updateApplicationDeployment(\Airavata\Model\Security\AuthzToken $authzToken, $appDeploymentId, \Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription $applicationDeployment)
  {
    $args = new \Airavata\API\Airavata_updateApplicationDeployment_args();
    $args->authzToken = $authzToken;
    $args->appDeploymentId = $appDeploymentId;
    $args->applicationDeployment = $applicationDeployment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'updateApplicationDeployment', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('updateApplicationDeployment', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_updateApplicationDeployment()
  {
    $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_updateApplicationDeployment_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_updateApplicationDeployment_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("updateApplicationDeployment failed: unknown result");
  }

  public function deleteApplicationDeployment(\Airavata\Model\Security\AuthzToken $authzToken, $appDeploymentId)
  {
    $this->send_deleteApplicationDeployment($authzToken, $appDeploymentId);
    return $this->recv_deleteApplicationDeployment();
  }

  public function send_deleteApplicationDeployment(\Airavata\Model\Security\AuthzToken $authzToken, $appDeploymentId)
  {
    $args = new \Airavata\API\Airavata_deleteApplicationDeployment_args();
    $args->authzToken = $authzToken;
    $args->appDeploymentId = $appDeploymentId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'deleteApplicationDeployment', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('deleteApplicationDeployment', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_deleteApplicationDeployment()
  {
    $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_deleteApplicationDeployment_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_deleteApplicationDeployment_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("deleteApplicationDeployment failed: unknown result");
  }

  public function getAllApplicationDeployments(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
  {
    $this->send_getAllApplicationDeployments($authzToken, $gatewayId);
    return $this->recv_getAllApplicationDeployments();
  }

  public function send_getAllApplicationDeployments(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
  {
    $args = new \Airavata\API\Airavata_getAllApplicationDeployments_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_, 'getAllApplicationDeployments', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getAllApplicationDeployments', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getAllApplicationDeployments()
  {
    $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_getAllApplicationDeployments_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_getAllApplicationDeployments_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("getAllApplicationDeployments failed: unknown result");
  }

  public function getAccessibleApplicationDeployments(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $permissionType)
  {
    $this->send_getAccessibleApplicationDeployments($authzToken, $gatewayId, $permissionType);
    return $this->recv_getAccessibleApplicationDeployments();
  }

  public function send_getAccessibleApplicationDeployments(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $permissionType)
  {
    $args = new \Airavata\API\Airavata_getAccessibleApplicationDeployments_args();
    $args->authzToken = $authzToken;
    $args->gatewayId = $gatewayId;
    $args->permissionType = $permissionType;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getAccessibleApplicationDeployments', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getAccessibleApplicationDeployments', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getAccessibleApplicationDeployments()
  {
    $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_getAccessibleApplicationDeployments_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_getAccessibleApplicationDeployments_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("getAccessibleApplicationDeployments failed: unknown result");
  }

  public function getAppModuleDeployedResources(\Airavata\Model\Security\AuthzToken $authzToken, $appModuleId)
  {
    $this->send_getAppModuleDeployedResources($authzToken, $appModuleId);
    return $this->recv_getAppModuleDeployedResources();
  }

  public function send_getAppModuleDeployedResources(\Airavata\Model\Security\AuthzToken $authzToken, $appModuleId)
  {
    $args = new \Airavata\API\Airavata_getAppModuleDeployedResources_args();
    $args->authzToken = $authzToken;
    $args->appModuleId = $appModuleId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getAppModuleDeployedResources', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getAppModuleDeployedResources', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getAppModuleDeployedResources()
  {
    $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_getAppModuleDeployedResources_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_getAppModuleDeployedResources_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("getAppModuleDeployedResources failed: unknown result");
  }

  public function getApplicationDeploymentsForAppModuleAndGroupResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $appModuleId, $groupResourceProfileId)
  {
    $this->send_getApplicationDeploymentsForAppModuleAndGroupResourceProfile($authzToken, $appModuleId, $groupResourceProfileId);
    return $this->recv_getApplicationDeploymentsForAppModuleAndGroupResourceProfile();
  }

  public function send_getApplicationDeploymentsForAppModuleAndGroupResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $appModuleId, $groupResourceProfileId)
  {
    $args = new \Airavata\API\Airavata_getApplicationDeploymentsForAppModuleAndGroupResourceProfile_args();
    $args->authzToken = $authzToken;
    $args->appModuleId = $appModuleId;
    $args->groupResourceProfileId = $groupResourceProfileId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getApplicationDeploymentsForAppModuleAndGroupResourceProfile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getApplicationDeploymentsForAppModuleAndGroupResourceProfile', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getApplicationDeploymentsForAppModuleAndGroupResourceProfile()
  {
    $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_getApplicationDeploymentsForAppModuleAndGroupResourceProfile_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_getApplicationDeploymentsForAppModuleAndGroupResourceProfile_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("getApplicationDeploymentsForAppModuleAndGroupResourceProfile failed: unknown result");
  }

  public function registerApplicationInterface(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, \Airavata\Model\AppCatalog\AppInterface\ApplicationInterfaceDescription $applicationInterface)
  {
    $this->send_registerApplicationInterface($authzToken, $gatewayId, $applicationInterface);
    return $this->recv_registerApplicationInterface();
  }

  public function send_registerApplicationInterface(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, \Airavata\Model\AppCatalog\AppInterface\ApplicationInterfaceDescription $applicationInterface)
  {
    $args = new \Airavata\API\Airavata_registerApplicationInterface_args();
    $args->authzToken = $authzToken;
    $args->gatewayId = $gatewayId;
    $args->applicationInterface = $applicationInterface;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'registerApplicationInterface', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('registerApplicationInterface', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_registerApplicationInterface()
  {
    $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_registerApplicationInterface_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_registerApplicationInterface_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("registerApplicationInterface failed: unknown result");
  }

  public function cloneApplicationInterface(\Airavata\Model\Security\AuthzToken $authzToken, $existingAppInterfaceID, $newApplicationName, $gatewayId)
  {
    $this->send_cloneApplicationInterface($authzToken, $existingAppInterfaceID, $newApplicationName, $gatewayId);
    return $this->recv_cloneApplicationInterface();
  }

  public function send_cloneApplicationInterface(\Airavata\Model\Security\AuthzToken $authzToken, $existingAppInterfaceID, $newApplicationName, $gatewayId)
  {
    $args = new \Airavata\API\Airavata_cloneApplicationInterface_args();
    $args->authzToken = $authzToken;
    $args->existingAppInterfaceID = $existingAppInterfaceID;
    $args->newApplicationName = $newApplicationName;
    $args->gatewayId = $gatewayId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'cloneApplicationInterface', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('cloneApplicationInterface', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_cloneApplicationInterface()
  {
    $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_cloneApplicationInterface_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_cloneApplicationInterface_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("cloneApplicationInterface failed: unknown result");
  }

  public function getApplicationInterface(\Airavata\Model\Security\AuthzToken $authzToken, $appInterfaceId)
  {
    $this->send_getApplicationInterface($authzToken, $appInterfaceId);
    return $this->recv_getApplicationInterface();
  }

  public function send_getApplicationInterface(\Airavata\Model\Security\AuthzToken $authzToken, $appInterfaceId)
  {
    $args = new \Airavata\API\Airavata_getApplicationInterface_args();
    $args->authzToken = $authzToken;
    $args->appInterfaceId = $appInterfaceId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getApplicationInterface', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getApplicationInterface', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getApplicationInterface()
  {
    $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_getApplicationInterface_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_getApplicationInterface_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("getApplicationInterface failed: unknown result");
  }

  public function updateApplicationInterface(\Airavata\Model\Security\AuthzToken $authzToken, $appInterfaceId, \Airavata\Model\AppCatalog\AppInterface\ApplicationInterfaceDescription $applicationInterface)
  {
    $this->send_updateApplicationInterface($authzToken, $appInterfaceId, $applicationInterface);
    return $this->recv_updateApplicationInterface();
  }

  public function send_updateApplicationInterface(\Airavata\Model\Security\AuthzToken $authzToken, $appInterfaceId, \Airavata\Model\AppCatalog\AppInterface\ApplicationInterfaceDescription $applicationInterface)
  {
    $args = new \Airavata\API\Airavata_updateApplicationInterface_args();
    $args->authzToken = $authzToken;
    $args->appInterfaceId = $appInterfaceId;
    $args->applicationInterface = $applicationInterface;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'updateApplicationInterface', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('updateApplicationInterface', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_updateApplicationInterface()
  {
    $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_updateApplicationInterface_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_updateApplicationInterface_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("updateApplicationInterface failed: unknown result");
  }

  public function deleteApplicationInterface(\Airavata\Model\Security\AuthzToken $authzToken, $appInterfaceId)
  {
    $this->send_deleteApplicationInterface($authzToken, $appInterfaceId);
    return $this->recv_deleteApplicationInterface();
  }

  public function send_deleteApplicationInterface(\Airavata\Model\Security\AuthzToken $authzToken, $appInterfaceId)
  {
    $args = new \Airavata\API\Airavata_deleteApplicationInterface_args();
    $args->authzToken = $authzToken;
    $args->appInterfaceId = $appInterfaceId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'deleteApplicationInterface', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('deleteApplicationInterface', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_deleteApplicationInterface()
  {
    $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_deleteApplicationInterface_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_deleteApplicationInterface_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("deleteApplicationInterface failed: unknown result");
  }

  public function getAllApplicationInterfaceNames(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
  {
    $this->send_getAllApplicationInterfaceNames($authzToken, $gatewayId);
    return $this->recv_getAllApplicationInterfaceNames();
  }

  public function send_getAllApplicationInterfaceNames(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
  {
    $args = new \Airavata\API\Airavata_getAllApplicationInterfaceNames_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_, 'getAllApplicationInterfaceNames', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getAllApplicationInterfaceNames', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getAllApplicationInterfaceNames()
  {
    $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_getAllApplicationInterfaceNames_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_getAllApplicationInterfaceNames_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("getAllApplicationInterfaceNames failed: unknown result");
  }

  public function getAllApplicationInterfaces(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
  {
    $this->send_getAllApplicationInterfaces($authzToken, $gatewayId);
    return $this->recv_getAllApplicationInterfaces();
  }

  public function send_getAllApplicationInterfaces(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
  {
    $args = new \Airavata\API\Airavata_getAllApplicationInterfaces_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_, 'getAllApplicationInterfaces', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getAllApplicationInterfaces', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getAllApplicationInterfaces()
  {
    $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_getAllApplicationInterfaces_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_getAllApplicationInterfaces_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("getAllApplicationInterfaces failed: unknown result");
  }

  public function getApplicationInputs(\Airavata\Model\Security\AuthzToken $authzToken, $appInterfaceId)
  {
    $this->send_getApplicationInputs($authzToken, $appInterfaceId);
    return $this->recv_getApplicationInputs();
  }

  public function send_getApplicationInputs(\Airavata\Model\Security\AuthzToken $authzToken, $appInterfaceId)
  {
    $args = new \Airavata\API\Airavata_getApplicationInputs_args();
    $args->authzToken = $authzToken;
    $args->appInterfaceId = $appInterfaceId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getApplicationInputs', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getApplicationInputs', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getApplicationInputs()
  {
    $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_getApplicationInputs_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_getApplicationInputs_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("getApplicationInputs failed: unknown result");
  }

  public function getApplicationOutputs(\Airavata\Model\Security\AuthzToken $authzToken, $appInterfaceId)
  {
    $this->send_getApplicationOutputs($authzToken, $appInterfaceId);
    return $this->recv_getApplicationOutputs();
  }

  public function send_getApplicationOutputs(\Airavata\Model\Security\AuthzToken $authzToken, $appInterfaceId)
  {
    $args = new \Airavata\API\Airavata_getApplicationOutputs_args();
    $args->authzToken = $authzToken;
    $args->appInterfaceId = $appInterfaceId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getApplicationOutputs', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getApplicationOutputs', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getApplicationOutputs()
  {
    $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_getApplicationOutputs_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_getApplicationOutputs_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("getApplicationOutputs failed: unknown result");
  }

  public function getAvailableAppInterfaceComputeResources(\Airavata\Model\Security\AuthzToken $authzToken, $appInterfaceId)
  {
    $this->send_getAvailableAppInterfaceComputeResources($authzToken, $appInterfaceId);
    return $this->recv_getAvailableAppInterfaceComputeResources();
  }

  public function send_getAvailableAppInterfaceComputeResources(\Airavata\Model\Security\AuthzToken $authzToken, $appInterfaceId)
  {
    $args = new \Airavata\API\Airavata_getAvailableAppInterfaceComputeResources_args();
    $args->authzToken = $authzToken;
    $args->appInterfaceId = $appInterfaceId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getAvailableAppInterfaceComputeResources', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getAvailableAppInterfaceComputeResources', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getAvailableAppInterfaceComputeResources()
  {
    $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_getAvailableAppInterfaceComputeResources_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_getAvailableAppInterfaceComputeResources_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("getAvailableAppInterfaceComputeResources failed: unknown result");
  }

  public function registerComputeResource(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\ComputeResource\ComputeResourceDescription $computeResourceDescription)
  {
    $this->send_registerComputeResource($authzToken, $computeResourceDescription);
    return $this->recv_registerComputeResource();
  }

  public function send_registerComputeResource(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\ComputeResource\ComputeResourceDescription $computeResourceDescription)
  {
    $args = new \Airavata\API\Airavata_registerComputeResource_args();
    $args->authzToken = $authzToken;
    $args->computeResourceDescription = $computeResourceDescription;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'registerComputeResource', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('registerComputeResource', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_registerComputeResource()
  {
    $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_registerComputeResource_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_registerComputeResource_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("registerComputeResource failed: unknown result");
  }

  public function getComputeResource(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId)
  {
    $this->send_getComputeResource($authzToken, $computeResourceId);
    return $this->recv_getComputeResource();
  }

  public function send_getComputeResource(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId)
  {
    $args = new \Airavata\API\Airavata_getComputeResource_args();
    $args->authzToken = $authzToken;
    $args->computeResourceId = $computeResourceId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getComputeResource', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getComputeResource', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getComputeResource()
  {
    $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_getComputeResource_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_getComputeResource_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("getComputeResource failed: unknown result");
  }

  public function getAllComputeResourceNames(\Airavata\Model\Security\AuthzToken $authzToken)
  {
    $this->send_getAllComputeResourceNames($authzToken);
    return $this->recv_getAllComputeResourceNames();
  }

  public function send_getAllComputeResourceNames(\Airavata\Model\Security\AuthzToken $authzToken)
  {
    $args = new \Airavata\API\Airavata_getAllComputeResourceNames_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_, 'getAllComputeResourceNames', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getAllComputeResourceNames', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getAllComputeResourceNames()
  {
    $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_getAllComputeResourceNames_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_getAllComputeResourceNames_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("getAllComputeResourceNames failed: unknown result");
  }

  public function updateComputeResource(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, \Airavata\Model\AppCatalog\ComputeResource\ComputeResourceDescription $computeResourceDescription)
  {
    $this->send_updateComputeResource($authzToken, $computeResourceId, $computeResourceDescription);
    return $this->recv_updateComputeResource();
  }

  public function send_updateComputeResource(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, \Airavata\Model\AppCatalog\ComputeResource\ComputeResourceDescription $computeResourceDescription)
  {
    $args = new \Airavata\API\Airavata_updateComputeResource_args();
    $args->authzToken = $authzToken;
    $args->computeResourceId = $computeResourceId;
    $args->computeResourceDescription = $computeResourceDescription;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'updateComputeResource', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('updateComputeResource', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_updateComputeResource()
  {
    $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_updateComputeResource_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_updateComputeResource_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("updateComputeResource failed: unknown result");
  }

  public function deleteComputeResource(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId)
  {
    $this->send_deleteComputeResource($authzToken, $computeResourceId);
    return $this->recv_deleteComputeResource();
  }

  public function send_deleteComputeResource(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId)
  {
    $args = new \Airavata\API\Airavata_deleteComputeResource_args();
    $args->authzToken = $authzToken;
    $args->computeResourceId = $computeResourceId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'deleteComputeResource', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('deleteComputeResource', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_deleteComputeResource()
  {
    $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_deleteComputeResource_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_deleteComputeResource_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("deleteComputeResource failed: unknown result");
  }

  public function registerStorageResource(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\StorageResource\StorageResourceDescription $storageResourceDescription)
  {
    $this->send_registerStorageResource($authzToken, $storageResourceDescription);
    return $this->recv_registerStorageResource();
  }

  public function send_registerStorageResource(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\StorageResource\StorageResourceDescription $storageResourceDescription)
  {
    $args = new \Airavata\API\Airavata_registerStorageResource_args();
    $args->authzToken = $authzToken;
    $args->storageResourceDescription = $storageResourceDescription;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'registerStorageResource', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('registerStorageResource', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_registerStorageResource()
  {
    $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_registerStorageResource_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_registerStorageResource_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("registerStorageResource failed: unknown result");
  }

  public function getStorageResource(\Airavata\Model\Security\AuthzToken $authzToken, $storageResourceId)
  {
    $this->send_getStorageResource($authzToken, $storageResourceId);
    return $this->recv_getStorageResource();
  }

  public function send_getStorageResource(\Airavata\Model\Security\AuthzToken $authzToken, $storageResourceId)
  {
    $args = new \Airavata\API\Airavata_getStorageResource_args();
    $args->authzToken = $authzToken;
    $args->storageResourceId = $storageResourceId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getStorageResource', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getStorageResource', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getStorageResource()
  {
    $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_getStorageResource_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_getStorageResource_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("getStorageResource failed: unknown result");
  }

  public function getAllStorageResourceNames(\Airavata\Model\Security\AuthzToken $authzToken)
  {
    $this->send_getAllStorageResourceNames($authzToken);
    return $this->recv_getAllStorageResourceNames();
  }

  public function send_getAllStorageResourceNames(\Airavata\Model\Security\AuthzToken $authzToken)
  {
    $args = new \Airavata\API\Airavata_getAllStorageResourceNames_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_, 'getAllStorageResourceNames', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getAllStorageResourceNames', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getAllStorageResourceNames()
  {
    $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_getAllStorageResourceNames_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_getAllStorageResourceNames_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("getAllStorageResourceNames failed: unknown result");
  }

  public function updateStorageResource(\Airavata\Model\Security\AuthzToken $authzToken, $storageResourceId, \Airavata\Model\AppCatalog\StorageResource\StorageResourceDescription $storageResourceDescription)
  {
    $this->send_updateStorageResource($authzToken, $storageResourceId, $storageResourceDescription);
    return $this->recv_updateStorageResource();
  }

  public function send_updateStorageResource(\Airavata\Model\Security\AuthzToken $authzToken, $storageResourceId, \Airavata\Model\AppCatalog\StorageResource\StorageResourceDescription $storageResourceDescription)
  {
    $args = new \Airavata\API\Airavata_updateStorageResource_args();
    $args->authzToken = $authzToken;
    $args->storageResourceId = $storageResourceId;
    $args->storageResourceDescription = $storageResourceDescription;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'updateStorageResource', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('updateStorageResource', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_updateStorageResource()
  {
    $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_updateStorageResource_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_updateStorageResource_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("updateStorageResource failed: unknown result");
  }

  public function deleteStorageResource(\Airavata\Model\Security\AuthzToken $authzToken, $storageResourceId)
  {
    $this->send_deleteStorageResource($authzToken, $storageResourceId);
    return $this->recv_deleteStorageResource();
  }

  public function send_deleteStorageResource(\Airavata\Model\Security\AuthzToken $authzToken, $storageResourceId)
  {
    $args = new \Airavata\API\Airavata_deleteStorageResource_args();
    $args->authzToken = $authzToken;
    $args->storageResourceId = $storageResourceId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'deleteStorageResource', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('deleteStorageResource', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_deleteStorageResource()
  {
    $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_deleteStorageResource_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_deleteStorageResource_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("deleteStorageResource failed: unknown result");
  }

  public function addLocalSubmissionDetails(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $priorityOrder, \Airavata\Model\AppCatalog\ComputeResource\LOCALSubmission $localSubmission)
  {
    $this->send_addLocalSubmissionDetails($authzToken, $computeResourceId, $priorityOrder, $localSubmission);
    return $this->recv_addLocalSubmissionDetails();
  }

  public function send_addLocalSubmissionDetails(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $priorityOrder, \Airavata\Model\AppCatalog\ComputeResource\LOCALSubmission $localSubmission)
  {
    $args = new \Airavata\API\Airavata_addLocalSubmissionDetails_args();
    $args->authzToken = $authzToken;
    $args->computeResourceId = $computeResourceId;
    $args->priorityOrder = $priorityOrder;
    $args->localSubmission = $localSubmission;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'addLocalSubmissionDetails', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('addLocalSubmissionDetails', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_addLocalSubmissionDetails()
  {
    $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_addLocalSubmissionDetails_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_addLocalSubmissionDetails_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("addLocalSubmissionDetails failed: unknown result");
  }

  public function updateLocalSubmissionDetails(\Airavata\Model\Security\AuthzToken $authzToken, $jobSubmissionInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\LOCALSubmission $localSubmission)
  {
    $this->send_updateLocalSubmissionDetails($authzToken, $jobSubmissionInterfaceId, $localSubmission);
    return $this->recv_updateLocalSubmissionDetails();
  }

  public function send_updateLocalSubmissionDetails(\Airavata\Model\Security\AuthzToken $authzToken, $jobSubmissionInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\LOCALSubmission $localSubmission)
  {
    $args = new \Airavata\API\Airavata_updateLocalSubmissionDetails_args();
    $args->authzToken = $authzToken;
    $args->jobSubmissionInterfaceId = $jobSubmissionInterfaceId;
    $args->localSubmission = $localSubmission;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'updateLocalSubmissionDetails', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('updateLocalSubmissionDetails', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_updateLocalSubmissionDetails()
  {
    $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_updateLocalSubmissionDetails_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_updateLocalSubmissionDetails_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("updateLocalSubmissionDetails failed: unknown result");
  }

  public function getLocalJobSubmission(\Airavata\Model\Security\AuthzToken $authzToken, $jobSubmissionId)
  {
    $this->send_getLocalJobSubmission($authzToken, $jobSubmissionId);
    return $this->recv_getLocalJobSubmission();
  }

  public function send_getLocalJobSubmission(\Airavata\Model\Security\AuthzToken $authzToken, $jobSubmissionId)
  {
    $args = new \Airavata\API\Airavata_getLocalJobSubmission_args();
    $args->authzToken = $authzToken;
    $args->jobSubmissionId = $jobSubmissionId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getLocalJobSubmission', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getLocalJobSubmission', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getLocalJobSubmission()
  {
    $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_getLocalJobSubmission_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_getLocalJobSubmission_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("getLocalJobSubmission failed: unknown result");
  }

  public function addSSHJobSubmissionDetails(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $priorityOrder, \Airavata\Model\AppCatalog\ComputeResource\SSHJobSubmission $sshJobSubmission)
  {
    $this->send_addSSHJobSubmissionDetails($authzToken, $computeResourceId, $priorityOrder, $sshJobSubmission);
    return $this->recv_addSSHJobSubmissionDetails();
  }

  public function send_addSSHJobSubmissionDetails(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $priorityOrder, \Airavata\Model\AppCatalog\ComputeResource\SSHJobSubmission $sshJobSubmission)
  {
    $args = new \Airavata\API\Airavata_addSSHJobSubmissionDetails_args();
    $args->authzToken = $authzToken;
    $args->computeResourceId = $computeResourceId;
    $args->priorityOrder = $priorityOrder;
    $args->sshJobSubmission = $sshJobSubmission;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'addSSHJobSubmissionDetails', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('addSSHJobSubmissionDetails', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_addSSHJobSubmissionDetails()
  {
    $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_addSSHJobSubmissionDetails_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_addSSHJobSubmissionDetails_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("addSSHJobSubmissionDetails failed: unknown result");
  }

  public function addSSHForkJobSubmissionDetails(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $priorityOrder, \Airavata\Model\AppCatalog\ComputeResource\SSHJobSubmission $sshJobSubmission)
  {
    $this->send_addSSHForkJobSubmissionDetails($authzToken, $computeResourceId, $priorityOrder, $sshJobSubmission);
    return $this->recv_addSSHForkJobSubmissionDetails();
  }

  public function send_addSSHForkJobSubmissionDetails(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $priorityOrder, \Airavata\Model\AppCatalog\ComputeResource\SSHJobSubmission $sshJobSubmission)
  {
    $args = new \Airavata\API\Airavata_addSSHForkJobSubmissionDetails_args();
    $args->authzToken = $authzToken;
    $args->computeResourceId = $computeResourceId;
    $args->priorityOrder = $priorityOrder;
    $args->sshJobSubmission = $sshJobSubmission;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'addSSHForkJobSubmissionDetails', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('addSSHForkJobSubmissionDetails', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_addSSHForkJobSubmissionDetails()
  {
    $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_addSSHForkJobSubmissionDetails_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_addSSHForkJobSubmissionDetails_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("addSSHForkJobSubmissionDetails failed: unknown result");
  }

  public function getSSHJobSubmission(\Airavata\Model\Security\AuthzToken $authzToken, $jobSubmissionId)
  {
    $this->send_getSSHJobSubmission($authzToken, $jobSubmissionId);
    return $this->recv_getSSHJobSubmission();
  }

  public function send_getSSHJobSubmission(\Airavata\Model\Security\AuthzToken $authzToken, $jobSubmissionId)
  {
    $args = new \Airavata\API\Airavata_getSSHJobSubmission_args();
    $args->authzToken = $authzToken;
    $args->jobSubmissionId = $jobSubmissionId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getSSHJobSubmission', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getSSHJobSubmission', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getSSHJobSubmission()
  {
    $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_getSSHJobSubmission_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_getSSHJobSubmission_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("getSSHJobSubmission failed: unknown result");
  }

  public function addUNICOREJobSubmissionDetails(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $priorityOrder, \Airavata\Model\AppCatalog\ComputeResource\UnicoreJobSubmission $unicoreJobSubmission)
  {
    $this->send_addUNICOREJobSubmissionDetails($authzToken, $computeResourceId, $priorityOrder, $unicoreJobSubmission);
    return $this->recv_addUNICOREJobSubmissionDetails();
  }

  public function send_addUNICOREJobSubmissionDetails(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $priorityOrder, \Airavata\Model\AppCatalog\ComputeResource\UnicoreJobSubmission $unicoreJobSubmission)
  {
    $args = new \Airavata\API\Airavata_addUNICOREJobSubmissionDetails_args();
    $args->authzToken = $authzToken;
    $args->computeResourceId = $computeResourceId;
    $args->priorityOrder = $priorityOrder;
    $args->unicoreJobSubmission = $unicoreJobSubmission;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'addUNICOREJobSubmissionDetails', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('addUNICOREJobSubmissionDetails', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_addUNICOREJobSubmissionDetails()
  {
    $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_addUNICOREJobSubmissionDetails_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_addUNICOREJobSubmissionDetails_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("addUNICOREJobSubmissionDetails failed: unknown result");
  }

  public function getUnicoreJobSubmission(\Airavata\Model\Security\AuthzToken $authzToken, $jobSubmissionId)
  {
    $this->send_getUnicoreJobSubmission($authzToken, $jobSubmissionId);
    return $this->recv_getUnicoreJobSubmission();
  }

  public function send_getUnicoreJobSubmission(\Airavata\Model\Security\AuthzToken $authzToken, $jobSubmissionId)
  {
    $args = new \Airavata\API\Airavata_getUnicoreJobSubmission_args();
    $args->authzToken = $authzToken;
    $args->jobSubmissionId = $jobSubmissionId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getUnicoreJobSubmission', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getUnicoreJobSubmission', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getUnicoreJobSubmission()
  {
    $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_getUnicoreJobSubmission_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_getUnicoreJobSubmission_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("getUnicoreJobSubmission failed: unknown result");
  }

  public function addCloudJobSubmissionDetails(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $priorityOrder, \Airavata\Model\AppCatalog\ComputeResource\CloudJobSubmission $cloudSubmission)
  {
    $this->send_addCloudJobSubmissionDetails($authzToken, $computeResourceId, $priorityOrder, $cloudSubmission);
    return $this->recv_addCloudJobSubmissionDetails();
  }

  public function send_addCloudJobSubmissionDetails(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $priorityOrder, \Airavata\Model\AppCatalog\ComputeResource\CloudJobSubmission $cloudSubmission)
  {
    $args = new \Airavata\API\Airavata_addCloudJobSubmissionDetails_args();
    $args->authzToken = $authzToken;
    $args->computeResourceId = $computeResourceId;
    $args->priorityOrder = $priorityOrder;
    $args->cloudSubmission = $cloudSubmission;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'addCloudJobSubmissionDetails', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('addCloudJobSubmissionDetails', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_addCloudJobSubmissionDetails()
  {
    $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_addCloudJobSubmissionDetails_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_addCloudJobSubmissionDetails_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("addCloudJobSubmissionDetails failed: unknown result");
  }

  public function getCloudJobSubmission(\Airavata\Model\Security\AuthzToken $authzToken, $jobSubmissionId)
  {
    $this->send_getCloudJobSubmission($authzToken, $jobSubmissionId);
    return $this->recv_getCloudJobSubmission();
  }

  public function send_getCloudJobSubmission(\Airavata\Model\Security\AuthzToken $authzToken, $jobSubmissionId)
  {
    $args = new \Airavata\API\Airavata_getCloudJobSubmission_args();
    $args->authzToken = $authzToken;
    $args->jobSubmissionId = $jobSubmissionId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getCloudJobSubmission', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getCloudJobSubmission', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getCloudJobSubmission()
  {
    $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_getCloudJobSubmission_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_getCloudJobSubmission_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("getCloudJobSubmission failed: unknown result");
  }

  public function updateSSHJobSubmissionDetails(\Airavata\Model\Security\AuthzToken $authzToken, $jobSubmissionInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\SSHJobSubmission $sshJobSubmission)
  {
    $this->send_updateSSHJobSubmissionDetails($authzToken, $jobSubmissionInterfaceId, $sshJobSubmission);
    return $this->recv_updateSSHJobSubmissionDetails();
  }

  public function send_updateSSHJobSubmissionDetails(\Airavata\Model\Security\AuthzToken $authzToken, $jobSubmissionInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\SSHJobSubmission $sshJobSubmission)
  {
    $args = new \Airavata\API\Airavata_updateSSHJobSubmissionDetails_args();
    $args->authzToken = $authzToken;
    $args->jobSubmissionInterfaceId = $jobSubmissionInterfaceId;
    $args->sshJobSubmission = $sshJobSubmission;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'updateSSHJobSubmissionDetails', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('updateSSHJobSubmissionDetails', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_updateSSHJobSubmissionDetails()
  {
    $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_updateSSHJobSubmissionDetails_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_updateSSHJobSubmissionDetails_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("updateSSHJobSubmissionDetails failed: unknown result");
  }

  public function updateCloudJobSubmissionDetails(\Airavata\Model\Security\AuthzToken $authzToken, $jobSubmissionInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\CloudJobSubmission $sshJobSubmission)
  {
    $this->send_updateCloudJobSubmissionDetails($authzToken, $jobSubmissionInterfaceId, $sshJobSubmission);
    return $this->recv_updateCloudJobSubmissionDetails();
  }

  public function send_updateCloudJobSubmissionDetails(\Airavata\Model\Security\AuthzToken $authzToken, $jobSubmissionInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\CloudJobSubmission $sshJobSubmission)
  {
    $args = new \Airavata\API\Airavata_updateCloudJobSubmissionDetails_args();
    $args->authzToken = $authzToken;
    $args->jobSubmissionInterfaceId = $jobSubmissionInterfaceId;
    $args->sshJobSubmission = $sshJobSubmission;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'updateCloudJobSubmissionDetails', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('updateCloudJobSubmissionDetails', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_updateCloudJobSubmissionDetails()
  {
    $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_updateCloudJobSubmissionDetails_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_updateCloudJobSubmissionDetails_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("updateCloudJobSubmissionDetails failed: unknown result");
  }

  public function updateUnicoreJobSubmissionDetails(\Airavata\Model\Security\AuthzToken $authzToken, $jobSubmissionInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\UnicoreJobSubmission $unicoreJobSubmission)
  {
    $this->send_updateUnicoreJobSubmissionDetails($authzToken, $jobSubmissionInterfaceId, $unicoreJobSubmission);
    return $this->recv_updateUnicoreJobSubmissionDetails();
  }

  public function send_updateUnicoreJobSubmissionDetails(\Airavata\Model\Security\AuthzToken $authzToken, $jobSubmissionInterfaceId, \Airavata\Model\AppCatalog\ComputeResource\UnicoreJobSubmission $unicoreJobSubmission)
  {
    $args = new \Airavata\API\Airavata_updateUnicoreJobSubmissionDetails_args();
    $args->authzToken = $authzToken;
    $args->jobSubmissionInterfaceId = $jobSubmissionInterfaceId;
    $args->unicoreJobSubmission = $unicoreJobSubmission;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'updateUnicoreJobSubmissionDetails', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('updateUnicoreJobSubmissionDetails', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_updateUnicoreJobSubmissionDetails()
  {
    $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_updateUnicoreJobSubmissionDetails_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_updateUnicoreJobSubmissionDetails_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("updateUnicoreJobSubmissionDetails failed: unknown result");
  }

  public function addLocalDataMovementDetails(\Airavata\Model\Security\AuthzToken $authzToken, $productUri, $dataMoveType, $priorityOrder, \Airavata\Model\Data\Movement\LOCALDataMovement $localDataMovement)
  {
    $this->send_addLocalDataMovementDetails($authzToken, $productUri, $dataMoveType, $priorityOrder, $localDataMovement);
    return $this->recv_addLocalDataMovementDetails();
  }

  public function send_addLocalDataMovementDetails(\Airavata\Model\Security\AuthzToken $authzToken, $productUri, $dataMoveType, $priorityOrder, \Airavata\Model\Data\Movement\LOCALDataMovement $localDataMovement)
  {
    $args = new \Airavata\API\Airavata_addLocalDataMovementDetails_args();
    $args->authzToken = $authzToken;
    $args->productUri = $productUri;
    $args->dataMoveType = $dataMoveType;
    $args->priorityOrder = $priorityOrder;
    $args->localDataMovement = $localDataMovement;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'addLocalDataMovementDetails', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('addLocalDataMovementDetails', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_addLocalDataMovementDetails()
  {
    $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_addLocalDataMovementDetails_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_addLocalDataMovementDetails_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("addLocalDataMovementDetails failed: unknown result");
  }

  public function updateLocalDataMovementDetails(\Airavata\Model\Security\AuthzToken $authzToken, $dataMovementInterfaceId, \Airavata\Model\Data\Movement\LOCALDataMovement $localDataMovement)
  {
    $this->send_updateLocalDataMovementDetails($authzToken, $dataMovementInterfaceId, $localDataMovement);
    return $this->recv_updateLocalDataMovementDetails();
  }

  public function send_updateLocalDataMovementDetails(\Airavata\Model\Security\AuthzToken $authzToken, $dataMovementInterfaceId, \Airavata\Model\Data\Movement\LOCALDataMovement $localDataMovement)
  {
    $args = new \Airavata\API\Airavata_updateLocalDataMovementDetails_args();
    $args->authzToken = $authzToken;
    $args->dataMovementInterfaceId = $dataMovementInterfaceId;
    $args->localDataMovement = $localDataMovement;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'updateLocalDataMovementDetails', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('updateLocalDataMovementDetails', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_updateLocalDataMovementDetails()
  {
    $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_updateLocalDataMovementDetails_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_updateLocalDataMovementDetails_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("updateLocalDataMovementDetails failed: unknown result");
  }

  public function getLocalDataMovement(\Airavata\Model\Security\AuthzToken $authzToken, $dataMovementId)
  {
    $this->send_getLocalDataMovement($authzToken, $dataMovementId);
    return $this->recv_getLocalDataMovement();
  }

  public function send_getLocalDataMovement(\Airavata\Model\Security\AuthzToken $authzToken, $dataMovementId)
  {
    $args = new \Airavata\API\Airavata_getLocalDataMovement_args();
    $args->authzToken = $authzToken;
    $args->dataMovementId = $dataMovementId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getLocalDataMovement', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getLocalDataMovement', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getLocalDataMovement()
  {
    $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_getLocalDataMovement_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_getLocalDataMovement_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("getLocalDataMovement failed: unknown result");
  }

  public function addSCPDataMovementDetails(\Airavata\Model\Security\AuthzToken $authzToken, $productUri, $dataMoveType, $priorityOrder, \Airavata\Model\Data\Movement\SCPDataMovement $scpDataMovement)
  {
    $this->send_addSCPDataMovementDetails($authzToken, $productUri, $dataMoveType, $priorityOrder, $scpDataMovement);
    return $this->recv_addSCPDataMovementDetails();
  }

  public function send_addSCPDataMovementDetails(\Airavata\Model\Security\AuthzToken $authzToken, $productUri, $dataMoveType, $priorityOrder, \Airavata\Model\Data\Movement\SCPDataMovement $scpDataMovement)
  {
    $args = new \Airavata\API\Airavata_addSCPDataMovementDetails_args();
    $args->authzToken = $authzToken;
    $args->productUri = $productUri;
    $args->dataMoveType = $dataMoveType;
    $args->priorityOrder = $priorityOrder;
    $args->scpDataMovement = $scpDataMovement;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'addSCPDataMovementDetails', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('addSCPDataMovementDetails', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_addSCPDataMovementDetails()
  {
    $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_addSCPDataMovementDetails_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_addSCPDataMovementDetails_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("addSCPDataMovementDetails failed: unknown result");
  }

  public function updateSCPDataMovementDetails(\Airavata\Model\Security\AuthzToken $authzToken, $dataMovementInterfaceId, \Airavata\Model\Data\Movement\SCPDataMovement $scpDataMovement)
  {
    $this->send_updateSCPDataMovementDetails($authzToken, $dataMovementInterfaceId, $scpDataMovement);
    return $this->recv_updateSCPDataMovementDetails();
  }

  public function send_updateSCPDataMovementDetails(\Airavata\Model\Security\AuthzToken $authzToken, $dataMovementInterfaceId, \Airavata\Model\Data\Movement\SCPDataMovement $scpDataMovement)
  {
    $args = new \Airavata\API\Airavata_updateSCPDataMovementDetails_args();
    $args->authzToken = $authzToken;
    $args->dataMovementInterfaceId = $dataMovementInterfaceId;
    $args->scpDataMovement = $scpDataMovement;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'updateSCPDataMovementDetails', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('updateSCPDataMovementDetails', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_updateSCPDataMovementDetails()
  {
    $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_updateSCPDataMovementDetails_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_updateSCPDataMovementDetails_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("updateSCPDataMovementDetails failed: unknown result");
  }

  public function getSCPDataMovement(\Airavata\Model\Security\AuthzToken $authzToken, $dataMovementId)
  {
    $this->send_getSCPDataMovement($authzToken, $dataMovementId);
    return $this->recv_getSCPDataMovement();
  }

  public function send_getSCPDataMovement(\Airavata\Model\Security\AuthzToken $authzToken, $dataMovementId)
  {
    $args = new \Airavata\API\Airavata_getSCPDataMovement_args();
    $args->authzToken = $authzToken;
    $args->dataMovementId = $dataMovementId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getSCPDataMovement', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getSCPDataMovement', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getSCPDataMovement()
  {
    $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_getSCPDataMovement_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_getSCPDataMovement_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("getSCPDataMovement failed: unknown result");
  }

  public function addUnicoreDataMovementDetails(\Airavata\Model\Security\AuthzToken $authzToken, $productUri, $dataMoveType, $priorityOrder, \Airavata\Model\Data\Movement\UnicoreDataMovement $unicoreDataMovement)
  {
    $this->send_addUnicoreDataMovementDetails($authzToken, $productUri, $dataMoveType, $priorityOrder, $unicoreDataMovement);
    return $this->recv_addUnicoreDataMovementDetails();
  }

  public function send_addUnicoreDataMovementDetails(\Airavata\Model\Security\AuthzToken $authzToken, $productUri, $dataMoveType, $priorityOrder, \Airavata\Model\Data\Movement\UnicoreDataMovement $unicoreDataMovement)
  {
    $args = new \Airavata\API\Airavata_addUnicoreDataMovementDetails_args();
    $args->authzToken = $authzToken;
    $args->productUri = $productUri;
    $args->dataMoveType = $dataMoveType;
    $args->priorityOrder = $priorityOrder;
    $args->unicoreDataMovement = $unicoreDataMovement;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'addUnicoreDataMovementDetails', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('addUnicoreDataMovementDetails', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_addUnicoreDataMovementDetails()
  {
    $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_addUnicoreDataMovementDetails_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_addUnicoreDataMovementDetails_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("addUnicoreDataMovementDetails failed: unknown result");
  }

  public function updateUnicoreDataMovementDetails(\Airavata\Model\Security\AuthzToken $authzToken, $dataMovementInterfaceId, \Airavata\Model\Data\Movement\UnicoreDataMovement $unicoreDataMovement)
  {
    $this->send_updateUnicoreDataMovementDetails($authzToken, $dataMovementInterfaceId, $unicoreDataMovement);
    return $this->recv_updateUnicoreDataMovementDetails();
  }

  public function send_updateUnicoreDataMovementDetails(\Airavata\Model\Security\AuthzToken $authzToken, $dataMovementInterfaceId, \Airavata\Model\Data\Movement\UnicoreDataMovement $unicoreDataMovement)
  {
    $args = new \Airavata\API\Airavata_updateUnicoreDataMovementDetails_args();
    $args->authzToken = $authzToken;
    $args->dataMovementInterfaceId = $dataMovementInterfaceId;
    $args->unicoreDataMovement = $unicoreDataMovement;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'updateUnicoreDataMovementDetails', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('updateUnicoreDataMovementDetails', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_updateUnicoreDataMovementDetails()
  {
    $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_updateUnicoreDataMovementDetails_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_updateUnicoreDataMovementDetails_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("updateUnicoreDataMovementDetails failed: unknown result");
  }

  public function getUnicoreDataMovement(\Airavata\Model\Security\AuthzToken $authzToken, $dataMovementId)
  {
    $this->send_getUnicoreDataMovement($authzToken, $dataMovementId);
    return $this->recv_getUnicoreDataMovement();
  }

  public function send_getUnicoreDataMovement(\Airavata\Model\Security\AuthzToken $authzToken, $dataMovementId)
  {
    $args = new \Airavata\API\Airavata_getUnicoreDataMovement_args();
    $args->authzToken = $authzToken;
    $args->dataMovementId = $dataMovementId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getUnicoreDataMovement', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getUnicoreDataMovement', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getUnicoreDataMovement()
  {
    $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_getUnicoreDataMovement_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_getUnicoreDataMovement_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("getUnicoreDataMovement failed: unknown result");
  }

  public function addGridFTPDataMovementDetails(\Airavata\Model\Security\AuthzToken $authzToken, $productUri, $dataMoveType, $priorityOrder, \Airavata\Model\Data\Movement\GridFTPDataMovement $gridFTPDataMovement)
  {
    $this->send_addGridFTPDataMovementDetails($authzToken, $productUri, $dataMoveType, $priorityOrder, $gridFTPDataMovement);
    return $this->recv_addGridFTPDataMovementDetails();
  }

  public function send_addGridFTPDataMovementDetails(\Airavata\Model\Security\AuthzToken $authzToken, $productUri, $dataMoveType, $priorityOrder, \Airavata\Model\Data\Movement\GridFTPDataMovement $gridFTPDataMovement)
  {
    $args = new \Airavata\API\Airavata_addGridFTPDataMovementDetails_args();
    $args->authzToken = $authzToken;
    $args->productUri = $productUri;
    $args->dataMoveType = $dataMoveType;
    $args->priorityOrder = $priorityOrder;
    $args->gridFTPDataMovement = $gridFTPDataMovement;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'addGridFTPDataMovementDetails', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('addGridFTPDataMovementDetails', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_addGridFTPDataMovementDetails()
  {
    $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_addGridFTPDataMovementDetails_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_addGridFTPDataMovementDetails_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("addGridFTPDataMovementDetails failed: unknown result");
  }

  public function updateGridFTPDataMovementDetails(\Airavata\Model\Security\AuthzToken $authzToken, $dataMovementInterfaceId, \Airavata\Model\Data\Movement\GridFTPDataMovement $gridFTPDataMovement)
  {
    $this->send_updateGridFTPDataMovementDetails($authzToken, $dataMovementInterfaceId, $gridFTPDataMovement);
    return $this->recv_updateGridFTPDataMovementDetails();
  }

  public function send_updateGridFTPDataMovementDetails(\Airavata\Model\Security\AuthzToken $authzToken, $dataMovementInterfaceId, \Airavata\Model\Data\Movement\GridFTPDataMovement $gridFTPDataMovement)
  {
    $args = new \Airavata\API\Airavata_updateGridFTPDataMovementDetails_args();
    $args->authzToken = $authzToken;
    $args->dataMovementInterfaceId = $dataMovementInterfaceId;
    $args->gridFTPDataMovement = $gridFTPDataMovement;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'updateGridFTPDataMovementDetails', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('updateGridFTPDataMovementDetails', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_updateGridFTPDataMovementDetails()
  {
    $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_updateGridFTPDataMovementDetails_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_updateGridFTPDataMovementDetails_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("updateGridFTPDataMovementDetails failed: unknown result");
  }

  public function getGridFTPDataMovement(\Airavata\Model\Security\AuthzToken $authzToken, $dataMovementId)
  {
    $this->send_getGridFTPDataMovement($authzToken, $dataMovementId);
    return $this->recv_getGridFTPDataMovement();
  }

  public function send_getGridFTPDataMovement(\Airavata\Model\Security\AuthzToken $authzToken, $dataMovementId)
  {
    $args = new \Airavata\API\Airavata_getGridFTPDataMovement_args();
    $args->authzToken = $authzToken;
    $args->dataMovementId = $dataMovementId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getGridFTPDataMovement', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getGridFTPDataMovement', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getGridFTPDataMovement()
  {
    $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_getGridFTPDataMovement_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_getGridFTPDataMovement_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("getGridFTPDataMovement failed: unknown result");
  }

  public function changeJobSubmissionPriority(\Airavata\Model\Security\AuthzToken $authzToken, $jobSubmissionInterfaceId, $newPriorityOrder)
  {
    $this->send_changeJobSubmissionPriority($authzToken, $jobSubmissionInterfaceId, $newPriorityOrder);
    return $this->recv_changeJobSubmissionPriority();
  }

  public function send_changeJobSubmissionPriority(\Airavata\Model\Security\AuthzToken $authzToken, $jobSubmissionInterfaceId, $newPriorityOrder)
  {
    $args = new \Airavata\API\Airavata_changeJobSubmissionPriority_args();
    $args->authzToken = $authzToken;
    $args->jobSubmissionInterfaceId = $jobSubmissionInterfaceId;
    $args->newPriorityOrder = $newPriorityOrder;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'changeJobSubmissionPriority', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('changeJobSubmissionPriority', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_changeJobSubmissionPriority()
  {
    $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_changeJobSubmissionPriority_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_changeJobSubmissionPriority_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("changeJobSubmissionPriority failed: unknown result");
  }

  public function changeDataMovementPriority(\Airavata\Model\Security\AuthzToken $authzToken, $dataMovementInterfaceId, $newPriorityOrder)
  {
    $this->send_changeDataMovementPriority($authzToken, $dataMovementInterfaceId, $newPriorityOrder);
    return $this->recv_changeDataMovementPriority();
  }

  public function send_changeDataMovementPriority(\Airavata\Model\Security\AuthzToken $authzToken, $dataMovementInterfaceId, $newPriorityOrder)
  {
    $args = new \Airavata\API\Airavata_changeDataMovementPriority_args();
    $args->authzToken = $authzToken;
    $args->dataMovementInterfaceId = $dataMovementInterfaceId;
    $args->newPriorityOrder = $newPriorityOrder;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'changeDataMovementPriority', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('changeDataMovementPriority', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_changeDataMovementPriority()
  {
    $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_changeDataMovementPriority_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_changeDataMovementPriority_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("changeDataMovementPriority failed: unknown result");
  }

  public function changeJobSubmissionPriorities(\Airavata\Model\Security\AuthzToken $authzToken, array $jobSubmissionPriorityMap)
  {
    $this->send_changeJobSubmissionPriorities($authzToken, $jobSubmissionPriorityMap);
    return $this->recv_changeJobSubmissionPriorities();
  }

  public function send_changeJobSubmissionPriorities(\Airavata\Model\Security\AuthzToken $authzToken, array $jobSubmissionPriorityMap)
  {
    $args = new \Airavata\API\Airavata_changeJobSubmissionPriorities_args();
    $args->authzToken = $authzToken;
    $args->jobSubmissionPriorityMap = $jobSubmissionPriorityMap;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'changeJobSubmissionPriorities', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('changeJobSubmissionPriorities', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_changeJobSubmissionPriorities()
  {
    $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_changeJobSubmissionPriorities_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_changeJobSubmissionPriorities_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("changeJobSubmissionPriorities failed: unknown result");
  }

  public function changeDataMovementPriorities(\Airavata\Model\Security\AuthzToken $authzToken, array $dataMovementPriorityMap)
  {
    $this->send_changeDataMovementPriorities($authzToken, $dataMovementPriorityMap);
    return $this->recv_changeDataMovementPriorities();
  }

  public function send_changeDataMovementPriorities(\Airavata\Model\Security\AuthzToken $authzToken, array $dataMovementPriorityMap)
  {
    $args = new \Airavata\API\Airavata_changeDataMovementPriorities_args();
    $args->authzToken = $authzToken;
    $args->dataMovementPriorityMap = $dataMovementPriorityMap;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'changeDataMovementPriorities', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('changeDataMovementPriorities', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_changeDataMovementPriorities()
  {
    $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_changeDataMovementPriorities_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_changeDataMovementPriorities_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("changeDataMovementPriorities failed: unknown result");
  }

  public function deleteJobSubmissionInterface(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $jobSubmissionInterfaceId)
  {
    $this->send_deleteJobSubmissionInterface($authzToken, $computeResourceId, $jobSubmissionInterfaceId);
    return $this->recv_deleteJobSubmissionInterface();
  }

  public function send_deleteJobSubmissionInterface(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $jobSubmissionInterfaceId)
  {
    $args = new \Airavata\API\Airavata_deleteJobSubmissionInterface_args();
    $args->authzToken = $authzToken;
    $args->computeResourceId = $computeResourceId;
    $args->jobSubmissionInterfaceId = $jobSubmissionInterfaceId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'deleteJobSubmissionInterface', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('deleteJobSubmissionInterface', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_deleteJobSubmissionInterface()
  {
    $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_deleteJobSubmissionInterface_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_deleteJobSubmissionInterface_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("deleteJobSubmissionInterface failed: unknown result");
  }

  public function deleteDataMovementInterface(\Airavata\Model\Security\AuthzToken $authzToken, $productUri, $dataMovementInterfaceId, $dataMoveType)
  {
    $this->send_deleteDataMovementInterface($authzToken, $productUri, $dataMovementInterfaceId, $dataMoveType);
    return $this->recv_deleteDataMovementInterface();
  }

  public function send_deleteDataMovementInterface(\Airavata\Model\Security\AuthzToken $authzToken, $productUri, $dataMovementInterfaceId, $dataMoveType)
  {
    $args = new \Airavata\API\Airavata_deleteDataMovementInterface_args();
    $args->authzToken = $authzToken;
    $args->productUri = $productUri;
    $args->dataMovementInterfaceId = $dataMovementInterfaceId;
    $args->dataMoveType = $dataMoveType;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'deleteDataMovementInterface', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('deleteDataMovementInterface', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_deleteDataMovementInterface()
  {
    $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_deleteDataMovementInterface_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_deleteDataMovementInterface_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("deleteDataMovementInterface failed: unknown result");
  }

  public function registerResourceJobManager(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager $resourceJobManager)
  {
    $this->send_registerResourceJobManager($authzToken, $resourceJobManager);
    return $this->recv_registerResourceJobManager();
  }

  public function send_registerResourceJobManager(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager $resourceJobManager)
  {
    $args = new \Airavata\API\Airavata_registerResourceJobManager_args();
    $args->authzToken = $authzToken;
    $args->resourceJobManager = $resourceJobManager;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'registerResourceJobManager', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('registerResourceJobManager', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_registerResourceJobManager()
  {
    $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_registerResourceJobManager_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_registerResourceJobManager_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("registerResourceJobManager failed: unknown result");
  }

  public function updateResourceJobManager(\Airavata\Model\Security\AuthzToken $authzToken, $resourceJobManagerId, \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager $updatedResourceJobManager)
  {
    $this->send_updateResourceJobManager($authzToken, $resourceJobManagerId, $updatedResourceJobManager);
    return $this->recv_updateResourceJobManager();
  }

  public function send_updateResourceJobManager(\Airavata\Model\Security\AuthzToken $authzToken, $resourceJobManagerId, \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager $updatedResourceJobManager)
  {
    $args = new \Airavata\API\Airavata_updateResourceJobManager_args();
    $args->authzToken = $authzToken;
    $args->resourceJobManagerId = $resourceJobManagerId;
    $args->updatedResourceJobManager = $updatedResourceJobManager;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'updateResourceJobManager', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('updateResourceJobManager', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_updateResourceJobManager()
  {
    $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_updateResourceJobManager_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_updateResourceJobManager_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("updateResourceJobManager failed: unknown result");
  }

  public function getResourceJobManager(\Airavata\Model\Security\AuthzToken $authzToken, $resourceJobManagerId)
  {
    $this->send_getResourceJobManager($authzToken, $resourceJobManagerId);
    return $this->recv_getResourceJobManager();
  }

  public function send_getResourceJobManager(\Airavata\Model\Security\AuthzToken $authzToken, $resourceJobManagerId)
  {
    $args = new \Airavata\API\Airavata_getResourceJobManager_args();
    $args->authzToken = $authzToken;
    $args->resourceJobManagerId = $resourceJobManagerId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getResourceJobManager', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getResourceJobManager', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getResourceJobManager()
  {
    $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_getResourceJobManager_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_getResourceJobManager_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("getResourceJobManager failed: unknown result");
  }

  public function deleteResourceJobManager(\Airavata\Model\Security\AuthzToken $authzToken, $resourceJobManagerId)
  {
    $this->send_deleteResourceJobManager($authzToken, $resourceJobManagerId);
    return $this->recv_deleteResourceJobManager();
  }

  public function send_deleteResourceJobManager(\Airavata\Model\Security\AuthzToken $authzToken, $resourceJobManagerId)
  {
    $args = new \Airavata\API\Airavata_deleteResourceJobManager_args();
    $args->authzToken = $authzToken;
    $args->resourceJobManagerId = $resourceJobManagerId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'deleteResourceJobManager', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('deleteResourceJobManager', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_deleteResourceJobManager()
  {
    $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_deleteResourceJobManager_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_deleteResourceJobManager_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("deleteResourceJobManager failed: unknown result");
  }

  public function deleteBatchQueue(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $queueName)
  {
    $this->send_deleteBatchQueue($authzToken, $computeResourceId, $queueName);
    return $this->recv_deleteBatchQueue();
  }

  public function send_deleteBatchQueue(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $queueName)
  {
    $args = new \Airavata\API\Airavata_deleteBatchQueue_args();
    $args->authzToken = $authzToken;
    $args->computeResourceId = $computeResourceId;
    $args->queueName = $queueName;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'deleteBatchQueue', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('deleteBatchQueue', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_deleteBatchQueue()
  {
    $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_deleteBatchQueue_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_deleteBatchQueue_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("deleteBatchQueue failed: unknown result");
  }

  public function registerGatewayResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile $gatewayResourceProfile)
  {
    $this->send_registerGatewayResourceProfile($authzToken, $gatewayResourceProfile);
    return $this->recv_registerGatewayResourceProfile();
  }

  public function send_registerGatewayResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile $gatewayResourceProfile)
  {
    $args = new \Airavata\API\Airavata_registerGatewayResourceProfile_args();
    $args->authzToken = $authzToken;
    $args->gatewayResourceProfile = $gatewayResourceProfile;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'registerGatewayResourceProfile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('registerGatewayResourceProfile', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_registerGatewayResourceProfile()
  {
    $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_registerGatewayResourceProfile_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_registerGatewayResourceProfile_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("registerGatewayResourceProfile failed: unknown result");
  }

  public function getGatewayResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID)
  {
    $this->send_getGatewayResourceProfile($authzToken, $gatewayID);
    return $this->recv_getGatewayResourceProfile();
  }

  public function send_getGatewayResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID)
  {
    $args = new \Airavata\API\Airavata_getGatewayResourceProfile_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_, 'getGatewayResourceProfile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getGatewayResourceProfile', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getGatewayResourceProfile()
  {
    $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_getGatewayResourceProfile_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_getGatewayResourceProfile_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("getGatewayResourceProfile failed: unknown result");
  }

  public function updateGatewayResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, \Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile $gatewayResourceProfile)
  {
    $this->send_updateGatewayResourceProfile($authzToken, $gatewayID, $gatewayResourceProfile);
    return $this->recv_updateGatewayResourceProfile();
  }

  public function send_updateGatewayResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, \Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile $gatewayResourceProfile)
  {
    $args = new \Airavata\API\Airavata_updateGatewayResourceProfile_args();
    $args->authzToken = $authzToken;
    $args->gatewayID = $gatewayID;
    $args->gatewayResourceProfile = $gatewayResourceProfile;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'updateGatewayResourceProfile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('updateGatewayResourceProfile', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_updateGatewayResourceProfile()
  {
    $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_updateGatewayResourceProfile_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_updateGatewayResourceProfile_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("updateGatewayResourceProfile failed: unknown result");
  }

  public function deleteGatewayResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID)
  {
    $this->send_deleteGatewayResourceProfile($authzToken, $gatewayID);
    return $this->recv_deleteGatewayResourceProfile();
  }

  public function send_deleteGatewayResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID)
  {
    $args = new \Airavata\API\Airavata_deleteGatewayResourceProfile_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_, 'deleteGatewayResourceProfile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('deleteGatewayResourceProfile', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_deleteGatewayResourceProfile()
  {
    $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_deleteGatewayResourceProfile_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_deleteGatewayResourceProfile_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("deleteGatewayResourceProfile failed: unknown result");
  }

  public function addGatewayComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $computeResourceId, \Airavata\Model\AppCatalog\GatewayProfile\ComputeResourcePreference $computeResourcePreference)
  {
    $this->send_addGatewayComputeResourcePreference($authzToken, $gatewayID, $computeResourceId, $computeResourcePreference);
    return $this->recv_addGatewayComputeResourcePreference();
  }

  public function send_addGatewayComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $computeResourceId, \Airavata\Model\AppCatalog\GatewayProfile\ComputeResourcePreference $computeResourcePreference)
  {
    $args = new \Airavata\API\Airavata_addGatewayComputeResourcePreference_args();
    $args->authzToken = $authzToken;
    $args->gatewayID = $gatewayID;
    $args->computeResourceId = $computeResourceId;
    $args->computeResourcePreference = $computeResourcePreference;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'addGatewayComputeResourcePreference', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('addGatewayComputeResourcePreference', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_addGatewayComputeResourcePreference()
  {
    $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_addGatewayComputeResourcePreference_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_addGatewayComputeResourcePreference_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("addGatewayComputeResourcePreference failed: unknown result");
  }

  public function addGatewayStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $storageResourceId, \Airavata\Model\AppCatalog\GatewayProfile\StoragePreference $storagePreference)
  {
    $this->send_addGatewayStoragePreference($authzToken, $gatewayID, $storageResourceId, $storagePreference);
    return $this->recv_addGatewayStoragePreference();
  }

  public function send_addGatewayStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $storageResourceId, \Airavata\Model\AppCatalog\GatewayProfile\StoragePreference $storagePreference)
  {
    $args = new \Airavata\API\Airavata_addGatewayStoragePreference_args();
    $args->authzToken = $authzToken;
    $args->gatewayID = $gatewayID;
    $args->storageResourceId = $storageResourceId;
    $args->storagePreference = $storagePreference;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'addGatewayStoragePreference', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('addGatewayStoragePreference', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_addGatewayStoragePreference()
  {
    $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_addGatewayStoragePreference_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_addGatewayStoragePreference_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("addGatewayStoragePreference failed: unknown result");
  }

  public function getGatewayComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $computeResourceId)
  {
    $this->send_getGatewayComputeResourcePreference($authzToken, $gatewayID, $computeResourceId);
    return $this->recv_getGatewayComputeResourcePreference();
  }

  public function send_getGatewayComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $computeResourceId)
  {
    $args = new \Airavata\API\Airavata_getGatewayComputeResourcePreference_args();
    $args->authzToken = $authzToken;
    $args->gatewayID = $gatewayID;
    $args->computeResourceId = $computeResourceId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getGatewayComputeResourcePreference', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getGatewayComputeResourcePreference', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getGatewayComputeResourcePreference()
  {
    $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_getGatewayComputeResourcePreference_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_getGatewayComputeResourcePreference_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("getGatewayComputeResourcePreference failed: unknown result");
  }

  public function getGatewayStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $storageResourceId)
  {
    $this->send_getGatewayStoragePreference($authzToken, $gatewayID, $storageResourceId);
    return $this->recv_getGatewayStoragePreference();
  }

  public function send_getGatewayStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $storageResourceId)
  {
    $args = new \Airavata\API\Airavata_getGatewayStoragePreference_args();
    $args->authzToken = $authzToken;
    $args->gatewayID = $gatewayID;
    $args->storageResourceId = $storageResourceId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getGatewayStoragePreference', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getGatewayStoragePreference', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getGatewayStoragePreference()
  {
    $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_getGatewayStoragePreference_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_getGatewayStoragePreference_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("getGatewayStoragePreference failed: unknown result");
  }

  public function getAllGatewayComputeResourcePreferences(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID)
  {
    $this->send_getAllGatewayComputeResourcePreferences($authzToken, $gatewayID);
    return $this->recv_getAllGatewayComputeResourcePreferences();
  }

  public function send_getAllGatewayComputeResourcePreferences(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID)
  {
    $args = new \Airavata\API\Airavata_getAllGatewayComputeResourcePreferences_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_, 'getAllGatewayComputeResourcePreferences', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getAllGatewayComputeResourcePreferences', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getAllGatewayComputeResourcePreferences()
  {
    $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_getAllGatewayComputeResourcePreferences_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_getAllGatewayComputeResourcePreferences_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("getAllGatewayComputeResourcePreferences failed: unknown result");
  }

  public function getAllGatewayStoragePreferences(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID)
  {
    $this->send_getAllGatewayStoragePreferences($authzToken, $gatewayID);
    return $this->recv_getAllGatewayStoragePreferences();
  }

  public function send_getAllGatewayStoragePreferences(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID)
  {
    $args = new \Airavata\API\Airavata_getAllGatewayStoragePreferences_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_, 'getAllGatewayStoragePreferences', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getAllGatewayStoragePreferences', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getAllGatewayStoragePreferences()
  {
    $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_getAllGatewayStoragePreferences_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_getAllGatewayStoragePreferences_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("getAllGatewayStoragePreferences failed: unknown result");
  }

  public function getAllGatewayResourceProfiles(\Airavata\Model\Security\AuthzToken $authzToken)
  {
    $this->send_getAllGatewayResourceProfiles($authzToken);
    return $this->recv_getAllGatewayResourceProfiles();
  }

  public function send_getAllGatewayResourceProfiles(\Airavata\Model\Security\AuthzToken $authzToken)
  {
    $args = new \Airavata\API\Airavata_getAllGatewayResourceProfiles_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_, 'getAllGatewayResourceProfiles', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getAllGatewayResourceProfiles', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getAllGatewayResourceProfiles()
  {
    $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_getAllGatewayResourceProfiles_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_getAllGatewayResourceProfiles_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("getAllGatewayResourceProfiles failed: unknown result");
  }

  public function updateGatewayComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $computeResourceId, \Airavata\Model\AppCatalog\GatewayProfile\ComputeResourcePreference $computeResourcePreference)
  {
    $this->send_updateGatewayComputeResourcePreference($authzToken, $gatewayID, $computeResourceId, $computeResourcePreference);
    return $this->recv_updateGatewayComputeResourcePreference();
  }

  public function send_updateGatewayComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $computeResourceId, \Airavata\Model\AppCatalog\GatewayProfile\ComputeResourcePreference $computeResourcePreference)
  {
    $args = new \Airavata\API\Airavata_updateGatewayComputeResourcePreference_args();
    $args->authzToken = $authzToken;
    $args->gatewayID = $gatewayID;
    $args->computeResourceId = $computeResourceId;
    $args->computeResourcePreference = $computeResourcePreference;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'updateGatewayComputeResourcePreference', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('updateGatewayComputeResourcePreference', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_updateGatewayComputeResourcePreference()
  {
    $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_updateGatewayComputeResourcePreference_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_updateGatewayComputeResourcePreference_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("updateGatewayComputeResourcePreference failed: unknown result");
  }

  public function updateGatewayStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $storageId, \Airavata\Model\AppCatalog\GatewayProfile\StoragePreference $storagePreference)
  {
    $this->send_updateGatewayStoragePreference($authzToken, $gatewayID, $storageId, $storagePreference);
    return $this->recv_updateGatewayStoragePreference();
  }

  public function send_updateGatewayStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $storageId, \Airavata\Model\AppCatalog\GatewayProfile\StoragePreference $storagePreference)
  {
    $args = new \Airavata\API\Airavata_updateGatewayStoragePreference_args();
    $args->authzToken = $authzToken;
    $args->gatewayID = $gatewayID;
    $args->storageId = $storageId;
    $args->storagePreference = $storagePreference;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'updateGatewayStoragePreference', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('updateGatewayStoragePreference', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_updateGatewayStoragePreference()
  {
    $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_updateGatewayStoragePreference_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_updateGatewayStoragePreference_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("updateGatewayStoragePreference failed: unknown result");
  }

  public function deleteGatewayComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $computeResourceId)
  {
    $this->send_deleteGatewayComputeResourcePreference($authzToken, $gatewayID, $computeResourceId);
    return $this->recv_deleteGatewayComputeResourcePreference();
  }

  public function send_deleteGatewayComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $computeResourceId)
  {
    $args = new \Airavata\API\Airavata_deleteGatewayComputeResourcePreference_args();
    $args->authzToken = $authzToken;
    $args->gatewayID = $gatewayID;
    $args->computeResourceId = $computeResourceId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'deleteGatewayComputeResourcePreference', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('deleteGatewayComputeResourcePreference', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_deleteGatewayComputeResourcePreference()
  {
    $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_deleteGatewayComputeResourcePreference_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_deleteGatewayComputeResourcePreference_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("deleteGatewayComputeResourcePreference failed: unknown result");
  }

  public function deleteGatewayStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $storageId)
  {
    $this->send_deleteGatewayStoragePreference($authzToken, $gatewayID, $storageId);
    return $this->recv_deleteGatewayStoragePreference();
  }

  public function send_deleteGatewayStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $storageId)
  {
    $args = new \Airavata\API\Airavata_deleteGatewayStoragePreference_args();
    $args->authzToken = $authzToken;
    $args->gatewayID = $gatewayID;
    $args->storageId = $storageId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'deleteGatewayStoragePreference', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('deleteGatewayStoragePreference', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_deleteGatewayStoragePreference()
  {
    $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_deleteGatewayStoragePreference_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_deleteGatewayStoragePreference_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("deleteGatewayStoragePreference failed: unknown result");
  }

  public function getSSHAccountProvisioners(\Airavata\Model\Security\AuthzToken $authzToken)
  {
    $this->send_getSSHAccountProvisioners($authzToken);
    return $this->recv_getSSHAccountProvisioners();
  }

  public function send_getSSHAccountProvisioners(\Airavata\Model\Security\AuthzToken $authzToken)
  {
    $args = new \Airavata\API\Airavata_getSSHAccountProvisioners_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_, 'getSSHAccountProvisioners', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getSSHAccountProvisioners', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getSSHAccountProvisioners()
  {
    $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_getSSHAccountProvisioners_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_getSSHAccountProvisioners_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("getSSHAccountProvisioners failed: unknown result");
  }

  public function doesUserHaveSSHAccount(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $userId)
  {
    $this->send_doesUserHaveSSHAccount($authzToken, $computeResourceId, $userId);
    return $this->recv_doesUserHaveSSHAccount();
  }

  public function send_doesUserHaveSSHAccount(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $userId)
  {
    $args = new \Airavata\API\Airavata_doesUserHaveSSHAccount_args();
    $args->authzToken = $authzToken;
    $args->computeResourceId = $computeResourceId;
    $args->userId = $userId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'doesUserHaveSSHAccount', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('doesUserHaveSSHAccount', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_doesUserHaveSSHAccount()
  {
    $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_doesUserHaveSSHAccount_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_doesUserHaveSSHAccount_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("doesUserHaveSSHAccount failed: unknown result");
  }

  public function isSSHSetupCompleteForUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $airavataCredStoreToken)
  {
    $this->send_isSSHSetupCompleteForUserComputeResourcePreference($authzToken, $computeResourceId, $airavataCredStoreToken);
    return $this->recv_isSSHSetupCompleteForUserComputeResourcePreference();
  }

  public function send_isSSHSetupCompleteForUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $airavataCredStoreToken)
  {
    $args = new \Airavata\API\Airavata_isSSHSetupCompleteForUserComputeResourcePreference_args();
    $args->authzToken = $authzToken;
    $args->computeResourceId = $computeResourceId;
    $args->airavataCredStoreToken = $airavataCredStoreToken;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'isSSHSetupCompleteForUserComputeResourcePreference', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('isSSHSetupCompleteForUserComputeResourcePreference', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_isSSHSetupCompleteForUserComputeResourcePreference()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_isSSHSetupCompleteForUserComputeResourcePreference_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \Airavata\API\Airavata_isSSHSetupCompleteForUserComputeResourcePreference_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ire !== null) {
      throw $result->ire;
    }
    if ($result->ace !== null) {
      throw $result->ace;
    }
    if ($result->ase !== null) {
      throw $result->ase;
    }
    if ($result->ae !== null) {
      throw $result->ae;
    }
    throw new \Exception("isSSHSetupCompleteForUserComputeResourcePreference failed: unknown result");
  }

  public function setupUserComputeResourcePreferencesForSSH(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $userId, $airavataCredStoreToken)
  {
    $this->send_setupUserComputeResourcePreferencesForSSH($authzToken, $computeResourceId, $userId, $airavataCredStoreToken);
    return $this->recv_setupUserComputeResourcePreferencesForSSH();
  }

  public function send_setupUserComputeResourcePreferencesForSSH(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $userId, $airavataCredStoreToken)
  {
    $args = new \Airavata\API\Airavata_setupUserComputeResourcePreferencesForSSH_args();
    $args->authzToken = $authzToken;
    $args->computeResourceId = $computeResourceId;
    $args->userId = $userId;
    $args->airavataCredStoreToken = $airavataCredStoreToken;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'setupUserComputeResourcePreferencesForSSH', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('setupUserComputeResourcePreferencesForSSH', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_setupUserComputeResourcePreferencesForSSH()
  {
    $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_setupUserComputeResourcePreferencesForSSH_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_setupUserComputeResourcePreferencesForSSH_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("setupUserComputeResourcePreferencesForSSH failed: unknown result");
  }

  public function registerUserResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile $userResourceProfile)
  {
    $this->send_registerUserResourceProfile($authzToken, $userResourceProfile);
    return $this->recv_registerUserResourceProfile();
  }

  public function send_registerUserResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile $userResourceProfile)
  {
    $args = new \Airavata\API\Airavata_registerUserResourceProfile_args();
    $args->authzToken = $authzToken;
    $args->userResourceProfile = $userResourceProfile;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'registerUserResourceProfile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('registerUserResourceProfile', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_registerUserResourceProfile()
  {
    $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_registerUserResourceProfile_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_registerUserResourceProfile_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("registerUserResourceProfile failed: unknown result");
  }

  public function isUserResourceProfileExists(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID)
  {
    $this->send_isUserResourceProfileExists($authzToken, $userId, $gatewayID);
    return $this->recv_isUserResourceProfileExists();
  }

  public function send_isUserResourceProfileExists(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID)
  {
    $args = new \Airavata\API\Airavata_isUserResourceProfileExists_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_, 'isUserResourceProfileExists', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('isUserResourceProfileExists', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_isUserResourceProfileExists()
  {
    $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_isUserResourceProfileExists_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_isUserResourceProfileExists_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("isUserResourceProfileExists failed: unknown result");
  }

  public function getUserResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID)
  {
    $this->send_getUserResourceProfile($authzToken, $userId, $gatewayID);
    return $this->recv_getUserResourceProfile();
  }

  public function send_getUserResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID)
  {
    $args = new \Airavata\API\Airavata_getUserResourceProfile_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_, 'getUserResourceProfile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getUserResourceProfile', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getUserResourceProfile()
  {
    $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_getUserResourceProfile_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_getUserResourceProfile_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("getUserResourceProfile failed: unknown result");
  }

  public function updateUserResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile $userResourceProfile)
  {
    $this->send_updateUserResourceProfile($authzToken, $userId, $gatewayID, $userResourceProfile);
    return $this->recv_updateUserResourceProfile();
  }

  public function send_updateUserResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile $userResourceProfile)
  {
    $args = new \Airavata\API\Airavata_updateUserResourceProfile_args();
    $args->authzToken = $authzToken;
    $args->userId = $userId;
    $args->gatewayID = $gatewayID;
    $args->userResourceProfile = $userResourceProfile;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'updateUserResourceProfile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('updateUserResourceProfile', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_updateUserResourceProfile()
  {
    $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_updateUserResourceProfile_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_updateUserResourceProfile_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("updateUserResourceProfile failed: unknown result");
  }

  public function deleteUserResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID)
  {
    $this->send_deleteUserResourceProfile($authzToken, $userId, $gatewayID);
    return $this->recv_deleteUserResourceProfile();
  }

  public function send_deleteUserResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID)
  {
    $args = new \Airavata\API\Airavata_deleteUserResourceProfile_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_, 'deleteUserResourceProfile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('deleteUserResourceProfile', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_deleteUserResourceProfile()
  {
    $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_deleteUserResourceProfile_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_deleteUserResourceProfile_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("deleteUserResourceProfile failed: unknown result");
  }

  public function addUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userComputeResourceId, \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference $userComputeResourcePreference)
  {
    $this->send_addUserComputeResourcePreference($authzToken, $userId, $gatewayID, $userComputeResourceId, $userComputeResourcePreference);
    return $this->recv_addUserComputeResourcePreference();
  }

  public function send_addUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userComputeResourceId, \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference $userComputeResourcePreference)
  {
    $args = new \Airavata\API\Airavata_addUserComputeResourcePreference_args();
    $args->authzToken = $authzToken;
    $args->userId = $userId;
    $args->gatewayID = $gatewayID;
    $args->userComputeResourceId = $userComputeResourceId;
    $args->userComputeResourcePreference = $userComputeResourcePreference;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'addUserComputeResourcePreference', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('addUserComputeResourcePreference', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_addUserComputeResourcePreference()
  {
    $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_addUserComputeResourcePreference_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_addUserComputeResourcePreference_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("addUserComputeResourcePreference failed: unknown result");
  }

  public function addUserStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userStorageResourceId, \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference $userStoragePreference)
  {
    $this->send_addUserStoragePreference($authzToken, $userId, $gatewayID, $userStorageResourceId, $userStoragePreference);
    return $this->recv_addUserStoragePreference();
  }

  public function send_addUserStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userStorageResourceId, \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference $userStoragePreference)
  {
    $args = new \Airavata\API\Airavata_addUserStoragePreference_args();
    $args->authzToken = $authzToken;
    $args->userId = $userId;
    $args->gatewayID = $gatewayID;
    $args->userStorageResourceId = $userStorageResourceId;
    $args->userStoragePreference = $userStoragePreference;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'addUserStoragePreference', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('addUserStoragePreference', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_addUserStoragePreference()
  {
    $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_addUserStoragePreference_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_addUserStoragePreference_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("addUserStoragePreference failed: unknown result");
  }

  public function getUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userComputeResourceId)
  {
    $this->send_getUserComputeResourcePreference($authzToken, $userId, $gatewayID, $userComputeResourceId);
    return $this->recv_getUserComputeResourcePreference();
  }

  public function send_getUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userComputeResourceId)
  {
    $args = new \Airavata\API\Airavata_getUserComputeResourcePreference_args();
    $args->authzToken = $authzToken;
    $args->userId = $userId;
    $args->gatewayID = $gatewayID;
    $args->userComputeResourceId = $userComputeResourceId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getUserComputeResourcePreference', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getUserComputeResourcePreference', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getUserComputeResourcePreference()
  {
    $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_getUserComputeResourcePreference_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_getUserComputeResourcePreference_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("getUserComputeResourcePreference failed: unknown result");
  }

  public function getUserStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userStorageResourceId)
  {
    $this->send_getUserStoragePreference($authzToken, $userId, $gatewayID, $userStorageResourceId);
    return $this->recv_getUserStoragePreference();
  }

  public function send_getUserStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userStorageResourceId)
  {
    $args = new \Airavata\API\Airavata_getUserStoragePreference_args();
    $args->authzToken = $authzToken;
    $args->userId = $userId;
    $args->gatewayID = $gatewayID;
    $args->userStorageResourceId = $userStorageResourceId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getUserStoragePreference', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getUserStoragePreference', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getUserStoragePreference()
  {
    $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_getUserStoragePreference_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_getUserStoragePreference_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("getUserStoragePreference failed: unknown result");
  }

  public function getAllUserComputeResourcePreferences(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID)
  {
    $this->send_getAllUserComputeResourcePreferences($authzToken, $userId, $gatewayID);
    return $this->recv_getAllUserComputeResourcePreferences();
  }

  public function send_getAllUserComputeResourcePreferences(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID)
  {
    $args = new \Airavata\API\Airavata_getAllUserComputeResourcePreferences_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_, 'getAllUserComputeResourcePreferences', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getAllUserComputeResourcePreferences', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getAllUserComputeResourcePreferences()
  {
    $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_getAllUserComputeResourcePreferences_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_getAllUserComputeResourcePreferences_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("getAllUserComputeResourcePreferences failed: unknown result");
  }

  public function getAllUserStoragePreferences(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID)
  {
    $this->send_getAllUserStoragePreferences($authzToken, $userId, $gatewayID);
    return $this->recv_getAllUserStoragePreferences();
  }

  public function send_getAllUserStoragePreferences(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID)
  {
    $args = new \Airavata\API\Airavata_getAllUserStoragePreferences_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_, 'getAllUserStoragePreferences', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getAllUserStoragePreferences', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getAllUserStoragePreferences()
  {
    $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_getAllUserStoragePreferences_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_getAllUserStoragePreferences_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("getAllUserStoragePreferences failed: unknown result");
  }

  public function getAllUserResourceProfiles(\Airavata\Model\Security\AuthzToken $authzToken)
  {
    $this->send_getAllUserResourceProfiles($authzToken);
    return $this->recv_getAllUserResourceProfiles();
  }

  public function send_getAllUserResourceProfiles(\Airavata\Model\Security\AuthzToken $authzToken)
  {
    $args = new \Airavata\API\Airavata_getAllUserResourceProfiles_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_, 'getAllUserResourceProfiles', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getAllUserResourceProfiles', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getAllUserResourceProfiles()
  {
    $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_getAllUserResourceProfiles_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_getAllUserResourceProfiles_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("getAllUserResourceProfiles failed: unknown result");
  }

  public function updateUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userComputeResourceId, \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference $userComputeResourcePreference)
  {
    $this->send_updateUserComputeResourcePreference($authzToken, $userId, $gatewayID, $userComputeResourceId, $userComputeResourcePreference);
    return $this->recv_updateUserComputeResourcePreference();
  }

  public function send_updateUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userComputeResourceId, \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference $userComputeResourcePreference)
  {
    $args = new \Airavata\API\Airavata_updateUserComputeResourcePreference_args();
    $args->authzToken = $authzToken;
    $args->userId = $userId;
    $args->gatewayID = $gatewayID;
    $args->userComputeResourceId = $userComputeResourceId;
    $args->userComputeResourcePreference = $userComputeResourcePreference;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'updateUserComputeResourcePreference', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('updateUserComputeResourcePreference', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_updateUserComputeResourcePreference()
  {
    $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_updateUserComputeResourcePreference_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_updateUserComputeResourcePreference_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("updateUserComputeResourcePreference failed: unknown result");
  }

  public function updateUserStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userStorageId, \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference $userStoragePreference)
  {
    $this->send_updateUserStoragePreference($authzToken, $userId, $gatewayID, $userStorageId, $userStoragePreference);
    return $this->recv_updateUserStoragePreference();
  }

  public function send_updateUserStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userStorageId, \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference $userStoragePreference)
  {
    $args = new \Airavata\API\Airavata_updateUserStoragePreference_args();
    $args->authzToken = $authzToken;
    $args->userId = $userId;
    $args->gatewayID = $gatewayID;
    $args->userStorageId = $userStorageId;
    $args->userStoragePreference = $userStoragePreference;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'updateUserStoragePreference', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('updateUserStoragePreference', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_updateUserStoragePreference()
  {
    $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_updateUserStoragePreference_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_updateUserStoragePreference_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("updateUserStoragePreference failed: unknown result");
  }

  public function deleteUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userComputeResourceId)
  {
    $this->send_deleteUserComputeResourcePreference($authzToken, $userId, $gatewayID, $userComputeResourceId);
    return $this->recv_deleteUserComputeResourcePreference();
  }

  public function send_deleteUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userComputeResourceId)
  {
    $args = new \Airavata\API\Airavata_deleteUserComputeResourcePreference_args();
    $args->authzToken = $authzToken;
    $args->userId = $userId;
    $args->gatewayID = $gatewayID;
    $args->userComputeResourceId = $userComputeResourceId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'deleteUserComputeResourcePreference', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('deleteUserComputeResourcePreference', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_deleteUserComputeResourcePreference()
  {
    $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_deleteUserComputeResourcePreference_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_deleteUserComputeResourcePreference_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("deleteUserComputeResourcePreference failed: unknown result");
  }

  public function deleteUserStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userStorageId)
  {
    $this->send_deleteUserStoragePreference($authzToken, $userId, $gatewayID, $userStorageId);
    return $this->recv_deleteUserStoragePreference();
  }

  public function send_deleteUserStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userStorageId)
  {
    $args = new \Airavata\API\Airavata_deleteUserStoragePreference_args();
    $args->authzToken = $authzToken;
    $args->userId = $userId;
    $args->gatewayID = $gatewayID;
    $args->userStorageId = $userStorageId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'deleteUserStoragePreference', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('deleteUserStoragePreference', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_deleteUserStoragePreference()
  {
    $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_deleteUserStoragePreference_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_deleteUserStoragePreference_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("deleteUserStoragePreference failed: unknown result");
  }

  public function getLatestQueueStatuses(\Airavata\Model\Security\AuthzToken $authzToken)
  {
    $this->send_getLatestQueueStatuses($authzToken);
    return $this->recv_getLatestQueueStatuses();
  }

  public function send_getLatestQueueStatuses(\Airavata\Model\Security\AuthzToken $authzToken)
  {
    $args = new \Airavata\API\Airavata_getLatestQueueStatuses_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_, 'getLatestQueueStatuses', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getLatestQueueStatuses', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getLatestQueueStatuses()
  {
    $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_getLatestQueueStatuses_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_getLatestQueueStatuses_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("getLatestQueueStatuses failed: unknown result");
  }

  public function registerDataProduct(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Data\Replica\DataProductModel $dataProductModel)
  {
    $this->send_registerDataProduct($authzToken, $dataProductModel);
    return $this->recv_registerDataProduct();
  }

  public function send_registerDataProduct(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Data\Replica\DataProductModel $dataProductModel)
  {
    $args = new \Airavata\API\Airavata_registerDataProduct_args();
    $args->authzToken = $authzToken;
    $args->dataProductModel = $dataProductModel;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'registerDataProduct', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('registerDataProduct', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_registerDataProduct()
  {
    $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_registerDataProduct_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_registerDataProduct_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("registerDataProduct failed: unknown result");
  }

  public function getDataProduct(\Airavata\Model\Security\AuthzToken $authzToken, $dataProductUri)
  {
    $this->send_getDataProduct($authzToken, $dataProductUri);
    return $this->recv_getDataProduct();
  }

  public function send_getDataProduct(\Airavata\Model\Security\AuthzToken $authzToken, $dataProductUri)
  {
    $args = new \Airavata\API\Airavata_getDataProduct_args();
    $args->authzToken = $authzToken;
    $args->dataProductUri = $dataProductUri;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getDataProduct', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getDataProduct', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getDataProduct()
  {
    $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_getDataProduct_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_getDataProduct_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("getDataProduct failed: unknown result");
  }

  public function registerReplicaLocation(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Data\Replica\DataReplicaLocationModel $replicaLocationModel)
  {
    $this->send_registerReplicaLocation($authzToken, $replicaLocationModel);
    return $this->recv_registerReplicaLocation();
  }

  public function send_registerReplicaLocation(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Data\Replica\DataReplicaLocationModel $replicaLocationModel)
  {
    $args = new \Airavata\API\Airavata_registerReplicaLocation_args();
    $args->authzToken = $authzToken;
    $args->replicaLocationModel = $replicaLocationModel;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'registerReplicaLocation', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('registerReplicaLocation', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_registerReplicaLocation()
  {
    $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_registerReplicaLocation_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_registerReplicaLocation_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("registerReplicaLocation failed: unknown result");
  }

  public function getParentDataProduct(\Airavata\Model\Security\AuthzToken $authzToken, $productUri)
  {
    $this->send_getParentDataProduct($authzToken, $productUri);
    return $this->recv_getParentDataProduct();
  }

  public function send_getParentDataProduct(\Airavata\Model\Security\AuthzToken $authzToken, $productUri)
  {
    $args = new \Airavata\API\Airavata_getParentDataProduct_args();
    $args->authzToken = $authzToken;
    $args->productUri = $productUri;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getParentDataProduct', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getParentDataProduct', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getParentDataProduct()
  {
    $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_getParentDataProduct_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_getParentDataProduct_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("getParentDataProduct failed: unknown result");
  }

  public function getChildDataProducts(\Airavata\Model\Security\AuthzToken $authzToken, $productUri)
  {
    $this->send_getChildDataProducts($authzToken, $productUri);
    return $this->recv_getChildDataProducts();
  }

  public function send_getChildDataProducts(\Airavata\Model\Security\AuthzToken $authzToken, $productUri)
  {
    $args = new \Airavata\API\Airavata_getChildDataProducts_args();
    $args->authzToken = $authzToken;
    $args->productUri = $productUri;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getChildDataProducts', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getChildDataProducts', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getChildDataProducts()
  {
    $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_getChildDataProducts_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_getChildDataProducts_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("getChildDataProducts failed: unknown result");
  }

  public function shareResourceWithUsers(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, array $userPermissionList)
  {
    $this->send_shareResourceWithUsers($authzToken, $resourceId, $userPermissionList);
    return $this->recv_shareResourceWithUsers();
  }

  public function send_shareResourceWithUsers(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, array $userPermissionList)
  {
    $args = new \Airavata\API\Airavata_shareResourceWithUsers_args();
    $args->authzToken = $authzToken;
    $args->resourceId = $resourceId;
    $args->userPermissionList = $userPermissionList;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'shareResourceWithUsers', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('shareResourceWithUsers', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_shareResourceWithUsers()
  {
    $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_shareResourceWithUsers_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_shareResourceWithUsers_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("shareResourceWithUsers failed: unknown result");
  }

  public function shareResourceWithGroups(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, array $groupPermissionList)
  {
    $this->send_shareResourceWithGroups($authzToken, $resourceId, $groupPermissionList);
    return $this->recv_shareResourceWithGroups();
  }

  public function send_shareResourceWithGroups(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, array $groupPermissionList)
  {
    $args = new \Airavata\API\Airavata_shareResourceWithGroups_args();
    $args->authzToken = $authzToken;
    $args->resourceId = $resourceId;
    $args->groupPermissionList = $groupPermissionList;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'shareResourceWithGroups', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('shareResourceWithGroups', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_shareResourceWithGroups()
  {
    $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_shareResourceWithGroups_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_shareResourceWithGroups_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("shareResourceWithGroups failed: unknown result");
  }

  public function revokeSharingOfResourceFromUsers(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, array $userPermissionList)
  {
    $this->send_revokeSharingOfResourceFromUsers($authzToken, $resourceId, $userPermissionList);
    return $this->recv_revokeSharingOfResourceFromUsers();
  }

  public function send_revokeSharingOfResourceFromUsers(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, array $userPermissionList)
  {
    $args = new \Airavata\API\Airavata_revokeSharingOfResourceFromUsers_args();
    $args->authzToken = $authzToken;
    $args->resourceId = $resourceId;
    $args->userPermissionList = $userPermissionList;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'revokeSharingOfResourceFromUsers', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('revokeSharingOfResourceFromUsers', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_revokeSharingOfResourceFromUsers()
  {
    $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_revokeSharingOfResourceFromUsers_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_revokeSharingOfResourceFromUsers_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("revokeSharingOfResourceFromUsers failed: unknown result");
  }

  public function revokeSharingOfResourceFromGroups(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, array $groupPermissionList)
  {
    $this->send_revokeSharingOfResourceFromGroups($authzToken, $resourceId, $groupPermissionList);
    return $this->recv_revokeSharingOfResourceFromGroups();
  }

  public function send_revokeSharingOfResourceFromGroups(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, array $groupPermissionList)
  {
    $args = new \Airavata\API\Airavata_revokeSharingOfResourceFromGroups_args();
    $args->authzToken = $authzToken;
    $args->resourceId = $resourceId;
    $args->groupPermissionList = $groupPermissionList;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'revokeSharingOfResourceFromGroups', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('revokeSharingOfResourceFromGroups', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_revokeSharingOfResourceFromGroups()
  {
    $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_revokeSharingOfResourceFromGroups_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_revokeSharingOfResourceFromGroups_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("revokeSharingOfResourceFromGroups failed: unknown result");
  }

  public function getAllAccessibleUsers(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, $permissionType)
  {
    $this->send_getAllAccessibleUsers($authzToken, $resourceId, $permissionType);
    return $this->recv_getAllAccessibleUsers();
  }

  public function send_getAllAccessibleUsers(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, $permissionType)
  {
    $args = new \Airavata\API\Airavata_getAllAccessibleUsers_args();
    $args->authzToken = $authzToken;
    $args->resourceId = $resourceId;
    $args->permissionType = $permissionType;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getAllAccessibleUsers', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getAllAccessibleUsers', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getAllAccessibleUsers()
  {
    $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_getAllAccessibleUsers_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_getAllAccessibleUsers_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("getAllAccessibleUsers failed: unknown result");
  }

  public function getAllAccessibleGroups(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, $permissionType)
  {
    $this->send_getAllAccessibleGroups($authzToken, $resourceId, $permissionType);
    return $this->recv_getAllAccessibleGroups();
  }

  public function send_getAllAccessibleGroups(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, $permissionType)
  {
    $args = new \Airavata\API\Airavata_getAllAccessibleGroups_args();
    $args->authzToken = $authzToken;
    $args->resourceId = $resourceId;
    $args->permissionType = $permissionType;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getAllAccessibleGroups', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getAllAccessibleGroups', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getAllAccessibleGroups()
  {
    $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_getAllAccessibleGroups_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_getAllAccessibleGroups_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("getAllAccessibleGroups failed: unknown result");
  }

  public function getAllDirectlyAccessibleUsers(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, $permissionType)
  {
    $this->send_getAllDirectlyAccessibleUsers($authzToken, $resourceId, $permissionType);
    return $this->recv_getAllDirectlyAccessibleUsers();
  }

  public function send_getAllDirectlyAccessibleUsers(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, $permissionType)
  {
    $args = new \Airavata\API\Airavata_getAllDirectlyAccessibleUsers_args();
    $args->authzToken = $authzToken;
    $args->resourceId = $resourceId;
    $args->permissionType = $permissionType;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getAllDirectlyAccessibleUsers', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getAllDirectlyAccessibleUsers', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getAllDirectlyAccessibleUsers()
  {
    $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_getAllDirectlyAccessibleUsers_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_getAllDirectlyAccessibleUsers_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("getAllDirectlyAccessibleUsers failed: unknown result");
  }

  public function getAllDirectlyAccessibleGroups(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, $permissionType)
  {
    $this->send_getAllDirectlyAccessibleGroups($authzToken, $resourceId, $permissionType);
    return $this->recv_getAllDirectlyAccessibleGroups();
  }

  public function send_getAllDirectlyAccessibleGroups(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, $permissionType)
  {
    $args = new \Airavata\API\Airavata_getAllDirectlyAccessibleGroups_args();
    $args->authzToken = $authzToken;
    $args->resourceId = $resourceId;
    $args->permissionType = $permissionType;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getAllDirectlyAccessibleGroups', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getAllDirectlyAccessibleGroups', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getAllDirectlyAccessibleGroups()
  {
    $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_getAllDirectlyAccessibleGroups_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_getAllDirectlyAccessibleGroups_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("getAllDirectlyAccessibleGroups failed: unknown result");
  }

  public function userHasAccess(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, $permissionType)
  {
    $this->send_userHasAccess($authzToken, $resourceId, $permissionType);
    return $this->recv_userHasAccess();
  }

  public function send_userHasAccess(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, $permissionType)
  {
    $args = new \Airavata\API\Airavata_userHasAccess_args();
    $args->authzToken = $authzToken;
    $args->resourceId = $resourceId;
    $args->permissionType = $permissionType;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'userHasAccess', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('userHasAccess', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_userHasAccess()
  {
    $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_userHasAccess_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_userHasAccess_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("userHasAccess failed: unknown result");
  }

  public function createGroupResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\GroupResourceProfile\GroupResourceProfile $groupResourceProfile)
  {
    $this->send_createGroupResourceProfile($authzToken, $groupResourceProfile);
    return $this->recv_createGroupResourceProfile();
  }

  public function send_createGroupResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\GroupResourceProfile\GroupResourceProfile $groupResourceProfile)
  {
    $args = new \Airavata\API\Airavata_createGroupResourceProfile_args();
    $args->authzToken = $authzToken;
    $args->groupResourceProfile = $groupResourceProfile;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'createGroupResourceProfile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('createGroupResourceProfile', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_createGroupResourceProfile()
  {
    $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_createGroupResourceProfile_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_createGroupResourceProfile_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("createGroupResourceProfile failed: unknown result");
  }

  public function updateGroupResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\GroupResourceProfile\GroupResourceProfile $groupResourceProfile)
  {
    $this->send_updateGroupResourceProfile($authzToken, $groupResourceProfile);
    $this->recv_updateGroupResourceProfile();
  }

  public function send_updateGroupResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\GroupResourceProfile\GroupResourceProfile $groupResourceProfile)
  {
    $args = new \Airavata\API\Airavata_updateGroupResourceProfile_args();
    $args->authzToken = $authzToken;
    $args->groupResourceProfile = $groupResourceProfile;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'updateGroupResourceProfile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('updateGroupResourceProfile', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_updateGroupResourceProfile()
  {
    $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_updateGroupResourceProfile_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_updateGroupResourceProfile_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    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;
    }
    return;
  }

  public function getGroupResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $groupResourceProfileId)
  {
    $this->send_getGroupResourceProfile($authzToken, $groupResourceProfileId);
    return $this->recv_getGroupResourceProfile();
  }

  public function send_getGroupResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $groupResourceProfileId)
  {
    $args = new \Airavata\API\Airavata_getGroupResourceProfile_args();
    $args->authzToken = $authzToken;
    $args->groupResourceProfileId = $groupResourceProfileId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getGroupResourceProfile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getGroupResourceProfile', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getGroupResourceProfile()
  {
    $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_getGroupResourceProfile_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_getGroupResourceProfile_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("getGroupResourceProfile failed: unknown result");
  }

  public function removeGroupResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $groupResourceProfileId)
  {
    $this->send_removeGroupResourceProfile($authzToken, $groupResourceProfileId);
    return $this->recv_removeGroupResourceProfile();
  }

  public function send_removeGroupResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $groupResourceProfileId)
  {
    $args = new \Airavata\API\Airavata_removeGroupResourceProfile_args();
    $args->authzToken = $authzToken;
    $args->groupResourceProfileId = $groupResourceProfileId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'removeGroupResourceProfile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('removeGroupResourceProfile', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_removeGroupResourceProfile()
  {
    $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_removeGroupResourceProfile_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_removeGroupResourceProfile_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("removeGroupResourceProfile failed: unknown result");
  }

  public function getGroupResourceList(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
  {
    $this->send_getGroupResourceList($authzToken, $gatewayId);
    return $this->recv_getGroupResourceList();
  }

  public function send_getGroupResourceList(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
  {
    $args = new \Airavata\API\Airavata_getGroupResourceList_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_, 'getGroupResourceList', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getGroupResourceList', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getGroupResourceList()
  {
    $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_getGroupResourceList_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_getGroupResourceList_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("getGroupResourceList failed: unknown result");
  }

  public function removeGroupComputePrefs(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $groupResourceProfileId)
  {
    $this->send_removeGroupComputePrefs($authzToken, $computeResourceId, $groupResourceProfileId);
    return $this->recv_removeGroupComputePrefs();
  }

  public function send_removeGroupComputePrefs(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $groupResourceProfileId)
  {
    $args = new \Airavata\API\Airavata_removeGroupComputePrefs_args();
    $args->authzToken = $authzToken;
    $args->computeResourceId = $computeResourceId;
    $args->groupResourceProfileId = $groupResourceProfileId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'removeGroupComputePrefs', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('removeGroupComputePrefs', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_removeGroupComputePrefs()
  {
    $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_removeGroupComputePrefs_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_removeGroupComputePrefs_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("removeGroupComputePrefs failed: unknown result");
  }

  public function removeGroupComputeResourcePolicy(\Airavata\Model\Security\AuthzToken $authzToken, $resourcePolicyId)
  {
    $this->send_removeGroupComputeResourcePolicy($authzToken, $resourcePolicyId);
    return $this->recv_removeGroupComputeResourcePolicy();
  }

  public function send_removeGroupComputeResourcePolicy(\Airavata\Model\Security\AuthzToken $authzToken, $resourcePolicyId)
  {
    $args = new \Airavata\API\Airavata_removeGroupComputeResourcePolicy_args();
    $args->authzToken = $authzToken;
    $args->resourcePolicyId = $resourcePolicyId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'removeGroupComputeResourcePolicy', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('removeGroupComputeResourcePolicy', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_removeGroupComputeResourcePolicy()
  {
    $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_removeGroupComputeResourcePolicy_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_removeGroupComputeResourcePolicy_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("removeGroupComputeResourcePolicy failed: unknown result");
  }

  public function removeGroupBatchQueueResourcePolicy(\Airavata\Model\Security\AuthzToken $authzToken, $resourcePolicyId)
  {
    $this->send_removeGroupBatchQueueResourcePolicy($authzToken, $resourcePolicyId);
    return $this->recv_removeGroupBatchQueueResourcePolicy();
  }

  public function send_removeGroupBatchQueueResourcePolicy(\Airavata\Model\Security\AuthzToken $authzToken, $resourcePolicyId)
  {
    $args = new \Airavata\API\Airavata_removeGroupBatchQueueResourcePolicy_args();
    $args->authzToken = $authzToken;
    $args->resourcePolicyId = $resourcePolicyId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'removeGroupBatchQueueResourcePolicy', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('removeGroupBatchQueueResourcePolicy', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_removeGroupBatchQueueResourcePolicy()
  {
    $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_removeGroupBatchQueueResourcePolicy_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_removeGroupBatchQueueResourcePolicy_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("removeGroupBatchQueueResourcePolicy failed: unknown result");
  }

  public function getGroupComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $groupResourceProfileId)
  {
    $this->send_getGroupComputeResourcePreference($authzToken, $computeResourceId, $groupResourceProfileId);
    return $this->recv_getGroupComputeResourcePreference();
  }

  public function send_getGroupComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $groupResourceProfileId)
  {
    $args = new \Airavata\API\Airavata_getGroupComputeResourcePreference_args();
    $args->authzToken = $authzToken;
    $args->computeResourceId = $computeResourceId;
    $args->groupResourceProfileId = $groupResourceProfileId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getGroupComputeResourcePreference', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getGroupComputeResourcePreference', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getGroupComputeResourcePreference()
  {
    $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_getGroupComputeResourcePreference_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_getGroupComputeResourcePreference_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("getGroupComputeResourcePreference failed: unknown result");
  }

  public function getGroupComputeResourcePolicy(\Airavata\Model\Security\AuthzToken $authzToken, $resourcePolicyId)
  {
    $this->send_getGroupComputeResourcePolicy($authzToken, $resourcePolicyId);
    return $this->recv_getGroupComputeResourcePolicy();
  }

  public function send_getGroupComputeResourcePolicy(\Airavata\Model\Security\AuthzToken $authzToken, $resourcePolicyId)
  {
    $args = new \Airavata\API\Airavata_getGroupComputeResourcePolicy_args();
    $args->authzToken = $authzToken;
    $args->resourcePolicyId = $resourcePolicyId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getGroupComputeResourcePolicy', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getGroupComputeResourcePolicy', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getGroupComputeResourcePolicy()
  {
    $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_getGroupComputeResourcePolicy_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_getGroupComputeResourcePolicy_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("getGroupComputeResourcePolicy failed: unknown result");
  }

  public function getBatchQueueResourcePolicy(\Airavata\Model\Security\AuthzToken $authzToken, $resourcePolicyId)
  {
    $this->send_getBatchQueueResourcePolicy($authzToken, $resourcePolicyId);
    return $this->recv_getBatchQueueResourcePolicy();
  }

  public function send_getBatchQueueResourcePolicy(\Airavata\Model\Security\AuthzToken $authzToken, $resourcePolicyId)
  {
    $args = new \Airavata\API\Airavata_getBatchQueueResourcePolicy_args();
    $args->authzToken = $authzToken;
    $args->resourcePolicyId = $resourcePolicyId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getBatchQueueResourcePolicy', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getBatchQueueResourcePolicy', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getBatchQueueResourcePolicy()
  {
    $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_getBatchQueueResourcePolicy_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_getBatchQueueResourcePolicy_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("getBatchQueueResourcePolicy failed: unknown result");
  }

  public function getGroupComputeResourcePrefList(\Airavata\Model\Security\AuthzToken $authzToken, $groupResourceProfileId)
  {
    $this->send_getGroupComputeResourcePrefList($authzToken, $groupResourceProfileId);
    return $this->recv_getGroupComputeResourcePrefList();
  }

  public function send_getGroupComputeResourcePrefList(\Airavata\Model\Security\AuthzToken $authzToken, $groupResourceProfileId)
  {
    $args = new \Airavata\API\Airavata_getGroupComputeResourcePrefList_args();
    $args->authzToken = $authzToken;
    $args->groupResourceProfileId = $groupResourceProfileId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getGroupComputeResourcePrefList', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getGroupComputeResourcePrefList', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getGroupComputeResourcePrefList()
  {
    $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_getGroupComputeResourcePrefList_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_getGroupComputeResourcePrefList_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("getGroupComputeResourcePrefList failed: unknown result");
  }

  public function getGroupBatchQueueResourcePolicyList(\Airavata\Model\Security\AuthzToken $authzToken, $groupResourceProfileId)
  {
    $this->send_getGroupBatchQueueResourcePolicyList($authzToken, $groupResourceProfileId);
    return $this->recv_getGroupBatchQueueResourcePolicyList();
  }

  public function send_getGroupBatchQueueResourcePolicyList(\Airavata\Model\Security\AuthzToken $authzToken, $groupResourceProfileId)
  {
    $args = new \Airavata\API\Airavata_getGroupBatchQueueResourcePolicyList_args();
    $args->authzToken = $authzToken;
    $args->groupResourceProfileId = $groupResourceProfileId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getGroupBatchQueueResourcePolicyList', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getGroupBatchQueueResourcePolicyList', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getGroupBatchQueueResourcePolicyList()
  {
    $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_getGroupBatchQueueResourcePolicyList_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_getGroupBatchQueueResourcePolicyList_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("getGroupBatchQueueResourcePolicyList failed: unknown result");
  }

  public function getGroupComputeResourcePolicyList(\Airavata\Model\Security\AuthzToken $authzToken, $groupResourceProfileId)
  {
    $this->send_getGroupComputeResourcePolicyList($authzToken, $groupResourceProfileId);
    return $this->recv_getGroupComputeResourcePolicyList();
  }

  public function send_getGroupComputeResourcePolicyList(\Airavata\Model\Security\AuthzToken $authzToken, $groupResourceProfileId)
  {
    $args = new \Airavata\API\Airavata_getGroupComputeResourcePolicyList_args();
    $args->authzToken = $authzToken;
    $args->groupResourceProfileId = $groupResourceProfileId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getGroupComputeResourcePolicyList', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getGroupComputeResourcePolicyList', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getGroupComputeResourcePolicyList()
  {
    $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_getGroupComputeResourcePolicyList_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_getGroupComputeResourcePolicyList_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("getGroupComputeResourcePolicyList failed: unknown result");
  }

  public function getGatewayGroups(\Airavata\Model\Security\AuthzToken $authzToken)
  {
    $this->send_getGatewayGroups($authzToken);
    return $this->recv_getGatewayGroups();
  }

  public function send_getGatewayGroups(\Airavata\Model\Security\AuthzToken $authzToken)
  {
    $args = new \Airavata\API\Airavata_getGatewayGroups_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_, 'getGatewayGroups', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getGatewayGroups', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getGatewayGroups()
  {
    $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_getGatewayGroups_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_getGatewayGroups_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("getGatewayGroups failed: unknown result");
  }

  public function getParser(\Airavata\Model\Security\AuthzToken $authzToken, $parserId, $gatewayId)
  {
    $this->send_getParser($authzToken, $parserId, $gatewayId);
    return $this->recv_getParser();
  }

  public function send_getParser(\Airavata\Model\Security\AuthzToken $authzToken, $parserId, $gatewayId)
  {
    $args = new \Airavata\API\Airavata_getParser_args();
    $args->authzToken = $authzToken;
    $args->parserId = $parserId;
    $args->gatewayId = $gatewayId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getParser', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getParser', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getParser()
  {
    $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_getParser_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_getParser_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("getParser failed: unknown result");
  }

  public function saveParser(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\Parser\Parser $parser)
  {
    $this->send_saveParser($authzToken, $parser);
    return $this->recv_saveParser();
  }

  public function send_saveParser(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\Parser\Parser $parser)
  {
    $args = new \Airavata\API\Airavata_saveParser_args();
    $args->authzToken = $authzToken;
    $args->parser = $parser;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'saveParser', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('saveParser', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_saveParser()
  {
    $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_saveParser_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_saveParser_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("saveParser failed: unknown result");
  }

  public function listAllParsers(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
  {
    $this->send_listAllParsers($authzToken, $gatewayId);
    return $this->recv_listAllParsers();
  }

  public function send_listAllParsers(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
  {
    $args = new \Airavata\API\Airavata_listAllParsers_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_, 'listAllParsers', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('listAllParsers', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_listAllParsers()
  {
    $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_listAllParsers_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_listAllParsers_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("listAllParsers failed: unknown result");
  }

  public function removeParser(\Airavata\Model\Security\AuthzToken $authzToken, $parserId, $gatewayId)
  {
    $this->send_removeParser($authzToken, $parserId, $gatewayId);
    return $this->recv_removeParser();
  }

  public function send_removeParser(\Airavata\Model\Security\AuthzToken $authzToken, $parserId, $gatewayId)
  {
    $args = new \Airavata\API\Airavata_removeParser_args();
    $args->authzToken = $authzToken;
    $args->parserId = $parserId;
    $args->gatewayId = $gatewayId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'removeParser', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('removeParser', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_removeParser()
  {
    $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_removeParser_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_removeParser_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("removeParser failed: unknown result");
  }

  public function getParsingTemplate(\Airavata\Model\Security\AuthzToken $authzToken, $templateId, $gatewayId)
  {
    $this->send_getParsingTemplate($authzToken, $templateId, $gatewayId);
    return $this->recv_getParsingTemplate();
  }

  public function send_getParsingTemplate(\Airavata\Model\Security\AuthzToken $authzToken, $templateId, $gatewayId)
  {
    $args = new \Airavata\API\Airavata_getParsingTemplate_args();
    $args->authzToken = $authzToken;
    $args->templateId = $templateId;
    $args->gatewayId = $gatewayId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getParsingTemplate', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getParsingTemplate', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getParsingTemplate()
  {
    $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_getParsingTemplate_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_getParsingTemplate_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("getParsingTemplate failed: unknown result");
  }

  public function getParsingTemplatesForExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $experimentId, $gatewayId)
  {
    $this->send_getParsingTemplatesForExperiment($authzToken, $experimentId, $gatewayId);
    return $this->recv_getParsingTemplatesForExperiment();
  }

  public function send_getParsingTemplatesForExperiment(\Airavata\Model\Security\AuthzToken $authzToken, $experimentId, $gatewayId)
  {
    $args = new \Airavata\API\Airavata_getParsingTemplatesForExperiment_args();
    $args->authzToken = $authzToken;
    $args->experimentId = $experimentId;
    $args->gatewayId = $gatewayId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getParsingTemplatesForExperiment', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getParsingTemplatesForExperiment', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getParsingTemplatesForExperiment()
  {
    $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_getParsingTemplatesForExperiment_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_getParsingTemplatesForExperiment_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("getParsingTemplatesForExperiment failed: unknown result");
  }

  public function saveParsingTemplate(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\Parser\ParsingTemplate $parsingTemplate)
  {
    $this->send_saveParsingTemplate($authzToken, $parsingTemplate);
    return $this->recv_saveParsingTemplate();
  }

  public function send_saveParsingTemplate(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\Parser\ParsingTemplate $parsingTemplate)
  {
    $args = new \Airavata\API\Airavata_saveParsingTemplate_args();
    $args->authzToken = $authzToken;
    $args->parsingTemplate = $parsingTemplate;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'saveParsingTemplate', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('saveParsingTemplate', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_saveParsingTemplate()
  {
    $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_saveParsingTemplate_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_saveParsingTemplate_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("saveParsingTemplate failed: unknown result");
  }

  public function removeParsingTemplate(\Airavata\Model\Security\AuthzToken $authzToken, $templateId, $gatewayId)
  {
    $this->send_removeParsingTemplate($authzToken, $templateId, $gatewayId);
    return $this->recv_removeParsingTemplate();
  }

  public function send_removeParsingTemplate(\Airavata\Model\Security\AuthzToken $authzToken, $templateId, $gatewayId)
  {
    $args = new \Airavata\API\Airavata_removeParsingTemplate_args();
    $args->authzToken = $authzToken;
    $args->templateId = $templateId;
    $args->gatewayId = $gatewayId;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'removeParsingTemplate', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('removeParsingTemplate', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_removeParsingTemplate()
  {
    $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_removeParsingTemplate_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_removeParsingTemplate_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("removeParsingTemplate failed: unknown result");
  }

  public function listAllParsingTemplates(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
  {
    $this->send_listAllParsingTemplates($authzToken, $gatewayId);
    return $this->recv_listAllParsingTemplates();
  }

  public function send_listAllParsingTemplates(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
  {
    $args = new \Airavata\API\Airavata_listAllParsingTemplates_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_, 'listAllParsingTemplates', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('listAllParsingTemplates', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_listAllParsingTemplates()
  {
    $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_listAllParsingTemplates_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_listAllParsingTemplates_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("listAllParsingTemplates failed: unknown result");
  }

}


// HELPER FUNCTIONS AND STRUCTURES

class Airavata_isUserExists_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $gatewayId = null;
  /**
   * @var string
   */
  public $userName = 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' => 'userName',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['gatewayId'])) {
        $this->gatewayId = $vals['gatewayId'];
      }
      if (isset($vals['userName'])) {
        $this->userName = $vals['userName'];
      }
    }
  }

  public function getName() {
    return 'Airavata_isUserExists_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::STRING) {
            $xfer += $input->readString($this->userName);
          } 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_isUserExists_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->userName !== null) {
      $xfer += $output->writeFieldBegin('userName', TType::STRING, 3);
      $xfer += $output->writeString($this->userName);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_isUserExists_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_isUserExists_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_isUserExists_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_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 'Airavata_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('Airavata_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 Airavata_addGateway_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_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->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_addGateway_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_getAllUsersInGateway_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_getAllUsersInGateway_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_getAllUsersInGateway_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_getAllUsersInGateway_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::LST,
          'etype' => TType::STRING,
          'elem' => array(
            '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_getAllUsersInGateway_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;
              $xfer += $input->readString($elem5);
              $this->success []= $elem5;
            }
            $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_getAllUsersInGateway_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::STRING, count($this->success));
        {
          foreach ($this->success as $iter6)
          {
            $xfer += $output->writeString($iter6);
          }
        }
        $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_updateGateway_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $gatewayId = 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' => 'gatewayId',
          'type' => TType::STRING,
          ),
        3 => 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['gatewayId'])) {
        $this->gatewayId = $vals['gatewayId'];
      }
      if (isset($vals['updatedGateway'])) {
        $this->updatedGateway = $vals['updatedGateway'];
      }
    }
  }

  public function getName() {
    return 'Airavata_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::STRING) {
            $xfer += $input->readString($this->gatewayId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          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('Airavata_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->gatewayId !== null) {
      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2);
      $xfer += $output->writeString($this->gatewayId);
      $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, 3);
      $xfer += $this->updatedGateway->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_updateGateway_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_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->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_updateGateway_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_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 'Airavata_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('Airavata_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 Airavata_getGateway_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Workspace\Gateway
   */
  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\Workspace\Gateway',
          ),
        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_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->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_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->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_deleteGateway_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_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->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_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->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_deleteGateway_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_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->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_deleteGateway_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_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 'Airavata_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('Airavata_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 Airavata_getAllGateways_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Workspace\Gateway[]
   */
  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\Workspace\Gateway',
            ),
          ),
        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_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();
            $_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->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_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 $iter13)
          {
            $xfer += $iter13->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_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 'Airavata_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('Airavata_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 Airavata_isGatewayExist_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_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->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_isGatewayExist_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_createNotification_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var \Airavata\Model\Workspace\Notification
   */
  public $notification = 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' => 'notification',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Workspace\Notification',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['notification'])) {
        $this->notification = $vals['notification'];
      }
    }
  }

  public function getName() {
    return 'Airavata_createNotification_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->notification = new \Airavata\Model\Workspace\Notification();
            $xfer += $this->notification->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_createNotification_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->notification !== null) {
      if (!is_object($this->notification)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('notification', TType::STRUCT, 2);
      $xfer += $this->notification->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_createNotification_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_createNotification_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_createNotification_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_updateNotification_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var \Airavata\Model\Workspace\Notification
   */
  public $notification = 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' => 'notification',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Workspace\Notification',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['notification'])) {
        $this->notification = $vals['notification'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateNotification_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->notification = new \Airavata\Model\Workspace\Notification();
            $xfer += $this->notification->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_updateNotification_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->notification !== null) {
      if (!is_object($this->notification)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('notification', TType::STRUCT, 2);
      $xfer += $this->notification->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_updateNotification_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_updateNotification_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_updateNotification_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_deleteNotification_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $gatewayId = null;
  /**
   * @var string
   */
  public $notificationId = 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' => 'notificationId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['gatewayId'])) {
        $this->gatewayId = $vals['gatewayId'];
      }
      if (isset($vals['notificationId'])) {
        $this->notificationId = $vals['notificationId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_deleteNotification_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::STRING) {
            $xfer += $input->readString($this->notificationId);
          } 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_deleteNotification_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->notificationId !== null) {
      $xfer += $output->writeFieldBegin('notificationId', TType::STRING, 3);
      $xfer += $output->writeString($this->notificationId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_deleteNotification_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_deleteNotification_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_deleteNotification_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_getNotification_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $gatewayId = null;
  /**
   * @var string
   */
  public $notificationId = 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' => 'notificationId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['gatewayId'])) {
        $this->gatewayId = $vals['gatewayId'];
      }
      if (isset($vals['notificationId'])) {
        $this->notificationId = $vals['notificationId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getNotification_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::STRING) {
            $xfer += $input->readString($this->notificationId);
          } 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_getNotification_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->notificationId !== null) {
      $xfer += $output->writeFieldBegin('notificationId', TType::STRING, 3);
      $xfer += $output->writeString($this->notificationId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getNotification_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Workspace\Notification
   */
  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\Workspace\Notification',
          ),
        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_getNotification_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\Notification();
            $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_getNotification_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_getAllNotifications_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_getAllNotifications_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_getAllNotifications_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_getAllNotifications_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Workspace\Notification[]
   */
  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\Workspace\Notification',
            ),
          ),
        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_getAllNotifications_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();
            $_size14 = 0;
            $_etype17 = 0;
            $xfer += $input->readListBegin($_etype17, $_size14);
            for ($_i18 = 0; $_i18 < $_size14; ++$_i18)
            {
              $elem19 = null;
              $elem19 = new \Airavata\Model\Workspace\Notification();
              $xfer += $elem19->read($input);
              $this->success []= $elem19;
            }
            $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_getAllNotifications_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 $iter20)
          {
            $xfer += $iter20->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_generateAndRegisterSSHKeys_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $description = 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',
          ),
        4 => array(
          'var' => 'description',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['description'])) {
        $this->description = $vals['description'];
      }
    }
  }

  public function getName() {
    return 'Airavata_generateAndRegisterSSHKeys_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 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->description);
          } 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_generateAndRegisterSSHKeys_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->description !== null) {
      $xfer += $output->writeFieldBegin('description', TType::STRING, 4);
      $xfer += $output->writeString($this->description);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_generateAndRegisterSSHKeys_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;

  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',
          ),
        );
    }
    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'];
      }
    }
  }

  public function getName() {
    return 'Airavata_generateAndRegisterSSHKeys_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;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_generateAndRegisterSSHKeys_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();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_registerPwdCredential_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $loginUserName = null;
  /**
   * @var string
   */
  public $password = null;
  /**
   * @var string
   */
  public $description = 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',
          ),
        4 => array(
          'var' => 'loginUserName',
          'type' => TType::STRING,
          ),
        5 => array(
          'var' => 'password',
          'type' => TType::STRING,
          ),
        6 => array(
          'var' => 'description',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['loginUserName'])) {
        $this->loginUserName = $vals['loginUserName'];
      }
      if (isset($vals['password'])) {
        $this->password = $vals['password'];
      }
      if (isset($vals['description'])) {
        $this->description = $vals['description'];
      }
    }
  }

  public function getName() {
    return 'Airavata_registerPwdCredential_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 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->loginUserName);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->password);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->description);
          } 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_registerPwdCredential_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->loginUserName !== null) {
      $xfer += $output->writeFieldBegin('loginUserName', TType::STRING, 4);
      $xfer += $output->writeString($this->loginUserName);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->password !== null) {
      $xfer += $output->writeFieldBegin('password', TType::STRING, 5);
      $xfer += $output->writeString($this->password);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->description !== null) {
      $xfer += $output->writeFieldBegin('description', TType::STRING, 6);
      $xfer += $output->writeString($this->description);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_registerPwdCredential_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;

  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',
          ),
        );
    }
    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'];
      }
    }
  }

  public function getName() {
    return 'Airavata_registerPwdCredential_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;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_registerPwdCredential_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();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getCredentialSummary_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $tokenId = 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' => 'tokenId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['tokenId'])) {
        $this->tokenId = $vals['tokenId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getCredentialSummary_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->tokenId);
          } 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_getCredentialSummary_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->tokenId !== null) {
      $xfer += $output->writeFieldBegin('tokenId', TType::STRING, 2);
      $xfer += $output->writeString($this->tokenId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getCredentialSummary_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Credential\Store\CredentialSummary
   */
  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\Credential\Store\CredentialSummary',
          ),
        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_getCredentialSummary_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\Credential\Store\CredentialSummary();
            $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_getCredentialSummary_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_getAllCredentialSummaries_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var int
   */
  public $type = 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' => 'type',
          'type' => TType::I32,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['type'])) {
        $this->type = $vals['type'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getAllCredentialSummaries_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::I32) {
            $xfer += $input->readI32($this->type);
          } 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_getAllCredentialSummaries_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->type !== null) {
      $xfer += $output->writeFieldBegin('type', TType::I32, 2);
      $xfer += $output->writeI32($this->type);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getAllCredentialSummaries_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Credential\Store\CredentialSummary[]
   */
  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;

  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\Credential\Store\CredentialSummary',
            ),
          ),
        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',
          ),
        );
    }
    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'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getAllCredentialSummaries_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();
            $_size21 = 0;
            $_etype24 = 0;
            $xfer += $input->readListBegin($_etype24, $_size21);
            for ($_i25 = 0; $_i25 < $_size21; ++$_i25)
            {
              $elem26 = null;
              $elem26 = new \Airavata\Model\Credential\Store\CredentialSummary();
              $xfer += $elem26->read($input);
              $this->success []= $elem26;
            }
            $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;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_getAllCredentialSummaries_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 $iter27)
          {
            $xfer += $iter27->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();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_deleteSSHPubKey_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $airavataCredStoreToken = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'authzToken',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Security\AuthzToken',
          ),
        2 => array(
          'var' => 'airavataCredStoreToken',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['airavataCredStoreToken'])) {
        $this->airavataCredStoreToken = $vals['airavataCredStoreToken'];
      }
    }
  }

  public function getName() {
    return 'Airavata_deleteSSHPubKey_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->airavataCredStoreToken);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_deleteSSHPubKey_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->airavataCredStoreToken !== null) {
      $xfer += $output->writeFieldBegin('airavataCredStoreToken', TType::STRING, 2);
      $xfer += $output->writeString($this->airavataCredStoreToken);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_deleteSSHPubKey_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_deleteSSHPubKey_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_deleteSSHPubKey_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_deletePWDCredential_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $airavataCredStoreToken = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'authzToken',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Security\AuthzToken',
          ),
        2 => array(
          'var' => 'airavataCredStoreToken',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['airavataCredStoreToken'])) {
        $this->airavataCredStoreToken = $vals['airavataCredStoreToken'];
      }
    }
  }

  public function getName() {
    return 'Airavata_deletePWDCredential_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->airavataCredStoreToken);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_deletePWDCredential_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->airavataCredStoreToken !== null) {
      $xfer += $output->writeFieldBegin('airavataCredStoreToken', TType::STRING, 2);
      $xfer += $output->writeString($this->airavataCredStoreToken);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_deletePWDCredential_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_deletePWDCredential_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_deletePWDCredential_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_createProject_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $gatewayId = null;
  /**
   * @var \Airavata\Model\Workspace\Project
   */
  public $project = 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' => 'project',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Workspace\Project',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['gatewayId'])) {
        $this->gatewayId = $vals['gatewayId'];
      }
      if (isset($vals['project'])) {
        $this->project = $vals['project'];
      }
    }
  }

  public function getName() {
    return 'Airavata_createProject_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->project = new \Airavata\Model\Workspace\Project();
            $xfer += $this->project->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_createProject_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->project !== null) {
      if (!is_object($this->project)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('project', TType::STRUCT, 3);
      $xfer += $this->project->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_createProject_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_createProject_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_createProject_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_updateProject_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $projectId = null;
  /**
   * @var \Airavata\Model\Workspace\Project
   */
  public $updatedProject = 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' => 'projectId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'updatedProject',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Workspace\Project',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['projectId'])) {
        $this->projectId = $vals['projectId'];
      }
      if (isset($vals['updatedProject'])) {
        $this->updatedProject = $vals['updatedProject'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateProject_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->projectId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->updatedProject = new \Airavata\Model\Workspace\Project();
            $xfer += $this->updatedProject->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_updateProject_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->projectId !== null) {
      $xfer += $output->writeFieldBegin('projectId', TType::STRING, 2);
      $xfer += $output->writeString($this->projectId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->updatedProject !== null) {
      if (!is_object($this->updatedProject)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('updatedProject', TType::STRUCT, 3);
      $xfer += $this->updatedProject->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_updateProject_result {
  static $_TSPEC;

  /**
   * @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\ProjectNotFoundException
   */
  public $pnfe = 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' => 'ace',
          'type' => TType::STRUCT,
          'class' => '\Airavata\API\Error\AiravataClientException',
          ),
        3 => array(
          'var' => 'ase',
          'type' => TType::STRUCT,
          'class' => '\Airavata\API\Error\AiravataSystemException',
          ),
        4 => array(
          'var' => 'pnfe',
          'type' => TType::STRUCT,
          'class' => '\Airavata\API\Error\ProjectNotFoundException',
          ),
        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['ace'])) {
        $this->ace = $vals['ace'];
      }
      if (isset($vals['ase'])) {
        $this->ase = $vals['ase'];
      }
      if (isset($vals['pnfe'])) {
        $this->pnfe = $vals['pnfe'];
      }
      if (isset($vals['ae'])) {
        $this->ae = $vals['ae'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateProject_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->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->pnfe = new \Airavata\API\Error\ProjectNotFoundException();
            $xfer += $this->pnfe->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_updateProject_result');
    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->pnfe !== null) {
      $xfer += $output->writeFieldBegin('pnfe', TType::STRUCT, 4);
      $xfer += $this->pnfe->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_getProject_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $projectId = 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' => 'projectId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['projectId'])) {
        $this->projectId = $vals['projectId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getProject_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->projectId);
          } 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_getProject_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->projectId !== null) {
      $xfer += $output->writeFieldBegin('projectId', TType::STRING, 2);
      $xfer += $output->writeString($this->projectId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getProject_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Workspace\Project
   */
  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\ProjectNotFoundException
   */
  public $pnfe = 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\Project',
          ),
        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' => 'pnfe',
          'type' => TType::STRUCT,
          'class' => '\Airavata\API\Error\ProjectNotFoundException',
          ),
        5 => 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['pnfe'])) {
        $this->pnfe = $vals['pnfe'];
      }
      if (isset($vals['ae'])) {
        $this->ae = $vals['ae'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getProject_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\Project();
            $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->pnfe = new \Airavata\API\Error\ProjectNotFoundException();
            $xfer += $this->pnfe->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_getProject_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->pnfe !== null) {
      $xfer += $output->writeFieldBegin('pnfe', TType::STRUCT, 4);
      $xfer += $this->pnfe->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_deleteProject_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $projectId = 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' => 'projectId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['projectId'])) {
        $this->projectId = $vals['projectId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_deleteProject_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->projectId);
          } 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_deleteProject_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->projectId !== null) {
      $xfer += $output->writeFieldBegin('projectId', TType::STRING, 2);
      $xfer += $output->writeString($this->projectId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_deleteProject_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\ProjectNotFoundException
   */
  public $pnfe = 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' => 'pnfe',
          'type' => TType::STRUCT,
          'class' => '\Airavata\API\Error\ProjectNotFoundException',
          ),
        5 => 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['pnfe'])) {
        $this->pnfe = $vals['pnfe'];
      }
      if (isset($vals['ae'])) {
        $this->ae = $vals['ae'];
      }
    }
  }

  public function getName() {
    return 'Airavata_deleteProject_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->pnfe = new \Airavata\API\Error\ProjectNotFoundException();
            $xfer += $this->pnfe->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_deleteProject_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->pnfe !== null) {
      $xfer += $output->writeFieldBegin('pnfe', TType::STRUCT, 4);
      $xfer += $this->pnfe->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_getUserProjects_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $gatewayId = null;
  /**
   * @var string
   */
  public $userName = null;
  /**
   * @var int
   */
  public $limit = null;
  /**
   * @var int
   */
  public $offset = 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' => 'userName',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'limit',
          'type' => TType::I32,
          ),
        5 => array(
          'var' => 'offset',
          '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['userName'])) {
        $this->userName = $vals['userName'];
      }
      if (isset($vals['limit'])) {
        $this->limit = $vals['limit'];
      }
      if (isset($vals['offset'])) {
        $this->offset = $vals['offset'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getUserProjects_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::STRING) {
            $xfer += $input->readString($this->userName);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->limit);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->offset);
          } 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_getUserProjects_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->userName !== null) {
      $xfer += $output->writeFieldBegin('userName', TType::STRING, 3);
      $xfer += $output->writeString($this->userName);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->limit !== null) {
      $xfer += $output->writeFieldBegin('limit', TType::I32, 4);
      $xfer += $output->writeI32($this->limit);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->offset !== null) {
      $xfer += $output->writeFieldBegin('offset', TType::I32, 5);
      $xfer += $output->writeI32($this->offset);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getUserProjects_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Workspace\Project[]
   */
  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\Workspace\Project',
            ),
          ),
        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_getUserProjects_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();
            $_size28 = 0;
            $_etype31 = 0;
            $xfer += $input->readListBegin($_etype31, $_size28);
            for ($_i32 = 0; $_i32 < $_size28; ++$_i32)
            {
              $elem33 = null;
              $elem33 = new \Airavata\Model\Workspace\Project();
              $xfer += $elem33->read($input);
              $this->success []= $elem33;
            }
            $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_getUserProjects_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 $iter34)
          {
            $xfer += $iter34->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_searchProjects_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $gatewayId = null;
  /**
   * @var string
   */
  public $userName = null;
  /**
   * @var array
   */
  public $filters = null;
  /**
   * @var int
   */
  public $limit = null;
  /**
   * @var int
   */
  public $offset = 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' => 'userName',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'filters',
          'type' => TType::MAP,
          'ktype' => TType::I32,
          'vtype' => TType::STRING,
          'key' => array(
            'type' => TType::I32,
          ),
          'val' => array(
            'type' => TType::STRING,
            ),
          ),
        5 => array(
          'var' => 'limit',
          'type' => TType::I32,
          ),
        6 => array(
          'var' => 'offset',
          '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['userName'])) {
        $this->userName = $vals['userName'];
      }
      if (isset($vals['filters'])) {
        $this->filters = $vals['filters'];
      }
      if (isset($vals['limit'])) {
        $this->limit = $vals['limit'];
      }
      if (isset($vals['offset'])) {
        $this->offset = $vals['offset'];
      }
    }
  }

  public function getName() {
    return 'Airavata_searchProjects_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::STRING) {
            $xfer += $input->readString($this->userName);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::MAP) {
            $this->filters = array();
            $_size35 = 0;
            $_ktype36 = 0;
            $_vtype37 = 0;
            $xfer += $input->readMapBegin($_ktype36, $_vtype37, $_size35);
            for ($_i39 = 0; $_i39 < $_size35; ++$_i39)
            {
              $key40 = 0;
              $val41 = '';
              $xfer += $input->readI32($key40);
              $xfer += $input->readString($val41);
              $this->filters[$key40] = $val41;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->limit);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->offset);
          } 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_searchProjects_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->userName !== null) {
      $xfer += $output->writeFieldBegin('userName', TType::STRING, 3);
      $xfer += $output->writeString($this->userName);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->filters !== null) {
      if (!is_array($this->filters)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('filters', TType::MAP, 4);
      {
        $output->writeMapBegin(TType::I32, TType::STRING, count($this->filters));
        {
          foreach ($this->filters as $kiter42 => $viter43)
          {
            $xfer += $output->writeI32($kiter42);
            $xfer += $output->writeString($viter43);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->limit !== null) {
      $xfer += $output->writeFieldBegin('limit', TType::I32, 5);
      $xfer += $output->writeI32($this->limit);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->offset !== null) {
      $xfer += $output->writeFieldBegin('offset', TType::I32, 6);
      $xfer += $output->writeI32($this->offset);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_searchProjects_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Workspace\Project[]
   */
  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\Workspace\Project',
            ),
          ),
        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_searchProjects_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();
            $_size44 = 0;
            $_etype47 = 0;
            $xfer += $input->readListBegin($_etype47, $_size44);
            for ($_i48 = 0; $_i48 < $_size44; ++$_i48)
            {
              $elem49 = null;
              $elem49 = new \Airavata\Model\Workspace\Project();
              $xfer += $elem49->read($input);
              $this->success []= $elem49;
            }
            $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_searchProjects_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 $iter50)
          {
            $xfer += $iter50->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_searchExperiments_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $gatewayId = null;
  /**
   * @var string
   */
  public $userName = null;
  /**
   * @var array
   */
  public $filters = null;
  /**
   * @var int
   */
  public $limit = null;
  /**
   * @var int
   */
  public $offset = 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' => 'userName',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'filters',
          'type' => TType::MAP,
          'ktype' => TType::I32,
          'vtype' => TType::STRING,
          'key' => array(
            'type' => TType::I32,
          ),
          'val' => array(
            'type' => TType::STRING,
            ),
          ),
        5 => array(
          'var' => 'limit',
          'type' => TType::I32,
          ),
        6 => array(
          'var' => 'offset',
          '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['userName'])) {
        $this->userName = $vals['userName'];
      }
      if (isset($vals['filters'])) {
        $this->filters = $vals['filters'];
      }
      if (isset($vals['limit'])) {
        $this->limit = $vals['limit'];
      }
      if (isset($vals['offset'])) {
        $this->offset = $vals['offset'];
      }
    }
  }

  public function getName() {
    return 'Airavata_searchExperiments_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::STRING) {
            $xfer += $input->readString($this->userName);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::MAP) {
            $this->filters = array();
            $_size51 = 0;
            $_ktype52 = 0;
            $_vtype53 = 0;
            $xfer += $input->readMapBegin($_ktype52, $_vtype53, $_size51);
            for ($_i55 = 0; $_i55 < $_size51; ++$_i55)
            {
              $key56 = 0;
              $val57 = '';
              $xfer += $input->readI32($key56);
              $xfer += $input->readString($val57);
              $this->filters[$key56] = $val57;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->limit);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->offset);
          } 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_searchExperiments_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->userName !== null) {
      $xfer += $output->writeFieldBegin('userName', TType::STRING, 3);
      $xfer += $output->writeString($this->userName);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->filters !== null) {
      if (!is_array($this->filters)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('filters', TType::MAP, 4);
      {
        $output->writeMapBegin(TType::I32, TType::STRING, count($this->filters));
        {
          foreach ($this->filters as $kiter58 => $viter59)
          {
            $xfer += $output->writeI32($kiter58);
            $xfer += $output->writeString($viter59);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->limit !== null) {
      $xfer += $output->writeFieldBegin('limit', TType::I32, 5);
      $xfer += $output->writeI32($this->limit);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->offset !== null) {
      $xfer += $output->writeFieldBegin('offset', TType::I32, 6);
      $xfer += $output->writeI32($this->offset);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_searchExperiments_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Experiment\ExperimentSummaryModel[]
   */
  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\Experiment\ExperimentSummaryModel',
            ),
          ),
        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_searchExperiments_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();
            $_size60 = 0;
            $_etype63 = 0;
            $xfer += $input->readListBegin($_etype63, $_size60);
            for ($_i64 = 0; $_i64 < $_size60; ++$_i64)
            {
              $elem65 = null;
              $elem65 = new \Airavata\Model\Experiment\ExperimentSummaryModel();
              $xfer += $elem65->read($input);
              $this->success []= $elem65;
            }
            $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_searchExperiments_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 $iter66)
          {
            $xfer += $iter66->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_getExperimentStatistics_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $gatewayId = null;
  /**
   * @var int
   */
  public $fromTime = null;
  /**
   * @var int
   */
  public $toTime = null;
  /**
   * @var string
   */
  public $userName = null;
  /**
   * @var string
   */
  public $applicationName = null;
  /**
   * @var string
   */
  public $resourceHostName = null;
  /**
   * @var int
   */
  public $limit = 50;
  /**
   * @var int
   */
  public $offset = 0;

  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' => 'fromTime',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'toTime',
          'type' => TType::I64,
          ),
        5 => array(
          'var' => 'userName',
          'type' => TType::STRING,
          ),
        6 => array(
          'var' => 'applicationName',
          'type' => TType::STRING,
          ),
        7 => array(
          'var' => 'resourceHostName',
          'type' => TType::STRING,
          ),
        8 => array(
          'var' => 'limit',
          'type' => TType::I32,
          ),
        9 => array(
          'var' => 'offset',
          '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['fromTime'])) {
        $this->fromTime = $vals['fromTime'];
      }
      if (isset($vals['toTime'])) {
        $this->toTime = $vals['toTime'];
      }
      if (isset($vals['userName'])) {
        $this->userName = $vals['userName'];
      }
      if (isset($vals['applicationName'])) {
        $this->applicationName = $vals['applicationName'];
      }
      if (isset($vals['resourceHostName'])) {
        $this->resourceHostName = $vals['resourceHostName'];
      }
      if (isset($vals['limit'])) {
        $this->limit = $vals['limit'];
      }
      if (isset($vals['offset'])) {
        $this->offset = $vals['offset'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getExperimentStatistics_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::I64) {
            $xfer += $input->readI64($this->fromTime);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->toTime);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->userName);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->applicationName);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 7:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->resourceHostName);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 8:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->limit);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 9:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->offset);
          } 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_getExperimentStatistics_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->fromTime !== null) {
      $xfer += $output->writeFieldBegin('fromTime', TType::I64, 3);
      $xfer += $output->writeI64($this->fromTime);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->toTime !== null) {
      $xfer += $output->writeFieldBegin('toTime', TType::I64, 4);
      $xfer += $output->writeI64($this->toTime);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->userName !== null) {
      $xfer += $output->writeFieldBegin('userName', TType::STRING, 5);
      $xfer += $output->writeString($this->userName);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->applicationName !== null) {
      $xfer += $output->writeFieldBegin('applicationName', TType::STRING, 6);
      $xfer += $output->writeString($this->applicationName);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->resourceHostName !== null) {
      $xfer += $output->writeFieldBegin('resourceHostName', TType::STRING, 7);
      $xfer += $output->writeString($this->resourceHostName);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->limit !== null) {
      $xfer += $output->writeFieldBegin('limit', TType::I32, 8);
      $xfer += $output->writeI32($this->limit);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->offset !== null) {
      $xfer += $output->writeFieldBegin('offset', TType::I32, 9);
      $xfer += $output->writeI32($this->offset);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getExperimentStatistics_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Experiment\ExperimentStatistics
   */
  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\Experiment\ExperimentStatistics',
          ),
        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_getExperimentStatistics_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\Experiment\ExperimentStatistics();
            $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_getExperimentStatistics_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_getExperimentsInProject_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $projectId = null;
  /**
   * @var int
   */
  public $limit = null;
  /**
   * @var int
   */
  public $offset = 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' => 'projectId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'limit',
          'type' => TType::I32,
          ),
        4 => array(
          'var' => 'offset',
          'type' => TType::I32,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['projectId'])) {
        $this->projectId = $vals['projectId'];
      }
      if (isset($vals['limit'])) {
        $this->limit = $vals['limit'];
      }
      if (isset($vals['offset'])) {
        $this->offset = $vals['offset'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getExperimentsInProject_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->projectId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->limit);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->offset);
          } 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_getExperimentsInProject_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->projectId !== null) {
      $xfer += $output->writeFieldBegin('projectId', TType::STRING, 2);
      $xfer += $output->writeString($this->projectId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->limit !== null) {
      $xfer += $output->writeFieldBegin('limit', TType::I32, 3);
      $xfer += $output->writeI32($this->limit);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->offset !== null) {
      $xfer += $output->writeFieldBegin('offset', TType::I32, 4);
      $xfer += $output->writeI32($this->offset);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getExperimentsInProject_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Experiment\ExperimentModel[]
   */
  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\ProjectNotFoundException
   */
  public $pnfe = 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\Experiment\ExperimentModel',
            ),
          ),
        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' => 'pnfe',
          'type' => TType::STRUCT,
          'class' => '\Airavata\API\Error\ProjectNotFoundException',
          ),
        5 => 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['pnfe'])) {
        $this->pnfe = $vals['pnfe'];
      }
      if (isset($vals['ae'])) {
        $this->ae = $vals['ae'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getExperimentsInProject_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();
            $_size67 = 0;
            $_etype70 = 0;
            $xfer += $input->readListBegin($_etype70, $_size67);
            for ($_i71 = 0; $_i71 < $_size67; ++$_i71)
            {
              $elem72 = null;
              $elem72 = new \Airavata\Model\Experiment\ExperimentModel();
              $xfer += $elem72->read($input);
              $this->success []= $elem72;
            }
            $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->pnfe = new \Airavata\API\Error\ProjectNotFoundException();
            $xfer += $this->pnfe->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_getExperimentsInProject_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 $iter73)
          {
            $xfer += $iter73->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->pnfe !== null) {
      $xfer += $output->writeFieldBegin('pnfe', TType::STRUCT, 4);
      $xfer += $this->pnfe->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_getUserExperiments_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $gatewayId = null;
  /**
   * @var string
   */
  public $userName = null;
  /**
   * @var int
   */
  public $limit = null;
  /**
   * @var int
   */
  public $offset = 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' => 'userName',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'limit',
          'type' => TType::I32,
          ),
        5 => array(
          'var' => 'offset',
          '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['userName'])) {
        $this->userName = $vals['userName'];
      }
      if (isset($vals['limit'])) {
        $this->limit = $vals['limit'];
      }
      if (isset($vals['offset'])) {
        $this->offset = $vals['offset'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getUserExperiments_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::STRING) {
            $xfer += $input->readString($this->userName);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->limit);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->offset);
          } 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_getUserExperiments_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->userName !== null) {
      $xfer += $output->writeFieldBegin('userName', TType::STRING, 3);
      $xfer += $output->writeString($this->userName);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->limit !== null) {
      $xfer += $output->writeFieldBegin('limit', TType::I32, 4);
      $xfer += $output->writeI32($this->limit);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->offset !== null) {
      $xfer += $output->writeFieldBegin('offset', TType::I32, 5);
      $xfer += $output->writeI32($this->offset);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getUserExperiments_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Experiment\ExperimentModel[]
   */
  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\Experiment\ExperimentModel',
            ),
          ),
        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_getUserExperiments_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();
            $_size74 = 0;
            $_etype77 = 0;
            $xfer += $input->readListBegin($_etype77, $_size74);
            for ($_i78 = 0; $_i78 < $_size74; ++$_i78)
            {
              $elem79 = null;
              $elem79 = new \Airavata\Model\Experiment\ExperimentModel();
              $xfer += $elem79->read($input);
              $this->success []= $elem79;
            }
            $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_getUserExperiments_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 $iter80)
          {
            $xfer += $iter80->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_createExperiment_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $gatewayId = null;
  /**
   * @var \Airavata\Model\Experiment\ExperimentModel
   */
  public $experiment = 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' => 'experiment',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Experiment\ExperimentModel',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['gatewayId'])) {
        $this->gatewayId = $vals['gatewayId'];
      }
      if (isset($vals['experiment'])) {
        $this->experiment = $vals['experiment'];
      }
    }
  }

  public function getName() {
    return 'Airavata_createExperiment_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->experiment = new \Airavata\Model\Experiment\ExperimentModel();
            $xfer += $this->experiment->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_createExperiment_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->experiment !== null) {
      if (!is_object($this->experiment)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('experiment', TType::STRUCT, 3);
      $xfer += $this->experiment->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_createExperiment_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_createExperiment_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_createExperiment_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_deleteExperiment_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $experimentId = 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' => 'experimentId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['experimentId'])) {
        $this->experimentId = $vals['experimentId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_deleteExperiment_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->experimentId);
          } 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_deleteExperiment_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->experimentId !== null) {
      $xfer += $output->writeFieldBegin('experimentId', TType::STRING, 2);
      $xfer += $output->writeString($this->experimentId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_deleteExperiment_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_deleteExperiment_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_deleteExperiment_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_getExperiment_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $airavataExperimentId = 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,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['airavataExperimentId'])) {
        $this->airavataExperimentId = $vals['airavataExperimentId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getExperiment_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;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_getExperiment_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();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getExperiment_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Experiment\ExperimentModel
   */
  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;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Experiment\ExperimentModel',
          ),
        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['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'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getExperiment_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\Experiment\ExperimentModel();
            $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->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_getExperiment_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->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_getExperimentByAdmin_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $airavataExperimentId = 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,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['airavataExperimentId'])) {
        $this->airavataExperimentId = $vals['airavataExperimentId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getExperimentByAdmin_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;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_getExperimentByAdmin_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();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getExperimentByAdmin_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Experiment\ExperimentModel
   */
  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;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Experiment\ExperimentModel',
          ),
        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['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'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getExperimentByAdmin_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\Experiment\ExperimentModel();
            $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->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_getExperimentByAdmin_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->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_getDetailedExperimentTree_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $airavataExperimentId = 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,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['airavataExperimentId'])) {
        $this->airavataExperimentId = $vals['airavataExperimentId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getDetailedExperimentTree_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;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_getDetailedExperimentTree_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();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getDetailedExperimentTree_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Experiment\ExperimentModel
   */
  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;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Experiment\ExperimentModel',
          ),
        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['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'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getDetailedExperimentTree_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\Experiment\ExperimentModel();
            $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->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_getDetailedExperimentTree_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->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_updateExperiment_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $airavataExperimentId = null;
  /**
   * @var \Airavata\Model\Experiment\ExperimentModel
   */
  public $experiment = 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' => 'experiment',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Experiment\ExperimentModel',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['airavataExperimentId'])) {
        $this->airavataExperimentId = $vals['airavataExperimentId'];
      }
      if (isset($vals['experiment'])) {
        $this->experiment = $vals['experiment'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateExperiment_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::STRUCT) {
            $this->experiment = new \Airavata\Model\Experiment\ExperimentModel();
            $xfer += $this->experiment->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_updateExperiment_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->experiment !== null) {
      if (!is_object($this->experiment)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('experiment', TType::STRUCT, 3);
      $xfer += $this->experiment->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_updateExperiment_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_updateExperiment_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_updateExperiment_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_updateExperimentConfiguration_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $airavataExperimentId = null;
  /**
   * @var \Airavata\Model\Experiment\UserConfigurationDataModel
   */
  public $userConfiguration = 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' => 'userConfiguration',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Experiment\UserConfigurationDataModel',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['airavataExperimentId'])) {
        $this->airavataExperimentId = $vals['airavataExperimentId'];
      }
      if (isset($vals['userConfiguration'])) {
        $this->userConfiguration = $vals['userConfiguration'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateExperimentConfiguration_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::STRUCT) {
            $this->userConfiguration = new \Airavata\Model\Experiment\UserConfigurationDataModel();
            $xfer += $this->userConfiguration->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_updateExperimentConfiguration_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->userConfiguration !== null) {
      if (!is_object($this->userConfiguration)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('userConfiguration', TType::STRUCT, 3);
      $xfer += $this->userConfiguration->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_updateExperimentConfiguration_result {
  static $_TSPEC;

  /**
   * @var \Airavata\API\Error\AuthorizationException
   */
  public $ae = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ae',
          'type' => TType::STRUCT,
          'class' => '\Airavata\API\Error\AuthorizationException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ae'])) {
        $this->ae = $vals['ae'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateExperimentConfiguration_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->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_updateExperimentConfiguration_result');
    if ($this->ae !== null) {
      $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 1);
      $xfer += $this->ae->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_updateResourceScheduleing_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $airavataExperimentId = null;
  /**
   * @var \Airavata\Model\Scheduling\ComputationalResourceSchedulingModel
   */
  public $resourceScheduling = 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' => 'resourceScheduling',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Scheduling\ComputationalResourceSchedulingModel',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['airavataExperimentId'])) {
        $this->airavataExperimentId = $vals['airavataExperimentId'];
      }
      if (isset($vals['resourceScheduling'])) {
        $this->resourceScheduling = $vals['resourceScheduling'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateResourceScheduleing_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::STRUCT) {
            $this->resourceScheduling = new \Airavata\Model\Scheduling\ComputationalResourceSchedulingModel();
            $xfer += $this->resourceScheduling->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_updateResourceScheduleing_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->resourceScheduling !== null) {
      if (!is_object($this->resourceScheduling)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('resourceScheduling', TType::STRUCT, 3);
      $xfer += $this->resourceScheduling->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_updateResourceScheduleing_result {
  static $_TSPEC;

  /**
   * @var \Airavata\API\Error\AuthorizationException
   */
  public $ae = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ae',
          'type' => TType::STRUCT,
          'class' => '\Airavata\API\Error\AuthorizationException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ae'])) {
        $this->ae = $vals['ae'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateResourceScheduleing_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->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_updateResourceScheduleing_result');
    if ($this->ae !== null) {
      $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 1);
      $xfer += $this->ae->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_validateExperiment_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $airavataExperimentId = 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,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['airavataExperimentId'])) {
        $this->airavataExperimentId = $vals['airavataExperimentId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_validateExperiment_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;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_validateExperiment_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();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_validateExperiment_result {
  static $_TSPEC;

  /**
   * @var bool
   */
  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;

  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' => '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['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'];
      }
    }
  }

  public function getName() {
    return 'Airavata_validateExperiment_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->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_validateExperiment_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->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_launchExperiment_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_launchExperiment_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_launchExperiment_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_launchExperiment_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_launchExperiment_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_launchExperiment_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_getExperimentStatus_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $airavataExperimentId = 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,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['airavataExperimentId'])) {
        $this->airavataExperimentId = $vals['airavataExperimentId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getExperimentStatus_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;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_getExperimentStatus_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();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getExperimentStatus_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Status\ExperimentStatus
   */
  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;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Status\ExperimentStatus',
          ),
        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['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'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getExperimentStatus_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\Status\ExperimentStatus();
            $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->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_getExperimentStatus_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->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_getExperimentOutputs_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $airavataExperimentId = 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,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['airavataExperimentId'])) {
        $this->airavataExperimentId = $vals['airavataExperimentId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getExperimentOutputs_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;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_getExperimentOutputs_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();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getExperimentOutputs_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Application\Io\OutputDataObjectType[]
   */
  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;

  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\Application\Io\OutputDataObjectType',
            ),
          ),
        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['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'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getExperimentOutputs_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();
            $_size81 = 0;
            $_etype84 = 0;
            $xfer += $input->readListBegin($_etype84, $_size81);
            for ($_i85 = 0; $_i85 < $_size81; ++$_i85)
            {
              $elem86 = null;
              $elem86 = new \Airavata\Model\Application\Io\OutputDataObjectType();
              $xfer += $elem86->read($input);
              $this->success []= $elem86;
            }
            $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->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_getExperimentOutputs_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 $iter87)
          {
            $xfer += $iter87->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->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_getIntermediateOutputs_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $airavataExperimentId = 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,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['airavataExperimentId'])) {
        $this->airavataExperimentId = $vals['airavataExperimentId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getIntermediateOutputs_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;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_getIntermediateOutputs_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();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getIntermediateOutputs_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Application\Io\OutputDataObjectType[]
   */
  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;

  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\Application\Io\OutputDataObjectType',
            ),
          ),
        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['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'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getIntermediateOutputs_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();
            $_size88 = 0;
            $_etype91 = 0;
            $xfer += $input->readListBegin($_etype91, $_size88);
            for ($_i92 = 0; $_i92 < $_size88; ++$_i92)
            {
              $elem93 = null;
              $elem93 = new \Airavata\Model\Application\Io\OutputDataObjectType();
              $xfer += $elem93->read($input);
              $this->success []= $elem93;
            }
            $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->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_getIntermediateOutputs_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 $iter94)
          {
            $xfer += $iter94->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->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_fetchIntermediateOutputs_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $airavataExperimentId = null;
  /**
   * @var string[]
   */
  public $outputNames = 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' => 'outputNames',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            '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['outputNames'])) {
        $this->outputNames = $vals['outputNames'];
      }
    }
  }

  public function getName() {
    return 'Airavata_fetchIntermediateOutputs_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::LST) {
            $this->outputNames = array();
            $_size95 = 0;
            $_etype98 = 0;
            $xfer += $input->readListBegin($_etype98, $_size95);
            for ($_i99 = 0; $_i99 < $_size95; ++$_i99)
            {
              $elem100 = null;
              $xfer += $input->readString($elem100);
              $this->outputNames []= $elem100;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_fetchIntermediateOutputs_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->outputNames !== null) {
      if (!is_array($this->outputNames)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('outputNames', TType::LST, 3);
      {
        $output->writeListBegin(TType::STRING, count($this->outputNames));
        {
          foreach ($this->outputNames as $iter101)
          {
            $xfer += $output->writeString($iter101);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_fetchIntermediateOutputs_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_fetchIntermediateOutputs_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_fetchIntermediateOutputs_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_getIntermediateOutputProcessStatus_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $airavataExperimentId = null;
  /**
   * @var string[]
   */
  public $outputNames = 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' => 'outputNames',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            '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['outputNames'])) {
        $this->outputNames = $vals['outputNames'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getIntermediateOutputProcessStatus_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::LST) {
            $this->outputNames = array();
            $_size102 = 0;
            $_etype105 = 0;
            $xfer += $input->readListBegin($_etype105, $_size102);
            for ($_i106 = 0; $_i106 < $_size102; ++$_i106)
            {
              $elem107 = null;
              $xfer += $input->readString($elem107);
              $this->outputNames []= $elem107;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_getIntermediateOutputProcessStatus_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->outputNames !== null) {
      if (!is_array($this->outputNames)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('outputNames', TType::LST, 3);
      {
        $output->writeListBegin(TType::STRING, count($this->outputNames));
        {
          foreach ($this->outputNames as $iter108)
          {
            $xfer += $output->writeString($iter108);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getIntermediateOutputProcessStatus_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Status\ProcessStatus
   */
  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;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Status\ProcessStatus',
          ),
        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['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'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getIntermediateOutputProcessStatus_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\Status\ProcessStatus();
            $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->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_getIntermediateOutputProcessStatus_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->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_getJobStatuses_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $airavataExperimentId = 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,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['airavataExperimentId'])) {
        $this->airavataExperimentId = $vals['airavataExperimentId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getJobStatuses_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;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_getJobStatuses_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();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getJobStatuses_result {
  static $_TSPEC;

  /**
   * @var array
   */
  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;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::STRING,
          'vtype' => TType::STRUCT,
          'key' => array(
            'type' => TType::STRING,
          ),
          'val' => array(
            'type' => TType::STRUCT,
            'class' => '\Airavata\Model\Status\JobStatus',
            ),
          ),
        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['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'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getJobStatuses_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::MAP) {
            $this->success = array();
            $_size109 = 0;
            $_ktype110 = 0;
            $_vtype111 = 0;
            $xfer += $input->readMapBegin($_ktype110, $_vtype111, $_size109);
            for ($_i113 = 0; $_i113 < $_size109; ++$_i113)
            {
              $key114 = '';
              $val115 = new \Airavata\Model\Status\JobStatus();
              $xfer += $input->readString($key114);
              $val115 = new \Airavata\Model\Status\JobStatus();
              $xfer += $val115->read($input);
              $this->success[$key114] = $val115;
            }
            $xfer += $input->readMapEnd();
          } 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;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_getJobStatuses_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::MAP, 0);
      {
        $output->writeMapBegin(TType::STRING, TType::STRUCT, count($this->success));
        {
          foreach ($this->success as $kiter116 => $viter117)
          {
            $xfer += $output->writeString($kiter116);
            $xfer += $viter117->write($output);
          }
        }
        $output->writeMapEnd();
      }
      $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();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getJobDetails_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $airavataExperimentId = 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,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['airavataExperimentId'])) {
        $this->airavataExperimentId = $vals['airavataExperimentId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getJobDetails_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;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_getJobDetails_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();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getJobDetails_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Job\JobModel[]
   */
  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;

  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\Job\JobModel',
            ),
          ),
        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['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'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getJobDetails_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();
            $_size118 = 0;
            $_etype121 = 0;
            $xfer += $input->readListBegin($_etype121, $_size118);
            for ($_i122 = 0; $_i122 < $_size118; ++$_i122)
            {
              $elem123 = null;
              $elem123 = new \Airavata\Model\Job\JobModel();
              $xfer += $elem123->read($input);
              $this->success []= $elem123;
            }
            $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->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_getJobDetails_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 $iter124)
          {
            $xfer += $iter124->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->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_cloneExperiment_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $existingExperimentID = null;
  /**
   * @var string
   */
  public $newExperimentName = null;
  /**
   * @var string
   */
  public $newExperimentProjectId = 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' => 'existingExperimentID',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'newExperimentName',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'newExperimentProjectId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['existingExperimentID'])) {
        $this->existingExperimentID = $vals['existingExperimentID'];
      }
      if (isset($vals['newExperimentName'])) {
        $this->newExperimentName = $vals['newExperimentName'];
      }
      if (isset($vals['newExperimentProjectId'])) {
        $this->newExperimentProjectId = $vals['newExperimentProjectId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_cloneExperiment_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->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_cloneExperiment_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_cloneExperiment_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_cloneExperiment_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_cloneExperiment_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_cloneExperimentByAdmin_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $existingExperimentID = null;
  /**
   * @var string
   */
  public $newExperimentName = null;
  /**
   * @var string
   */
  public $newExperimentProjectId = 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' => 'existingExperimentID',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'newExperimentName',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'newExperimentProjectId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['existingExperimentID'])) {
        $this->existingExperimentID = $vals['existingExperimentID'];
      }
      if (isset($vals['newExperimentName'])) {
        $this->newExperimentName = $vals['newExperimentName'];
      }
      if (isset($vals['newExperimentProjectId'])) {
        $this->newExperimentProjectId = $vals['newExperimentProjectId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_cloneExperimentByAdmin_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->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();
            $_size125 = 0;
            $_etype128 = 0;
            $xfer += $input->readListBegin($_etype128, $_size125);
            for ($_i129 = 0; $_i129 < $_size125; ++$_i129)
            {
              $elem130 = null;
              $elem130 = new \Airavata\Model\AppCatalog\AppDeployment\ApplicationModule();
              $xfer += $elem130->read($input);
              $this->success []= $elem130;
            }
            $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 $iter131)
          {
            $xfer += $iter131->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_getAccessibleAppModules_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_getAccessibleAppModules_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_getAccessibleAppModules_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_getAccessibleAppModules_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_getAccessibleAppModules_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();
            $_size132 = 0;
            $_etype135 = 0;
            $xfer += $input->readListBegin($_etype135, $_size132);
            for ($_i136 = 0; $_i136 < $_size132; ++$_i136)
            {
              $elem137 = null;
              $elem137 = new \Airavata\Model\AppCatalog\AppDeployment\ApplicationModule();
              $xfer += $elem137->read($input);
              $this->success []= $elem137;
            }
            $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_getAccessibleAppModules_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 $iter138)
          {
            $xfer += $iter138->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);
          } 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_deleteApplicationModule_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_deleteApplicationModule_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_deleteApplicationModule_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_deleteApplicationModule_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_registerApplicationDeployment_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $gatewayId = null;
  /**
   * @var \Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription
   */
  public $applicationDeployment = 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' => 'applicationDeployment',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['gatewayId'])) {
        $this->gatewayId = $vals['gatewayId'];
      }
      if (isset($vals['applicationDeployment'])) {
        $this->applicationDeployment = $vals['applicationDeployment'];
      }
    }
  }

  public function getName() {
    return 'Airavata_registerApplicationDeployment_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->applicationDeployment = new \Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription();
            $xfer += $this->applicationDeployment->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_registerApplicationDeployment_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->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);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_registerApplicationDeployment_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_registerApplicationDeployment_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_registerApplicationDeployment_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_getApplicationDeployment_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $appDeploymentId = 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' => 'appDeploymentId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['appDeploymentId'])) {
        $this->appDeploymentId = $vals['appDeploymentId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getApplicationDeployment_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->appDeploymentId);
          } 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_getApplicationDeployment_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->appDeploymentId !== null) {
      $xfer += $output->writeFieldBegin('appDeploymentId', TType::STRING, 2);
      $xfer += $output->writeString($this->appDeploymentId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getApplicationDeployment_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription
   */
  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\ApplicationDeploymentDescription',
          ),
        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_getApplicationDeployment_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\ApplicationDeploymentDescription();
            $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_getApplicationDeployment_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_updateApplicationDeployment_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $appDeploymentId = null;
  /**
   * @var \Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription
   */
  public $applicationDeployment = 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' => 'appDeploymentId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'applicationDeployment',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['appDeploymentId'])) {
        $this->appDeploymentId = $vals['appDeploymentId'];
      }
      if (isset($vals['applicationDeployment'])) {
        $this->applicationDeployment = $vals['applicationDeployment'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateApplicationDeployment_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->appDeploymentId);
          } 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);
          } 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_updateApplicationDeployment_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->appDeploymentId !== null) {
      $xfer += $output->writeFieldBegin('appDeploymentId', TType::STRING, 2);
      $xfer += $output->writeString($this->appDeploymentId);
      $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);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_updateApplicationDeployment_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_updateApplicationDeployment_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_updateApplicationDeployment_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_deleteApplicationDeployment_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $appDeploymentId = 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' => 'appDeploymentId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['appDeploymentId'])) {
        $this->appDeploymentId = $vals['appDeploymentId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_deleteApplicationDeployment_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->appDeploymentId);
          } 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_deleteApplicationDeployment_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->appDeploymentId !== null) {
      $xfer += $output->writeFieldBegin('appDeploymentId', TType::STRING, 2);
      $xfer += $output->writeString($this->appDeploymentId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_deleteApplicationDeployment_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_deleteApplicationDeployment_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_deleteApplicationDeployment_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_getAllApplicationDeployments_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_getAllApplicationDeployments_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_getAllApplicationDeployments_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_getAllApplicationDeployments_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription[]
   */
  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\ApplicationDeploymentDescription',
            ),
          ),
        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_getAllApplicationDeployments_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();
            $_size139 = 0;
            $_etype142 = 0;
            $xfer += $input->readListBegin($_etype142, $_size139);
            for ($_i143 = 0; $_i143 < $_size139; ++$_i143)
            {
              $elem144 = null;
              $elem144 = new \Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription();
              $xfer += $elem144->read($input);
              $this->success []= $elem144;
            }
            $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_getAllApplicationDeployments_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 $iter145)
          {
            $xfer += $iter145->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_getAccessibleApplicationDeployments_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $gatewayId = null;
  /**
   * @var int
   */
  public $permissionType = 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' => 'permissionType',
          '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['permissionType'])) {
        $this->permissionType = $vals['permissionType'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getAccessibleApplicationDeployments_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->permissionType);
          } 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_getAccessibleApplicationDeployments_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->permissionType !== null) {
      $xfer += $output->writeFieldBegin('permissionType', TType::I32, 3);
      $xfer += $output->writeI32($this->permissionType);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getAccessibleApplicationDeployments_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription[]
   */
  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\ApplicationDeploymentDescription',
            ),
          ),
        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_getAccessibleApplicationDeployments_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();
            $_size146 = 0;
            $_etype149 = 0;
            $xfer += $input->readListBegin($_etype149, $_size146);
            for ($_i150 = 0; $_i150 < $_size146; ++$_i150)
            {
              $elem151 = null;
              $elem151 = new \Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription();
              $xfer += $elem151->read($input);
              $this->success []= $elem151;
            }
            $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_getAccessibleApplicationDeployments_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 $iter152)
          {
            $xfer += $iter152->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_getAppModuleDeployedResources_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_getAppModuleDeployedResources_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_getAppModuleDeployedResources_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_getAppModuleDeployedResources_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::LST,
          'etype' => TType::STRING,
          'elem' => array(
            '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_getAppModuleDeployedResources_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();
            $_size153 = 0;
            $_etype156 = 0;
            $xfer += $input->readListBegin($_etype156, $_size153);
            for ($_i157 = 0; $_i157 < $_size153; ++$_i157)
            {
              $elem158 = null;
              $xfer += $input->readString($elem158);
              $this->success []= $elem158;
            }
            $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_getAppModuleDeployedResources_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::STRING, count($this->success));
        {
          foreach ($this->success as $iter159)
          {
            $xfer += $output->writeString($iter159);
          }
        }
        $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_getApplicationDeploymentsForAppModuleAndGroupResourceProfile_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $appModuleId = null;
  /**
   * @var string
   */
  public $groupResourceProfileId = 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' => 'groupResourceProfileId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['appModuleId'])) {
        $this->appModuleId = $vals['appModuleId'];
      }
      if (isset($vals['groupResourceProfileId'])) {
        $this->groupResourceProfileId = $vals['groupResourceProfileId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getApplicationDeploymentsForAppModuleAndGroupResourceProfile_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::STRING) {
            $xfer += $input->readString($this->groupResourceProfileId);
          } 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_getApplicationDeploymentsForAppModuleAndGroupResourceProfile_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->groupResourceProfileId !== null) {
      $xfer += $output->writeFieldBegin('groupResourceProfileId', TType::STRING, 3);
      $xfer += $output->writeString($this->groupResourceProfileId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getApplicationDeploymentsForAppModuleAndGroupResourceProfile_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription[]
   */
  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\ApplicationDeploymentDescription',
            ),
          ),
        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_getApplicationDeploymentsForAppModuleAndGroupResourceProfile_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();
            $_size160 = 0;
            $_etype163 = 0;
            $xfer += $input->readListBegin($_etype163, $_size160);
            for ($_i164 = 0; $_i164 < $_size160; ++$_i164)
            {
              $elem165 = null;
              $elem165 = new \Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription();
              $xfer += $elem165->read($input);
              $this->success []= $elem165;
            }
            $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_getApplicationDeploymentsForAppModuleAndGroupResourceProfile_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 $iter166)
          {
            $xfer += $iter166->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_registerApplicationInterface_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $gatewayId = null;
  /**
   * @var \Airavata\Model\AppCatalog\AppInterface\ApplicationInterfaceDescription
   */
  public $applicationInterface = 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' => 'applicationInterface',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\AppInterface\ApplicationInterfaceDescription',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['gatewayId'])) {
        $this->gatewayId = $vals['gatewayId'];
      }
      if (isset($vals['applicationInterface'])) {
        $this->applicationInterface = $vals['applicationInterface'];
      }
    }
  }

  public function getName() {
    return 'Airavata_registerApplicationInterface_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->applicationInterface = new \Airavata\Model\AppCatalog\AppInterface\ApplicationInterfaceDescription();
            $xfer += $this->applicationInterface->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_registerApplicationInterface_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->applicationInterface !== null) {
      if (!is_object($this->applicationInterface)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('applicationInterface', TType::STRUCT, 3);
      $xfer += $this->applicationInterface->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_registerApplicationInterface_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_registerApplicationInterface_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_registerApplicationInterface_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_cloneApplicationInterface_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $existingAppInterfaceID = null;
  /**
   * @var string
   */
  public $newApplicationName = 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' => 'existingAppInterfaceID',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'newApplicationName',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'gatewayId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['existingAppInterfaceID'])) {
        $this->existingAppInterfaceID = $vals['existingAppInterfaceID'];
      }
      if (isset($vals['newApplicationName'])) {
        $this->newApplicationName = $vals['newApplicationName'];
      }
      if (isset($vals['gatewayId'])) {
        $this->gatewayId = $vals['gatewayId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_cloneApplicationInterface_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->existingAppInterfaceID);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->newApplicationName);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          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_cloneApplicationInterface_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->existingAppInterfaceID !== null) {
      $xfer += $output->writeFieldBegin('existingAppInterfaceID', TType::STRING, 2);
      $xfer += $output->writeString($this->existingAppInterfaceID);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->newApplicationName !== null) {
      $xfer += $output->writeFieldBegin('newApplicationName', TType::STRING, 3);
      $xfer += $output->writeString($this->newApplicationName);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->gatewayId !== null) {
      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 4);
      $xfer += $output->writeString($this->gatewayId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_cloneApplicationInterface_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_cloneApplicationInterface_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_cloneApplicationInterface_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_getApplicationInterface_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $appInterfaceId = 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' => 'appInterfaceId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['appInterfaceId'])) {
        $this->appInterfaceId = $vals['appInterfaceId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getApplicationInterface_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->appInterfaceId);
          } 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_getApplicationInterface_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->appInterfaceId !== null) {
      $xfer += $output->writeFieldBegin('appInterfaceId', TType::STRING, 2);
      $xfer += $output->writeString($this->appInterfaceId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getApplicationInterface_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\AppInterface\ApplicationInterfaceDescription
   */
  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\AppInterface\ApplicationInterfaceDescription',
          ),
        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_getApplicationInterface_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\AppInterface\ApplicationInterfaceDescription();
            $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_getApplicationInterface_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_updateApplicationInterface_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $appInterfaceId = null;
  /**
   * @var \Airavata\Model\AppCatalog\AppInterface\ApplicationInterfaceDescription
   */
  public $applicationInterface = 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' => 'appInterfaceId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'applicationInterface',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\AppInterface\ApplicationInterfaceDescription',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['appInterfaceId'])) {
        $this->appInterfaceId = $vals['appInterfaceId'];
      }
      if (isset($vals['applicationInterface'])) {
        $this->applicationInterface = $vals['applicationInterface'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateApplicationInterface_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->appInterfaceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->applicationInterface = new \Airavata\Model\AppCatalog\AppInterface\ApplicationInterfaceDescription();
            $xfer += $this->applicationInterface->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_updateApplicationInterface_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->appInterfaceId !== null) {
      $xfer += $output->writeFieldBegin('appInterfaceId', TType::STRING, 2);
      $xfer += $output->writeString($this->appInterfaceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->applicationInterface !== null) {
      if (!is_object($this->applicationInterface)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('applicationInterface', TType::STRUCT, 3);
      $xfer += $this->applicationInterface->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_updateApplicationInterface_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_updateApplicationInterface_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_updateApplicationInterface_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_deleteApplicationInterface_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $appInterfaceId = 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' => 'appInterfaceId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['appInterfaceId'])) {
        $this->appInterfaceId = $vals['appInterfaceId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_deleteApplicationInterface_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->appInterfaceId);
          } 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_deleteApplicationInterface_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->appInterfaceId !== null) {
      $xfer += $output->writeFieldBegin('appInterfaceId', TType::STRING, 2);
      $xfer += $output->writeString($this->appInterfaceId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_deleteApplicationInterface_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_deleteApplicationInterface_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_deleteApplicationInterface_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_getAllApplicationInterfaceNames_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_getAllApplicationInterfaceNames_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_getAllApplicationInterfaceNames_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_getAllApplicationInterfaceNames_result {
  static $_TSPEC;

  /**
   * @var array
   */
  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::MAP,
          'ktype' => TType::STRING,
          'vtype' => TType::STRING,
          'key' => array(
            'type' => TType::STRING,
          ),
          'val' => array(
            '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_getAllApplicationInterfaceNames_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::MAP) {
            $this->success = array();
            $_size167 = 0;
            $_ktype168 = 0;
            $_vtype169 = 0;
            $xfer += $input->readMapBegin($_ktype168, $_vtype169, $_size167);
            for ($_i171 = 0; $_i171 < $_size167; ++$_i171)
            {
              $key172 = '';
              $val173 = '';
              $xfer += $input->readString($key172);
              $xfer += $input->readString($val173);
              $this->success[$key172] = $val173;
            }
            $xfer += $input->readMapEnd();
          } 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_getAllApplicationInterfaceNames_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::MAP, 0);
      {
        $output->writeMapBegin(TType::STRING, TType::STRING, count($this->success));
        {
          foreach ($this->success as $kiter174 => $viter175)
          {
            $xfer += $output->writeString($kiter174);
            $xfer += $output->writeString($viter175);
          }
        }
        $output->writeMapEnd();
      }
      $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_getAllApplicationInterfaces_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_getAllApplicationInterfaces_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_getAllApplicationInterfaces_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_getAllApplicationInterfaces_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\AppInterface\ApplicationInterfaceDescription[]
   */
  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\AppInterface\ApplicationInterfaceDescription',
            ),
          ),
        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_getAllApplicationInterfaces_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();
            $_size176 = 0;
            $_etype179 = 0;
            $xfer += $input->readListBegin($_etype179, $_size176);
            for ($_i180 = 0; $_i180 < $_size176; ++$_i180)
            {
              $elem181 = null;
              $elem181 = new \Airavata\Model\AppCatalog\AppInterface\ApplicationInterfaceDescription();
              $xfer += $elem181->read($input);
              $this->success []= $elem181;
            }
            $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_getAllApplicationInterfaces_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 $iter182)
          {
            $xfer += $iter182->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_getApplicationInputs_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $appInterfaceId = 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' => 'appInterfaceId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['appInterfaceId'])) {
        $this->appInterfaceId = $vals['appInterfaceId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getApplicationInputs_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->appInterfaceId);
          } 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_getApplicationInputs_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->appInterfaceId !== null) {
      $xfer += $output->writeFieldBegin('appInterfaceId', TType::STRING, 2);
      $xfer += $output->writeString($this->appInterfaceId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getApplicationInputs_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Application\Io\InputDataObjectType[]
   */
  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\Application\Io\InputDataObjectType',
            ),
          ),
        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_getApplicationInputs_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();
            $_size183 = 0;
            $_etype186 = 0;
            $xfer += $input->readListBegin($_etype186, $_size183);
            for ($_i187 = 0; $_i187 < $_size183; ++$_i187)
            {
              $elem188 = null;
              $elem188 = new \Airavata\Model\Application\Io\InputDataObjectType();
              $xfer += $elem188->read($input);
              $this->success []= $elem188;
            }
            $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_getApplicationInputs_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 $iter189)
          {
            $xfer += $iter189->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_getApplicationOutputs_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $appInterfaceId = 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' => 'appInterfaceId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['appInterfaceId'])) {
        $this->appInterfaceId = $vals['appInterfaceId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getApplicationOutputs_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->appInterfaceId);
          } 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_getApplicationOutputs_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->appInterfaceId !== null) {
      $xfer += $output->writeFieldBegin('appInterfaceId', TType::STRING, 2);
      $xfer += $output->writeString($this->appInterfaceId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getApplicationOutputs_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Application\Io\OutputDataObjectType[]
   */
  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\Application\Io\OutputDataObjectType',
            ),
          ),
        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_getApplicationOutputs_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();
            $_size190 = 0;
            $_etype193 = 0;
            $xfer += $input->readListBegin($_etype193, $_size190);
            for ($_i194 = 0; $_i194 < $_size190; ++$_i194)
            {
              $elem195 = null;
              $elem195 = new \Airavata\Model\Application\Io\OutputDataObjectType();
              $xfer += $elem195->read($input);
              $this->success []= $elem195;
            }
            $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_getApplicationOutputs_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 $iter196)
          {
            $xfer += $iter196->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_getAvailableAppInterfaceComputeResources_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $appInterfaceId = 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' => 'appInterfaceId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['appInterfaceId'])) {
        $this->appInterfaceId = $vals['appInterfaceId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getAvailableAppInterfaceComputeResources_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->appInterfaceId);
          } 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_getAvailableAppInterfaceComputeResources_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->appInterfaceId !== null) {
      $xfer += $output->writeFieldBegin('appInterfaceId', TType::STRING, 2);
      $xfer += $output->writeString($this->appInterfaceId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getAvailableAppInterfaceComputeResources_result {
  static $_TSPEC;

  /**
   * @var array
   */
  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::MAP,
          'ktype' => TType::STRING,
          'vtype' => TType::STRING,
          'key' => array(
            'type' => TType::STRING,
          ),
          'val' => array(
            '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_getAvailableAppInterfaceComputeResources_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::MAP) {
            $this->success = array();
            $_size197 = 0;
            $_ktype198 = 0;
            $_vtype199 = 0;
            $xfer += $input->readMapBegin($_ktype198, $_vtype199, $_size197);
            for ($_i201 = 0; $_i201 < $_size197; ++$_i201)
            {
              $key202 = '';
              $val203 = '';
              $xfer += $input->readString($key202);
              $xfer += $input->readString($val203);
              $this->success[$key202] = $val203;
            }
            $xfer += $input->readMapEnd();
          } 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_getAvailableAppInterfaceComputeResources_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::MAP, 0);
      {
        $output->writeMapBegin(TType::STRING, TType::STRING, count($this->success));
        {
          foreach ($this->success as $kiter204 => $viter205)
          {
            $xfer += $output->writeString($kiter204);
            $xfer += $output->writeString($viter205);
          }
        }
        $output->writeMapEnd();
      }
      $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_registerComputeResource_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var \Airavata\Model\AppCatalog\ComputeResource\ComputeResourceDescription
   */
  public $computeResourceDescription = 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' => 'computeResourceDescription',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\ComputeResource\ComputeResourceDescription',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['computeResourceDescription'])) {
        $this->computeResourceDescription = $vals['computeResourceDescription'];
      }
    }
  }

  public function getName() {
    return 'Airavata_registerComputeResource_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->computeResourceDescription = new \Airavata\Model\AppCatalog\ComputeResource\ComputeResourceDescription();
            $xfer += $this->computeResourceDescription->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_registerComputeResource_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->computeResourceDescription !== null) {
      if (!is_object($this->computeResourceDescription)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('computeResourceDescription', TType::STRUCT, 2);
      $xfer += $this->computeResourceDescription->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_registerComputeResource_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_registerComputeResource_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_registerComputeResource_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_getComputeResource_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $computeResourceId = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'authzToken',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Security\AuthzToken',
          ),
        2 => array(
          'var' => 'computeResourceId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['computeResourceId'])) {
        $this->computeResourceId = $vals['computeResourceId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getComputeResource_args';
  }

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->authzToken = new \Airavata\Model\Security\AuthzToken();
            $xfer += $this->authzToken->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->computeResourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_getComputeResource_args');
    if ($this->authzToken !== null) {
      if (!is_object($this->authzToken)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
      $xfer += $this->authzToken->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->computeResourceId !== null) {
      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 2);
      $xfer += $output->writeString($this->computeResourceId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getComputeResource_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\ComputeResource\ComputeResourceDescription
   */
  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\ComputeResource\ComputeResourceDescription',
          ),
        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_getComputeResource_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\ComputeResource\ComputeResourceDescription();
            $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_getComputeResource_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_getAllComputeResourceNames_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 'Airavata_getAllComputeResourceNames_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('Airavata_getAllComputeResourceNames_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 Airavata_getAllComputeResourceNames_result {
  static $_TSPEC;

  /**
   * @var array
   */
  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::MAP,
          'ktype' => TType::STRING,
          'vtype' => TType::STRING,
          'key' => array(
            'type' => TType::STRING,
          ),
          'val' => array(
            '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_getAllComputeResourceNames_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::MAP) {
            $this->success = array();
            $_size206 = 0;
            $_ktype207 = 0;
            $_vtype208 = 0;
            $xfer += $input->readMapBegin($_ktype207, $_vtype208, $_size206);
            for ($_i210 = 0; $_i210 < $_size206; ++$_i210)
            {
              $key211 = '';
              $val212 = '';
              $xfer += $input->readString($key211);
              $xfer += $input->readString($val212);
              $this->success[$key211] = $val212;
            }
            $xfer += $input->readMapEnd();
          } 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_getAllComputeResourceNames_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::MAP, 0);
      {
        $output->writeMapBegin(TType::STRING, TType::STRING, count($this->success));
        {
          foreach ($this->success as $kiter213 => $viter214)
          {
            $xfer += $output->writeString($kiter213);
            $xfer += $output->writeString($viter214);
          }
        }
        $output->writeMapEnd();
      }
      $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_updateComputeResource_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $computeResourceId = null;
  /**
   * @var \Airavata\Model\AppCatalog\ComputeResource\ComputeResourceDescription
   */
  public $computeResourceDescription = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'authzToken',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Security\AuthzToken',
          ),
        2 => array(
          'var' => 'computeResourceId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'computeResourceDescription',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\ComputeResource\ComputeResourceDescription',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['computeResourceId'])) {
        $this->computeResourceId = $vals['computeResourceId'];
      }
      if (isset($vals['computeResourceDescription'])) {
        $this->computeResourceDescription = $vals['computeResourceDescription'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateComputeResource_args';
  }

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->authzToken = new \Airavata\Model\Security\AuthzToken();
            $xfer += $this->authzToken->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->computeResourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->computeResourceDescription = new \Airavata\Model\AppCatalog\ComputeResource\ComputeResourceDescription();
            $xfer += $this->computeResourceDescription->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_updateComputeResource_args');
    if ($this->authzToken !== null) {
      if (!is_object($this->authzToken)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
      $xfer += $this->authzToken->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->computeResourceId !== null) {
      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 2);
      $xfer += $output->writeString($this->computeResourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->computeResourceDescription !== null) {
      if (!is_object($this->computeResourceDescription)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('computeResourceDescription', TType::STRUCT, 3);
      $xfer += $this->computeResourceDescription->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_updateComputeResource_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_updateComputeResource_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_updateComputeResource_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_deleteComputeResource_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $computeResourceId = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'authzToken',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Security\AuthzToken',
          ),
        2 => array(
          'var' => 'computeResourceId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['computeResourceId'])) {
        $this->computeResourceId = $vals['computeResourceId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_deleteComputeResource_args';
  }

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->authzToken = new \Airavata\Model\Security\AuthzToken();
            $xfer += $this->authzToken->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->computeResourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_deleteComputeResource_args');
    if ($this->authzToken !== null) {
      if (!is_object($this->authzToken)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
      $xfer += $this->authzToken->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->computeResourceId !== null) {
      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 2);
      $xfer += $output->writeString($this->computeResourceId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_deleteComputeResource_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_deleteComputeResource_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_deleteComputeResource_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_registerStorageResource_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var \Airavata\Model\AppCatalog\StorageResource\StorageResourceDescription
   */
  public $storageResourceDescription = 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' => 'storageResourceDescription',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\StorageResource\StorageResourceDescription',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['storageResourceDescription'])) {
        $this->storageResourceDescription = $vals['storageResourceDescription'];
      }
    }
  }

  public function getName() {
    return 'Airavata_registerStorageResource_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->storageResourceDescription = new \Airavata\Model\AppCatalog\StorageResource\StorageResourceDescription();
            $xfer += $this->storageResourceDescription->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_registerStorageResource_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->storageResourceDescription !== null) {
      if (!is_object($this->storageResourceDescription)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('storageResourceDescription', TType::STRUCT, 2);
      $xfer += $this->storageResourceDescription->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_registerStorageResource_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_registerStorageResource_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_registerStorageResource_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_getStorageResource_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $storageResourceId = 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' => 'storageResourceId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['storageResourceId'])) {
        $this->storageResourceId = $vals['storageResourceId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getStorageResource_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->storageResourceId);
          } 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_getStorageResource_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->storageResourceId !== null) {
      $xfer += $output->writeFieldBegin('storageResourceId', TType::STRING, 2);
      $xfer += $output->writeString($this->storageResourceId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getStorageResource_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\StorageResource\StorageResourceDescription
   */
  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\StorageResource\StorageResourceDescription',
          ),
        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_getStorageResource_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\StorageResource\StorageResourceDescription();
            $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_getStorageResource_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_getAllStorageResourceNames_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 'Airavata_getAllStorageResourceNames_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('Airavata_getAllStorageResourceNames_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 Airavata_getAllStorageResourceNames_result {
  static $_TSPEC;

  /**
   * @var array
   */
  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::MAP,
          'ktype' => TType::STRING,
          'vtype' => TType::STRING,
          'key' => array(
            'type' => TType::STRING,
          ),
          'val' => array(
            '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_getAllStorageResourceNames_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::MAP) {
            $this->success = array();
            $_size215 = 0;
            $_ktype216 = 0;
            $_vtype217 = 0;
            $xfer += $input->readMapBegin($_ktype216, $_vtype217, $_size215);
            for ($_i219 = 0; $_i219 < $_size215; ++$_i219)
            {
              $key220 = '';
              $val221 = '';
              $xfer += $input->readString($key220);
              $xfer += $input->readString($val221);
              $this->success[$key220] = $val221;
            }
            $xfer += $input->readMapEnd();
          } 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_getAllStorageResourceNames_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::MAP, 0);
      {
        $output->writeMapBegin(TType::STRING, TType::STRING, count($this->success));
        {
          foreach ($this->success as $kiter222 => $viter223)
          {
            $xfer += $output->writeString($kiter222);
            $xfer += $output->writeString($viter223);
          }
        }
        $output->writeMapEnd();
      }
      $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_updateStorageResource_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $storageResourceId = null;
  /**
   * @var \Airavata\Model\AppCatalog\StorageResource\StorageResourceDescription
   */
  public $storageResourceDescription = 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' => 'storageResourceId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'storageResourceDescription',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\StorageResource\StorageResourceDescription',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['storageResourceId'])) {
        $this->storageResourceId = $vals['storageResourceId'];
      }
      if (isset($vals['storageResourceDescription'])) {
        $this->storageResourceDescription = $vals['storageResourceDescription'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateStorageResource_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->storageResourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->storageResourceDescription = new \Airavata\Model\AppCatalog\StorageResource\StorageResourceDescription();
            $xfer += $this->storageResourceDescription->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_updateStorageResource_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->storageResourceId !== null) {
      $xfer += $output->writeFieldBegin('storageResourceId', TType::STRING, 2);
      $xfer += $output->writeString($this->storageResourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->storageResourceDescription !== null) {
      if (!is_object($this->storageResourceDescription)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('storageResourceDescription', TType::STRUCT, 3);
      $xfer += $this->storageResourceDescription->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_updateStorageResource_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_updateStorageResource_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_updateStorageResource_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_deleteStorageResource_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $storageResourceId = 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' => 'storageResourceId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['storageResourceId'])) {
        $this->storageResourceId = $vals['storageResourceId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_deleteStorageResource_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->storageResourceId);
          } 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_deleteStorageResource_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->storageResourceId !== null) {
      $xfer += $output->writeFieldBegin('storageResourceId', TType::STRING, 2);
      $xfer += $output->writeString($this->storageResourceId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_deleteStorageResource_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_deleteStorageResource_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_deleteStorageResource_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_addLocalSubmissionDetails_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $computeResourceId = null;
  /**
   * @var int
   */
  public $priorityOrder = null;
  /**
   * @var \Airavata\Model\AppCatalog\ComputeResource\LOCALSubmission
   */
  public $localSubmission = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'authzToken',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Security\AuthzToken',
          ),
        2 => array(
          'var' => 'computeResourceId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'priorityOrder',
          'type' => TType::I32,
          ),
        4 => array(
          'var' => 'localSubmission',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\ComputeResource\LOCALSubmission',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['computeResourceId'])) {
        $this->computeResourceId = $vals['computeResourceId'];
      }
      if (isset($vals['priorityOrder'])) {
        $this->priorityOrder = $vals['priorityOrder'];
      }
      if (isset($vals['localSubmission'])) {
        $this->localSubmission = $vals['localSubmission'];
      }
    }
  }

  public function getName() {
    return 'Airavata_addLocalSubmissionDetails_args';
  }

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->authzToken = new \Airavata\Model\Security\AuthzToken();
            $xfer += $this->authzToken->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->computeResourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->priorityOrder);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->localSubmission = new \Airavata\Model\AppCatalog\ComputeResource\LOCALSubmission();
            $xfer += $this->localSubmission->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_addLocalSubmissionDetails_args');
    if ($this->authzToken !== null) {
      if (!is_object($this->authzToken)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
      $xfer += $this->authzToken->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->computeResourceId !== null) {
      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 2);
      $xfer += $output->writeString($this->computeResourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->priorityOrder !== null) {
      $xfer += $output->writeFieldBegin('priorityOrder', TType::I32, 3);
      $xfer += $output->writeI32($this->priorityOrder);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->localSubmission !== null) {
      if (!is_object($this->localSubmission)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('localSubmission', TType::STRUCT, 4);
      $xfer += $this->localSubmission->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_addLocalSubmissionDetails_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_addLocalSubmissionDetails_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_addLocalSubmissionDetails_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_updateLocalSubmissionDetails_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $jobSubmissionInterfaceId = null;
  /**
   * @var \Airavata\Model\AppCatalog\ComputeResource\LOCALSubmission
   */
  public $localSubmission = 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' => 'jobSubmissionInterfaceId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'localSubmission',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\ComputeResource\LOCALSubmission',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['jobSubmissionInterfaceId'])) {
        $this->jobSubmissionInterfaceId = $vals['jobSubmissionInterfaceId'];
      }
      if (isset($vals['localSubmission'])) {
        $this->localSubmission = $vals['localSubmission'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateLocalSubmissionDetails_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->jobSubmissionInterfaceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->localSubmission = new \Airavata\Model\AppCatalog\ComputeResource\LOCALSubmission();
            $xfer += $this->localSubmission->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_updateLocalSubmissionDetails_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->jobSubmissionInterfaceId !== null) {
      $xfer += $output->writeFieldBegin('jobSubmissionInterfaceId', TType::STRING, 2);
      $xfer += $output->writeString($this->jobSubmissionInterfaceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->localSubmission !== null) {
      if (!is_object($this->localSubmission)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('localSubmission', TType::STRUCT, 3);
      $xfer += $this->localSubmission->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_updateLocalSubmissionDetails_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_updateLocalSubmissionDetails_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_updateLocalSubmissionDetails_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_getLocalJobSubmission_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $jobSubmissionId = 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' => 'jobSubmissionId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['jobSubmissionId'])) {
        $this->jobSubmissionId = $vals['jobSubmissionId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getLocalJobSubmission_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->jobSubmissionId);
          } 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_getLocalJobSubmission_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->jobSubmissionId !== null) {
      $xfer += $output->writeFieldBegin('jobSubmissionId', TType::STRING, 2);
      $xfer += $output->writeString($this->jobSubmissionId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getLocalJobSubmission_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\ComputeResource\LOCALSubmission
   */
  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\ComputeResource\LOCALSubmission',
          ),
        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_getLocalJobSubmission_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\ComputeResource\LOCALSubmission();
            $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_getLocalJobSubmission_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_addSSHJobSubmissionDetails_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $computeResourceId = null;
  /**
   * @var int
   */
  public $priorityOrder = null;
  /**
   * @var \Airavata\Model\AppCatalog\ComputeResource\SSHJobSubmission
   */
  public $sshJobSubmission = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'authzToken',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Security\AuthzToken',
          ),
        2 => array(
          'var' => 'computeResourceId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'priorityOrder',
          'type' => TType::I32,
          ),
        4 => array(
          'var' => 'sshJobSubmission',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\ComputeResource\SSHJobSubmission',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['computeResourceId'])) {
        $this->computeResourceId = $vals['computeResourceId'];
      }
      if (isset($vals['priorityOrder'])) {
        $this->priorityOrder = $vals['priorityOrder'];
      }
      if (isset($vals['sshJobSubmission'])) {
        $this->sshJobSubmission = $vals['sshJobSubmission'];
      }
    }
  }

  public function getName() {
    return 'Airavata_addSSHJobSubmissionDetails_args';
  }

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->authzToken = new \Airavata\Model\Security\AuthzToken();
            $xfer += $this->authzToken->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->computeResourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->priorityOrder);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->sshJobSubmission = new \Airavata\Model\AppCatalog\ComputeResource\SSHJobSubmission();
            $xfer += $this->sshJobSubmission->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_addSSHJobSubmissionDetails_args');
    if ($this->authzToken !== null) {
      if (!is_object($this->authzToken)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
      $xfer += $this->authzToken->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->computeResourceId !== null) {
      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 2);
      $xfer += $output->writeString($this->computeResourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->priorityOrder !== null) {
      $xfer += $output->writeFieldBegin('priorityOrder', TType::I32, 3);
      $xfer += $output->writeI32($this->priorityOrder);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->sshJobSubmission !== null) {
      if (!is_object($this->sshJobSubmission)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('sshJobSubmission', TType::STRUCT, 4);
      $xfer += $this->sshJobSubmission->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_addSSHJobSubmissionDetails_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_addSSHJobSubmissionDetails_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_addSSHJobSubmissionDetails_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_addSSHForkJobSubmissionDetails_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $computeResourceId = null;
  /**
   * @var int
   */
  public $priorityOrder = null;
  /**
   * @var \Airavata\Model\AppCatalog\ComputeResource\SSHJobSubmission
   */
  public $sshJobSubmission = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'authzToken',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Security\AuthzToken',
          ),
        2 => array(
          'var' => 'computeResourceId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'priorityOrder',
          'type' => TType::I32,
          ),
        4 => array(
          'var' => 'sshJobSubmission',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\ComputeResource\SSHJobSubmission',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['computeResourceId'])) {
        $this->computeResourceId = $vals['computeResourceId'];
      }
      if (isset($vals['priorityOrder'])) {
        $this->priorityOrder = $vals['priorityOrder'];
      }
      if (isset($vals['sshJobSubmission'])) {
        $this->sshJobSubmission = $vals['sshJobSubmission'];
      }
    }
  }

  public function getName() {
    return 'Airavata_addSSHForkJobSubmissionDetails_args';
  }

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->authzToken = new \Airavata\Model\Security\AuthzToken();
            $xfer += $this->authzToken->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->computeResourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->priorityOrder);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->sshJobSubmission = new \Airavata\Model\AppCatalog\ComputeResource\SSHJobSubmission();
            $xfer += $this->sshJobSubmission->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_addSSHForkJobSubmissionDetails_args');
    if ($this->authzToken !== null) {
      if (!is_object($this->authzToken)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
      $xfer += $this->authzToken->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->computeResourceId !== null) {
      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 2);
      $xfer += $output->writeString($this->computeResourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->priorityOrder !== null) {
      $xfer += $output->writeFieldBegin('priorityOrder', TType::I32, 3);
      $xfer += $output->writeI32($this->priorityOrder);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->sshJobSubmission !== null) {
      if (!is_object($this->sshJobSubmission)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('sshJobSubmission', TType::STRUCT, 4);
      $xfer += $this->sshJobSubmission->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_addSSHForkJobSubmissionDetails_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_addSSHForkJobSubmissionDetails_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_addSSHForkJobSubmissionDetails_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_getSSHJobSubmission_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $jobSubmissionId = 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' => 'jobSubmissionId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['jobSubmissionId'])) {
        $this->jobSubmissionId = $vals['jobSubmissionId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getSSHJobSubmission_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->jobSubmissionId);
          } 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_getSSHJobSubmission_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->jobSubmissionId !== null) {
      $xfer += $output->writeFieldBegin('jobSubmissionId', TType::STRING, 2);
      $xfer += $output->writeString($this->jobSubmissionId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getSSHJobSubmission_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\ComputeResource\SSHJobSubmission
   */
  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\ComputeResource\SSHJobSubmission',
          ),
        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_getSSHJobSubmission_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\ComputeResource\SSHJobSubmission();
            $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_getSSHJobSubmission_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_addUNICOREJobSubmissionDetails_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $computeResourceId = null;
  /**
   * @var int
   */
  public $priorityOrder = null;
  /**
   * @var \Airavata\Model\AppCatalog\ComputeResource\UnicoreJobSubmission
   */
  public $unicoreJobSubmission = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'authzToken',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Security\AuthzToken',
          ),
        2 => array(
          'var' => 'computeResourceId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'priorityOrder',
          'type' => TType::I32,
          ),
        4 => array(
          'var' => 'unicoreJobSubmission',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\ComputeResource\UnicoreJobSubmission',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['computeResourceId'])) {
        $this->computeResourceId = $vals['computeResourceId'];
      }
      if (isset($vals['priorityOrder'])) {
        $this->priorityOrder = $vals['priorityOrder'];
      }
      if (isset($vals['unicoreJobSubmission'])) {
        $this->unicoreJobSubmission = $vals['unicoreJobSubmission'];
      }
    }
  }

  public function getName() {
    return 'Airavata_addUNICOREJobSubmissionDetails_args';
  }

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->authzToken = new \Airavata\Model\Security\AuthzToken();
            $xfer += $this->authzToken->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->computeResourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->priorityOrder);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->unicoreJobSubmission = new \Airavata\Model\AppCatalog\ComputeResource\UnicoreJobSubmission();
            $xfer += $this->unicoreJobSubmission->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_addUNICOREJobSubmissionDetails_args');
    if ($this->authzToken !== null) {
      if (!is_object($this->authzToken)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
      $xfer += $this->authzToken->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->computeResourceId !== null) {
      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 2);
      $xfer += $output->writeString($this->computeResourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->priorityOrder !== null) {
      $xfer += $output->writeFieldBegin('priorityOrder', TType::I32, 3);
      $xfer += $output->writeI32($this->priorityOrder);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->unicoreJobSubmission !== null) {
      if (!is_object($this->unicoreJobSubmission)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('unicoreJobSubmission', TType::STRUCT, 4);
      $xfer += $this->unicoreJobSubmission->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_addUNICOREJobSubmissionDetails_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_addUNICOREJobSubmissionDetails_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_addUNICOREJobSubmissionDetails_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_getUnicoreJobSubmission_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $jobSubmissionId = 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' => 'jobSubmissionId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['jobSubmissionId'])) {
        $this->jobSubmissionId = $vals['jobSubmissionId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getUnicoreJobSubmission_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->jobSubmissionId);
          } 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_getUnicoreJobSubmission_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->jobSubmissionId !== null) {
      $xfer += $output->writeFieldBegin('jobSubmissionId', TType::STRING, 2);
      $xfer += $output->writeString($this->jobSubmissionId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getUnicoreJobSubmission_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\ComputeResource\UnicoreJobSubmission
   */
  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\ComputeResource\UnicoreJobSubmission',
          ),
        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_getUnicoreJobSubmission_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\ComputeResource\UnicoreJobSubmission();
            $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_getUnicoreJobSubmission_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_addCloudJobSubmissionDetails_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $computeResourceId = null;
  /**
   * @var int
   */
  public $priorityOrder = null;
  /**
   * @var \Airavata\Model\AppCatalog\ComputeResource\CloudJobSubmission
   */
  public $cloudSubmission = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'authzToken',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Security\AuthzToken',
          ),
        2 => array(
          'var' => 'computeResourceId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'priorityOrder',
          'type' => TType::I32,
          ),
        4 => array(
          'var' => 'cloudSubmission',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\ComputeResource\CloudJobSubmission',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['computeResourceId'])) {
        $this->computeResourceId = $vals['computeResourceId'];
      }
      if (isset($vals['priorityOrder'])) {
        $this->priorityOrder = $vals['priorityOrder'];
      }
      if (isset($vals['cloudSubmission'])) {
        $this->cloudSubmission = $vals['cloudSubmission'];
      }
    }
  }

  public function getName() {
    return 'Airavata_addCloudJobSubmissionDetails_args';
  }

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->authzToken = new \Airavata\Model\Security\AuthzToken();
            $xfer += $this->authzToken->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->computeResourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->priorityOrder);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->cloudSubmission = new \Airavata\Model\AppCatalog\ComputeResource\CloudJobSubmission();
            $xfer += $this->cloudSubmission->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_addCloudJobSubmissionDetails_args');
    if ($this->authzToken !== null) {
      if (!is_object($this->authzToken)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
      $xfer += $this->authzToken->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->computeResourceId !== null) {
      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 2);
      $xfer += $output->writeString($this->computeResourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->priorityOrder !== null) {
      $xfer += $output->writeFieldBegin('priorityOrder', TType::I32, 3);
      $xfer += $output->writeI32($this->priorityOrder);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->cloudSubmission !== null) {
      if (!is_object($this->cloudSubmission)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('cloudSubmission', TType::STRUCT, 4);
      $xfer += $this->cloudSubmission->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_addCloudJobSubmissionDetails_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_addCloudJobSubmissionDetails_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_addCloudJobSubmissionDetails_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_getCloudJobSubmission_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $jobSubmissionId = 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' => 'jobSubmissionId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['jobSubmissionId'])) {
        $this->jobSubmissionId = $vals['jobSubmissionId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getCloudJobSubmission_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->jobSubmissionId);
          } 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_getCloudJobSubmission_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->jobSubmissionId !== null) {
      $xfer += $output->writeFieldBegin('jobSubmissionId', TType::STRING, 2);
      $xfer += $output->writeString($this->jobSubmissionId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getCloudJobSubmission_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\ComputeResource\CloudJobSubmission
   */
  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\ComputeResource\CloudJobSubmission',
          ),
        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_getCloudJobSubmission_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\ComputeResource\CloudJobSubmission();
            $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_getCloudJobSubmission_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_updateSSHJobSubmissionDetails_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $jobSubmissionInterfaceId = null;
  /**
   * @var \Airavata\Model\AppCatalog\ComputeResource\SSHJobSubmission
   */
  public $sshJobSubmission = 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' => 'jobSubmissionInterfaceId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'sshJobSubmission',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\ComputeResource\SSHJobSubmission',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['jobSubmissionInterfaceId'])) {
        $this->jobSubmissionInterfaceId = $vals['jobSubmissionInterfaceId'];
      }
      if (isset($vals['sshJobSubmission'])) {
        $this->sshJobSubmission = $vals['sshJobSubmission'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateSSHJobSubmissionDetails_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->jobSubmissionInterfaceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->sshJobSubmission = new \Airavata\Model\AppCatalog\ComputeResource\SSHJobSubmission();
            $xfer += $this->sshJobSubmission->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_updateSSHJobSubmissionDetails_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->jobSubmissionInterfaceId !== null) {
      $xfer += $output->writeFieldBegin('jobSubmissionInterfaceId', TType::STRING, 2);
      $xfer += $output->writeString($this->jobSubmissionInterfaceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->sshJobSubmission !== null) {
      if (!is_object($this->sshJobSubmission)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('sshJobSubmission', TType::STRUCT, 3);
      $xfer += $this->sshJobSubmission->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_updateSSHJobSubmissionDetails_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_updateSSHJobSubmissionDetails_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_updateSSHJobSubmissionDetails_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_updateCloudJobSubmissionDetails_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $jobSubmissionInterfaceId = null;
  /**
   * @var \Airavata\Model\AppCatalog\ComputeResource\CloudJobSubmission
   */
  public $sshJobSubmission = 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' => 'jobSubmissionInterfaceId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'sshJobSubmission',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\ComputeResource\CloudJobSubmission',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['jobSubmissionInterfaceId'])) {
        $this->jobSubmissionInterfaceId = $vals['jobSubmissionInterfaceId'];
      }
      if (isset($vals['sshJobSubmission'])) {
        $this->sshJobSubmission = $vals['sshJobSubmission'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateCloudJobSubmissionDetails_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->jobSubmissionInterfaceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->sshJobSubmission = new \Airavata\Model\AppCatalog\ComputeResource\CloudJobSubmission();
            $xfer += $this->sshJobSubmission->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_updateCloudJobSubmissionDetails_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->jobSubmissionInterfaceId !== null) {
      $xfer += $output->writeFieldBegin('jobSubmissionInterfaceId', TType::STRING, 2);
      $xfer += $output->writeString($this->jobSubmissionInterfaceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->sshJobSubmission !== null) {
      if (!is_object($this->sshJobSubmission)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('sshJobSubmission', TType::STRUCT, 3);
      $xfer += $this->sshJobSubmission->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_updateCloudJobSubmissionDetails_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_updateCloudJobSubmissionDetails_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_updateCloudJobSubmissionDetails_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_updateUnicoreJobSubmissionDetails_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $jobSubmissionInterfaceId = null;
  /**
   * @var \Airavata\Model\AppCatalog\ComputeResource\UnicoreJobSubmission
   */
  public $unicoreJobSubmission = 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' => 'jobSubmissionInterfaceId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'unicoreJobSubmission',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\ComputeResource\UnicoreJobSubmission',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['jobSubmissionInterfaceId'])) {
        $this->jobSubmissionInterfaceId = $vals['jobSubmissionInterfaceId'];
      }
      if (isset($vals['unicoreJobSubmission'])) {
        $this->unicoreJobSubmission = $vals['unicoreJobSubmission'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateUnicoreJobSubmissionDetails_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->jobSubmissionInterfaceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->unicoreJobSubmission = new \Airavata\Model\AppCatalog\ComputeResource\UnicoreJobSubmission();
            $xfer += $this->unicoreJobSubmission->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_updateUnicoreJobSubmissionDetails_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->jobSubmissionInterfaceId !== null) {
      $xfer += $output->writeFieldBegin('jobSubmissionInterfaceId', TType::STRING, 2);
      $xfer += $output->writeString($this->jobSubmissionInterfaceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->unicoreJobSubmission !== null) {
      if (!is_object($this->unicoreJobSubmission)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('unicoreJobSubmission', TType::STRUCT, 3);
      $xfer += $this->unicoreJobSubmission->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_updateUnicoreJobSubmissionDetails_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_updateUnicoreJobSubmissionDetails_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_updateUnicoreJobSubmissionDetails_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_addLocalDataMovementDetails_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $productUri = null;
  /**
   * @var int
   */
  public $dataMoveType = null;
  /**
   * @var int
   */
  public $priorityOrder = null;
  /**
   * @var \Airavata\Model\Data\Movement\LOCALDataMovement
   */
  public $localDataMovement = 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' => 'productUri',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'dataMoveType',
          'type' => TType::I32,
          ),
        4 => array(
          'var' => 'priorityOrder',
          'type' => TType::I32,
          ),
        5 => array(
          'var' => 'localDataMovement',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Data\Movement\LOCALDataMovement',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['productUri'])) {
        $this->productUri = $vals['productUri'];
      }
      if (isset($vals['dataMoveType'])) {
        $this->dataMoveType = $vals['dataMoveType'];
      }
      if (isset($vals['priorityOrder'])) {
        $this->priorityOrder = $vals['priorityOrder'];
      }
      if (isset($vals['localDataMovement'])) {
        $this->localDataMovement = $vals['localDataMovement'];
      }
    }
  }

  public function getName() {
    return 'Airavata_addLocalDataMovementDetails_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->productUri);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->dataMoveType);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->priorityOrder);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->localDataMovement = new \Airavata\Model\Data\Movement\LOCALDataMovement();
            $xfer += $this->localDataMovement->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_addLocalDataMovementDetails_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->productUri !== null) {
      $xfer += $output->writeFieldBegin('productUri', TType::STRING, 2);
      $xfer += $output->writeString($this->productUri);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->dataMoveType !== null) {
      $xfer += $output->writeFieldBegin('dataMoveType', TType::I32, 3);
      $xfer += $output->writeI32($this->dataMoveType);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->priorityOrder !== null) {
      $xfer += $output->writeFieldBegin('priorityOrder', TType::I32, 4);
      $xfer += $output->writeI32($this->priorityOrder);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->localDataMovement !== null) {
      if (!is_object($this->localDataMovement)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('localDataMovement', TType::STRUCT, 5);
      $xfer += $this->localDataMovement->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_addLocalDataMovementDetails_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_addLocalDataMovementDetails_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_addLocalDataMovementDetails_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_updateLocalDataMovementDetails_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $dataMovementInterfaceId = null;
  /**
   * @var \Airavata\Model\Data\Movement\LOCALDataMovement
   */
  public $localDataMovement = 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' => 'dataMovementInterfaceId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'localDataMovement',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Data\Movement\LOCALDataMovement',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['dataMovementInterfaceId'])) {
        $this->dataMovementInterfaceId = $vals['dataMovementInterfaceId'];
      }
      if (isset($vals['localDataMovement'])) {
        $this->localDataMovement = $vals['localDataMovement'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateLocalDataMovementDetails_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->dataMovementInterfaceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->localDataMovement = new \Airavata\Model\Data\Movement\LOCALDataMovement();
            $xfer += $this->localDataMovement->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_updateLocalDataMovementDetails_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->dataMovementInterfaceId !== null) {
      $xfer += $output->writeFieldBegin('dataMovementInterfaceId', TType::STRING, 2);
      $xfer += $output->writeString($this->dataMovementInterfaceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->localDataMovement !== null) {
      if (!is_object($this->localDataMovement)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('localDataMovement', TType::STRUCT, 3);
      $xfer += $this->localDataMovement->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_updateLocalDataMovementDetails_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_updateLocalDataMovementDetails_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_updateLocalDataMovementDetails_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_getLocalDataMovement_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $dataMovementId = 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' => 'dataMovementId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['dataMovementId'])) {
        $this->dataMovementId = $vals['dataMovementId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getLocalDataMovement_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->dataMovementId);
          } 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_getLocalDataMovement_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->dataMovementId !== null) {
      $xfer += $output->writeFieldBegin('dataMovementId', TType::STRING, 2);
      $xfer += $output->writeString($this->dataMovementId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getLocalDataMovement_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Data\Movement\LOCALDataMovement
   */
  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\Data\Movement\LOCALDataMovement',
          ),
        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_getLocalDataMovement_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\Data\Movement\LOCALDataMovement();
            $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_getLocalDataMovement_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_addSCPDataMovementDetails_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $productUri = null;
  /**
   * @var int
   */
  public $dataMoveType = null;
  /**
   * @var int
   */
  public $priorityOrder = null;
  /**
   * @var \Airavata\Model\Data\Movement\SCPDataMovement
   */
  public $scpDataMovement = 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' => 'productUri',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'dataMoveType',
          'type' => TType::I32,
          ),
        4 => array(
          'var' => 'priorityOrder',
          'type' => TType::I32,
          ),
        5 => array(
          'var' => 'scpDataMovement',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Data\Movement\SCPDataMovement',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['productUri'])) {
        $this->productUri = $vals['productUri'];
      }
      if (isset($vals['dataMoveType'])) {
        $this->dataMoveType = $vals['dataMoveType'];
      }
      if (isset($vals['priorityOrder'])) {
        $this->priorityOrder = $vals['priorityOrder'];
      }
      if (isset($vals['scpDataMovement'])) {
        $this->scpDataMovement = $vals['scpDataMovement'];
      }
    }
  }

  public function getName() {
    return 'Airavata_addSCPDataMovementDetails_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->productUri);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->dataMoveType);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->priorityOrder);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->scpDataMovement = new \Airavata\Model\Data\Movement\SCPDataMovement();
            $xfer += $this->scpDataMovement->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_addSCPDataMovementDetails_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->productUri !== null) {
      $xfer += $output->writeFieldBegin('productUri', TType::STRING, 2);
      $xfer += $output->writeString($this->productUri);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->dataMoveType !== null) {
      $xfer += $output->writeFieldBegin('dataMoveType', TType::I32, 3);
      $xfer += $output->writeI32($this->dataMoveType);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->priorityOrder !== null) {
      $xfer += $output->writeFieldBegin('priorityOrder', TType::I32, 4);
      $xfer += $output->writeI32($this->priorityOrder);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->scpDataMovement !== null) {
      if (!is_object($this->scpDataMovement)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('scpDataMovement', TType::STRUCT, 5);
      $xfer += $this->scpDataMovement->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_addSCPDataMovementDetails_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_addSCPDataMovementDetails_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_addSCPDataMovementDetails_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_updateSCPDataMovementDetails_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $dataMovementInterfaceId = null;
  /**
   * @var \Airavata\Model\Data\Movement\SCPDataMovement
   */
  public $scpDataMovement = 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' => 'dataMovementInterfaceId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'scpDataMovement',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Data\Movement\SCPDataMovement',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['dataMovementInterfaceId'])) {
        $this->dataMovementInterfaceId = $vals['dataMovementInterfaceId'];
      }
      if (isset($vals['scpDataMovement'])) {
        $this->scpDataMovement = $vals['scpDataMovement'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateSCPDataMovementDetails_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->dataMovementInterfaceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->scpDataMovement = new \Airavata\Model\Data\Movement\SCPDataMovement();
            $xfer += $this->scpDataMovement->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_updateSCPDataMovementDetails_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->dataMovementInterfaceId !== null) {
      $xfer += $output->writeFieldBegin('dataMovementInterfaceId', TType::STRING, 2);
      $xfer += $output->writeString($this->dataMovementInterfaceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->scpDataMovement !== null) {
      if (!is_object($this->scpDataMovement)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('scpDataMovement', TType::STRUCT, 3);
      $xfer += $this->scpDataMovement->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_updateSCPDataMovementDetails_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_updateSCPDataMovementDetails_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_updateSCPDataMovementDetails_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_getSCPDataMovement_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $dataMovementId = 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' => 'dataMovementId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['dataMovementId'])) {
        $this->dataMovementId = $vals['dataMovementId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getSCPDataMovement_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->dataMovementId);
          } 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_getSCPDataMovement_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->dataMovementId !== null) {
      $xfer += $output->writeFieldBegin('dataMovementId', TType::STRING, 2);
      $xfer += $output->writeString($this->dataMovementId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getSCPDataMovement_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Data\Movement\SCPDataMovement
   */
  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\Data\Movement\SCPDataMovement',
          ),
        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_getSCPDataMovement_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\Data\Movement\SCPDataMovement();
            $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_getSCPDataMovement_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_addUnicoreDataMovementDetails_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $productUri = null;
  /**
   * @var int
   */
  public $dataMoveType = null;
  /**
   * @var int
   */
  public $priorityOrder = null;
  /**
   * @var \Airavata\Model\Data\Movement\UnicoreDataMovement
   */
  public $unicoreDataMovement = 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' => 'productUri',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'dataMoveType',
          'type' => TType::I32,
          ),
        4 => array(
          'var' => 'priorityOrder',
          'type' => TType::I32,
          ),
        5 => array(
          'var' => 'unicoreDataMovement',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Data\Movement\UnicoreDataMovement',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['productUri'])) {
        $this->productUri = $vals['productUri'];
      }
      if (isset($vals['dataMoveType'])) {
        $this->dataMoveType = $vals['dataMoveType'];
      }
      if (isset($vals['priorityOrder'])) {
        $this->priorityOrder = $vals['priorityOrder'];
      }
      if (isset($vals['unicoreDataMovement'])) {
        $this->unicoreDataMovement = $vals['unicoreDataMovement'];
      }
    }
  }

  public function getName() {
    return 'Airavata_addUnicoreDataMovementDetails_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->productUri);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->dataMoveType);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->priorityOrder);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->unicoreDataMovement = new \Airavata\Model\Data\Movement\UnicoreDataMovement();
            $xfer += $this->unicoreDataMovement->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_addUnicoreDataMovementDetails_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->productUri !== null) {
      $xfer += $output->writeFieldBegin('productUri', TType::STRING, 2);
      $xfer += $output->writeString($this->productUri);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->dataMoveType !== null) {
      $xfer += $output->writeFieldBegin('dataMoveType', TType::I32, 3);
      $xfer += $output->writeI32($this->dataMoveType);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->priorityOrder !== null) {
      $xfer += $output->writeFieldBegin('priorityOrder', TType::I32, 4);
      $xfer += $output->writeI32($this->priorityOrder);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->unicoreDataMovement !== null) {
      if (!is_object($this->unicoreDataMovement)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('unicoreDataMovement', TType::STRUCT, 5);
      $xfer += $this->unicoreDataMovement->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_addUnicoreDataMovementDetails_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_addUnicoreDataMovementDetails_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_addUnicoreDataMovementDetails_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_updateUnicoreDataMovementDetails_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $dataMovementInterfaceId = null;
  /**
   * @var \Airavata\Model\Data\Movement\UnicoreDataMovement
   */
  public $unicoreDataMovement = 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' => 'dataMovementInterfaceId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'unicoreDataMovement',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Data\Movement\UnicoreDataMovement',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['dataMovementInterfaceId'])) {
        $this->dataMovementInterfaceId = $vals['dataMovementInterfaceId'];
      }
      if (isset($vals['unicoreDataMovement'])) {
        $this->unicoreDataMovement = $vals['unicoreDataMovement'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateUnicoreDataMovementDetails_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->dataMovementInterfaceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->unicoreDataMovement = new \Airavata\Model\Data\Movement\UnicoreDataMovement();
            $xfer += $this->unicoreDataMovement->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_updateUnicoreDataMovementDetails_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->dataMovementInterfaceId !== null) {
      $xfer += $output->writeFieldBegin('dataMovementInterfaceId', TType::STRING, 2);
      $xfer += $output->writeString($this->dataMovementInterfaceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->unicoreDataMovement !== null) {
      if (!is_object($this->unicoreDataMovement)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('unicoreDataMovement', TType::STRUCT, 3);
      $xfer += $this->unicoreDataMovement->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_updateUnicoreDataMovementDetails_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_updateUnicoreDataMovementDetails_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_updateUnicoreDataMovementDetails_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_getUnicoreDataMovement_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $dataMovementId = 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' => 'dataMovementId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['dataMovementId'])) {
        $this->dataMovementId = $vals['dataMovementId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getUnicoreDataMovement_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->dataMovementId);
          } 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_getUnicoreDataMovement_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->dataMovementId !== null) {
      $xfer += $output->writeFieldBegin('dataMovementId', TType::STRING, 2);
      $xfer += $output->writeString($this->dataMovementId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getUnicoreDataMovement_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Data\Movement\UnicoreDataMovement
   */
  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\Data\Movement\UnicoreDataMovement',
          ),
        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_getUnicoreDataMovement_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\Data\Movement\UnicoreDataMovement();
            $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_getUnicoreDataMovement_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_addGridFTPDataMovementDetails_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $productUri = null;
  /**
   * @var int
   */
  public $dataMoveType = null;
  /**
   * @var int
   */
  public $priorityOrder = null;
  /**
   * @var \Airavata\Model\Data\Movement\GridFTPDataMovement
   */
  public $gridFTPDataMovement = 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' => 'productUri',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'dataMoveType',
          'type' => TType::I32,
          ),
        4 => array(
          'var' => 'priorityOrder',
          'type' => TType::I32,
          ),
        5 => array(
          'var' => 'gridFTPDataMovement',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Data\Movement\GridFTPDataMovement',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['productUri'])) {
        $this->productUri = $vals['productUri'];
      }
      if (isset($vals['dataMoveType'])) {
        $this->dataMoveType = $vals['dataMoveType'];
      }
      if (isset($vals['priorityOrder'])) {
        $this->priorityOrder = $vals['priorityOrder'];
      }
      if (isset($vals['gridFTPDataMovement'])) {
        $this->gridFTPDataMovement = $vals['gridFTPDataMovement'];
      }
    }
  }

  public function getName() {
    return 'Airavata_addGridFTPDataMovementDetails_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->productUri);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->dataMoveType);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->priorityOrder);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->gridFTPDataMovement = new \Airavata\Model\Data\Movement\GridFTPDataMovement();
            $xfer += $this->gridFTPDataMovement->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_addGridFTPDataMovementDetails_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->productUri !== null) {
      $xfer += $output->writeFieldBegin('productUri', TType::STRING, 2);
      $xfer += $output->writeString($this->productUri);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->dataMoveType !== null) {
      $xfer += $output->writeFieldBegin('dataMoveType', TType::I32, 3);
      $xfer += $output->writeI32($this->dataMoveType);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->priorityOrder !== null) {
      $xfer += $output->writeFieldBegin('priorityOrder', TType::I32, 4);
      $xfer += $output->writeI32($this->priorityOrder);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->gridFTPDataMovement !== null) {
      if (!is_object($this->gridFTPDataMovement)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('gridFTPDataMovement', TType::STRUCT, 5);
      $xfer += $this->gridFTPDataMovement->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_addGridFTPDataMovementDetails_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_addGridFTPDataMovementDetails_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_addGridFTPDataMovementDetails_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_updateGridFTPDataMovementDetails_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $dataMovementInterfaceId = null;
  /**
   * @var \Airavata\Model\Data\Movement\GridFTPDataMovement
   */
  public $gridFTPDataMovement = 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' => 'dataMovementInterfaceId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'gridFTPDataMovement',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Data\Movement\GridFTPDataMovement',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['dataMovementInterfaceId'])) {
        $this->dataMovementInterfaceId = $vals['dataMovementInterfaceId'];
      }
      if (isset($vals['gridFTPDataMovement'])) {
        $this->gridFTPDataMovement = $vals['gridFTPDataMovement'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateGridFTPDataMovementDetails_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->dataMovementInterfaceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->gridFTPDataMovement = new \Airavata\Model\Data\Movement\GridFTPDataMovement();
            $xfer += $this->gridFTPDataMovement->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_updateGridFTPDataMovementDetails_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->dataMovementInterfaceId !== null) {
      $xfer += $output->writeFieldBegin('dataMovementInterfaceId', TType::STRING, 2);
      $xfer += $output->writeString($this->dataMovementInterfaceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->gridFTPDataMovement !== null) {
      if (!is_object($this->gridFTPDataMovement)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('gridFTPDataMovement', TType::STRUCT, 3);
      $xfer += $this->gridFTPDataMovement->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_updateGridFTPDataMovementDetails_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_updateGridFTPDataMovementDetails_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_updateGridFTPDataMovementDetails_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_getGridFTPDataMovement_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $dataMovementId = 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' => 'dataMovementId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['dataMovementId'])) {
        $this->dataMovementId = $vals['dataMovementId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getGridFTPDataMovement_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->dataMovementId);
          } 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_getGridFTPDataMovement_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->dataMovementId !== null) {
      $xfer += $output->writeFieldBegin('dataMovementId', TType::STRING, 2);
      $xfer += $output->writeString($this->dataMovementId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getGridFTPDataMovement_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Data\Movement\GridFTPDataMovement
   */
  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\Data\Movement\GridFTPDataMovement',
          ),
        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_getGridFTPDataMovement_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\Data\Movement\GridFTPDataMovement();
            $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_getGridFTPDataMovement_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_changeJobSubmissionPriority_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $jobSubmissionInterfaceId = null;
  /**
   * @var int
   */
  public $newPriorityOrder = 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' => 'jobSubmissionInterfaceId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'newPriorityOrder',
          'type' => TType::I32,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['jobSubmissionInterfaceId'])) {
        $this->jobSubmissionInterfaceId = $vals['jobSubmissionInterfaceId'];
      }
      if (isset($vals['newPriorityOrder'])) {
        $this->newPriorityOrder = $vals['newPriorityOrder'];
      }
    }
  }

  public function getName() {
    return 'Airavata_changeJobSubmissionPriority_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->jobSubmissionInterfaceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->newPriorityOrder);
          } 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_changeJobSubmissionPriority_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->jobSubmissionInterfaceId !== null) {
      $xfer += $output->writeFieldBegin('jobSubmissionInterfaceId', TType::STRING, 2);
      $xfer += $output->writeString($this->jobSubmissionInterfaceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->newPriorityOrder !== null) {
      $xfer += $output->writeFieldBegin('newPriorityOrder', TType::I32, 3);
      $xfer += $output->writeI32($this->newPriorityOrder);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_changeJobSubmissionPriority_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_changeJobSubmissionPriority_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_changeJobSubmissionPriority_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_changeDataMovementPriority_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $dataMovementInterfaceId = null;
  /**
   * @var int
   */
  public $newPriorityOrder = 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' => 'dataMovementInterfaceId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'newPriorityOrder',
          'type' => TType::I32,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['dataMovementInterfaceId'])) {
        $this->dataMovementInterfaceId = $vals['dataMovementInterfaceId'];
      }
      if (isset($vals['newPriorityOrder'])) {
        $this->newPriorityOrder = $vals['newPriorityOrder'];
      }
    }
  }

  public function getName() {
    return 'Airavata_changeDataMovementPriority_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->dataMovementInterfaceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->newPriorityOrder);
          } 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_changeDataMovementPriority_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->dataMovementInterfaceId !== null) {
      $xfer += $output->writeFieldBegin('dataMovementInterfaceId', TType::STRING, 2);
      $xfer += $output->writeString($this->dataMovementInterfaceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->newPriorityOrder !== null) {
      $xfer += $output->writeFieldBegin('newPriorityOrder', TType::I32, 3);
      $xfer += $output->writeI32($this->newPriorityOrder);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_changeDataMovementPriority_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_changeDataMovementPriority_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_changeDataMovementPriority_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_changeJobSubmissionPriorities_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var array
   */
  public $jobSubmissionPriorityMap = 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' => 'jobSubmissionPriorityMap',
          'type' => TType::MAP,
          'ktype' => TType::STRING,
          'vtype' => TType::I32,
          'key' => array(
            'type' => TType::STRING,
          ),
          'val' => array(
            'type' => TType::I32,
            ),
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['jobSubmissionPriorityMap'])) {
        $this->jobSubmissionPriorityMap = $vals['jobSubmissionPriorityMap'];
      }
    }
  }

  public function getName() {
    return 'Airavata_changeJobSubmissionPriorities_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::MAP) {
            $this->jobSubmissionPriorityMap = array();
            $_size224 = 0;
            $_ktype225 = 0;
            $_vtype226 = 0;
            $xfer += $input->readMapBegin($_ktype225, $_vtype226, $_size224);
            for ($_i228 = 0; $_i228 < $_size224; ++$_i228)
            {
              $key229 = '';
              $val230 = 0;
              $xfer += $input->readString($key229);
              $xfer += $input->readI32($val230);
              $this->jobSubmissionPriorityMap[$key229] = $val230;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_changeJobSubmissionPriorities_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->jobSubmissionPriorityMap !== null) {
      if (!is_array($this->jobSubmissionPriorityMap)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('jobSubmissionPriorityMap', TType::MAP, 2);
      {
        $output->writeMapBegin(TType::STRING, TType::I32, count($this->jobSubmissionPriorityMap));
        {
          foreach ($this->jobSubmissionPriorityMap as $kiter231 => $viter232)
          {
            $xfer += $output->writeString($kiter231);
            $xfer += $output->writeI32($viter232);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_changeJobSubmissionPriorities_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_changeJobSubmissionPriorities_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_changeJobSubmissionPriorities_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_changeDataMovementPriorities_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var array
   */
  public $dataMovementPriorityMap = 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' => 'dataMovementPriorityMap',
          'type' => TType::MAP,
          'ktype' => TType::STRING,
          'vtype' => TType::I32,
          'key' => array(
            'type' => TType::STRING,
          ),
          'val' => array(
            'type' => TType::I32,
            ),
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['dataMovementPriorityMap'])) {
        $this->dataMovementPriorityMap = $vals['dataMovementPriorityMap'];
      }
    }
  }

  public function getName() {
    return 'Airavata_changeDataMovementPriorities_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::MAP) {
            $this->dataMovementPriorityMap = array();
            $_size233 = 0;
            $_ktype234 = 0;
            $_vtype235 = 0;
            $xfer += $input->readMapBegin($_ktype234, $_vtype235, $_size233);
            for ($_i237 = 0; $_i237 < $_size233; ++$_i237)
            {
              $key238 = '';
              $val239 = 0;
              $xfer += $input->readString($key238);
              $xfer += $input->readI32($val239);
              $this->dataMovementPriorityMap[$key238] = $val239;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_changeDataMovementPriorities_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->dataMovementPriorityMap !== null) {
      if (!is_array($this->dataMovementPriorityMap)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('dataMovementPriorityMap', TType::MAP, 2);
      {
        $output->writeMapBegin(TType::STRING, TType::I32, count($this->dataMovementPriorityMap));
        {
          foreach ($this->dataMovementPriorityMap as $kiter240 => $viter241)
          {
            $xfer += $output->writeString($kiter240);
            $xfer += $output->writeI32($viter241);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_changeDataMovementPriorities_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_changeDataMovementPriorities_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_changeDataMovementPriorities_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_deleteJobSubmissionInterface_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $computeResourceId = null;
  /**
   * @var string
   */
  public $jobSubmissionInterfaceId = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'authzToken',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Security\AuthzToken',
          ),
        2 => array(
          'var' => 'computeResourceId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'jobSubmissionInterfaceId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['computeResourceId'])) {
        $this->computeResourceId = $vals['computeResourceId'];
      }
      if (isset($vals['jobSubmissionInterfaceId'])) {
        $this->jobSubmissionInterfaceId = $vals['jobSubmissionInterfaceId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_deleteJobSubmissionInterface_args';
  }

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->authzToken = new \Airavata\Model\Security\AuthzToken();
            $xfer += $this->authzToken->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->computeResourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->jobSubmissionInterfaceId);
          } 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_deleteJobSubmissionInterface_args');
    if ($this->authzToken !== null) {
      if (!is_object($this->authzToken)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
      $xfer += $this->authzToken->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->computeResourceId !== null) {
      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 2);
      $xfer += $output->writeString($this->computeResourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->jobSubmissionInterfaceId !== null) {
      $xfer += $output->writeFieldBegin('jobSubmissionInterfaceId', TType::STRING, 3);
      $xfer += $output->writeString($this->jobSubmissionInterfaceId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_deleteJobSubmissionInterface_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_deleteJobSubmissionInterface_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_deleteJobSubmissionInterface_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_deleteDataMovementInterface_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $productUri = null;
  /**
   * @var string
   */
  public $dataMovementInterfaceId = null;
  /**
   * @var int
   */
  public $dataMoveType = 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' => 'productUri',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'dataMovementInterfaceId',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'dataMoveType',
          'type' => TType::I32,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['productUri'])) {
        $this->productUri = $vals['productUri'];
      }
      if (isset($vals['dataMovementInterfaceId'])) {
        $this->dataMovementInterfaceId = $vals['dataMovementInterfaceId'];
      }
      if (isset($vals['dataMoveType'])) {
        $this->dataMoveType = $vals['dataMoveType'];
      }
    }
  }

  public function getName() {
    return 'Airavata_deleteDataMovementInterface_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->productUri);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->dataMovementInterfaceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->dataMoveType);
          } 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_deleteDataMovementInterface_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->productUri !== null) {
      $xfer += $output->writeFieldBegin('productUri', TType::STRING, 2);
      $xfer += $output->writeString($this->productUri);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->dataMovementInterfaceId !== null) {
      $xfer += $output->writeFieldBegin('dataMovementInterfaceId', TType::STRING, 3);
      $xfer += $output->writeString($this->dataMovementInterfaceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->dataMoveType !== null) {
      $xfer += $output->writeFieldBegin('dataMoveType', TType::I32, 4);
      $xfer += $output->writeI32($this->dataMoveType);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_deleteDataMovementInterface_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_deleteDataMovementInterface_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_deleteDataMovementInterface_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_registerResourceJobManager_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager
   */
  public $resourceJobManager = 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' => 'resourceJobManager',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['resourceJobManager'])) {
        $this->resourceJobManager = $vals['resourceJobManager'];
      }
    }
  }

  public function getName() {
    return 'Airavata_registerResourceJobManager_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->resourceJobManager = new \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager();
            $xfer += $this->resourceJobManager->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_registerResourceJobManager_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->resourceJobManager !== null) {
      if (!is_object($this->resourceJobManager)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('resourceJobManager', TType::STRUCT, 2);
      $xfer += $this->resourceJobManager->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_registerResourceJobManager_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_registerResourceJobManager_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_registerResourceJobManager_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_updateResourceJobManager_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $resourceJobManagerId = null;
  /**
   * @var \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager
   */
  public $updatedResourceJobManager = 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' => 'resourceJobManagerId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'updatedResourceJobManager',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['resourceJobManagerId'])) {
        $this->resourceJobManagerId = $vals['resourceJobManagerId'];
      }
      if (isset($vals['updatedResourceJobManager'])) {
        $this->updatedResourceJobManager = $vals['updatedResourceJobManager'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateResourceJobManager_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->resourceJobManagerId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->updatedResourceJobManager = new \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager();
            $xfer += $this->updatedResourceJobManager->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_updateResourceJobManager_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->resourceJobManagerId !== null) {
      $xfer += $output->writeFieldBegin('resourceJobManagerId', TType::STRING, 2);
      $xfer += $output->writeString($this->resourceJobManagerId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->updatedResourceJobManager !== null) {
      if (!is_object($this->updatedResourceJobManager)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('updatedResourceJobManager', TType::STRUCT, 3);
      $xfer += $this->updatedResourceJobManager->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_updateResourceJobManager_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_updateResourceJobManager_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_updateResourceJobManager_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_getResourceJobManager_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $resourceJobManagerId = 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' => 'resourceJobManagerId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['resourceJobManagerId'])) {
        $this->resourceJobManagerId = $vals['resourceJobManagerId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getResourceJobManager_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->resourceJobManagerId);
          } 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_getResourceJobManager_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->resourceJobManagerId !== null) {
      $xfer += $output->writeFieldBegin('resourceJobManagerId', TType::STRING, 2);
      $xfer += $output->writeString($this->resourceJobManagerId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getResourceJobManager_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager
   */
  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\ComputeResource\ResourceJobManager',
          ),
        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_getResourceJobManager_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\ComputeResource\ResourceJobManager();
            $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_getResourceJobManager_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_deleteResourceJobManager_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $resourceJobManagerId = 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' => 'resourceJobManagerId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['resourceJobManagerId'])) {
        $this->resourceJobManagerId = $vals['resourceJobManagerId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_deleteResourceJobManager_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->resourceJobManagerId);
          } 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_deleteResourceJobManager_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->resourceJobManagerId !== null) {
      $xfer += $output->writeFieldBegin('resourceJobManagerId', TType::STRING, 2);
      $xfer += $output->writeString($this->resourceJobManagerId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_deleteResourceJobManager_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_deleteResourceJobManager_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_deleteResourceJobManager_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_deleteBatchQueue_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $computeResourceId = null;
  /**
   * @var string
   */
  public $queueName = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'authzToken',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Security\AuthzToken',
          ),
        2 => array(
          'var' => 'computeResourceId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'queueName',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['computeResourceId'])) {
        $this->computeResourceId = $vals['computeResourceId'];
      }
      if (isset($vals['queueName'])) {
        $this->queueName = $vals['queueName'];
      }
    }
  }

  public function getName() {
    return 'Airavata_deleteBatchQueue_args';
  }

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->authzToken = new \Airavata\Model\Security\AuthzToken();
            $xfer += $this->authzToken->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->computeResourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->queueName);
          } 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_deleteBatchQueue_args');
    if ($this->authzToken !== null) {
      if (!is_object($this->authzToken)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
      $xfer += $this->authzToken->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->computeResourceId !== null) {
      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 2);
      $xfer += $output->writeString($this->computeResourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->queueName !== null) {
      $xfer += $output->writeFieldBegin('queueName', TType::STRING, 3);
      $xfer += $output->writeString($this->queueName);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_deleteBatchQueue_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_deleteBatchQueue_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_deleteBatchQueue_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_registerGatewayResourceProfile_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var \Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile
   */
  public $gatewayResourceProfile = 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' => 'gatewayResourceProfile',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['gatewayResourceProfile'])) {
        $this->gatewayResourceProfile = $vals['gatewayResourceProfile'];
      }
    }
  }

  public function getName() {
    return 'Airavata_registerGatewayResourceProfile_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->gatewayResourceProfile = new \Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile();
            $xfer += $this->gatewayResourceProfile->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_registerGatewayResourceProfile_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->gatewayResourceProfile !== null) {
      if (!is_object($this->gatewayResourceProfile)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('gatewayResourceProfile', TType::STRUCT, 2);
      $xfer += $this->gatewayResourceProfile->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_registerGatewayResourceProfile_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_registerGatewayResourceProfile_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_registerGatewayResourceProfile_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_getGatewayResourceProfile_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_getGatewayResourceProfile_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_getGatewayResourceProfile_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_getGatewayResourceProfile_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile
   */
  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\GatewayProfile\GatewayResourceProfile',
          ),
        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_getGatewayResourceProfile_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\GatewayProfile\GatewayResourceProfile();
            $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_getGatewayResourceProfile_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_updateGatewayResourceProfile_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $gatewayID = null;
  /**
   * @var \Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile
   */
  public $gatewayResourceProfile = 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' => 'gatewayResourceProfile',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['gatewayID'])) {
        $this->gatewayID = $vals['gatewayID'];
      }
      if (isset($vals['gatewayResourceProfile'])) {
        $this->gatewayResourceProfile = $vals['gatewayResourceProfile'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateGatewayResourceProfile_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->gatewayResourceProfile = new \Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile();
            $xfer += $this->gatewayResourceProfile->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_updateGatewayResourceProfile_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->gatewayResourceProfile !== null) {
      if (!is_object($this->gatewayResourceProfile)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('gatewayResourceProfile', TType::STRUCT, 3);
      $xfer += $this->gatewayResourceProfile->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_updateGatewayResourceProfile_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_updateGatewayResourceProfile_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_updateGatewayResourceProfile_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_deleteGatewayResourceProfile_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_deleteGatewayResourceProfile_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_deleteGatewayResourceProfile_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_deleteGatewayResourceProfile_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_deleteGatewayResourceProfile_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_deleteGatewayResourceProfile_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_addGatewayComputeResourcePreference_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $gatewayID = null;
  /**
   * @var string
   */
  public $computeResourceId = null;
  /**
   * @var \Airavata\Model\AppCatalog\GatewayProfile\ComputeResourcePreference
   */
  public $computeResourcePreference = 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' => 'computeResourceId',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'computeResourcePreference',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\GatewayProfile\ComputeResourcePreference',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['gatewayID'])) {
        $this->gatewayID = $vals['gatewayID'];
      }
      if (isset($vals['computeResourceId'])) {
        $this->computeResourceId = $vals['computeResourceId'];
      }
      if (isset($vals['computeResourcePreference'])) {
        $this->computeResourcePreference = $vals['computeResourcePreference'];
      }
    }
  }

  public function getName() {
    return 'Airavata_addGatewayComputeResourcePreference_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::STRING) {
            $xfer += $input->readString($this->computeResourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->computeResourcePreference = new \Airavata\Model\AppCatalog\GatewayProfile\ComputeResourcePreference();
            $xfer += $this->computeResourcePreference->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_addGatewayComputeResourcePreference_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->computeResourceId !== null) {
      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 3);
      $xfer += $output->writeString($this->computeResourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->computeResourcePreference !== null) {
      if (!is_object($this->computeResourcePreference)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('computeResourcePreference', TType::STRUCT, 4);
      $xfer += $this->computeResourcePreference->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_addGatewayComputeResourcePreference_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_addGatewayComputeResourcePreference_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_addGatewayComputeResourcePreference_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_addGatewayStoragePreference_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $gatewayID = null;
  /**
   * @var string
   */
  public $storageResourceId = null;
  /**
   * @var \Airavata\Model\AppCatalog\GatewayProfile\StoragePreference
   */
  public $storagePreference = 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' => 'storageResourceId',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'storagePreference',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\GatewayProfile\StoragePreference',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['gatewayID'])) {
        $this->gatewayID = $vals['gatewayID'];
      }
      if (isset($vals['storageResourceId'])) {
        $this->storageResourceId = $vals['storageResourceId'];
      }
      if (isset($vals['storagePreference'])) {
        $this->storagePreference = $vals['storagePreference'];
      }
    }
  }

  public function getName() {
    return 'Airavata_addGatewayStoragePreference_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::STRING) {
            $xfer += $input->readString($this->storageResourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->storagePreference = new \Airavata\Model\AppCatalog\GatewayProfile\StoragePreference();
            $xfer += $this->storagePreference->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_addGatewayStoragePreference_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->storageResourceId !== null) {
      $xfer += $output->writeFieldBegin('storageResourceId', TType::STRING, 3);
      $xfer += $output->writeString($this->storageResourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->storagePreference !== null) {
      if (!is_object($this->storagePreference)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('storagePreference', TType::STRUCT, 4);
      $xfer += $this->storagePreference->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_addGatewayStoragePreference_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_addGatewayStoragePreference_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_addGatewayStoragePreference_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_getGatewayComputeResourcePreference_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $gatewayID = null;
  /**
   * @var string
   */
  public $computeResourceId = 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' => 'computeResourceId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['gatewayID'])) {
        $this->gatewayID = $vals['gatewayID'];
      }
      if (isset($vals['computeResourceId'])) {
        $this->computeResourceId = $vals['computeResourceId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getGatewayComputeResourcePreference_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::STRING) {
            $xfer += $input->readString($this->computeResourceId);
          } 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_getGatewayComputeResourcePreference_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->computeResourceId !== null) {
      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 3);
      $xfer += $output->writeString($this->computeResourceId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getGatewayComputeResourcePreference_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\GatewayProfile\ComputeResourcePreference
   */
  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\GatewayProfile\ComputeResourcePreference',
          ),
        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_getGatewayComputeResourcePreference_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\GatewayProfile\ComputeResourcePreference();
            $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_getGatewayComputeResourcePreference_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_getGatewayStoragePreference_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $gatewayID = null;
  /**
   * @var string
   */
  public $storageResourceId = 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' => 'storageResourceId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['gatewayID'])) {
        $this->gatewayID = $vals['gatewayID'];
      }
      if (isset($vals['storageResourceId'])) {
        $this->storageResourceId = $vals['storageResourceId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getGatewayStoragePreference_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::STRING) {
            $xfer += $input->readString($this->storageResourceId);
          } 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_getGatewayStoragePreference_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->storageResourceId !== null) {
      $xfer += $output->writeFieldBegin('storageResourceId', TType::STRING, 3);
      $xfer += $output->writeString($this->storageResourceId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getGatewayStoragePreference_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\GatewayProfile\StoragePreference
   */
  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\GatewayProfile\StoragePreference',
          ),
        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_getGatewayStoragePreference_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\GatewayProfile\StoragePreference();
            $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_getGatewayStoragePreference_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_getAllGatewayComputeResourcePreferences_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_getAllGatewayComputeResourcePreferences_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_getAllGatewayComputeResourcePreferences_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_getAllGatewayComputeResourcePreferences_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\GatewayProfile\ComputeResourcePreference[]
   */
  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\GatewayProfile\ComputeResourcePreference',
            ),
          ),
        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_getAllGatewayComputeResourcePreferences_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();
            $_size242 = 0;
            $_etype245 = 0;
            $xfer += $input->readListBegin($_etype245, $_size242);
            for ($_i246 = 0; $_i246 < $_size242; ++$_i246)
            {
              $elem247 = null;
              $elem247 = new \Airavata\Model\AppCatalog\GatewayProfile\ComputeResourcePreference();
              $xfer += $elem247->read($input);
              $this->success []= $elem247;
            }
            $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_getAllGatewayComputeResourcePreferences_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 $iter248)
          {
            $xfer += $iter248->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_getAllGatewayStoragePreferences_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_getAllGatewayStoragePreferences_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_getAllGatewayStoragePreferences_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_getAllGatewayStoragePreferences_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\GatewayProfile\StoragePreference[]
   */
  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\GatewayProfile\StoragePreference',
            ),
          ),
        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_getAllGatewayStoragePreferences_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();
            $_size249 = 0;
            $_etype252 = 0;
            $xfer += $input->readListBegin($_etype252, $_size249);
            for ($_i253 = 0; $_i253 < $_size249; ++$_i253)
            {
              $elem254 = null;
              $elem254 = new \Airavata\Model\AppCatalog\GatewayProfile\StoragePreference();
              $xfer += $elem254->read($input);
              $this->success []= $elem254;
            }
            $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_getAllGatewayStoragePreferences_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 $iter255)
          {
            $xfer += $iter255->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_getAllGatewayResourceProfiles_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 'Airavata_getAllGatewayResourceProfiles_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('Airavata_getAllGatewayResourceProfiles_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 Airavata_getAllGatewayResourceProfiles_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile[]
   */
  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\GatewayProfile\GatewayResourceProfile',
            ),
          ),
        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_getAllGatewayResourceProfiles_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();
            $_size256 = 0;
            $_etype259 = 0;
            $xfer += $input->readListBegin($_etype259, $_size256);
            for ($_i260 = 0; $_i260 < $_size256; ++$_i260)
            {
              $elem261 = null;
              $elem261 = new \Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile();
              $xfer += $elem261->read($input);
              $this->success []= $elem261;
            }
            $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_getAllGatewayResourceProfiles_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 $iter262)
          {
            $xfer += $iter262->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_updateGatewayComputeResourcePreference_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $gatewayID = null;
  /**
   * @var string
   */
  public $computeResourceId = null;
  /**
   * @var \Airavata\Model\AppCatalog\GatewayProfile\ComputeResourcePreference
   */
  public $computeResourcePreference = 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' => 'computeResourceId',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'computeResourcePreference',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\GatewayProfile\ComputeResourcePreference',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['gatewayID'])) {
        $this->gatewayID = $vals['gatewayID'];
      }
      if (isset($vals['computeResourceId'])) {
        $this->computeResourceId = $vals['computeResourceId'];
      }
      if (isset($vals['computeResourcePreference'])) {
        $this->computeResourcePreference = $vals['computeResourcePreference'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateGatewayComputeResourcePreference_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::STRING) {
            $xfer += $input->readString($this->computeResourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->computeResourcePreference = new \Airavata\Model\AppCatalog\GatewayProfile\ComputeResourcePreference();
            $xfer += $this->computeResourcePreference->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_updateGatewayComputeResourcePreference_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->computeResourceId !== null) {
      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 3);
      $xfer += $output->writeString($this->computeResourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->computeResourcePreference !== null) {
      if (!is_object($this->computeResourcePreference)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('computeResourcePreference', TType::STRUCT, 4);
      $xfer += $this->computeResourcePreference->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_updateGatewayComputeResourcePreference_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_updateGatewayComputeResourcePreference_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_updateGatewayComputeResourcePreference_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_updateGatewayStoragePreference_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $gatewayID = null;
  /**
   * @var string
   */
  public $storageId = null;
  /**
   * @var \Airavata\Model\AppCatalog\GatewayProfile\StoragePreference
   */
  public $storagePreference = 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' => 'storageId',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'storagePreference',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\GatewayProfile\StoragePreference',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['gatewayID'])) {
        $this->gatewayID = $vals['gatewayID'];
      }
      if (isset($vals['storageId'])) {
        $this->storageId = $vals['storageId'];
      }
      if (isset($vals['storagePreference'])) {
        $this->storagePreference = $vals['storagePreference'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateGatewayStoragePreference_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::STRING) {
            $xfer += $input->readString($this->storageId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->storagePreference = new \Airavata\Model\AppCatalog\GatewayProfile\StoragePreference();
            $xfer += $this->storagePreference->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_updateGatewayStoragePreference_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->storageId !== null) {
      $xfer += $output->writeFieldBegin('storageId', TType::STRING, 3);
      $xfer += $output->writeString($this->storageId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->storagePreference !== null) {
      if (!is_object($this->storagePreference)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('storagePreference', TType::STRUCT, 4);
      $xfer += $this->storagePreference->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_updateGatewayStoragePreference_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_updateGatewayStoragePreference_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_updateGatewayStoragePreference_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_deleteGatewayComputeResourcePreference_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $gatewayID = null;
  /**
   * @var string
   */
  public $computeResourceId = 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' => 'computeResourceId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['gatewayID'])) {
        $this->gatewayID = $vals['gatewayID'];
      }
      if (isset($vals['computeResourceId'])) {
        $this->computeResourceId = $vals['computeResourceId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_deleteGatewayComputeResourcePreference_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::STRING) {
            $xfer += $input->readString($this->computeResourceId);
          } 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_deleteGatewayComputeResourcePreference_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->computeResourceId !== null) {
      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 3);
      $xfer += $output->writeString($this->computeResourceId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_deleteGatewayComputeResourcePreference_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_deleteGatewayComputeResourcePreference_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_deleteGatewayComputeResourcePreference_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_deleteGatewayStoragePreference_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $gatewayID = null;
  /**
   * @var string
   */
  public $storageId = 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' => 'storageId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['gatewayID'])) {
        $this->gatewayID = $vals['gatewayID'];
      }
      if (isset($vals['storageId'])) {
        $this->storageId = $vals['storageId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_deleteGatewayStoragePreference_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::STRING) {
            $xfer += $input->readString($this->storageId);
          } 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_deleteGatewayStoragePreference_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->storageId !== null) {
      $xfer += $output->writeFieldBegin('storageId', TType::STRING, 3);
      $xfer += $output->writeString($this->storageId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_deleteGatewayStoragePreference_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_deleteGatewayStoragePreference_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_deleteGatewayStoragePreference_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_getSSHAccountProvisioners_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 'Airavata_getSSHAccountProvisioners_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('Airavata_getSSHAccountProvisioners_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 Airavata_getSSHAccountProvisioners_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\AccountProvisioning\SSHAccountProvisioner[]
   */
  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\AccountProvisioning\SSHAccountProvisioner',
            ),
          ),
        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_getSSHAccountProvisioners_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();
            $_size263 = 0;
            $_etype266 = 0;
            $xfer += $input->readListBegin($_etype266, $_size263);
            for ($_i267 = 0; $_i267 < $_size263; ++$_i267)
            {
              $elem268 = null;
              $elem268 = new \Airavata\Model\AppCatalog\AccountProvisioning\SSHAccountProvisioner();
              $xfer += $elem268->read($input);
              $this->success []= $elem268;
            }
            $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_getSSHAccountProvisioners_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 $iter269)
          {
            $xfer += $iter269->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_doesUserHaveSSHAccount_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $computeResourceId = null;
  /**
   * @var string
   */
  public $userId = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'authzToken',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Security\AuthzToken',
          ),
        2 => array(
          'var' => 'computeResourceId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'userId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['computeResourceId'])) {
        $this->computeResourceId = $vals['computeResourceId'];
      }
      if (isset($vals['userId'])) {
        $this->userId = $vals['userId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_doesUserHaveSSHAccount_args';
  }

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->authzToken = new \Airavata\Model\Security\AuthzToken();
            $xfer += $this->authzToken->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->computeResourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->userId);
          } 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_doesUserHaveSSHAccount_args');
    if ($this->authzToken !== null) {
      if (!is_object($this->authzToken)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
      $xfer += $this->authzToken->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->computeResourceId !== null) {
      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 2);
      $xfer += $output->writeString($this->computeResourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->userId !== null) {
      $xfer += $output->writeFieldBegin('userId', TType::STRING, 3);
      $xfer += $output->writeString($this->userId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_doesUserHaveSSHAccount_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_doesUserHaveSSHAccount_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_doesUserHaveSSHAccount_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_isSSHSetupCompleteForUserComputeResourcePreference_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $computeResourceId = null;
  /**
   * @var string
   */
  public $airavataCredStoreToken = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'authzToken',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Security\AuthzToken',
          ),
        2 => array(
          'var' => 'computeResourceId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'airavataCredStoreToken',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['computeResourceId'])) {
        $this->computeResourceId = $vals['computeResourceId'];
      }
      if (isset($vals['airavataCredStoreToken'])) {
        $this->airavataCredStoreToken = $vals['airavataCredStoreToken'];
      }
    }
  }

  public function getName() {
    return 'Airavata_isSSHSetupCompleteForUserComputeResourcePreference_args';
  }

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->authzToken = new \Airavata\Model\Security\AuthzToken();
            $xfer += $this->authzToken->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->computeResourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->airavataCredStoreToken);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_isSSHSetupCompleteForUserComputeResourcePreference_args');
    if ($this->authzToken !== null) {
      if (!is_object($this->authzToken)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
      $xfer += $this->authzToken->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->computeResourceId !== null) {
      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 2);
      $xfer += $output->writeString($this->computeResourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->airavataCredStoreToken !== null) {
      $xfer += $output->writeFieldBegin('airavataCredStoreToken', TType::STRING, 3);
      $xfer += $output->writeString($this->airavataCredStoreToken);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_isSSHSetupCompleteForUserComputeResourcePreference_result {
  static $_TSPEC;

  /**
   * @var bool
   */
  public $success = null;
  /**
   * @var \Airavata\API\Error\InvalidRequestException
   */
  public $ire = null;
  /**
   * @var \Airavata\API\Error\AiravataClientException
   */
  public $ace = null;
  /**
   * @var \Airavata\API\Error\AiravataSystemException
   */
  public $ase = null;
  /**
   * @var \Airavata\API\Error\AuthorizationException
   */
  public $ae = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::BOOL,
          ),
        1 => array(
          'var' => 'ire',
          'type' => TType::STRUCT,
          'class' => '\Airavata\API\Error\InvalidRequestException',
          ),
        2 => array(
          'var' => 'ace',
          'type' => TType::STRUCT,
          'class' => '\Airavata\API\Error\AiravataClientException',
          ),
        3 => array(
          'var' => 'ase',
          'type' => TType::STRUCT,
          'class' => '\Airavata\API\Error\AiravataSystemException',
          ),
        4 => array(
          'var' => 'ae',
          'type' => TType::STRUCT,
          'class' => '\Airavata\API\Error\AuthorizationException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ire'])) {
        $this->ire = $vals['ire'];
      }
      if (isset($vals['ace'])) {
        $this->ace = $vals['ace'];
      }
      if (isset($vals['ase'])) {
        $this->ase = $vals['ase'];
      }
      if (isset($vals['ae'])) {
        $this->ae = $vals['ae'];
      }
    }
  }

  public function getName() {
    return 'Airavata_isSSHSetupCompleteForUserComputeResourcePreference_result';
  }

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::BOOL) {
            $xfer += $input->readBool($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ire = new \Airavata\API\Error\InvalidRequestException();
            $xfer += $this->ire->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ace = new \Airavata\API\Error\AiravataClientException();
            $xfer += $this->ace->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ase = new \Airavata\API\Error\AiravataSystemException();
            $xfer += $this->ase->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->ae = new \Airavata\API\Error\AuthorizationException();
            $xfer += $this->ae->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_isSSHSetupCompleteForUserComputeResourcePreference_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
      $xfer += $output->writeBool($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ire !== null) {
      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
      $xfer += $this->ire->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ace !== null) {
      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
      $xfer += $this->ace->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ase !== null) {
      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
      $xfer += $this->ase->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ae !== null) {
      $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 4);
      $xfer += $this->ae->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_setupUserComputeResourcePreferencesForSSH_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $computeResourceId = null;
  /**
   * @var string
   */
  public $userId = null;
  /**
   * @var string
   */
  public $airavataCredStoreToken = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'authzToken',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Security\AuthzToken',
          ),
        2 => array(
          'var' => 'computeResourceId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'userId',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'airavataCredStoreToken',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['computeResourceId'])) {
        $this->computeResourceId = $vals['computeResourceId'];
      }
      if (isset($vals['userId'])) {
        $this->userId = $vals['userId'];
      }
      if (isset($vals['airavataCredStoreToken'])) {
        $this->airavataCredStoreToken = $vals['airavataCredStoreToken'];
      }
    }
  }

  public function getName() {
    return 'Airavata_setupUserComputeResourcePreferencesForSSH_args';
  }

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->authzToken = new \Airavata\Model\Security\AuthzToken();
            $xfer += $this->authzToken->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->computeResourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->userId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->airavataCredStoreToken);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_setupUserComputeResourcePreferencesForSSH_args');
    if ($this->authzToken !== null) {
      if (!is_object($this->authzToken)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
      $xfer += $this->authzToken->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->computeResourceId !== null) {
      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 2);
      $xfer += $output->writeString($this->computeResourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->userId !== null) {
      $xfer += $output->writeFieldBegin('userId', TType::STRING, 3);
      $xfer += $output->writeString($this->userId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->airavataCredStoreToken !== null) {
      $xfer += $output->writeFieldBegin('airavataCredStoreToken', TType::STRING, 4);
      $xfer += $output->writeString($this->airavataCredStoreToken);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_setupUserComputeResourcePreferencesForSSH_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference
   */
  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\UserResourceProfile\UserComputeResourcePreference',
          ),
        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_setupUserComputeResourcePreferencesForSSH_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\UserResourceProfile\UserComputeResourcePreference();
            $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_setupUserComputeResourcePreferencesForSSH_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_registerUserResourceProfile_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile
   */
  public $userResourceProfile = 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' => 'userResourceProfile',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['userResourceProfile'])) {
        $this->userResourceProfile = $vals['userResourceProfile'];
      }
    }
  }

  public function getName() {
    return 'Airavata_registerUserResourceProfile_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->userResourceProfile = new \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile();
            $xfer += $this->userResourceProfile->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_registerUserResourceProfile_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->userResourceProfile !== null) {
      if (!is_object($this->userResourceProfile)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('userResourceProfile', TType::STRUCT, 2);
      $xfer += $this->userResourceProfile->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_registerUserResourceProfile_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_registerUserResourceProfile_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_registerUserResourceProfile_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_isUserResourceProfileExists_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 'Airavata_isUserResourceProfileExists_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('Airavata_isUserResourceProfileExists_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 Airavata_isUserResourceProfileExists_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_isUserResourceProfileExists_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_isUserResourceProfileExists_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_getUserResourceProfile_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 'Airavata_getUserResourceProfile_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('Airavata_getUserResourceProfile_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 Airavata_getUserResourceProfile_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile
   */
  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\UserResourceProfile\UserResourceProfile',
          ),
        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_getUserResourceProfile_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\UserResourceProfile\UserResourceProfile();
            $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_getUserResourceProfile_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_updateUserResourceProfile_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $userId = null;
  /**
   * @var string
   */
  public $gatewayID = null;
  /**
   * @var \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile
   */
  public $userResourceProfile = 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,
          ),
        4 => array(
          'var' => 'userResourceProfile',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile',
          ),
        );
    }
    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'];
      }
      if (isset($vals['userResourceProfile'])) {
        $this->userResourceProfile = $vals['userResourceProfile'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateUserResourceProfile_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;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->userResourceProfile = new \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile();
            $xfer += $this->userResourceProfile->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_updateUserResourceProfile_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();
    }
    if ($this->userResourceProfile !== null) {
      if (!is_object($this->userResourceProfile)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('userResourceProfile', TType::STRUCT, 4);
      $xfer += $this->userResourceProfile->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_updateUserResourceProfile_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_updateUserResourceProfile_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_updateUserResourceProfile_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_deleteUserResourceProfile_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 'Airavata_deleteUserResourceProfile_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('Airavata_deleteUserResourceProfile_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 Airavata_deleteUserResourceProfile_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_deleteUserResourceProfile_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_deleteUserResourceProfile_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_addUserComputeResourcePreference_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $userId = null;
  /**
   * @var string
   */
  public $gatewayID = null;
  /**
   * @var string
   */
  public $userComputeResourceId = null;
  /**
   * @var \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference
   */
  public $userComputeResourcePreference = 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,
          ),
        4 => array(
          'var' => 'userComputeResourceId',
          'type' => TType::STRING,
          ),
        5 => array(
          'var' => 'userComputeResourcePreference',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference',
          ),
        );
    }
    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'];
      }
      if (isset($vals['userComputeResourceId'])) {
        $this->userComputeResourceId = $vals['userComputeResourceId'];
      }
      if (isset($vals['userComputeResourcePreference'])) {
        $this->userComputeResourcePreference = $vals['userComputeResourcePreference'];
      }
    }
  }

  public function getName() {
    return 'Airavata_addUserComputeResourcePreference_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;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->userComputeResourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->userComputeResourcePreference = new \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference();
            $xfer += $this->userComputeResourcePreference->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_addUserComputeResourcePreference_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();
    }
    if ($this->userComputeResourceId !== null) {
      $xfer += $output->writeFieldBegin('userComputeResourceId', TType::STRING, 4);
      $xfer += $output->writeString($this->userComputeResourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->userComputeResourcePreference !== null) {
      if (!is_object($this->userComputeResourcePreference)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('userComputeResourcePreference', TType::STRUCT, 5);
      $xfer += $this->userComputeResourcePreference->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_addUserComputeResourcePreference_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_addUserComputeResourcePreference_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_addUserComputeResourcePreference_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_addUserStoragePreference_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $userId = null;
  /**
   * @var string
   */
  public $gatewayID = null;
  /**
   * @var string
   */
  public $userStorageResourceId = null;
  /**
   * @var \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference
   */
  public $userStoragePreference = 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,
          ),
        4 => array(
          'var' => 'userStorageResourceId',
          'type' => TType::STRING,
          ),
        5 => array(
          'var' => 'userStoragePreference',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference',
          ),
        );
    }
    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'];
      }
      if (isset($vals['userStorageResourceId'])) {
        $this->userStorageResourceId = $vals['userStorageResourceId'];
      }
      if (isset($vals['userStoragePreference'])) {
        $this->userStoragePreference = $vals['userStoragePreference'];
      }
    }
  }

  public function getName() {
    return 'Airavata_addUserStoragePreference_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;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->userStorageResourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->userStoragePreference = new \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference();
            $xfer += $this->userStoragePreference->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_addUserStoragePreference_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();
    }
    if ($this->userStorageResourceId !== null) {
      $xfer += $output->writeFieldBegin('userStorageResourceId', TType::STRING, 4);
      $xfer += $output->writeString($this->userStorageResourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->userStoragePreference !== null) {
      if (!is_object($this->userStoragePreference)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('userStoragePreference', TType::STRUCT, 5);
      $xfer += $this->userStoragePreference->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_addUserStoragePreference_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_addUserStoragePreference_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_addUserStoragePreference_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_getUserComputeResourcePreference_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $userId = null;
  /**
   * @var string
   */
  public $gatewayID = null;
  /**
   * @var string
   */
  public $userComputeResourceId = 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,
          ),
        4 => array(
          'var' => 'userComputeResourceId',
          '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'];
      }
      if (isset($vals['userComputeResourceId'])) {
        $this->userComputeResourceId = $vals['userComputeResourceId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getUserComputeResourcePreference_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;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->userComputeResourceId);
          } 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_getUserComputeResourcePreference_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();
    }
    if ($this->userComputeResourceId !== null) {
      $xfer += $output->writeFieldBegin('userComputeResourceId', TType::STRING, 4);
      $xfer += $output->writeString($this->userComputeResourceId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getUserComputeResourcePreference_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference
   */
  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\UserResourceProfile\UserComputeResourcePreference',
          ),
        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_getUserComputeResourcePreference_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\UserResourceProfile\UserComputeResourcePreference();
            $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_getUserComputeResourcePreference_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_getUserStoragePreference_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $userId = null;
  /**
   * @var string
   */
  public $gatewayID = null;
  /**
   * @var string
   */
  public $userStorageResourceId = 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,
          ),
        4 => array(
          'var' => 'userStorageResourceId',
          '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'];
      }
      if (isset($vals['userStorageResourceId'])) {
        $this->userStorageResourceId = $vals['userStorageResourceId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getUserStoragePreference_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;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->userStorageResourceId);
          } 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_getUserStoragePreference_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();
    }
    if ($this->userStorageResourceId !== null) {
      $xfer += $output->writeFieldBegin('userStorageResourceId', TType::STRING, 4);
      $xfer += $output->writeString($this->userStorageResourceId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getUserStoragePreference_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference
   */
  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\UserResourceProfile\UserStoragePreference',
          ),
        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_getUserStoragePreference_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\UserResourceProfile\UserStoragePreference();
            $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_getUserStoragePreference_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_getAllUserComputeResourcePreferences_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 'Airavata_getAllUserComputeResourcePreferences_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('Airavata_getAllUserComputeResourcePreferences_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 Airavata_getAllUserComputeResourcePreferences_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference[]
   */
  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\UserResourceProfile\UserComputeResourcePreference',
            ),
          ),
        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_getAllUserComputeResourcePreferences_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();
            $_size270 = 0;
            $_etype273 = 0;
            $xfer += $input->readListBegin($_etype273, $_size270);
            for ($_i274 = 0; $_i274 < $_size270; ++$_i274)
            {
              $elem275 = null;
              $elem275 = new \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference();
              $xfer += $elem275->read($input);
              $this->success []= $elem275;
            }
            $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_getAllUserComputeResourcePreferences_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 $iter276)
          {
            $xfer += $iter276->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_getAllUserStoragePreferences_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 'Airavata_getAllUserStoragePreferences_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('Airavata_getAllUserStoragePreferences_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 Airavata_getAllUserStoragePreferences_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference[]
   */
  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\UserResourceProfile\UserStoragePreference',
            ),
          ),
        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_getAllUserStoragePreferences_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();
            $_size277 = 0;
            $_etype280 = 0;
            $xfer += $input->readListBegin($_etype280, $_size277);
            for ($_i281 = 0; $_i281 < $_size277; ++$_i281)
            {
              $elem282 = null;
              $elem282 = new \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference();
              $xfer += $elem282->read($input);
              $this->success []= $elem282;
            }
            $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_getAllUserStoragePreferences_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 $iter283)
          {
            $xfer += $iter283->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_getAllUserResourceProfiles_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 'Airavata_getAllUserResourceProfiles_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('Airavata_getAllUserResourceProfiles_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 Airavata_getAllUserResourceProfiles_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile[]
   */
  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\UserResourceProfile\UserResourceProfile',
            ),
          ),
        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_getAllUserResourceProfiles_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();
            $_size284 = 0;
            $_etype287 = 0;
            $xfer += $input->readListBegin($_etype287, $_size284);
            for ($_i288 = 0; $_i288 < $_size284; ++$_i288)
            {
              $elem289 = null;
              $elem289 = new \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile();
              $xfer += $elem289->read($input);
              $this->success []= $elem289;
            }
            $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_getAllUserResourceProfiles_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 $iter290)
          {
            $xfer += $iter290->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_updateUserComputeResourcePreference_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $userId = null;
  /**
   * @var string
   */
  public $gatewayID = null;
  /**
   * @var string
   */
  public $userComputeResourceId = null;
  /**
   * @var \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference
   */
  public $userComputeResourcePreference = 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,
          ),
        4 => array(
          'var' => 'userComputeResourceId',
          'type' => TType::STRING,
          ),
        5 => array(
          'var' => 'userComputeResourcePreference',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference',
          ),
        );
    }
    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'];
      }
      if (isset($vals['userComputeResourceId'])) {
        $this->userComputeResourceId = $vals['userComputeResourceId'];
      }
      if (isset($vals['userComputeResourcePreference'])) {
        $this->userComputeResourcePreference = $vals['userComputeResourcePreference'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateUserComputeResourcePreference_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;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->userComputeResourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->userComputeResourcePreference = new \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference();
            $xfer += $this->userComputeResourcePreference->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_updateUserComputeResourcePreference_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();
    }
    if ($this->userComputeResourceId !== null) {
      $xfer += $output->writeFieldBegin('userComputeResourceId', TType::STRING, 4);
      $xfer += $output->writeString($this->userComputeResourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->userComputeResourcePreference !== null) {
      if (!is_object($this->userComputeResourcePreference)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('userComputeResourcePreference', TType::STRUCT, 5);
      $xfer += $this->userComputeResourcePreference->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_updateUserComputeResourcePreference_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_updateUserComputeResourcePreference_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_updateUserComputeResourcePreference_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_updateUserStoragePreference_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $userId = null;
  /**
   * @var string
   */
  public $gatewayID = null;
  /**
   * @var string
   */
  public $userStorageId = null;
  /**
   * @var \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference
   */
  public $userStoragePreference = 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,
          ),
        4 => array(
          'var' => 'userStorageId',
          'type' => TType::STRING,
          ),
        5 => array(
          'var' => 'userStoragePreference',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference',
          ),
        );
    }
    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'];
      }
      if (isset($vals['userStorageId'])) {
        $this->userStorageId = $vals['userStorageId'];
      }
      if (isset($vals['userStoragePreference'])) {
        $this->userStoragePreference = $vals['userStoragePreference'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateUserStoragePreference_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;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->userStorageId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->userStoragePreference = new \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference();
            $xfer += $this->userStoragePreference->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_updateUserStoragePreference_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();
    }
    if ($this->userStorageId !== null) {
      $xfer += $output->writeFieldBegin('userStorageId', TType::STRING, 4);
      $xfer += $output->writeString($this->userStorageId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->userStoragePreference !== null) {
      if (!is_object($this->userStoragePreference)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('userStoragePreference', TType::STRUCT, 5);
      $xfer += $this->userStoragePreference->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_updateUserStoragePreference_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_updateUserStoragePreference_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_updateUserStoragePreference_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_deleteUserComputeResourcePreference_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $userId = null;
  /**
   * @var string
   */
  public $gatewayID = null;
  /**
   * @var string
   */
  public $userComputeResourceId = 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,
          ),
        4 => array(
          'var' => 'userComputeResourceId',
          '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'];
      }
      if (isset($vals['userComputeResourceId'])) {
        $this->userComputeResourceId = $vals['userComputeResourceId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_deleteUserComputeResourcePreference_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;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->userComputeResourceId);
          } 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_deleteUserComputeResourcePreference_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();
    }
    if ($this->userComputeResourceId !== null) {
      $xfer += $output->writeFieldBegin('userComputeResourceId', TType::STRING, 4);
      $xfer += $output->writeString($this->userComputeResourceId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_deleteUserComputeResourcePreference_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_deleteUserComputeResourcePreference_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_deleteUserComputeResourcePreference_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_deleteUserStoragePreference_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $userId = null;
  /**
   * @var string
   */
  public $gatewayID = null;
  /**
   * @var string
   */
  public $userStorageId = 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,
          ),
        4 => array(
          'var' => 'userStorageId',
          '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'];
      }
      if (isset($vals['userStorageId'])) {
        $this->userStorageId = $vals['userStorageId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_deleteUserStoragePreference_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;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->userStorageId);
          } 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_deleteUserStoragePreference_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();
    }
    if ($this->userStorageId !== null) {
      $xfer += $output->writeFieldBegin('userStorageId', TType::STRING, 4);
      $xfer += $output->writeString($this->userStorageId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_deleteUserStoragePreference_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_deleteUserStoragePreference_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_deleteUserStoragePreference_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_getLatestQueueStatuses_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 'Airavata_getLatestQueueStatuses_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('Airavata_getLatestQueueStatuses_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 Airavata_getLatestQueueStatuses_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Status\QueueStatusModel[]
   */
  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\Status\QueueStatusModel',
            ),
          ),
        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_getLatestQueueStatuses_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();
            $_size291 = 0;
            $_etype294 = 0;
            $xfer += $input->readListBegin($_etype294, $_size291);
            for ($_i295 = 0; $_i295 < $_size291; ++$_i295)
            {
              $elem296 = null;
              $elem296 = new \Airavata\Model\Status\QueueStatusModel();
              $xfer += $elem296->read($input);
              $this->success []= $elem296;
            }
            $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_getLatestQueueStatuses_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 $iter297)
          {
            $xfer += $iter297->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_registerDataProduct_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var \Airavata\Model\Data\Replica\DataProductModel
   */
  public $dataProductModel = 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' => 'dataProductModel',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Data\Replica\DataProductModel',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['dataProductModel'])) {
        $this->dataProductModel = $vals['dataProductModel'];
      }
    }
  }

  public function getName() {
    return 'Airavata_registerDataProduct_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->dataProductModel = new \Airavata\Model\Data\Replica\DataProductModel();
            $xfer += $this->dataProductModel->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_registerDataProduct_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->dataProductModel !== null) {
      if (!is_object($this->dataProductModel)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('dataProductModel', TType::STRUCT, 2);
      $xfer += $this->dataProductModel->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_registerDataProduct_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_registerDataProduct_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_registerDataProduct_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_getDataProduct_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $dataProductUri = 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' => 'dataProductUri',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['dataProductUri'])) {
        $this->dataProductUri = $vals['dataProductUri'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getDataProduct_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->dataProductUri);
          } 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_getDataProduct_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->dataProductUri !== null) {
      $xfer += $output->writeFieldBegin('dataProductUri', TType::STRING, 2);
      $xfer += $output->writeString($this->dataProductUri);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getDataProduct_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Data\Replica\DataProductModel
   */
  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\Data\Replica\DataProductModel',
          ),
        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_getDataProduct_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\Data\Replica\DataProductModel();
            $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_getDataProduct_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_registerReplicaLocation_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var \Airavata\Model\Data\Replica\DataReplicaLocationModel
   */
  public $replicaLocationModel = 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' => 'replicaLocationModel',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Data\Replica\DataReplicaLocationModel',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['replicaLocationModel'])) {
        $this->replicaLocationModel = $vals['replicaLocationModel'];
      }
    }
  }

  public function getName() {
    return 'Airavata_registerReplicaLocation_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->replicaLocationModel = new \Airavata\Model\Data\Replica\DataReplicaLocationModel();
            $xfer += $this->replicaLocationModel->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_registerReplicaLocation_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->replicaLocationModel !== null) {
      if (!is_object($this->replicaLocationModel)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('replicaLocationModel', TType::STRUCT, 2);
      $xfer += $this->replicaLocationModel->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_registerReplicaLocation_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_registerReplicaLocation_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_registerReplicaLocation_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_getParentDataProduct_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $productUri = 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' => 'productUri',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['productUri'])) {
        $this->productUri = $vals['productUri'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getParentDataProduct_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->productUri);
          } 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_getParentDataProduct_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->productUri !== null) {
      $xfer += $output->writeFieldBegin('productUri', TType::STRING, 2);
      $xfer += $output->writeString($this->productUri);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getParentDataProduct_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Data\Replica\DataProductModel
   */
  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\Data\Replica\DataProductModel',
          ),
        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_getParentDataProduct_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\Data\Replica\DataProductModel();
            $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_getParentDataProduct_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_getChildDataProducts_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $productUri = 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' => 'productUri',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['productUri'])) {
        $this->productUri = $vals['productUri'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getChildDataProducts_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->productUri);
          } 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_getChildDataProducts_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->productUri !== null) {
      $xfer += $output->writeFieldBegin('productUri', TType::STRING, 2);
      $xfer += $output->writeString($this->productUri);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getChildDataProducts_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Data\Replica\DataProductModel[]
   */
  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\Data\Replica\DataProductModel',
            ),
          ),
        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_getChildDataProducts_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();
            $_size298 = 0;
            $_etype301 = 0;
            $xfer += $input->readListBegin($_etype301, $_size298);
            for ($_i302 = 0; $_i302 < $_size298; ++$_i302)
            {
              $elem303 = null;
              $elem303 = new \Airavata\Model\Data\Replica\DataProductModel();
              $xfer += $elem303->read($input);
              $this->success []= $elem303;
            }
            $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_getChildDataProducts_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 $iter304)
          {
            $xfer += $iter304->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_shareResourceWithUsers_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $resourceId = null;
  /**
   * @var array
   */
  public $userPermissionList = 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' => 'resourceId',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'userPermissionList',
          'type' => TType::MAP,
          'ktype' => TType::STRING,
          'vtype' => TType::I32,
          'key' => array(
            'type' => TType::STRING,
          ),
          'val' => array(
            'type' => TType::I32,
            ),
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['resourceId'])) {
        $this->resourceId = $vals['resourceId'];
      }
      if (isset($vals['userPermissionList'])) {
        $this->userPermissionList = $vals['userPermissionList'];
      }
    }
  }

  public function getName() {
    return 'Airavata_shareResourceWithUsers_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->resourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::MAP) {
            $this->userPermissionList = array();
            $_size305 = 0;
            $_ktype306 = 0;
            $_vtype307 = 0;
            $xfer += $input->readMapBegin($_ktype306, $_vtype307, $_size305);
            for ($_i309 = 0; $_i309 < $_size305; ++$_i309)
            {
              $key310 = '';
              $val311 = 0;
              $xfer += $input->readString($key310);
              $xfer += $input->readI32($val311);
              $this->userPermissionList[$key310] = $val311;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_shareResourceWithUsers_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->resourceId !== null) {
      $xfer += $output->writeFieldBegin('resourceId', TType::STRING, 2);
      $xfer += $output->writeString($this->resourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->userPermissionList !== null) {
      if (!is_array($this->userPermissionList)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('userPermissionList', TType::MAP, 4);
      {
        $output->writeMapBegin(TType::STRING, TType::I32, count($this->userPermissionList));
        {
          foreach ($this->userPermissionList as $kiter312 => $viter313)
          {
            $xfer += $output->writeString($kiter312);
            $xfer += $output->writeI32($viter313);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_shareResourceWithUsers_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_shareResourceWithUsers_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_shareResourceWithUsers_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_shareResourceWithGroups_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $resourceId = null;
  /**
   * @var array
   */
  public $groupPermissionList = 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' => 'resourceId',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'groupPermissionList',
          'type' => TType::MAP,
          'ktype' => TType::STRING,
          'vtype' => TType::I32,
          'key' => array(
            'type' => TType::STRING,
          ),
          'val' => array(
            'type' => TType::I32,
            ),
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['resourceId'])) {
        $this->resourceId = $vals['resourceId'];
      }
      if (isset($vals['groupPermissionList'])) {
        $this->groupPermissionList = $vals['groupPermissionList'];
      }
    }
  }

  public function getName() {
    return 'Airavata_shareResourceWithGroups_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->resourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::MAP) {
            $this->groupPermissionList = array();
            $_size314 = 0;
            $_ktype315 = 0;
            $_vtype316 = 0;
            $xfer += $input->readMapBegin($_ktype315, $_vtype316, $_size314);
            for ($_i318 = 0; $_i318 < $_size314; ++$_i318)
            {
              $key319 = '';
              $val320 = 0;
              $xfer += $input->readString($key319);
              $xfer += $input->readI32($val320);
              $this->groupPermissionList[$key319] = $val320;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_shareResourceWithGroups_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->resourceId !== null) {
      $xfer += $output->writeFieldBegin('resourceId', TType::STRING, 2);
      $xfer += $output->writeString($this->resourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->groupPermissionList !== null) {
      if (!is_array($this->groupPermissionList)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('groupPermissionList', TType::MAP, 4);
      {
        $output->writeMapBegin(TType::STRING, TType::I32, count($this->groupPermissionList));
        {
          foreach ($this->groupPermissionList as $kiter321 => $viter322)
          {
            $xfer += $output->writeString($kiter321);
            $xfer += $output->writeI32($viter322);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_shareResourceWithGroups_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_shareResourceWithGroups_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_shareResourceWithGroups_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_revokeSharingOfResourceFromUsers_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $resourceId = null;
  /**
   * @var array
   */
  public $userPermissionList = 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' => 'resourceId',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'userPermissionList',
          'type' => TType::MAP,
          'ktype' => TType::STRING,
          'vtype' => TType::I32,
          'key' => array(
            'type' => TType::STRING,
          ),
          'val' => array(
            'type' => TType::I32,
            ),
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['resourceId'])) {
        $this->resourceId = $vals['resourceId'];
      }
      if (isset($vals['userPermissionList'])) {
        $this->userPermissionList = $vals['userPermissionList'];
      }
    }
  }

  public function getName() {
    return 'Airavata_revokeSharingOfResourceFromUsers_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->resourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::MAP) {
            $this->userPermissionList = array();
            $_size323 = 0;
            $_ktype324 = 0;
            $_vtype325 = 0;
            $xfer += $input->readMapBegin($_ktype324, $_vtype325, $_size323);
            for ($_i327 = 0; $_i327 < $_size323; ++$_i327)
            {
              $key328 = '';
              $val329 = 0;
              $xfer += $input->readString($key328);
              $xfer += $input->readI32($val329);
              $this->userPermissionList[$key328] = $val329;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_revokeSharingOfResourceFromUsers_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->resourceId !== null) {
      $xfer += $output->writeFieldBegin('resourceId', TType::STRING, 2);
      $xfer += $output->writeString($this->resourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->userPermissionList !== null) {
      if (!is_array($this->userPermissionList)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('userPermissionList', TType::MAP, 4);
      {
        $output->writeMapBegin(TType::STRING, TType::I32, count($this->userPermissionList));
        {
          foreach ($this->userPermissionList as $kiter330 => $viter331)
          {
            $xfer += $output->writeString($kiter330);
            $xfer += $output->writeI32($viter331);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_revokeSharingOfResourceFromUsers_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_revokeSharingOfResourceFromUsers_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_revokeSharingOfResourceFromUsers_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_revokeSharingOfResourceFromGroups_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $resourceId = null;
  /**
   * @var array
   */
  public $groupPermissionList = 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' => 'resourceId',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'groupPermissionList',
          'type' => TType::MAP,
          'ktype' => TType::STRING,
          'vtype' => TType::I32,
          'key' => array(
            'type' => TType::STRING,
          ),
          'val' => array(
            'type' => TType::I32,
            ),
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['resourceId'])) {
        $this->resourceId = $vals['resourceId'];
      }
      if (isset($vals['groupPermissionList'])) {
        $this->groupPermissionList = $vals['groupPermissionList'];
      }
    }
  }

  public function getName() {
    return 'Airavata_revokeSharingOfResourceFromGroups_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->resourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::MAP) {
            $this->groupPermissionList = array();
            $_size332 = 0;
            $_ktype333 = 0;
            $_vtype334 = 0;
            $xfer += $input->readMapBegin($_ktype333, $_vtype334, $_size332);
            for ($_i336 = 0; $_i336 < $_size332; ++$_i336)
            {
              $key337 = '';
              $val338 = 0;
              $xfer += $input->readString($key337);
              $xfer += $input->readI32($val338);
              $this->groupPermissionList[$key337] = $val338;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('Airavata_revokeSharingOfResourceFromGroups_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->resourceId !== null) {
      $xfer += $output->writeFieldBegin('resourceId', TType::STRING, 2);
      $xfer += $output->writeString($this->resourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->groupPermissionList !== null) {
      if (!is_array($this->groupPermissionList)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('groupPermissionList', TType::MAP, 4);
      {
        $output->writeMapBegin(TType::STRING, TType::I32, count($this->groupPermissionList));
        {
          foreach ($this->groupPermissionList as $kiter339 => $viter340)
          {
            $xfer += $output->writeString($kiter339);
            $xfer += $output->writeI32($viter340);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_revokeSharingOfResourceFromGroups_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_revokeSharingOfResourceFromGroups_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_revokeSharingOfResourceFromGroups_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_getAllAccessibleUsers_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $resourceId = null;
  /**
   * @var int
   */
  public $permissionType = 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' => 'resourceId',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'permissionType',
          'type' => TType::I32,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['resourceId'])) {
        $this->resourceId = $vals['resourceId'];
      }
      if (isset($vals['permissionType'])) {
        $this->permissionType = $vals['permissionType'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getAllAccessibleUsers_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->resourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->permissionType);
          } 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_getAllAccessibleUsers_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->resourceId !== null) {
      $xfer += $output->writeFieldBegin('resourceId', TType::STRING, 2);
      $xfer += $output->writeString($this->resourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->permissionType !== null) {
      $xfer += $output->writeFieldBegin('permissionType', TType::I32, 4);
      $xfer += $output->writeI32($this->permissionType);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getAllAccessibleUsers_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::LST,
          'etype' => TType::STRING,
          'elem' => array(
            '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_getAllAccessibleUsers_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();
            $_size341 = 0;
            $_etype344 = 0;
            $xfer += $input->readListBegin($_etype344, $_size341);
            for ($_i345 = 0; $_i345 < $_size341; ++$_i345)
            {
              $elem346 = null;
              $xfer += $input->readString($elem346);
              $this->success []= $elem346;
            }
            $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_getAllAccessibleUsers_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::STRING, count($this->success));
        {
          foreach ($this->success as $iter347)
          {
            $xfer += $output->writeString($iter347);
          }
        }
        $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_getAllAccessibleGroups_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $resourceId = null;
  /**
   * @var int
   */
  public $permissionType = 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' => 'resourceId',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'permissionType',
          'type' => TType::I32,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['resourceId'])) {
        $this->resourceId = $vals['resourceId'];
      }
      if (isset($vals['permissionType'])) {
        $this->permissionType = $vals['permissionType'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getAllAccessibleGroups_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->resourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->permissionType);
          } 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_getAllAccessibleGroups_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->resourceId !== null) {
      $xfer += $output->writeFieldBegin('resourceId', TType::STRING, 2);
      $xfer += $output->writeString($this->resourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->permissionType !== null) {
      $xfer += $output->writeFieldBegin('permissionType', TType::I32, 4);
      $xfer += $output->writeI32($this->permissionType);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getAllAccessibleGroups_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::LST,
          'etype' => TType::STRING,
          'elem' => array(
            '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_getAllAccessibleGroups_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();
            $_size348 = 0;
            $_etype351 = 0;
            $xfer += $input->readListBegin($_etype351, $_size348);
            for ($_i352 = 0; $_i352 < $_size348; ++$_i352)
            {
              $elem353 = null;
              $xfer += $input->readString($elem353);
              $this->success []= $elem353;
            }
            $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_getAllAccessibleGroups_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::STRING, count($this->success));
        {
          foreach ($this->success as $iter354)
          {
            $xfer += $output->writeString($iter354);
          }
        }
        $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_getAllDirectlyAccessibleUsers_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $resourceId = null;
  /**
   * @var int
   */
  public $permissionType = 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' => 'resourceId',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'permissionType',
          'type' => TType::I32,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['resourceId'])) {
        $this->resourceId = $vals['resourceId'];
      }
      if (isset($vals['permissionType'])) {
        $this->permissionType = $vals['permissionType'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getAllDirectlyAccessibleUsers_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->resourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->permissionType);
          } 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_getAllDirectlyAccessibleUsers_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->resourceId !== null) {
      $xfer += $output->writeFieldBegin('resourceId', TType::STRING, 2);
      $xfer += $output->writeString($this->resourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->permissionType !== null) {
      $xfer += $output->writeFieldBegin('permissionType', TType::I32, 4);
      $xfer += $output->writeI32($this->permissionType);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getAllDirectlyAccessibleUsers_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::LST,
          'etype' => TType::STRING,
          'elem' => array(
            '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_getAllDirectlyAccessibleUsers_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();
            $_size355 = 0;
            $_etype358 = 0;
            $xfer += $input->readListBegin($_etype358, $_size355);
            for ($_i359 = 0; $_i359 < $_size355; ++$_i359)
            {
              $elem360 = null;
              $xfer += $input->readString($elem360);
              $this->success []= $elem360;
            }
            $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_getAllDirectlyAccessibleUsers_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::STRING, count($this->success));
        {
          foreach ($this->success as $iter361)
          {
            $xfer += $output->writeString($iter361);
          }
        }
        $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_getAllDirectlyAccessibleGroups_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $resourceId = null;
  /**
   * @var int
   */
  public $permissionType = 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' => 'resourceId',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'permissionType',
          'type' => TType::I32,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['resourceId'])) {
        $this->resourceId = $vals['resourceId'];
      }
      if (isset($vals['permissionType'])) {
        $this->permissionType = $vals['permissionType'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getAllDirectlyAccessibleGroups_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->resourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->permissionType);
          } 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_getAllDirectlyAccessibleGroups_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->resourceId !== null) {
      $xfer += $output->writeFieldBegin('resourceId', TType::STRING, 2);
      $xfer += $output->writeString($this->resourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->permissionType !== null) {
      $xfer += $output->writeFieldBegin('permissionType', TType::I32, 4);
      $xfer += $output->writeI32($this->permissionType);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getAllDirectlyAccessibleGroups_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::LST,
          'etype' => TType::STRING,
          'elem' => array(
            '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_getAllDirectlyAccessibleGroups_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();
            $_size362 = 0;
            $_etype365 = 0;
            $xfer += $input->readListBegin($_etype365, $_size362);
            for ($_i366 = 0; $_i366 < $_size362; ++$_i366)
            {
              $elem367 = null;
              $xfer += $input->readString($elem367);
              $this->success []= $elem367;
            }
            $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_getAllDirectlyAccessibleGroups_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::STRING, count($this->success));
        {
          foreach ($this->success as $iter368)
          {
            $xfer += $output->writeString($iter368);
          }
        }
        $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_userHasAccess_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $resourceId = null;
  /**
   * @var int
   */
  public $permissionType = 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' => 'resourceId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'permissionType',
          'type' => TType::I32,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['resourceId'])) {
        $this->resourceId = $vals['resourceId'];
      }
      if (isset($vals['permissionType'])) {
        $this->permissionType = $vals['permissionType'];
      }
    }
  }

  public function getName() {
    return 'Airavata_userHasAccess_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->resourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->permissionType);
          } 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_userHasAccess_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->resourceId !== null) {
      $xfer += $output->writeFieldBegin('resourceId', TType::STRING, 2);
      $xfer += $output->writeString($this->resourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->permissionType !== null) {
      $xfer += $output->writeFieldBegin('permissionType', TType::I32, 3);
      $xfer += $output->writeI32($this->permissionType);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_userHasAccess_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_userHasAccess_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_userHasAccess_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_createGroupResourceProfile_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var \Airavata\Model\AppCatalog\GroupResourceProfile\GroupResourceProfile
   */
  public $groupResourceProfile = 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' => 'groupResourceProfile',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\GroupResourceProfile\GroupResourceProfile',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['groupResourceProfile'])) {
        $this->groupResourceProfile = $vals['groupResourceProfile'];
      }
    }
  }

  public function getName() {
    return 'Airavata_createGroupResourceProfile_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->groupResourceProfile = new \Airavata\Model\AppCatalog\GroupResourceProfile\GroupResourceProfile();
            $xfer += $this->groupResourceProfile->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_createGroupResourceProfile_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->groupResourceProfile !== null) {
      if (!is_object($this->groupResourceProfile)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('groupResourceProfile', TType::STRUCT, 2);
      $xfer += $this->groupResourceProfile->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_createGroupResourceProfile_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_createGroupResourceProfile_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_createGroupResourceProfile_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_updateGroupResourceProfile_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var \Airavata\Model\AppCatalog\GroupResourceProfile\GroupResourceProfile
   */
  public $groupResourceProfile = 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' => 'groupResourceProfile',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\GroupResourceProfile\GroupResourceProfile',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['groupResourceProfile'])) {
        $this->groupResourceProfile = $vals['groupResourceProfile'];
      }
    }
  }

  public function getName() {
    return 'Airavata_updateGroupResourceProfile_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->groupResourceProfile = new \Airavata\Model\AppCatalog\GroupResourceProfile\GroupResourceProfile();
            $xfer += $this->groupResourceProfile->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_updateGroupResourceProfile_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->groupResourceProfile !== null) {
      if (!is_object($this->groupResourceProfile)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('groupResourceProfile', TType::STRUCT, 2);
      $xfer += $this->groupResourceProfile->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_updateGroupResourceProfile_result {
  static $_TSPEC;

  /**
   * @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(
        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['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_updateGroupResourceProfile_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->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_updateGroupResourceProfile_result');
    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_getGroupResourceProfile_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $groupResourceProfileId = 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' => 'groupResourceProfileId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['groupResourceProfileId'])) {
        $this->groupResourceProfileId = $vals['groupResourceProfileId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getGroupResourceProfile_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->groupResourceProfileId);
          } 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_getGroupResourceProfile_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->groupResourceProfileId !== null) {
      $xfer += $output->writeFieldBegin('groupResourceProfileId', TType::STRING, 2);
      $xfer += $output->writeString($this->groupResourceProfileId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getGroupResourceProfile_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\GroupResourceProfile\GroupResourceProfile
   */
  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\GroupResourceProfile\GroupResourceProfile',
          ),
        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_getGroupResourceProfile_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\GroupResourceProfile\GroupResourceProfile();
            $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_getGroupResourceProfile_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_removeGroupResourceProfile_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $groupResourceProfileId = 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' => 'groupResourceProfileId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['groupResourceProfileId'])) {
        $this->groupResourceProfileId = $vals['groupResourceProfileId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_removeGroupResourceProfile_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->groupResourceProfileId);
          } 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_removeGroupResourceProfile_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->groupResourceProfileId !== null) {
      $xfer += $output->writeFieldBegin('groupResourceProfileId', TType::STRING, 2);
      $xfer += $output->writeString($this->groupResourceProfileId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_removeGroupResourceProfile_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_removeGroupResourceProfile_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_removeGroupResourceProfile_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_getGroupResourceList_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_getGroupResourceList_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_getGroupResourceList_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_getGroupResourceList_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\GroupResourceProfile\GroupResourceProfile[]
   */
  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\GroupResourceProfile\GroupResourceProfile',
            ),
          ),
        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_getGroupResourceList_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();
            $_size369 = 0;
            $_etype372 = 0;
            $xfer += $input->readListBegin($_etype372, $_size369);
            for ($_i373 = 0; $_i373 < $_size369; ++$_i373)
            {
              $elem374 = null;
              $elem374 = new \Airavata\Model\AppCatalog\GroupResourceProfile\GroupResourceProfile();
              $xfer += $elem374->read($input);
              $this->success []= $elem374;
            }
            $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_getGroupResourceList_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 $iter375)
          {
            $xfer += $iter375->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_removeGroupComputePrefs_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $computeResourceId = null;
  /**
   * @var string
   */
  public $groupResourceProfileId = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'authzToken',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Security\AuthzToken',
          ),
        2 => array(
          'var' => 'computeResourceId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'groupResourceProfileId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['computeResourceId'])) {
        $this->computeResourceId = $vals['computeResourceId'];
      }
      if (isset($vals['groupResourceProfileId'])) {
        $this->groupResourceProfileId = $vals['groupResourceProfileId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_removeGroupComputePrefs_args';
  }

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->authzToken = new \Airavata\Model\Security\AuthzToken();
            $xfer += $this->authzToken->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->computeResourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->groupResourceProfileId);
          } 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_removeGroupComputePrefs_args');
    if ($this->authzToken !== null) {
      if (!is_object($this->authzToken)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
      $xfer += $this->authzToken->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->computeResourceId !== null) {
      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 2);
      $xfer += $output->writeString($this->computeResourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->groupResourceProfileId !== null) {
      $xfer += $output->writeFieldBegin('groupResourceProfileId', TType::STRING, 3);
      $xfer += $output->writeString($this->groupResourceProfileId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_removeGroupComputePrefs_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_removeGroupComputePrefs_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_removeGroupComputePrefs_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_removeGroupComputeResourcePolicy_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $resourcePolicyId = 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' => 'resourcePolicyId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['resourcePolicyId'])) {
        $this->resourcePolicyId = $vals['resourcePolicyId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_removeGroupComputeResourcePolicy_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->resourcePolicyId);
          } 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_removeGroupComputeResourcePolicy_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->resourcePolicyId !== null) {
      $xfer += $output->writeFieldBegin('resourcePolicyId', TType::STRING, 2);
      $xfer += $output->writeString($this->resourcePolicyId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_removeGroupComputeResourcePolicy_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_removeGroupComputeResourcePolicy_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_removeGroupComputeResourcePolicy_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_removeGroupBatchQueueResourcePolicy_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $resourcePolicyId = 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' => 'resourcePolicyId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['resourcePolicyId'])) {
        $this->resourcePolicyId = $vals['resourcePolicyId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_removeGroupBatchQueueResourcePolicy_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->resourcePolicyId);
          } 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_removeGroupBatchQueueResourcePolicy_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->resourcePolicyId !== null) {
      $xfer += $output->writeFieldBegin('resourcePolicyId', TType::STRING, 2);
      $xfer += $output->writeString($this->resourcePolicyId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_removeGroupBatchQueueResourcePolicy_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_removeGroupBatchQueueResourcePolicy_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_removeGroupBatchQueueResourcePolicy_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_getGroupComputeResourcePreference_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $computeResourceId = null;
  /**
   * @var string
   */
  public $groupResourceProfileId = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'authzToken',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\Security\AuthzToken',
          ),
        2 => array(
          'var' => 'computeResourceId',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'groupResourceProfileId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['computeResourceId'])) {
        $this->computeResourceId = $vals['computeResourceId'];
      }
      if (isset($vals['groupResourceProfileId'])) {
        $this->groupResourceProfileId = $vals['groupResourceProfileId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getGroupComputeResourcePreference_args';
  }

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->authzToken = new \Airavata\Model\Security\AuthzToken();
            $xfer += $this->authzToken->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->computeResourceId);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->groupResourceProfileId);
          } 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_getGroupComputeResourcePreference_args');
    if ($this->authzToken !== null) {
      if (!is_object($this->authzToken)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
      $xfer += $this->authzToken->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->computeResourceId !== null) {
      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 2);
      $xfer += $output->writeString($this->computeResourceId);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->groupResourceProfileId !== null) {
      $xfer += $output->writeFieldBegin('groupResourceProfileId', TType::STRING, 3);
      $xfer += $output->writeString($this->groupResourceProfileId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getGroupComputeResourcePreference_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\GroupResourceProfile\GroupComputeResourcePreference
   */
  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\GroupResourceProfile\GroupComputeResourcePreference',
          ),
        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_getGroupComputeResourcePreference_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\GroupResourceProfile\GroupComputeResourcePreference();
            $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_getGroupComputeResourcePreference_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_getGroupComputeResourcePolicy_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $resourcePolicyId = 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' => 'resourcePolicyId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['resourcePolicyId'])) {
        $this->resourcePolicyId = $vals['resourcePolicyId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getGroupComputeResourcePolicy_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->resourcePolicyId);
          } 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_getGroupComputeResourcePolicy_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->resourcePolicyId !== null) {
      $xfer += $output->writeFieldBegin('resourcePolicyId', TType::STRING, 2);
      $xfer += $output->writeString($this->resourcePolicyId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getGroupComputeResourcePolicy_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\GroupResourceProfile\ComputeResourcePolicy
   */
  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\GroupResourceProfile\ComputeResourcePolicy',
          ),
        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_getGroupComputeResourcePolicy_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\GroupResourceProfile\ComputeResourcePolicy();
            $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_getGroupComputeResourcePolicy_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_getBatchQueueResourcePolicy_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $resourcePolicyId = 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' => 'resourcePolicyId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['resourcePolicyId'])) {
        $this->resourcePolicyId = $vals['resourcePolicyId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getBatchQueueResourcePolicy_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->resourcePolicyId);
          } 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_getBatchQueueResourcePolicy_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->resourcePolicyId !== null) {
      $xfer += $output->writeFieldBegin('resourcePolicyId', TType::STRING, 2);
      $xfer += $output->writeString($this->resourcePolicyId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getBatchQueueResourcePolicy_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\GroupResourceProfile\BatchQueueResourcePolicy
   */
  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\GroupResourceProfile\BatchQueueResourcePolicy',
          ),
        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_getBatchQueueResourcePolicy_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\GroupResourceProfile\BatchQueueResourcePolicy();
            $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_getBatchQueueResourcePolicy_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_getGroupComputeResourcePrefList_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $groupResourceProfileId = 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' => 'groupResourceProfileId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['groupResourceProfileId'])) {
        $this->groupResourceProfileId = $vals['groupResourceProfileId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getGroupComputeResourcePrefList_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->groupResourceProfileId);
          } 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_getGroupComputeResourcePrefList_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->groupResourceProfileId !== null) {
      $xfer += $output->writeFieldBegin('groupResourceProfileId', TType::STRING, 2);
      $xfer += $output->writeString($this->groupResourceProfileId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getGroupComputeResourcePrefList_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\GroupResourceProfile\GroupComputeResourcePreference[]
   */
  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\GroupResourceProfile\GroupComputeResourcePreference',
            ),
          ),
        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_getGroupComputeResourcePrefList_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();
            $_size376 = 0;
            $_etype379 = 0;
            $xfer += $input->readListBegin($_etype379, $_size376);
            for ($_i380 = 0; $_i380 < $_size376; ++$_i380)
            {
              $elem381 = null;
              $elem381 = new \Airavata\Model\AppCatalog\GroupResourceProfile\GroupComputeResourcePreference();
              $xfer += $elem381->read($input);
              $this->success []= $elem381;
            }
            $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_getGroupComputeResourcePrefList_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 $iter382)
          {
            $xfer += $iter382->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_getGroupBatchQueueResourcePolicyList_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $groupResourceProfileId = 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' => 'groupResourceProfileId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['groupResourceProfileId'])) {
        $this->groupResourceProfileId = $vals['groupResourceProfileId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getGroupBatchQueueResourcePolicyList_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->groupResourceProfileId);
          } 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_getGroupBatchQueueResourcePolicyList_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->groupResourceProfileId !== null) {
      $xfer += $output->writeFieldBegin('groupResourceProfileId', TType::STRING, 2);
      $xfer += $output->writeString($this->groupResourceProfileId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getGroupBatchQueueResourcePolicyList_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\GroupResourceProfile\BatchQueueResourcePolicy[]
   */
  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\GroupResourceProfile\BatchQueueResourcePolicy',
            ),
          ),
        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_getGroupBatchQueueResourcePolicyList_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();
            $_size383 = 0;
            $_etype386 = 0;
            $xfer += $input->readListBegin($_etype386, $_size383);
            for ($_i387 = 0; $_i387 < $_size383; ++$_i387)
            {
              $elem388 = null;
              $elem388 = new \Airavata\Model\AppCatalog\GroupResourceProfile\BatchQueueResourcePolicy();
              $xfer += $elem388->read($input);
              $this->success []= $elem388;
            }
            $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_getGroupBatchQueueResourcePolicyList_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 $iter389)
          {
            $xfer += $iter389->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_getGroupComputeResourcePolicyList_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $groupResourceProfileId = 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' => 'groupResourceProfileId',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['groupResourceProfileId'])) {
        $this->groupResourceProfileId = $vals['groupResourceProfileId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getGroupComputeResourcePolicyList_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->groupResourceProfileId);
          } 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_getGroupComputeResourcePolicyList_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->groupResourceProfileId !== null) {
      $xfer += $output->writeFieldBegin('groupResourceProfileId', TType::STRING, 2);
      $xfer += $output->writeString($this->groupResourceProfileId);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_getGroupComputeResourcePolicyList_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\GroupResourceProfile\ComputeResourcePolicy[]
   */
  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\GroupResourceProfile\ComputeResourcePolicy',
            ),
          ),
        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_getGroupComputeResourcePolicyList_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();
            $_size390 = 0;
            $_etype393 = 0;
            $xfer += $input->readListBegin($_etype393, $_size390);
            for ($_i394 = 0; $_i394 < $_size390; ++$_i394)
            {
              $elem395 = null;
              $elem395 = new \Airavata\Model\AppCatalog\GroupResourceProfile\ComputeResourcePolicy();
              $xfer += $elem395->read($input);
              $this->success []= $elem395;
            }
            $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_getGroupComputeResourcePolicyList_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 $iter396)
          {
            $xfer += $iter396->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_getGatewayGroups_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 'Airavata_getGatewayGroups_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('Airavata_getGatewayGroups_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 Airavata_getGatewayGroups_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\GatewayGroups\GatewayGroups
   */
  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\GatewayGroups\GatewayGroups',
          ),
        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_getGatewayGroups_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\GatewayGroups\GatewayGroups();
            $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_getGatewayGroups_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_getParser_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $parserId = 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' => 'parserId',
          '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['parserId'])) {
        $this->parserId = $vals['parserId'];
      }
      if (isset($vals['gatewayId'])) {
        $this->gatewayId = $vals['gatewayId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getParser_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->parserId);
          } 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_getParser_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->parserId !== null) {
      $xfer += $output->writeFieldBegin('parserId', TType::STRING, 2);
      $xfer += $output->writeString($this->parserId);
      $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_getParser_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\Parser\Parser
   */
  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\Parser\Parser',
          ),
        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_getParser_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\Parser\Parser();
            $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_getParser_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_saveParser_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var \Airavata\Model\AppCatalog\Parser\Parser
   */
  public $parser = 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' => 'parser',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\Parser\Parser',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['parser'])) {
        $this->parser = $vals['parser'];
      }
    }
  }

  public function getName() {
    return 'Airavata_saveParser_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->parser = new \Airavata\Model\AppCatalog\Parser\Parser();
            $xfer += $this->parser->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_saveParser_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->parser !== null) {
      if (!is_object($this->parser)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('parser', TType::STRUCT, 2);
      $xfer += $this->parser->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_saveParser_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_saveParser_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_saveParser_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_listAllParsers_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_listAllParsers_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_listAllParsers_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_listAllParsers_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\Parser\Parser[]
   */
  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\Parser\Parser',
            ),
          ),
        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_listAllParsers_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();
            $_size397 = 0;
            $_etype400 = 0;
            $xfer += $input->readListBegin($_etype400, $_size397);
            for ($_i401 = 0; $_i401 < $_size397; ++$_i401)
            {
              $elem402 = null;
              $elem402 = new \Airavata\Model\AppCatalog\Parser\Parser();
              $xfer += $elem402->read($input);
              $this->success []= $elem402;
            }
            $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_listAllParsers_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 $iter403)
          {
            $xfer += $iter403->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_removeParser_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $parserId = 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' => 'parserId',
          '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['parserId'])) {
        $this->parserId = $vals['parserId'];
      }
      if (isset($vals['gatewayId'])) {
        $this->gatewayId = $vals['gatewayId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_removeParser_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->parserId);
          } 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_removeParser_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->parserId !== null) {
      $xfer += $output->writeFieldBegin('parserId', TType::STRING, 2);
      $xfer += $output->writeString($this->parserId);
      $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_removeParser_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_removeParser_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_removeParser_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_getParsingTemplate_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $templateId = 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' => 'templateId',
          '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['templateId'])) {
        $this->templateId = $vals['templateId'];
      }
      if (isset($vals['gatewayId'])) {
        $this->gatewayId = $vals['gatewayId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getParsingTemplate_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->templateId);
          } 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_getParsingTemplate_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->templateId !== null) {
      $xfer += $output->writeFieldBegin('templateId', TType::STRING, 2);
      $xfer += $output->writeString($this->templateId);
      $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_getParsingTemplate_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\Parser\ParsingTemplate
   */
  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\Parser\ParsingTemplate',
          ),
        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_getParsingTemplate_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\Parser\ParsingTemplate();
            $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_getParsingTemplate_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_getParsingTemplatesForExperiment_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $experimentId = 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' => 'experimentId',
          '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['experimentId'])) {
        $this->experimentId = $vals['experimentId'];
      }
      if (isset($vals['gatewayId'])) {
        $this->gatewayId = $vals['gatewayId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_getParsingTemplatesForExperiment_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->experimentId);
          } 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_getParsingTemplatesForExperiment_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->experimentId !== null) {
      $xfer += $output->writeFieldBegin('experimentId', TType::STRING, 2);
      $xfer += $output->writeString($this->experimentId);
      $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_getParsingTemplatesForExperiment_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\Parser\ParsingTemplate[]
   */
  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\Parser\ParsingTemplate',
            ),
          ),
        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_getParsingTemplatesForExperiment_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();
            $_size404 = 0;
            $_etype407 = 0;
            $xfer += $input->readListBegin($_etype407, $_size404);
            for ($_i408 = 0; $_i408 < $_size404; ++$_i408)
            {
              $elem409 = null;
              $elem409 = new \Airavata\Model\AppCatalog\Parser\ParsingTemplate();
              $xfer += $elem409->read($input);
              $this->success []= $elem409;
            }
            $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_getParsingTemplatesForExperiment_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 $iter410)
          {
            $xfer += $iter410->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_saveParsingTemplate_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var \Airavata\Model\AppCatalog\Parser\ParsingTemplate
   */
  public $parsingTemplate = 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' => 'parsingTemplate',
          'type' => TType::STRUCT,
          'class' => '\Airavata\Model\AppCatalog\Parser\ParsingTemplate',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['authzToken'])) {
        $this->authzToken = $vals['authzToken'];
      }
      if (isset($vals['parsingTemplate'])) {
        $this->parsingTemplate = $vals['parsingTemplate'];
      }
    }
  }

  public function getName() {
    return 'Airavata_saveParsingTemplate_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->parsingTemplate = new \Airavata\Model\AppCatalog\Parser\ParsingTemplate();
            $xfer += $this->parsingTemplate->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_saveParsingTemplate_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->parsingTemplate !== null) {
      if (!is_object($this->parsingTemplate)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('parsingTemplate', TType::STRUCT, 2);
      $xfer += $this->parsingTemplate->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class Airavata_saveParsingTemplate_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_saveParsingTemplate_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_saveParsingTemplate_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_removeParsingTemplate_args {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\Security\AuthzToken
   */
  public $authzToken = null;
  /**
   * @var string
   */
  public $templateId = 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' => 'templateId',
          '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['templateId'])) {
        $this->templateId = $vals['templateId'];
      }
      if (isset($vals['gatewayId'])) {
        $this->gatewayId = $vals['gatewayId'];
      }
    }
  }

  public function getName() {
    return 'Airavata_removeParsingTemplate_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->templateId);
          } 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_removeParsingTemplate_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->templateId !== null) {
      $xfer += $output->writeFieldBegin('templateId', TType::STRING, 2);
      $xfer += $output->writeString($this->templateId);
      $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_removeParsingTemplate_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_removeParsingTemplate_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_removeParsingTemplate_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_listAllParsingTemplates_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_listAllParsingTemplates_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_listAllParsingTemplates_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_listAllParsingTemplates_result {
  static $_TSPEC;

  /**
   * @var \Airavata\Model\AppCatalog\Parser\ParsingTemplate[]
   */
  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\Parser\ParsingTemplate',
            ),
          ),
        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_listAllParsingTemplates_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();
            $_size411 = 0;
            $_etype414 = 0;
            $xfer += $input->readListBegin($_etype414, $_size411);
            for ($_i415 = 0; $_i415 < $_size411; ++$_i415)
            {
              $elem416 = null;
              $elem416 = new \Airavata\Model\AppCatalog\Parser\ParsingTemplate();
              $xfer += $elem416->read($input);
              $this->success []= $elem416;
            }
            $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_listAllParsingTemplates_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 $iter417)
          {
            $xfer += $iter417->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;
  }

}


