Пример #1
0
 public function write($output) {
   $xfer = 0;
   $xfer += $output->writeStructBegin('TaskModel');
   if ($this->taskId !== null) {
     $xfer += $output->writeFieldBegin('taskId', TType::STRING, 1);
     $xfer += $output->writeString($this->taskId);
     $xfer += $output->writeFieldEnd();
   }
   if ($this->taskType !== null) {
     $xfer += $output->writeFieldBegin('taskType', TType::I32, 2);
     $xfer += $output->writeI32($this->taskType);
     $xfer += $output->writeFieldEnd();
   }
   if ($this->parentProcessId !== null) {
     $xfer += $output->writeFieldBegin('parentProcessId', TType::STRING, 3);
     $xfer += $output->writeString($this->parentProcessId);
     $xfer += $output->writeFieldEnd();
   }
   if ($this->creationTime !== null) {
     $xfer += $output->writeFieldBegin('creationTime', TType::I64, 4);
     $xfer += $output->writeI64($this->creationTime);
     $xfer += $output->writeFieldEnd();
   }
   if ($this->lastUpdateTime !== null) {
     $xfer += $output->writeFieldBegin('lastUpdateTime', TType::I64, 5);
     $xfer += $output->writeI64($this->lastUpdateTime);
     $xfer += $output->writeFieldEnd();
   }
   if ($this->taskStatus !== null) {
     if (!is_object($this->taskStatus)) {
       throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
     }
     $xfer += $output->writeFieldBegin('taskStatus', TType::STRUCT, 6);
     $xfer += $this->taskStatus->write($output);
     $xfer += $output->writeFieldEnd();
   }
   if ($this->taskDetail !== null) {
     $xfer += $output->writeFieldBegin('taskDetail', TType::STRING, 7);
     $xfer += $output->writeString($this->taskDetail);
     $xfer += $output->writeFieldEnd();
   }
   if ($this->subTaskModel !== null) {
     $xfer += $output->writeFieldBegin('subTaskModel', TType::STRING, 8);
     $xfer += $output->writeString($this->subTaskModel);
     $xfer += $output->writeFieldEnd();
   }
   if ($this->taskError !== null) {
     if (!is_object($this->taskError)) {
       throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
     }
     $xfer += $output->writeFieldBegin('taskError', TType::STRUCT, 9);
     $xfer += $this->taskError->write($output);
     $xfer += $output->writeFieldEnd();
   }
   $xfer += $output->writeFieldStop();
   $xfer += $output->writeStructEnd();
   return $xfer;
 }
Пример #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;
 }