Exemple #1
0
 public function write($output)
 {
     $xfer = 0;
     $xfer += $output->writeStructBegin('NetMobileNumberResult');
     if ($this->result !== null) {
         if (!is_object($this->result)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('result', TType::STRUCT, 1);
         $xfer += $this->result->write($output);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->url !== null) {
         $xfer += $output->writeFieldBegin('url', TType::STRING, 2);
         $xfer += $output->writeString($this->url);
         $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
 }
 public function write($output)
 {
     $xfer = 0;
     $xfer += $output->writeStructBegin('CloudHardDiskService_reverseVAC_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();
     }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
 }
Exemple #3
0
 public function write($output)
 {
     $xfer = 0;
     $xfer += $output->writeStructBegin('usageResult');
     if ($this->result !== null) {
         if (!is_object($this->result)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('result', TType::STRUCT, 1);
         $xfer += $this->result->write($output);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->capacity !== null) {
         $xfer += $output->writeFieldBegin('capacity', TType::I32, 2);
         $xfer += $output->writeI32($this->capacity);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->usage !== null) {
         $xfer += $output->writeFieldBegin('usage', TType::I32, 3);
         $xfer += $output->writeI32($this->usage);
         $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
 }