/**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->fort_id = $reader->readString($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->team_color = \POGOProtos\Enums\TeamColor::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Data\PokemonData();
             $this->pokemon_data = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->name = $reader->readString($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             if ($this->image_urls === null) {
                 $this->image_urls = new \Protobuf\ScalarCollection();
             }
             $this->image_urls->add($reader->readString($stream));
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->fp = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->stamina = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 8) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->max_stamina = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 9) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->type = \POGOProtos\Map\Fort\FortType::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 10) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->latitude = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 11) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->longitude = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 12) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->description = $reader->readString($stream);
             continue;
         }
         if ($tag === 13) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Map\Fort\FortModifier();
             if ($this->modifiers === null) {
                 $this->modifiers = new \Protobuf\MessageCollection();
             }
             $this->modifiers->add($innerMessage);
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->result = \POGOProtos\Networking\Responses\IncenseEncounterResponse\Result::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Data\PokemonData();
             $this->pokemon_data = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Data\Capture\CaptureProbability();
             $this->capture_probability = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 6);
             $this->encounter_id = $reader->readFixed64($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 3);
             $this->last_modified_timestamp_ms = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->latitude = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->longitude = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->spawn_point_id = $reader->readString($stream);
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Data\PokemonData();
             $this->pokemon_data = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 11) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->time_till_hidden_ms = $reader->readVarint($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Data\PokemonData();
             $this->pokemon_data = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Inventory\Item\ItemData();
             $this->item = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Data\PokedexEntry();
             $this->pokedex_entry = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Data\Player\PlayerStats();
             $this->player_stats = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Data\Player\PlayerCurrency();
             $this->player_currency = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Data\Player\PlayerCamera();
             $this->player_camera = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Inventory\InventoryUpgrades();
             $this->inventory_upgrades = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 8) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Inventory\AppliedItems();
             $this->applied_items = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 9) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Inventory\EggIncubators();
             $this->egg_incubators = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 10) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Inventory\Candy();
             $this->candy = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 11) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Data\Quests\Quest();
             $this->quest = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }