예제 #1
0
파일: Types.php 프로젝트: minudika/airavata
 public function write($output)
 {
     $xfer = 0;
     $xfer += $output->writeStructBegin('SSHJobSubmission');
     if ($this->jobSubmissionInterfaceId !== null) {
         $xfer += $output->writeFieldBegin('jobSubmissionInterfaceId', TType::STRING, 1);
         $xfer += $output->writeString($this->jobSubmissionInterfaceId);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->securityProtocol !== null) {
         $xfer += $output->writeFieldBegin('securityProtocol', TType::I32, 2);
         $xfer += $output->writeI32($this->securityProtocol);
         $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, 3);
         $xfer += $this->resourceJobManager->write($output);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->alternativeSSHHostName !== null) {
         $xfer += $output->writeFieldBegin('alternativeSSHHostName', TType::STRING, 4);
         $xfer += $output->writeString($this->alternativeSSHHostName);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->sshPort !== null) {
         $xfer += $output->writeFieldBegin('sshPort', TType::I32, 5);
         $xfer += $output->writeI32($this->sshPort);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->monitorMode !== null) {
         $xfer += $output->writeFieldBegin('monitorMode', TType::I32, 6);
         $xfer += $output->writeI32($this->monitorMode);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->batchQueueEmailSenders !== null) {
         if (!is_array($this->batchQueueEmailSenders)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('batchQueueEmailSenders', TType::LST, 7);
         $output->writeListBegin(TType::STRING, count($this->batchQueueEmailSenders));
         foreach ($this->batchQueueEmailSenders as $iter15) {
             $xfer += $output->writeString($iter15);
         }
         $output->writeListEnd();
         $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
 }