| <?php |
| namespace Airavata\Model\AppCatalog\GroupResourceProfile; |
| |
| /** |
| * 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; |
| |
| |
| class GroupAccountSSHProvisionerConfig { |
| static $_TSPEC; |
| |
| /** |
| * @var string |
| */ |
| public $resourceId = null; |
| /** |
| * @var string |
| */ |
| public $groupResourceProfileId = "DO_NOT_SET_AT_CLIENTS"; |
| /** |
| * @var string |
| */ |
| public $configName = null; |
| /** |
| * @var string |
| */ |
| public $configValue = null; |
| |
| public function __construct($vals=null) { |
| if (!isset(self::$_TSPEC)) { |
| self::$_TSPEC = array( |
| 1 => array( |
| 'var' => 'resourceId', |
| 'type' => TType::STRING, |
| ), |
| 2 => array( |
| 'var' => 'groupResourceProfileId', |
| 'type' => TType::STRING, |
| ), |
| 3 => array( |
| 'var' => 'configName', |
| 'type' => TType::STRING, |
| ), |
| 4 => array( |
| 'var' => 'configValue', |
| 'type' => TType::STRING, |
| ), |
| ); |
| } |
| if (is_array($vals)) { |
| if (isset($vals['resourceId'])) { |
| $this->resourceId = $vals['resourceId']; |
| } |
| if (isset($vals['groupResourceProfileId'])) { |
| $this->groupResourceProfileId = $vals['groupResourceProfileId']; |
| } |
| if (isset($vals['configName'])) { |
| $this->configName = $vals['configName']; |
| } |
| if (isset($vals['configValue'])) { |
| $this->configValue = $vals['configValue']; |
| } |
| } |
| } |
| |
| public function getName() { |
| return 'GroupAccountSSHProvisionerConfig'; |
| } |
| |
| public function read($input) |
| { |
| $xfer = 0; |
| $fname = null; |
| $ftype = 0; |
| $fid = 0; |
| $xfer += $input->readStructBegin($fname); |
| while (true) |
| { |
| $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| if ($ftype == TType::STOP) { |
| break; |
| } |
| switch ($fid) |
| { |
| case 1: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->resourceId); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 2: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->groupResourceProfileId); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 3: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->configName); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 4: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->configValue); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| default: |
| $xfer += $input->skip($ftype); |
| break; |
| } |
| $xfer += $input->readFieldEnd(); |
| } |
| $xfer += $input->readStructEnd(); |
| return $xfer; |
| } |
| |
| public function write($output) { |
| $xfer = 0; |
| $xfer += $output->writeStructBegin('GroupAccountSSHProvisionerConfig'); |
| if ($this->resourceId !== null) { |
| $xfer += $output->writeFieldBegin('resourceId', TType::STRING, 1); |
| $xfer += $output->writeString($this->resourceId); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->groupResourceProfileId !== null) { |
| $xfer += $output->writeFieldBegin('groupResourceProfileId', TType::STRING, 2); |
| $xfer += $output->writeString($this->groupResourceProfileId); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->configName !== null) { |
| $xfer += $output->writeFieldBegin('configName', TType::STRING, 3); |
| $xfer += $output->writeString($this->configName); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->configValue !== null) { |
| $xfer += $output->writeFieldBegin('configValue', TType::STRING, 4); |
| $xfer += $output->writeString($this->configValue); |
| $xfer += $output->writeFieldEnd(); |
| } |
| $xfer += $output->writeFieldStop(); |
| $xfer += $output->writeStructEnd(); |
| return $xfer; |
| } |
| |
| } |
| |
| class GroupComputeResourcePreference { |
| static $_TSPEC; |
| |
| /** |
| * @var string |
| */ |
| public $computeResourceId = null; |
| /** |
| * @var string |
| */ |
| public $groupResourceProfileId = "DO_NOT_SET_AT_CLIENTS"; |
| /** |
| * @var bool |
| */ |
| public $overridebyAiravata = true; |
| /** |
| * @var string |
| */ |
| public $loginUserName = null; |
| /** |
| * @var int |
| */ |
| public $preferredJobSubmissionProtocol = null; |
| /** |
| * @var int |
| */ |
| public $preferredDataMovementProtocol = null; |
| /** |
| * @var string |
| */ |
| public $preferredBatchQueue = null; |
| /** |
| * @var string |
| */ |
| public $scratchLocation = null; |
| /** |
| * @var string |
| */ |
| public $allocationProjectNumber = null; |
| /** |
| * @var string |
| */ |
| public $resourceSpecificCredentialStoreToken = null; |
| /** |
| * @var string |
| */ |
| public $usageReportingGatewayId = null; |
| /** |
| * @var string |
| */ |
| public $qualityOfService = null; |
| /** |
| * @var string |
| */ |
| public $reservation = null; |
| /** |
| * @var int |
| */ |
| public $reservationStartTime = null; |
| /** |
| * @var int |
| */ |
| public $reservationEndTime = null; |
| /** |
| * @var string |
| */ |
| public $sshAccountProvisioner = null; |
| /** |
| * @var \Airavata\Model\AppCatalog\GroupResourceProfile\GroupAccountSSHProvisionerConfig[] |
| */ |
| public $groupSSHAccountProvisionerConfigs = null; |
| /** |
| * @var string |
| */ |
| public $sshAccountProvisionerAdditionalInfo = null; |
| |
| public function __construct($vals=null) { |
| if (!isset(self::$_TSPEC)) { |
| self::$_TSPEC = array( |
| 1 => array( |
| 'var' => 'computeResourceId', |
| 'type' => TType::STRING, |
| ), |
| 2 => array( |
| 'var' => 'groupResourceProfileId', |
| 'type' => TType::STRING, |
| ), |
| 3 => array( |
| 'var' => 'overridebyAiravata', |
| 'type' => TType::BOOL, |
| ), |
| 4 => array( |
| 'var' => 'loginUserName', |
| 'type' => TType::STRING, |
| ), |
| 5 => array( |
| 'var' => 'preferredJobSubmissionProtocol', |
| 'type' => TType::I32, |
| ), |
| 6 => array( |
| 'var' => 'preferredDataMovementProtocol', |
| 'type' => TType::I32, |
| ), |
| 7 => array( |
| 'var' => 'preferredBatchQueue', |
| 'type' => TType::STRING, |
| ), |
| 8 => array( |
| 'var' => 'scratchLocation', |
| 'type' => TType::STRING, |
| ), |
| 9 => array( |
| 'var' => 'allocationProjectNumber', |
| 'type' => TType::STRING, |
| ), |
| 10 => array( |
| 'var' => 'resourceSpecificCredentialStoreToken', |
| 'type' => TType::STRING, |
| ), |
| 11 => array( |
| 'var' => 'usageReportingGatewayId', |
| 'type' => TType::STRING, |
| ), |
| 12 => array( |
| 'var' => 'qualityOfService', |
| 'type' => TType::STRING, |
| ), |
| 13 => array( |
| 'var' => 'reservation', |
| 'type' => TType::STRING, |
| ), |
| 14 => array( |
| 'var' => 'reservationStartTime', |
| 'type' => TType::I64, |
| ), |
| 15 => array( |
| 'var' => 'reservationEndTime', |
| 'type' => TType::I64, |
| ), |
| 16 => array( |
| 'var' => 'sshAccountProvisioner', |
| 'type' => TType::STRING, |
| ), |
| 17 => array( |
| 'var' => 'groupSSHAccountProvisionerConfigs', |
| 'type' => TType::LST, |
| 'etype' => TType::STRUCT, |
| 'elem' => array( |
| 'type' => TType::STRUCT, |
| 'class' => '\Airavata\Model\AppCatalog\GroupResourceProfile\GroupAccountSSHProvisionerConfig', |
| ), |
| ), |
| 18 => array( |
| 'var' => 'sshAccountProvisionerAdditionalInfo', |
| 'type' => TType::STRING, |
| ), |
| ); |
| } |
| if (is_array($vals)) { |
| if (isset($vals['computeResourceId'])) { |
| $this->computeResourceId = $vals['computeResourceId']; |
| } |
| if (isset($vals['groupResourceProfileId'])) { |
| $this->groupResourceProfileId = $vals['groupResourceProfileId']; |
| } |
| if (isset($vals['overridebyAiravata'])) { |
| $this->overridebyAiravata = $vals['overridebyAiravata']; |
| } |
| if (isset($vals['loginUserName'])) { |
| $this->loginUserName = $vals['loginUserName']; |
| } |
| if (isset($vals['preferredJobSubmissionProtocol'])) { |
| $this->preferredJobSubmissionProtocol = $vals['preferredJobSubmissionProtocol']; |
| } |
| if (isset($vals['preferredDataMovementProtocol'])) { |
| $this->preferredDataMovementProtocol = $vals['preferredDataMovementProtocol']; |
| } |
| if (isset($vals['preferredBatchQueue'])) { |
| $this->preferredBatchQueue = $vals['preferredBatchQueue']; |
| } |
| if (isset($vals['scratchLocation'])) { |
| $this->scratchLocation = $vals['scratchLocation']; |
| } |
| if (isset($vals['allocationProjectNumber'])) { |
| $this->allocationProjectNumber = $vals['allocationProjectNumber']; |
| } |
| if (isset($vals['resourceSpecificCredentialStoreToken'])) { |
| $this->resourceSpecificCredentialStoreToken = $vals['resourceSpecificCredentialStoreToken']; |
| } |
| if (isset($vals['usageReportingGatewayId'])) { |
| $this->usageReportingGatewayId = $vals['usageReportingGatewayId']; |
| } |
| if (isset($vals['qualityOfService'])) { |
| $this->qualityOfService = $vals['qualityOfService']; |
| } |
| if (isset($vals['reservation'])) { |
| $this->reservation = $vals['reservation']; |
| } |
| if (isset($vals['reservationStartTime'])) { |
| $this->reservationStartTime = $vals['reservationStartTime']; |
| } |
| if (isset($vals['reservationEndTime'])) { |
| $this->reservationEndTime = $vals['reservationEndTime']; |
| } |
| if (isset($vals['sshAccountProvisioner'])) { |
| $this->sshAccountProvisioner = $vals['sshAccountProvisioner']; |
| } |
| if (isset($vals['groupSSHAccountProvisionerConfigs'])) { |
| $this->groupSSHAccountProvisionerConfigs = $vals['groupSSHAccountProvisionerConfigs']; |
| } |
| if (isset($vals['sshAccountProvisionerAdditionalInfo'])) { |
| $this->sshAccountProvisionerAdditionalInfo = $vals['sshAccountProvisionerAdditionalInfo']; |
| } |
| } |
| } |
| |
| public function getName() { |
| return 'GroupComputeResourcePreference'; |
| } |
| |
| public function read($input) |
| { |
| $xfer = 0; |
| $fname = null; |
| $ftype = 0; |
| $fid = 0; |
| $xfer += $input->readStructBegin($fname); |
| while (true) |
| { |
| $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| if ($ftype == TType::STOP) { |
| break; |
| } |
| switch ($fid) |
| { |
| case 1: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->computeResourceId); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 2: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->groupResourceProfileId); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 3: |
| if ($ftype == TType::BOOL) { |
| $xfer += $input->readBool($this->overridebyAiravata); |
| } 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::I32) { |
| $xfer += $input->readI32($this->preferredJobSubmissionProtocol); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 6: |
| if ($ftype == TType::I32) { |
| $xfer += $input->readI32($this->preferredDataMovementProtocol); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 7: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->preferredBatchQueue); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 8: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->scratchLocation); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 9: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->allocationProjectNumber); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 10: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->resourceSpecificCredentialStoreToken); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 11: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->usageReportingGatewayId); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 12: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->qualityOfService); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 13: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->reservation); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 14: |
| if ($ftype == TType::I64) { |
| $xfer += $input->readI64($this->reservationStartTime); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 15: |
| if ($ftype == TType::I64) { |
| $xfer += $input->readI64($this->reservationEndTime); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 16: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->sshAccountProvisioner); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 17: |
| if ($ftype == TType::LST) { |
| $this->groupSSHAccountProvisionerConfigs = array(); |
| $_size0 = 0; |
| $_etype3 = 0; |
| $xfer += $input->readListBegin($_etype3, $_size0); |
| for ($_i4 = 0; $_i4 < $_size0; ++$_i4) |
| { |
| $elem5 = null; |
| $elem5 = new \Airavata\Model\AppCatalog\GroupResourceProfile\GroupAccountSSHProvisionerConfig(); |
| $xfer += $elem5->read($input); |
| $this->groupSSHAccountProvisionerConfigs []= $elem5; |
| } |
| $xfer += $input->readListEnd(); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 18: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->sshAccountProvisionerAdditionalInfo); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| default: |
| $xfer += $input->skip($ftype); |
| break; |
| } |
| $xfer += $input->readFieldEnd(); |
| } |
| $xfer += $input->readStructEnd(); |
| return $xfer; |
| } |
| |
| public function write($output) { |
| $xfer = 0; |
| $xfer += $output->writeStructBegin('GroupComputeResourcePreference'); |
| if ($this->computeResourceId !== null) { |
| $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 1); |
| $xfer += $output->writeString($this->computeResourceId); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->groupResourceProfileId !== null) { |
| $xfer += $output->writeFieldBegin('groupResourceProfileId', TType::STRING, 2); |
| $xfer += $output->writeString($this->groupResourceProfileId); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->overridebyAiravata !== null) { |
| $xfer += $output->writeFieldBegin('overridebyAiravata', TType::BOOL, 3); |
| $xfer += $output->writeBool($this->overridebyAiravata); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->loginUserName !== null) { |
| $xfer += $output->writeFieldBegin('loginUserName', TType::STRING, 4); |
| $xfer += $output->writeString($this->loginUserName); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->preferredJobSubmissionProtocol !== null) { |
| $xfer += $output->writeFieldBegin('preferredJobSubmissionProtocol', TType::I32, 5); |
| $xfer += $output->writeI32($this->preferredJobSubmissionProtocol); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->preferredDataMovementProtocol !== null) { |
| $xfer += $output->writeFieldBegin('preferredDataMovementProtocol', TType::I32, 6); |
| $xfer += $output->writeI32($this->preferredDataMovementProtocol); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->preferredBatchQueue !== null) { |
| $xfer += $output->writeFieldBegin('preferredBatchQueue', TType::STRING, 7); |
| $xfer += $output->writeString($this->preferredBatchQueue); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->scratchLocation !== null) { |
| $xfer += $output->writeFieldBegin('scratchLocation', TType::STRING, 8); |
| $xfer += $output->writeString($this->scratchLocation); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->allocationProjectNumber !== null) { |
| $xfer += $output->writeFieldBegin('allocationProjectNumber', TType::STRING, 9); |
| $xfer += $output->writeString($this->allocationProjectNumber); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->resourceSpecificCredentialStoreToken !== null) { |
| $xfer += $output->writeFieldBegin('resourceSpecificCredentialStoreToken', TType::STRING, 10); |
| $xfer += $output->writeString($this->resourceSpecificCredentialStoreToken); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->usageReportingGatewayId !== null) { |
| $xfer += $output->writeFieldBegin('usageReportingGatewayId', TType::STRING, 11); |
| $xfer += $output->writeString($this->usageReportingGatewayId); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->qualityOfService !== null) { |
| $xfer += $output->writeFieldBegin('qualityOfService', TType::STRING, 12); |
| $xfer += $output->writeString($this->qualityOfService); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->reservation !== null) { |
| $xfer += $output->writeFieldBegin('reservation', TType::STRING, 13); |
| $xfer += $output->writeString($this->reservation); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->reservationStartTime !== null) { |
| $xfer += $output->writeFieldBegin('reservationStartTime', TType::I64, 14); |
| $xfer += $output->writeI64($this->reservationStartTime); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->reservationEndTime !== null) { |
| $xfer += $output->writeFieldBegin('reservationEndTime', TType::I64, 15); |
| $xfer += $output->writeI64($this->reservationEndTime); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->sshAccountProvisioner !== null) { |
| $xfer += $output->writeFieldBegin('sshAccountProvisioner', TType::STRING, 16); |
| $xfer += $output->writeString($this->sshAccountProvisioner); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->groupSSHAccountProvisionerConfigs !== null) { |
| if (!is_array($this->groupSSHAccountProvisionerConfigs)) { |
| throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| } |
| $xfer += $output->writeFieldBegin('groupSSHAccountProvisionerConfigs', TType::LST, 17); |
| { |
| $output->writeListBegin(TType::STRUCT, count($this->groupSSHAccountProvisionerConfigs)); |
| { |
| foreach ($this->groupSSHAccountProvisionerConfigs as $iter6) |
| { |
| $xfer += $iter6->write($output); |
| } |
| } |
| $output->writeListEnd(); |
| } |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->sshAccountProvisionerAdditionalInfo !== null) { |
| $xfer += $output->writeFieldBegin('sshAccountProvisionerAdditionalInfo', TType::STRING, 18); |
| $xfer += $output->writeString($this->sshAccountProvisionerAdditionalInfo); |
| $xfer += $output->writeFieldEnd(); |
| } |
| $xfer += $output->writeFieldStop(); |
| $xfer += $output->writeStructEnd(); |
| return $xfer; |
| } |
| |
| } |
| |
| class ComputeResourcePolicy { |
| static $_TSPEC; |
| |
| /** |
| * @var string |
| */ |
| public $resourcePolicyId = "DO_NOT_SET_AT_CLIENTS"; |
| /** |
| * @var string |
| */ |
| public $computeResourceId = null; |
| /** |
| * @var string |
| */ |
| public $groupResourceProfileId = "DO_NOT_SET_AT_CLIENTS"; |
| /** |
| * @var string[] |
| */ |
| public $allowedBatchQueues = null; |
| |
| public function __construct($vals=null) { |
| if (!isset(self::$_TSPEC)) { |
| self::$_TSPEC = array( |
| 1 => array( |
| 'var' => 'resourcePolicyId', |
| 'type' => TType::STRING, |
| ), |
| 2 => array( |
| 'var' => 'computeResourceId', |
| 'type' => TType::STRING, |
| ), |
| 3 => array( |
| 'var' => 'groupResourceProfileId', |
| 'type' => TType::STRING, |
| ), |
| 4 => array( |
| 'var' => 'allowedBatchQueues', |
| 'type' => TType::LST, |
| 'etype' => TType::STRING, |
| 'elem' => array( |
| 'type' => TType::STRING, |
| ), |
| ), |
| ); |
| } |
| if (is_array($vals)) { |
| if (isset($vals['resourcePolicyId'])) { |
| $this->resourcePolicyId = $vals['resourcePolicyId']; |
| } |
| if (isset($vals['computeResourceId'])) { |
| $this->computeResourceId = $vals['computeResourceId']; |
| } |
| if (isset($vals['groupResourceProfileId'])) { |
| $this->groupResourceProfileId = $vals['groupResourceProfileId']; |
| } |
| if (isset($vals['allowedBatchQueues'])) { |
| $this->allowedBatchQueues = $vals['allowedBatchQueues']; |
| } |
| } |
| } |
| |
| public function getName() { |
| return 'ComputeResourcePolicy'; |
| } |
| |
| public function read($input) |
| { |
| $xfer = 0; |
| $fname = null; |
| $ftype = 0; |
| $fid = 0; |
| $xfer += $input->readStructBegin($fname); |
| while (true) |
| { |
| $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| if ($ftype == TType::STOP) { |
| break; |
| } |
| switch ($fid) |
| { |
| case 1: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->resourcePolicyId); |
| } 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; |
| case 4: |
| if ($ftype == TType::LST) { |
| $this->allowedBatchQueues = array(); |
| $_size7 = 0; |
| $_etype10 = 0; |
| $xfer += $input->readListBegin($_etype10, $_size7); |
| for ($_i11 = 0; $_i11 < $_size7; ++$_i11) |
| { |
| $elem12 = null; |
| $xfer += $input->readString($elem12); |
| $this->allowedBatchQueues []= $elem12; |
| } |
| $xfer += $input->readListEnd(); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| default: |
| $xfer += $input->skip($ftype); |
| break; |
| } |
| $xfer += $input->readFieldEnd(); |
| } |
| $xfer += $input->readStructEnd(); |
| return $xfer; |
| } |
| |
| public function write($output) { |
| $xfer = 0; |
| $xfer += $output->writeStructBegin('ComputeResourcePolicy'); |
| if ($this->resourcePolicyId !== null) { |
| $xfer += $output->writeFieldBegin('resourcePolicyId', TType::STRING, 1); |
| $xfer += $output->writeString($this->resourcePolicyId); |
| $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(); |
| } |
| if ($this->allowedBatchQueues !== null) { |
| if (!is_array($this->allowedBatchQueues)) { |
| throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| } |
| $xfer += $output->writeFieldBegin('allowedBatchQueues', TType::LST, 4); |
| { |
| $output->writeListBegin(TType::STRING, count($this->allowedBatchQueues)); |
| { |
| foreach ($this->allowedBatchQueues as $iter13) |
| { |
| $xfer += $output->writeString($iter13); |
| } |
| } |
| $output->writeListEnd(); |
| } |
| $xfer += $output->writeFieldEnd(); |
| } |
| $xfer += $output->writeFieldStop(); |
| $xfer += $output->writeStructEnd(); |
| return $xfer; |
| } |
| |
| } |
| |
| class BatchQueueResourcePolicy { |
| static $_TSPEC; |
| |
| /** |
| * @var string |
| */ |
| public $resourcePolicyId = "DO_NOT_SET_AT_CLIENTS"; |
| /** |
| * @var string |
| */ |
| public $computeResourceId = null; |
| /** |
| * @var string |
| */ |
| public $groupResourceProfileId = "DO_NOT_SET_AT_CLIENTS"; |
| /** |
| * @var string |
| */ |
| public $queuename = null; |
| /** |
| * @var int |
| */ |
| public $maxAllowedNodes = null; |
| /** |
| * @var int |
| */ |
| public $maxAllowedCores = null; |
| /** |
| * @var int |
| */ |
| public $maxAllowedWalltime = null; |
| |
| public function __construct($vals=null) { |
| if (!isset(self::$_TSPEC)) { |
| self::$_TSPEC = array( |
| 1 => array( |
| 'var' => 'resourcePolicyId', |
| 'type' => TType::STRING, |
| ), |
| 2 => array( |
| 'var' => 'computeResourceId', |
| 'type' => TType::STRING, |
| ), |
| 3 => array( |
| 'var' => 'groupResourceProfileId', |
| 'type' => TType::STRING, |
| ), |
| 4 => array( |
| 'var' => 'queuename', |
| 'type' => TType::STRING, |
| ), |
| 5 => array( |
| 'var' => 'maxAllowedNodes', |
| 'type' => TType::I32, |
| ), |
| 6 => array( |
| 'var' => 'maxAllowedCores', |
| 'type' => TType::I32, |
| ), |
| 7 => array( |
| 'var' => 'maxAllowedWalltime', |
| 'type' => TType::I32, |
| ), |
| ); |
| } |
| if (is_array($vals)) { |
| if (isset($vals['resourcePolicyId'])) { |
| $this->resourcePolicyId = $vals['resourcePolicyId']; |
| } |
| if (isset($vals['computeResourceId'])) { |
| $this->computeResourceId = $vals['computeResourceId']; |
| } |
| if (isset($vals['groupResourceProfileId'])) { |
| $this->groupResourceProfileId = $vals['groupResourceProfileId']; |
| } |
| if (isset($vals['queuename'])) { |
| $this->queuename = $vals['queuename']; |
| } |
| if (isset($vals['maxAllowedNodes'])) { |
| $this->maxAllowedNodes = $vals['maxAllowedNodes']; |
| } |
| if (isset($vals['maxAllowedCores'])) { |
| $this->maxAllowedCores = $vals['maxAllowedCores']; |
| } |
| if (isset($vals['maxAllowedWalltime'])) { |
| $this->maxAllowedWalltime = $vals['maxAllowedWalltime']; |
| } |
| } |
| } |
| |
| public function getName() { |
| return 'BatchQueueResourcePolicy'; |
| } |
| |
| public function read($input) |
| { |
| $xfer = 0; |
| $fname = null; |
| $ftype = 0; |
| $fid = 0; |
| $xfer += $input->readStructBegin($fname); |
| while (true) |
| { |
| $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| if ($ftype == TType::STOP) { |
| break; |
| } |
| switch ($fid) |
| { |
| case 1: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->resourcePolicyId); |
| } 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; |
| case 4: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->queuename); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 5: |
| if ($ftype == TType::I32) { |
| $xfer += $input->readI32($this->maxAllowedNodes); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 6: |
| if ($ftype == TType::I32) { |
| $xfer += $input->readI32($this->maxAllowedCores); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 7: |
| if ($ftype == TType::I32) { |
| $xfer += $input->readI32($this->maxAllowedWalltime); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| default: |
| $xfer += $input->skip($ftype); |
| break; |
| } |
| $xfer += $input->readFieldEnd(); |
| } |
| $xfer += $input->readStructEnd(); |
| return $xfer; |
| } |
| |
| public function write($output) { |
| $xfer = 0; |
| $xfer += $output->writeStructBegin('BatchQueueResourcePolicy'); |
| if ($this->resourcePolicyId !== null) { |
| $xfer += $output->writeFieldBegin('resourcePolicyId', TType::STRING, 1); |
| $xfer += $output->writeString($this->resourcePolicyId); |
| $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(); |
| } |
| if ($this->queuename !== null) { |
| $xfer += $output->writeFieldBegin('queuename', TType::STRING, 4); |
| $xfer += $output->writeString($this->queuename); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->maxAllowedNodes !== null) { |
| $xfer += $output->writeFieldBegin('maxAllowedNodes', TType::I32, 5); |
| $xfer += $output->writeI32($this->maxAllowedNodes); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->maxAllowedCores !== null) { |
| $xfer += $output->writeFieldBegin('maxAllowedCores', TType::I32, 6); |
| $xfer += $output->writeI32($this->maxAllowedCores); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->maxAllowedWalltime !== null) { |
| $xfer += $output->writeFieldBegin('maxAllowedWalltime', TType::I32, 7); |
| $xfer += $output->writeI32($this->maxAllowedWalltime); |
| $xfer += $output->writeFieldEnd(); |
| } |
| $xfer += $output->writeFieldStop(); |
| $xfer += $output->writeStructEnd(); |
| return $xfer; |
| } |
| |
| } |
| |
| /** |
| * 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. |
| * |
| */ |
| class GroupResourceProfile { |
| static $_TSPEC; |
| |
| /** |
| * @var string |
| */ |
| public $gatewayId = null; |
| /** |
| * @var string |
| */ |
| public $groupResourceProfileId = "DO_NOT_SET_AT_CLIENTS"; |
| /** |
| * @var string |
| */ |
| public $groupResourceProfileName = null; |
| /** |
| * @var \Airavata\Model\AppCatalog\GroupResourceProfile\GroupComputeResourcePreference[] |
| */ |
| public $computePreferences = null; |
| /** |
| * @var \Airavata\Model\AppCatalog\GroupResourceProfile\ComputeResourcePolicy[] |
| */ |
| public $computeResourcePolicies = null; |
| /** |
| * @var \Airavata\Model\AppCatalog\GroupResourceProfile\BatchQueueResourcePolicy[] |
| */ |
| public $batchQueueResourcePolicies = null; |
| /** |
| * @var int |
| */ |
| public $creationTime = null; |
| /** |
| * @var int |
| */ |
| public $updatedTime = null; |
| /** |
| * @var string |
| */ |
| public $defaultCredentialStoreToken = null; |
| |
| public function __construct($vals=null) { |
| if (!isset(self::$_TSPEC)) { |
| self::$_TSPEC = array( |
| 1 => array( |
| 'var' => 'gatewayId', |
| 'type' => TType::STRING, |
| ), |
| 2 => array( |
| 'var' => 'groupResourceProfileId', |
| 'type' => TType::STRING, |
| ), |
| 3 => array( |
| 'var' => 'groupResourceProfileName', |
| 'type' => TType::STRING, |
| ), |
| 4 => array( |
| 'var' => 'computePreferences', |
| 'type' => TType::LST, |
| 'etype' => TType::STRUCT, |
| 'elem' => array( |
| 'type' => TType::STRUCT, |
| 'class' => '\Airavata\Model\AppCatalog\GroupResourceProfile\GroupComputeResourcePreference', |
| ), |
| ), |
| 5 => array( |
| 'var' => 'computeResourcePolicies', |
| 'type' => TType::LST, |
| 'etype' => TType::STRUCT, |
| 'elem' => array( |
| 'type' => TType::STRUCT, |
| 'class' => '\Airavata\Model\AppCatalog\GroupResourceProfile\ComputeResourcePolicy', |
| ), |
| ), |
| 6 => array( |
| 'var' => 'batchQueueResourcePolicies', |
| 'type' => TType::LST, |
| 'etype' => TType::STRUCT, |
| 'elem' => array( |
| 'type' => TType::STRUCT, |
| 'class' => '\Airavata\Model\AppCatalog\GroupResourceProfile\BatchQueueResourcePolicy', |
| ), |
| ), |
| 7 => array( |
| 'var' => 'creationTime', |
| 'type' => TType::I64, |
| ), |
| 8 => array( |
| 'var' => 'updatedTime', |
| 'type' => TType::I64, |
| ), |
| 9 => array( |
| 'var' => 'defaultCredentialStoreToken', |
| 'type' => TType::STRING, |
| ), |
| ); |
| } |
| if (is_array($vals)) { |
| if (isset($vals['gatewayId'])) { |
| $this->gatewayId = $vals['gatewayId']; |
| } |
| if (isset($vals['groupResourceProfileId'])) { |
| $this->groupResourceProfileId = $vals['groupResourceProfileId']; |
| } |
| if (isset($vals['groupResourceProfileName'])) { |
| $this->groupResourceProfileName = $vals['groupResourceProfileName']; |
| } |
| if (isset($vals['computePreferences'])) { |
| $this->computePreferences = $vals['computePreferences']; |
| } |
| if (isset($vals['computeResourcePolicies'])) { |
| $this->computeResourcePolicies = $vals['computeResourcePolicies']; |
| } |
| if (isset($vals['batchQueueResourcePolicies'])) { |
| $this->batchQueueResourcePolicies = $vals['batchQueueResourcePolicies']; |
| } |
| if (isset($vals['creationTime'])) { |
| $this->creationTime = $vals['creationTime']; |
| } |
| if (isset($vals['updatedTime'])) { |
| $this->updatedTime = $vals['updatedTime']; |
| } |
| if (isset($vals['defaultCredentialStoreToken'])) { |
| $this->defaultCredentialStoreToken = $vals['defaultCredentialStoreToken']; |
| } |
| } |
| } |
| |
| public function getName() { |
| return 'GroupResourceProfile'; |
| } |
| |
| public function read($input) |
| { |
| $xfer = 0; |
| $fname = null; |
| $ftype = 0; |
| $fid = 0; |
| $xfer += $input->readStructBegin($fname); |
| while (true) |
| { |
| $xfer += $input->readFieldBegin($fname, $ftype, $fid); |
| if ($ftype == TType::STOP) { |
| break; |
| } |
| switch ($fid) |
| { |
| case 1: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->gatewayId); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 2: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->groupResourceProfileId); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 3: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->groupResourceProfileName); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 4: |
| if ($ftype == TType::LST) { |
| $this->computePreferences = array(); |
| $_size14 = 0; |
| $_etype17 = 0; |
| $xfer += $input->readListBegin($_etype17, $_size14); |
| for ($_i18 = 0; $_i18 < $_size14; ++$_i18) |
| { |
| $elem19 = null; |
| $elem19 = new \Airavata\Model\AppCatalog\GroupResourceProfile\GroupComputeResourcePreference(); |
| $xfer += $elem19->read($input); |
| $this->computePreferences []= $elem19; |
| } |
| $xfer += $input->readListEnd(); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 5: |
| if ($ftype == TType::LST) { |
| $this->computeResourcePolicies = array(); |
| $_size20 = 0; |
| $_etype23 = 0; |
| $xfer += $input->readListBegin($_etype23, $_size20); |
| for ($_i24 = 0; $_i24 < $_size20; ++$_i24) |
| { |
| $elem25 = null; |
| $elem25 = new \Airavata\Model\AppCatalog\GroupResourceProfile\ComputeResourcePolicy(); |
| $xfer += $elem25->read($input); |
| $this->computeResourcePolicies []= $elem25; |
| } |
| $xfer += $input->readListEnd(); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 6: |
| if ($ftype == TType::LST) { |
| $this->batchQueueResourcePolicies = array(); |
| $_size26 = 0; |
| $_etype29 = 0; |
| $xfer += $input->readListBegin($_etype29, $_size26); |
| for ($_i30 = 0; $_i30 < $_size26; ++$_i30) |
| { |
| $elem31 = null; |
| $elem31 = new \Airavata\Model\AppCatalog\GroupResourceProfile\BatchQueueResourcePolicy(); |
| $xfer += $elem31->read($input); |
| $this->batchQueueResourcePolicies []= $elem31; |
| } |
| $xfer += $input->readListEnd(); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 7: |
| if ($ftype == TType::I64) { |
| $xfer += $input->readI64($this->creationTime); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 8: |
| if ($ftype == TType::I64) { |
| $xfer += $input->readI64($this->updatedTime); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| case 9: |
| if ($ftype == TType::STRING) { |
| $xfer += $input->readString($this->defaultCredentialStoreToken); |
| } else { |
| $xfer += $input->skip($ftype); |
| } |
| break; |
| default: |
| $xfer += $input->skip($ftype); |
| break; |
| } |
| $xfer += $input->readFieldEnd(); |
| } |
| $xfer += $input->readStructEnd(); |
| return $xfer; |
| } |
| |
| public function write($output) { |
| $xfer = 0; |
| $xfer += $output->writeStructBegin('GroupResourceProfile'); |
| if ($this->gatewayId !== null) { |
| $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 1); |
| $xfer += $output->writeString($this->gatewayId); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->groupResourceProfileId !== null) { |
| $xfer += $output->writeFieldBegin('groupResourceProfileId', TType::STRING, 2); |
| $xfer += $output->writeString($this->groupResourceProfileId); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->groupResourceProfileName !== null) { |
| $xfer += $output->writeFieldBegin('groupResourceProfileName', TType::STRING, 3); |
| $xfer += $output->writeString($this->groupResourceProfileName); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->computePreferences !== null) { |
| if (!is_array($this->computePreferences)) { |
| throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| } |
| $xfer += $output->writeFieldBegin('computePreferences', TType::LST, 4); |
| { |
| $output->writeListBegin(TType::STRUCT, count($this->computePreferences)); |
| { |
| foreach ($this->computePreferences as $iter32) |
| { |
| $xfer += $iter32->write($output); |
| } |
| } |
| $output->writeListEnd(); |
| } |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->computeResourcePolicies !== null) { |
| if (!is_array($this->computeResourcePolicies)) { |
| throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| } |
| $xfer += $output->writeFieldBegin('computeResourcePolicies', TType::LST, 5); |
| { |
| $output->writeListBegin(TType::STRUCT, count($this->computeResourcePolicies)); |
| { |
| foreach ($this->computeResourcePolicies as $iter33) |
| { |
| $xfer += $iter33->write($output); |
| } |
| } |
| $output->writeListEnd(); |
| } |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->batchQueueResourcePolicies !== null) { |
| if (!is_array($this->batchQueueResourcePolicies)) { |
| throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); |
| } |
| $xfer += $output->writeFieldBegin('batchQueueResourcePolicies', TType::LST, 6); |
| { |
| $output->writeListBegin(TType::STRUCT, count($this->batchQueueResourcePolicies)); |
| { |
| foreach ($this->batchQueueResourcePolicies as $iter34) |
| { |
| $xfer += $iter34->write($output); |
| } |
| } |
| $output->writeListEnd(); |
| } |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->creationTime !== null) { |
| $xfer += $output->writeFieldBegin('creationTime', TType::I64, 7); |
| $xfer += $output->writeI64($this->creationTime); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->updatedTime !== null) { |
| $xfer += $output->writeFieldBegin('updatedTime', TType::I64, 8); |
| $xfer += $output->writeI64($this->updatedTime); |
| $xfer += $output->writeFieldEnd(); |
| } |
| if ($this->defaultCredentialStoreToken !== null) { |
| $xfer += $output->writeFieldBegin('defaultCredentialStoreToken', TType::STRING, 9); |
| $xfer += $output->writeString($this->defaultCredentialStoreToken); |
| $xfer += $output->writeFieldEnd(); |
| } |
| $xfer += $output->writeFieldStop(); |
| $xfer += $output->writeStructEnd(); |
| return $xfer; |
| } |
| |
| } |
| |
| |