/** * {@inheritdoc} */ public function writeTo(\Protobuf\WriteContext $context) { $stream = $context->getStream(); $writer = $context->getWriter(); $sizeContext = $context->getComputeSizeContext(); if ($this->result !== null) { $writer->writeVarint($stream, 8); $writer->writeVarint($stream, $this->result->value()); } if ($this->applied_items !== null) { $writer->writeVarint($stream, 18); $writer->writeVarint($stream, $this->applied_items->serializedSize($sizeContext)); $this->applied_items->writeTo($context); } if ($this->extensions !== null) { $this->extensions->writeTo($context); } return $stream; }
/** * {@inheritdoc} */ public function writeTo(\Protobuf\WriteContext $context) { $stream = $context->getStream(); $writer = $context->getWriter(); $sizeContext = $context->getComputeSizeContext(); if ($this->pokemon_data !== null) { $writer->writeVarint($stream, 10); $writer->writeVarint($stream, $this->pokemon_data->serializedSize($sizeContext)); $this->pokemon_data->writeTo($context); } if ($this->item !== null) { $writer->writeVarint($stream, 18); $writer->writeVarint($stream, $this->item->serializedSize($sizeContext)); $this->item->writeTo($context); } if ($this->pokedex_entry !== null) { $writer->writeVarint($stream, 26); $writer->writeVarint($stream, $this->pokedex_entry->serializedSize($sizeContext)); $this->pokedex_entry->writeTo($context); } if ($this->player_stats !== null) { $writer->writeVarint($stream, 34); $writer->writeVarint($stream, $this->player_stats->serializedSize($sizeContext)); $this->player_stats->writeTo($context); } if ($this->player_currency !== null) { $writer->writeVarint($stream, 42); $writer->writeVarint($stream, $this->player_currency->serializedSize($sizeContext)); $this->player_currency->writeTo($context); } if ($this->player_camera !== null) { $writer->writeVarint($stream, 50); $writer->writeVarint($stream, $this->player_camera->serializedSize($sizeContext)); $this->player_camera->writeTo($context); } if ($this->inventory_upgrades !== null) { $writer->writeVarint($stream, 58); $writer->writeVarint($stream, $this->inventory_upgrades->serializedSize($sizeContext)); $this->inventory_upgrades->writeTo($context); } if ($this->applied_items !== null) { $writer->writeVarint($stream, 66); $writer->writeVarint($stream, $this->applied_items->serializedSize($sizeContext)); $this->applied_items->writeTo($context); } if ($this->egg_incubators !== null) { $writer->writeVarint($stream, 74); $writer->writeVarint($stream, $this->egg_incubators->serializedSize($sizeContext)); $this->egg_incubators->writeTo($context); } if ($this->candy !== null) { $writer->writeVarint($stream, 82); $writer->writeVarint($stream, $this->candy->serializedSize($sizeContext)); $this->candy->writeTo($context); } if ($this->quest !== null) { $writer->writeVarint($stream, 90); $writer->writeVarint($stream, $this->quest->serializedSize($sizeContext)); $this->quest->writeTo($context); } if ($this->extensions !== null) { $this->extensions->writeTo($context); } return $stream; }