/** * {@inheritdoc} */ public function writeTo(\Protobuf\WriteContext $context) { $stream = $context->getStream(); $writer = $context->getWriter(); $sizeContext = $context->getComputeSizeContext(); if ($this->gym_state !== null) { $writer->writeVarint($stream, 10); $writer->writeVarint($stream, $this->gym_state->serializedSize($sizeContext)); $this->gym_state->writeTo($context); } if ($this->name !== null) { $writer->writeVarint($stream, 18); $writer->writeString($stream, $this->name); } if ($this->urls !== null) { foreach ($this->urls as $val) { $writer->writeVarint($stream, 26); $writer->writeString($stream, $val); } } if ($this->result !== null) { $writer->writeVarint($stream, 32); $writer->writeVarint($stream, $this->result->value()); } if ($this->description !== null) { $writer->writeVarint($stream, 42); $writer->writeString($stream, $this->description); } 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->result !== null) { $writer->writeVarint($stream, 8); $writer->writeVarint($stream, $this->result->value()); } if ($this->fort_details !== null) { $writer->writeVarint($stream, 18); $writer->writeVarint($stream, $this->fort_details->serializedSize($sizeContext)); $this->fort_details->writeTo($context); } if ($this->pokemon_data !== null) { $writer->writeVarint($stream, 26); $writer->writeVarint($stream, $this->pokemon_data->serializedSize($sizeContext)); $this->pokemon_data->writeTo($context); } if ($this->gym_state !== null) { $writer->writeVarint($stream, 34); $writer->writeVarint($stream, $this->gym_state->serializedSize($sizeContext)); $this->gym_state->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->gym_state !== null) { $writer->writeVarint($stream, 10); $writer->writeVarint($stream, $this->gym_state->serializedSize($sizeContext)); $this->gym_state->writeTo($context); } if ($this->attackers !== null) { foreach ($this->attackers as $val) { $writer->writeVarint($stream, 18); $writer->writeVarint($stream, $val->serializedSize($sizeContext)); $val->writeTo($context); } } if ($this->player_experience_awarded !== null) { foreach ($this->player_experience_awarded as $val) { $writer->writeVarint($stream, 24); $writer->writeVarint($stream, $val); } } if ($this->next_defender_pokemon_id !== null) { $writer->writeVarint($stream, 32); $writer->writeVarint($stream, $this->next_defender_pokemon_id); } if ($this->gym_points_delta !== null) { $writer->writeVarint($stream, 40); $writer->writeVarint($stream, $this->gym_points_delta); } if ($this->extensions !== null) { $this->extensions->writeTo($context); } return $stream; }