Esempio n. 1
0
 public function write($output)
 {
     $xfer = 0;
     $xfer += $output->writeStructBegin('EmailNewApplication');
     if ($this->creator !== null) {
         if (!is_object($this->creator)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('creator', TType::STRUCT, 1);
         $xfer += $this->creator->write($output);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->app !== null) {
         if (!is_object($this->app)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('app', TType::STRUCT, 2);
         $xfer += $this->app->write($output);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->appToken !== null) {
         if (!is_object($this->appToken)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('appToken', TType::STRUCT, 3);
         $xfer += $this->appToken->write($output);
         $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
 }
Esempio n. 2
0
 public function write($output)
 {
     $xfer = 0;
     $xfer += $output->writeStructBegin('SendMessageRequest');
     if ($this->applicationToken !== null) {
         if (!is_object($this->applicationToken)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('applicationToken', TType::STRUCT, 1);
         $xfer += $this->applicationToken->write($output);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->body !== null) {
         $xfer += $output->writeFieldBegin('body', TType::STRING, 2);
         $xfer += $output->writeString($this->body);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->urgency !== null) {
         $xfer += $output->writeFieldBegin('urgency', TType::I32, 3);
         $xfer += $output->writeI32($this->urgency);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->timeOfMessage !== null) {
         $xfer += $output->writeFieldBegin('timeOfMessage', TType::I64, 4);
         $xfer += $output->writeI64($this->timeOfMessage);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->title !== null) {
         $xfer += $output->writeFieldBegin('title', TType::STRING, 5);
         $xfer += $output->writeString($this->title);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->hostname !== null) {
         $xfer += $output->writeFieldBegin('hostname', TType::STRING, 6);
         $xfer += $output->writeString($this->hostname);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->macAddress !== null) {
         $xfer += $output->writeFieldBegin('macAddress', TType::STRING, 7);
         $xfer += $output->writeString($this->macAddress);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->ipv4Address !== null) {
         $xfer += $output->writeFieldBegin('ipv4Address', TType::STRING, 8);
         $xfer += $output->writeString($this->ipv4Address);
         $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
 }
Esempio n. 3
0
 public function write($output)
 {
     $xfer = 0;
     $xfer += $output->writeStructBegin('HealthPokeRequest');
     if ($this->applicationId !== null) {
         $xfer += $output->writeFieldBegin('applicationId', TType::STRING, 1);
         $xfer += $output->writeString($this->applicationId);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->serviceToken !== null) {
         if (!is_object($this->serviceToken)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('serviceToken', TType::STRUCT, 2);
         $xfer += $this->serviceToken->write($output);
         $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
 }
Esempio n. 4
0
 public function write($output)
 {
     $xfer = 0;
     $xfer += $output->writeStructBegin('RenewApplicationTokenResponse');
     if ($this->serviceToken !== null) {
         if (!is_object($this->serviceToken)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('serviceToken', TType::STRUCT, 1);
         $xfer += $this->serviceToken->write($output);
         $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
 }
Esempio n. 5
0
 public function write($output)
 {
     $xfer = 0;
     $xfer += $output->writeStructBegin('ApplicationTokenRegenerated');
     if ($this->applicationToken !== null) {
         if (!is_object($this->applicationToken)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('applicationToken', TType::STRUCT, 1);
         $xfer += $this->applicationToken->write($output);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->actor !== null) {
         if (!is_object($this->actor)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('actor', TType::STRUCT, 2);
         $xfer += $this->actor->write($output);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->message !== null) {
         $xfer += $output->writeFieldBegin('message', TType::STRING, 3);
         $xfer += $output->writeString($this->message);
         $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
 }