Esempio n. 1
0
 public function write($output)
 {
     $xfer = 0;
     $xfer += $output->writeStructBegin('UserConfigurationDataModel');
     if ($this->airavataAutoSchedule !== null) {
         $xfer += $output->writeFieldBegin('airavataAutoSchedule', TType::BOOL, 1);
         $xfer += $output->writeBool($this->airavataAutoSchedule);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->overrideManualScheduledParams !== null) {
         $xfer += $output->writeFieldBegin('overrideManualScheduledParams', TType::BOOL, 2);
         $xfer += $output->writeBool($this->overrideManualScheduledParams);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->shareExperimentPublicly !== null) {
         $xfer += $output->writeFieldBegin('shareExperimentPublicly', TType::BOOL, 3);
         $xfer += $output->writeBool($this->shareExperimentPublicly);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->computationalResourceScheduling !== null) {
         if (!is_object($this->computationalResourceScheduling)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('computationalResourceScheduling', TType::STRUCT, 4);
         $xfer += $this->computationalResourceScheduling->write($output);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->throttleResources !== null) {
         $xfer += $output->writeFieldBegin('throttleResources', TType::BOOL, 5);
         $xfer += $output->writeBool($this->throttleResources);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->userDN !== null) {
         $xfer += $output->writeFieldBegin('userDN', TType::STRING, 6);
         $xfer += $output->writeString($this->userDN);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->generateCert !== null) {
         $xfer += $output->writeFieldBegin('generateCert', TType::BOOL, 7);
         $xfer += $output->writeBool($this->generateCert);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->storageId !== null) {
         $xfer += $output->writeFieldBegin('storageId', TType::STRING, 8);
         $xfer += $output->writeString($this->storageId);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->experimentDataDir !== null) {
         $xfer += $output->writeFieldBegin('experimentDataDir', TType::STRING, 9);
         $xfer += $output->writeString($this->experimentDataDir);
         $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
 }
Esempio n. 2
0
 public function write($output)
 {
     $xfer = 0;
     $xfer += $output->writeStructBegin('ProcessModel');
     if ($this->processId !== null) {
         $xfer += $output->writeFieldBegin('processId', TType::STRING, 1);
         $xfer += $output->writeString($this->processId);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->experimentId !== null) {
         $xfer += $output->writeFieldBegin('experimentId', TType::STRING, 2);
         $xfer += $output->writeString($this->experimentId);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->creationTime !== null) {
         $xfer += $output->writeFieldBegin('creationTime', TType::I64, 3);
         $xfer += $output->writeI64($this->creationTime);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->lastUpdateTime !== null) {
         $xfer += $output->writeFieldBegin('lastUpdateTime', TType::I64, 4);
         $xfer += $output->writeI64($this->lastUpdateTime);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->processStatus !== null) {
         if (!is_object($this->processStatus)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('processStatus', TType::STRUCT, 5);
         $xfer += $this->processStatus->write($output);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->processDetail !== null) {
         $xfer += $output->writeFieldBegin('processDetail', TType::STRING, 6);
         $xfer += $output->writeString($this->processDetail);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->applicationInterfaceId !== null) {
         $xfer += $output->writeFieldBegin('applicationInterfaceId', TType::STRING, 7);
         $xfer += $output->writeString($this->applicationInterfaceId);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->applicationDeploymentId !== null) {
         $xfer += $output->writeFieldBegin('applicationDeploymentId', TType::STRING, 8);
         $xfer += $output->writeString($this->applicationDeploymentId);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->computeResourceId !== null) {
         $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 9);
         $xfer += $output->writeString($this->computeResourceId);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->processInputs !== null) {
         if (!is_array($this->processInputs)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('processInputs', TType::LST, 10);
         $output->writeListBegin(TType::STRUCT, count($this->processInputs));
         foreach ($this->processInputs as $iter24) {
             $xfer += $iter24->write($output);
         }
         $output->writeListEnd();
         $xfer += $output->writeFieldEnd();
     }
     if ($this->processOutputs !== null) {
         if (!is_array($this->processOutputs)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('processOutputs', TType::LST, 11);
         $output->writeListBegin(TType::STRUCT, count($this->processOutputs));
         foreach ($this->processOutputs as $iter25) {
             $xfer += $iter25->write($output);
         }
         $output->writeListEnd();
         $xfer += $output->writeFieldEnd();
     }
     if ($this->resourceSchedule !== null) {
         if (!is_object($this->resourceSchedule)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('resourceSchedule', TType::STRUCT, 12);
         $xfer += $this->resourceSchedule->write($output);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->tasks !== null) {
         if (!is_array($this->tasks)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('tasks', TType::LST, 13);
         $output->writeListBegin(TType::STRUCT, count($this->tasks));
         foreach ($this->tasks as $iter26) {
             $xfer += $iter26->write($output);
         }
         $output->writeListEnd();
         $xfer += $output->writeFieldEnd();
     }
     if ($this->taskDag !== null) {
         $xfer += $output->writeFieldBegin('taskDag', TType::STRING, 14);
         $xfer += $output->writeString($this->taskDag);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->processError !== null) {
         if (!is_object($this->processError)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('processError', TType::STRUCT, 15);
         $xfer += $this->processError->write($output);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->gatewayExecutionId !== null) {
         $xfer += $output->writeFieldBegin('gatewayExecutionId', TType::STRING, 16);
         $xfer += $output->writeString($this->gatewayExecutionId);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->enableEmailNotification !== null) {
         $xfer += $output->writeFieldBegin('enableEmailNotification', TType::BOOL, 17);
         $xfer += $output->writeBool($this->enableEmailNotification);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->emailAddresses !== null) {
         if (!is_array($this->emailAddresses)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('emailAddresses', TType::LST, 18);
         $output->writeListBegin(TType::STRING, count($this->emailAddresses));
         foreach ($this->emailAddresses as $iter27) {
             $xfer += $output->writeString($iter27);
         }
         $output->writeListEnd();
         $xfer += $output->writeFieldEnd();
     }
     if ($this->storageResourceId !== null) {
         $xfer += $output->writeFieldBegin('storageResourceId', TType::STRING, 19);
         $xfer += $output->writeString($this->storageResourceId);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->userDn !== null) {
         $xfer += $output->writeFieldBegin('userDn', TType::STRING, 20);
         $xfer += $output->writeString($this->userDn);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->generateCert !== null) {
         $xfer += $output->writeFieldBegin('generateCert', TType::BOOL, 21);
         $xfer += $output->writeBool($this->generateCert);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->experimentDataDir !== null) {
         $xfer += $output->writeFieldBegin('experimentDataDir', TType::STRING, 22);
         $xfer += $output->writeString($this->experimentDataDir);
         $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
 }